diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index f815da76..d37a72b8 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -17,7 +17,7 @@ jobs: - name: lint go uses: golangci/golangci-lint-action@v6 with: - version: v1.52 + version: v1.59 args: --timeout=5m --color=always --max-same-issues=0 --max-issues-per-linter=0 acceptance: diff --git a/.golangci.yaml b/.golangci.yaml index b000df4a..acdb9d52 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -6,7 +6,6 @@ linter-settings: linters: disable-all: true enable: - - deadcode - errcheck - goconst - gofmt @@ -20,10 +19,8 @@ linters: - predeclared - revive - staticcheck - - structcheck - typecheck - unconvert - unparam - unused - - varcheck - wastedassign diff --git a/internal/commands/convert.go b/internal/commands/convert.go index f2fef069..a066a5e2 100644 --- a/internal/commands/convert.go +++ b/internal/commands/convert.go @@ -20,7 +20,7 @@ func newConvertCommand() *cobra.Command { konstraint convert examples`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(_ *cobra.Command, args []string) error { path := "." if len(args) > 0 { path = args[0] diff --git a/internal/rego/rego.go b/internal/rego/rego.go index 000999f8..98f72593 100644 --- a/internal/rego/rego.go +++ b/internal/rego/rego.go @@ -657,7 +657,7 @@ func (r Rego) SkipConstraint() bool { func parseDirectory(directory string, parseImports bool) ([]Rego, error) { // Recursively find all rego files (ignoring test files), starting at the given directory. - result, err := loader.NewFileLoader().WithProcessAnnotation(true).Filtered([]string{directory}, func(abspath string, info os.FileInfo, depth int) bool { + result, err := loader.NewFileLoader().WithProcessAnnotation(true).Filtered([]string{directory}, func(_ string, info os.FileInfo, _ int) bool { if strings.HasSuffix(info.Name(), "_test.rego") { return true }