Chore: Remove Revive standalone linter - use it via golangci-lint (#33150)
* Remove Revive standalone linter - use it via golangci-lint * Add revive settings to ignore lint errors for now * Small fix * Update to grabpl v0.5.53 * Remove errorCode and warningCode from config
This commit is contained in:
@@ -11,6 +11,11 @@ min-occurrences = 5
|
||||
[linters-settings.exhaustive]
|
||||
default-signifies-exhaustive = true
|
||||
|
||||
[linters-settings.revive]
|
||||
ignore-generated-header = false
|
||||
severity = "warning"
|
||||
confidence = 3
|
||||
|
||||
[linters-settings.gocritic]
|
||||
enabled-checks = ["ruleguard"]
|
||||
[linters-settings.gocritic.settings.ruleguard]
|
||||
@@ -52,6 +57,7 @@ enable = [
|
||||
"asciicheck",
|
||||
"errorlint",
|
||||
"sqlclosecheck",
|
||||
"revive",
|
||||
]
|
||||
|
||||
# Disabled linters (might want them later)
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
ignoreGeneratedHeader = false
|
||||
severity = "error"
|
||||
confidence = 0.8
|
||||
errorCode = 1
|
||||
warningCode = 1
|
||||
|
||||
[rule.context-as-argument]
|
||||
[rule.error-return]
|
||||
[rule.package-comments]
|
||||
[rule.range]
|
||||
[rule.superfluous-else]
|
||||
[rule.modifies-parameter]
|
||||
[rule.indent-error-flow]
|
||||
[rule.error-strings]
|
||||
[rule.error-naming]
|
||||
[rule.exported]
|
||||
[rule.unexported-return]
|
||||
[rule.dot-imports]
|
||||
[rule.receiver-naming]
|
||||
[rule.blank-imports]
|
||||
[rule.var-naming]
|
||||
|
||||
# This can be checked by other tools like megacheck
|
||||
[rule.unreachable-code]
|
||||
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
ignoreGeneratedHeader = false
|
||||
severity = "error"
|
||||
confidence = 0.8
|
||||
errorCode = 1
|
||||
|
||||
[rule.context-as-argument]
|
||||
[rule.error-return]
|
||||
[rule.package-comments]
|
||||
[rule.range]
|
||||
[rule.superfluous-else]
|
||||
[rule.modifies-parameter]
|
||||
[rule.indent-error-flow]
|
||||
[rule.error-strings]
|
||||
[rule.error-naming]
|
||||
|
||||
# This can be checked by other tools like megacheck
|
||||
[rule.unreachable-code]
|
||||
|
||||
# Those are probably should be enabled at some point
|
||||
# [rule.unexported-return]
|
||||
# [rule.exported]
|
||||
# [rule.var-naming]
|
||||
# [rule.dot-imports]
|
||||
# [rule.receiver-naming]
|
||||
# [rule.blank-imports]
|
||||
@@ -5,7 +5,6 @@ go 1.14
|
||||
require (
|
||||
github.com/golangci/golangci-lint v1.37.1
|
||||
github.com/mattn/go-runewidth v0.0.9 // indirect
|
||||
github.com/mgechev/revive v1.0.3
|
||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||
github.com/unknwon/bra v0.0.0-20200517080246-1e3013ecaff8
|
||||
github.com/unknwon/log v0.0.0-20200308114134-929b1006e34a // indirect
|
||||
|
||||
@@ -4,6 +4,5 @@ package main
|
||||
|
||||
import (
|
||||
_ "github.com/golangci/golangci-lint/cmd/golangci-lint"
|
||||
_ "github.com/mgechev/revive"
|
||||
_ "github.com/unknwon/bra"
|
||||
)
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
grabpl_version = '0.5.48'
|
||||
grabpl_version = '0.5.53'
|
||||
build_image = 'grafana/build-container:1.4.1'
|
||||
publish_image = 'grafana/grafana-ci-deploy:1.3.1'
|
||||
grafana_docker_image = 'grafana/drone-grafana-docker:0.3.2'
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
SCRIPT=${1:-revive}
|
||||
|
||||
$SCRIPT \
|
||||
-formatter stylish \
|
||||
-config scripts/go/configs/revive-strict.toml \
|
||||
-exclude ./pkg/plugins/backendplugin/pluginextensionv2/... \
|
||||
./pkg/services/alerting/... \
|
||||
./pkg/services/provisioning/datasources/... \
|
||||
./pkg/services/provisioning/dashboards/... \
|
||||
./pkg/services/provisioning/notifiers/... \
|
||||
./pkg/services/provisioning/values/... \
|
||||
./pkg/plugins/backendplugin/...
|
||||
Reference in New Issue
Block a user