Skip to content

Commit c02181c

Browse files
committed
Bump golangci-lint to v1.59
... and fix issues reported by the new version. Signed-off-by: James Alseth <[email protected]>
1 parent 44c2c7d commit c02181c

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed

.github/workflows/pull_request.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: lint go
1818
uses: golangci/golangci-lint-action@v6
1919
with:
20-
version: v1.52
20+
version: v1.59
2121
args: --timeout=5m --color=always --max-same-issues=0 --max-issues-per-linter=0
2222

2323
acceptance:

.golangci.yaml

-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ linter-settings:
66
linters:
77
disable-all: true
88
enable:
9-
- deadcode
109
- errcheck
1110
- goconst
1211
- gofmt
@@ -20,10 +19,8 @@ linters:
2019
- predeclared
2120
- revive
2221
- staticcheck
23-
- structcheck
2422
- typecheck
2523
- unconvert
2624
- unparam
2725
- unused
28-
- varcheck
2926
- wastedassign

internal/commands/convert.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func newConvertCommand() *cobra.Command {
2020
2121
konstraint convert examples`,
2222

23-
RunE: func(cmd *cobra.Command, args []string) error {
23+
RunE: func(_ *cobra.Command, args []string) error {
2424
path := "."
2525
if len(args) > 0 {
2626
path = args[0]

internal/rego/rego.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ func (r Rego) SkipConstraint() bool {
657657

658658
func parseDirectory(directory string, parseImports bool) ([]Rego, error) {
659659
// Recursively find all rego files (ignoring test files), starting at the given directory.
660-
result, err := loader.NewFileLoader().WithProcessAnnotation(true).Filtered([]string{directory}, func(abspath string, info os.FileInfo, depth int) bool {
660+
result, err := loader.NewFileLoader().WithProcessAnnotation(true).Filtered([]string{directory}, func(_ string, info os.FileInfo, _ int) bool {
661661
if strings.HasSuffix(info.Name(), "_test.rego") {
662662
return true
663663
}

0 commit comments

Comments
 (0)