Skip to content

Commit

Permalink
update the Golang CI linter configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
tommartensen committed Dec 18, 2024
1 parent 7e4eeff commit 83d7212
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
15 changes: 6 additions & 9 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ run:
timeout: 16m

output:
format: "junit-xml:report.xml,colored-line-number"
formats:
- format: junit-xml
- format: colored-line-number

issues:
exclude-use-default: false
Expand Down Expand Up @@ -35,8 +37,6 @@ linters-settings:
gosec:
includes:
- G601
revive:
min-confidence: 0
govet:
enable-all: true
disable:
Expand All @@ -56,16 +56,13 @@ linters-settings:
- Warnf
- Error
- Errorf
gocritic:
enabled-checks:
- commentFormatting
nolintlint:
allow-leading-space: false # require machine-readable nolint directives (i.e. with no leading space)
allow-unused: false # report any unused nolint directives
require-explanation: false # don't require an explanation for nolint directives
require-specific: true # require nolint directives to be specific about which linter is being skipped
revive:
confidence: 0
staticcheck:
go: "1.20"
checks: [all, -ST1000, -ST1001, -ST1003, -ST1005, -SA1019, -SA4001, -ST1016]
wrapcheck:
ignoreSigRegexps:
Expand All @@ -81,6 +78,7 @@ linters:
enable:
- asciicheck
# - bodyclose
- copyloopvar
# - deadcode
# - depguard
# - dogsled
Expand All @@ -92,7 +90,6 @@ linters:
# - gochecknoinits
# - gocognit
# - goconst
- exportloopref
- gocritic
# - gocyclo
# - godot
Expand Down
2 changes: 0 additions & 2 deletions service/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,6 @@ func (s *clusterImpl) List(ctx context.Context, request *v1.ClusterListRequest)
// Loop over all of the workflows, and keep only the ones that match our
// request criteria.
for _, workflow := range workflowList.Items {
workflow := workflow

// This cluster is expired, and we did not request to include expired
// clusters.
if !request.Expired && isWorkflowExpired(workflow) {
Expand Down

0 comments on commit 83d7212

Please sign in to comment.