linting

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Linting package aggregates the linting machinery

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	RuleArgs map[Rule]RuleArgs
}

type Failure

type Failure struct {
	RuleName string
	Message  string
	Position int // line number in the changelog file
}

Failure is the linting error model

type Linter

type Linter struct{}

Linter provides changelog linting method

func (Linter) Lint

func (Linter) Lint(changes model.Changelog, config *Config, failures chan Failure)

Lint a changelog

type Rule

type Rule interface {
	Apply(model.Changelog, chan Failure, RuleArgs)
	Name() string
}

Rule general abstraction

type RuleArgs

type RuleArgs = any

Directories

Path Synopsis
Package rule holds all available linting rules
Package rule holds all available linting rules

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL