Documentation ¶
Index ¶
Constants ¶
const DefaultConfigName = ".protolinter.yaml"
DefaultConfigName - default configuration file name.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // VerboseMode specifies whether to show verbose messages, such as when downloading dependencies. VerboseMode bool `mapstructure:"verbose_mode"` // OmitCoordinates specifies whether to omit source file coordinates from error messages. OmitCoordinates bool `mapstructure:"omit_coordinates"` // ExcludedChecks is a list of checks that should be excluded from analysis. ExcludedChecks []string `mapstructure:"excluded_checks"` // ExcludedDescriptors is a list of full protopaths that should be excluded from analysis. ExcludedDescriptors []string `mapstructure:"excluded_descriptors"` // contains filtered or unexported fields }
Config represents the configuration read from the file.
func LoadConfig ¶
LoadConfig loads the configuration from the specified file using Viper. If the filename is empty, it loads the default configuration file.
func (*Config) GetExcludedChecks ¶
GetExcludedChecks returns the list of excluded checks from the Config struct. If the Config is nil or ExcludedChecks is not set, it returns an empty slice.
func (*Config) GetExcludedDescriptors ¶
GetExcludedDescriptors returns the list of excluded descriptors from the Config struct. If the Config is nil or ExcludedDescriptors is not set, it returns an empty slice.
func (*Config) GetOmitCoordinates ¶
GetOmitCoordinates returns the value of OmitCoordinates from the Config struct. If the Config is nil or OmitCoordinates is not set, it returns false.
func (*Config) GetVerboseMode ¶
GetVerboseMode returns the value of VerboseMode from the Config struct. If the Config is nil or VerboseMode is not set, it returns false.
func (*Config) IsCheckExcluded ¶
IsCheckExcluded checks if a specific check is excluded based on the configuration.