Skip to content

Commit

Permalink
Update golangci-lint in pre-commit
Browse files Browse the repository at this point in the history
This required fixing some new issues:

    WARN [lintersdb] The name "gas" is deprecated. The linter has been renamed to: gosec.
    cmd/validate-opslevel-annotations/main.go:186:30: Error return value is not checked (errcheck)
                            objects = append(objects, object.(client.Object))
  • Loading branch information
matthewhughes-uw committed Jan 6, 2025
1 parent 8391720 commit 1797ea2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ linters:
- misspell # Finds commonly misspelled English words in comments [fast: true]
- nakedret # Finds naked returns in functions greater than a specified function length [fast: true]
- errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases [fast: false]
- gas # Inspects source code for security problems [fast: false]
- gosec # Inspects source code for security problems [fast: false]
- unconvert # Remove unnecessary type conversions [fast: false]
- unparam # Reports unused function parameters [fast: false]
- prealloc # Finds slice declarations that could potentially be preallocated [fast: true]
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/golangci/golangci-lint
rev: v1.61.0
rev: v1.63.4
hooks:
- id: golangci-lint-full
- id: golangci-lint-config-verify
Expand Down
2 changes: 1 addition & 1 deletion cmd/validate-opslevel-annotations/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func decodeManifest(rc io.ReadCloser) ([]client.Object, error) {
}

if isSupportedObject(object) {
objects = append(objects, object.(client.Object))
objects = append(objects, object.(client.Object)) //nolint:errcheck
}
}
}
Expand Down

0 comments on commit 1797ea2

Please sign in to comment.