Skip to content

Commit

Permalink
vet: disable revive empty-block check
Browse files Browse the repository at this point in the history
  • Loading branch information
purnesh42H committed Sep 4, 2024
1 parent 70f19ee commit a7bf0f6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
27 changes: 27 additions & 0 deletions scripts/revive.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Enabled rules
[rule.blank-imports]
[rule.context-as-argument]
[rule.context-keys-type]
[rule.dot-imports]
[rule.error-return]
[rule.error-strings]
[rule.error-naming]
[rule.exported]
[rule.increment-decrement]
[rule.var-naming]
[rule.var-declaration]
[rule.package-comments]
[rule.range]
[rule.receiver-naming]
[rule.time-naming]
[rule.unexported-return]
[rule.indent-error-flow]
[rule.errorf]
[rule.superfluous-else]
[rule.unused-parameter]
[rule.unreachable-code]
[rule.redefines-builtin-id]

# Disabled rules
[rule.empty-block]
Disabled = true
2 changes: 1 addition & 1 deletion scripts/vet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ done

# Collection of revive linter analysis checks
REV_OUT="$(mktemp)"
revive -set_exit_status=1 -exclude "reflection/test/grpc_testing_not_regenerate/" -formatter plain ./... >"${REV_OUT}" || true
revive -set_exit_status=1 -exclude "reflection/test/grpc_testing_not_regenerate/" -formatter plain -config "$(dirname "$0")/revive.toml" ./... >"${REV_OUT}" || true

# TODO: Remove `|| true` to unskip linter failures once existing issues are fixed.
(not grep -v "\.pb\.go:" "${REV_OUT}") || true
Expand Down

0 comments on commit a7bf0f6

Please sign in to comment.