ruleconfiguration

package
v0.0.0-...-fe2acf1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package ruleconfiguration defines the configuration of each rule: - metadata - output template - under which conditions it's enabled - the level of a failure - which function implements it

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Type

type Type struct {
	ProjectType      projecttype.Type // The project type the rule applies to.
	SuperprojectType projecttype.Type // The superproject type requirement for the rule.
	// The following fields provide arbitrary text for the tool output associated with each rule:
	Category        string
	Subcategory     string
	ID              string // Unique rule identifier: <project type identifier (L|S|P|I)><category identifier><number>
	Brief           string // Short description of the rule.
	Description     string // Verbose description of the rule.
	MessageTemplate string // The warning/error message template displayed when the rule is violated. Will be filled by rule function output.
	Reference       string // URL to visit for more information about the rule subject.
	// The following fields define under which tool configuration modes the rule will run:
	DisableModes []rulemode.Type // Rule is disabled when tool is in any of these modes.
	EnableModes  []rulemode.Type // Rule is only enabled when tool is in one of these modes.
	// The following fields define the rule level in each configuration mode:
	InfoModes    []rulemode.Type   // Failure of the rule only results in an informational message.
	WarningModes []rulemode.Type   // Failure of the rule is considered a warning.
	ErrorModes   []rulemode.Type   // Failure of the rule is considered an error.
	RuleFunction rulefunction.Type // The function that implements the rule.
}

Type is the type for rule configurations.

func Configurations

func Configurations() []Type

Configurations returns the slice of rule configurations.

Jump to

Keyboard shortcuts

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