Skip to content

Commit

Permalink
exclude rather than include revive rules
Browse files Browse the repository at this point in the history
  • Loading branch information
cce committed Jun 14, 2023
1 parent 4896d8d commit a167659
Showing 1 changed file with 9 additions and 55 deletions.
64 changes: 9 additions & 55 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,60 +70,6 @@ linters-settings:
- (github.com/algorand/go-algorand/cmd/goal/main).reportWarnRawln
- (github.com/algorand/go-algorand/cmd/goal/main).reportErrorf
- (github.com/algorand/go-algorand/cmd/goal/main).reportErrorln
revive:
# When set to false, ignores files with "GENERATED" header, similar to golint.
# See https://github.com/mgechev/revive#available-rules for details.
# Default: false
ignore-generated-header: false

# Sets the default severity.
# See https://github.com/mgechev/revive#configuration
# Default: warning
severity: warning

# Enable all available rules.
# Default: false
enable-all-rules: false

# Sets the default failure confidence.
# This means that linting errors with less than 0.8 confidence will be ignored.
# Default: 0.8
confidence: 0.8

# In order to disable any default rules, you have to list out all rules you would like enabled.
# We explicitly disable (vs omitting) rules to make it clear how we are diverging.
rules:
- name: blank-imports
- name: context-as-argument
- name: context-keys-type
- name: dot-imports
- name: error-return
- name: error-strings
- name: error-naming
- name: exported
- name: if-return
- name: increment-decrement
- name: var-naming
- name: var-declaration
disabled: true
- name: package-comments
disabled: true
- name: range
- name: receiver-naming
- name: time-naming
- name: unexported-return
disabled: true
- name: indent-error-flow
- name: errorf
- name: empty-block
disabled: true
- name: superfluous-else
disabled: true
- name: unused-parameter
disabled: true
- name: unreachable-code
- name: redefines-builtin-id
disabled: true

issues:
# Work our way back over time to be clean against all these
Expand Down Expand Up @@ -154,7 +100,15 @@ issues:
# "EXC0005 staticcheck: Developers tend to write in C-style with an explicit 'break' in a 'switch', so it's ok to ignore"
- ineffective break statement. Did you mean to break out of the outer loop
# revive: irrelevant error about naming
- "var-naming: don't use leading k in Go names"
- "^var-naming: don't use leading k in Go names"
# revive: ignore unused-paramter, package-comments, unexported-return, redefines-builtin-id, var-declaration, empty-block, superfluous-else
- "^unused-parameter: parameter"
- "^package-comments: should have a package comment"
- "^unexported-return: "
- "^redefines-builtin-id: redefinition of"
- "^var-declaration: should"
- "^empty-block: this block is empty, you can remove it"
- "^superfluous-else: if block ends with"

exclude-rules:
- path: _test\.go
Expand Down

0 comments on commit a167659

Please sign in to comment.