Documentation
¶
Overview ¶
Package severity defines severity levels for lint rules.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterExternalSeverities ¶ added in v1.3.123
RegisterExternalSeverities adds severity entries from external analyzer packages. This allows packages like staticcheck to register their severity mappings without requiring manual entries in the rulesSeverity map.
Params:
- entries: map of rule codes to severity levels
Types ¶
type Level ¶
type Level int
Level represents the severity level of a rule
func GetSeverity ¶
GetSeverity returns the severity level of a rule.
Params:
- ruleCode: rule code (e.g., "KTN-VAR-CAMEL")
Returns:
- level: severity level
func (Level) ColorCode ¶
ColorCode returns the ANSI color code for a level.
Returns:
- code: ANSI color code
func (Level) String ¶
String returns the text representation of the level.
Returns:
- text: text representation
Click to show internal directories.
Click to hide internal directories.