summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mgechev/revive/lint/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/mgechev/revive/lint/config.go')
-rw-r--r--vendor/github.com/mgechev/revive/lint/config.go32
1 files changed, 32 insertions, 0 deletions
diff --git a/vendor/github.com/mgechev/revive/lint/config.go b/vendor/github.com/mgechev/revive/lint/config.go
new file mode 100644
index 0000000000..fe65ace522
--- /dev/null
+++ b/vendor/github.com/mgechev/revive/lint/config.go
@@ -0,0 +1,32 @@
+package lint
+
+// Arguments is type used for the arguments of a rule.
+type Arguments = []interface{}
+
+// RuleConfig is type used for the rule configuration.
+type RuleConfig struct {
+ Arguments Arguments
+ Severity Severity
+}
+
+// RulesConfig defines the config for all rules.
+type RulesConfig = map[string]RuleConfig
+
+// DirectiveConfig is type used for the linter directive configuration.
+type DirectiveConfig struct {
+ Severity Severity
+}
+
+// DirectivesConfig defines the config for all directives.
+type DirectivesConfig = map[string]DirectiveConfig
+
+// Config defines the config of the linter.
+type Config struct {
+ IgnoreGeneratedHeader bool `toml:"ignoreGeneratedHeader"`
+ Confidence float64
+ Severity Severity
+ Rules RulesConfig `toml:"rule"`
+ ErrorCode int `toml:"errorCode"`
+ WarningCode int `toml:"warningCode"`
+ Directives DirectivesConfig `toml:"directive"`
+}