misc: disable goconst linter, remove nolint in internal/compiler (#3585)

* golangci-lint: remove goconst linter

We've debated turning it to 10, or removing it alltogether; landed
at the fact that if the number of occurrences really is 10+, it'll
be noted in code review anyways.

* internal/compiler/wasm: more selectively disable deadcode/varcheck linter

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
This commit is contained in:
Stephan Renatus
2021-06-24 12:37:02 +02:00
committed by GitHub
parent 5fb5cc4ad4
commit 7b39b96633
2 changed files with 1 additions and 5 deletions
-2
View File
@@ -14,9 +14,7 @@ linters:
- errcheck
- govet
- ineffassign
# - golint # deprecated and no longer supported
- revive # replacement for golint
- goconst
- gofmt
- goimports
- unused
+1 -3
View File
@@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
// Package wasm contains an IR->WASM compiler backend.
// nolint: deadcode,varcheck // Package in development (2021).
package wasm
import (
@@ -32,6 +31,7 @@ const (
opaWasmABIMinorVersionVar = "opa_wasm_abi_minor_version"
)
// nolint: deadcode,varcheck
const (
opaTypeNull int32 = iota + 1
opaTypeBoolean
@@ -45,10 +45,8 @@ const (
)
const (
opaFuncPrefix = "opa_"
opaAbort = "opa_abort"
opaRuntimeError = "opa_runtime_error"
opaJSONParse = "opa_json_parse"
opaNull = "opa_null"
opaBoolean = "opa_boolean"
opaNumberInt = "opa_number_int"