Skip to content

Commit

Permalink
enable linter: revive (deep-exit) (#3077)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmetc authored Jun 11, 2024
1 parent c39c9cf commit 1d08edc
Showing 1 changed file with 52 additions and 2 deletions.
54 changes: 52 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@ linters-settings:
- name: cyclomatic
# lower this after refactoring
arguments: [45]
- name: deep-exit
disabled: true
- name: defer
disabled: true
- name: empty-block
Expand Down Expand Up @@ -495,3 +493,55 @@ issues:
- linters:
- canonicalheader
path: pkg/apiserver/middlewares/v1/tls_auth.go

# tolerate deep exit in tests, for now
- linters:
- revive
path: "pkg/(.+)_test.go"
text: "deep-exit: .*"

# tolerate deep exit in cobra's OnInitialize, for now
- linters:
- revive
path: "cmd/crowdsec-cli/main.go"
text: "deep-exit: .*"

- linters:
- revive
path: "cmd/crowdsec-cli/item_metrics.go"
text: "deep-exit: .*"

- linters:
- revive
path: "cmd/crowdsec-cli/machines.go"
text: "deep-exit: .*"

- linters:
- revive
path: "cmd/crowdsec-cli/utils.go"
text: "deep-exit: .*"

- linters:
- revive
path: "cmd/crowdsec-cli/hubtest.go"
text: "deep-exit: .*"

- linters:
- revive
path: "pkg/leakybucket/overflows.go"
text: "deep-exit: .*"

- linters:
- revive
path: "cmd/crowdsec/crowdsec.go"
text: "deep-exit: .*"

- linters:
- revive
path: "cmd/crowdsec/api.go"
text: "deep-exit: .*"

- linters:
- revive
path: "cmd/crowdsec/win_service.go"
text: "deep-exit: .*"

0 comments on commit 1d08edc

Please sign in to comment.