linting

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllRulesGroupID = RuleAddr{
	Name: "all",
}

AllRulesGroupID represents the inclusion of all rule and group linting IDs.

Functions

This section is empty.

Types

type RuleAddr

type RuleAddr struct {
	Namespace string
	Name      string
}

RuleAddr represents the identifier for an individual lint rule or for a group of lint rules.

func MustParseRuleAddr

func MustParseRuleAddr(raw string) RuleAddr

MustParseRuleAddr is the same as ParseRuleAddr but it panics if a validation error occurs. This function is recommended to be used in tests and at init time.

func ParseRuleAddr

func ParseRuleAddr(raw string) (RuleAddr, error)

ParseRuleAddr parses a string into a RuleAddr struct. This is used to validate the given identifier and if all the validation passes, it will return the parsed RuleAddr. The validations applied against the given rule id are explained in details on [addrMatchingReg], but in short, here are some valid formats:

  • core:depends_on
  • 0namespace:lint_rule_id
  • namespace/full/path:0lines

func (RuleAddr) String

func (ra RuleAddr) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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