Skip to content

Commit

Permalink
ci: use custom revive config file on CI check
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Sep 14, 2024
1 parent fef1611 commit 50ace87
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/revive.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
ignoreGeneratedHeader = false
# Sets the default severity to "warning"
#severity = "error"
severity = "warning"
confidence = 0.8
errorCode = 0
warningCode = 0

[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]
severity = "warning"
[rule.if-return]
[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.argument-limit]
arguments = [4]
[rule.function-result-limit]
arguments = [3]
[rule.empty-block]
[rule.confusing-naming]
[rule.superfluous-else]
[rule.unused-parameter]
[rule.unreachable-code]
[rule.unnecessary-stmt]
[rule.struct-tag]
[rule.atomic]
[rule.empty-lines]
[rule.duplicated-imports]
[rule.import-shadowing]
[rule.confusing-results]
[rule.modifies-parameter]
[rule.redefines-builtin-id]
1 change: 1 addition & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
uses: docker://morphy/revive-action:v2
if: ${{ matrix.os == 'ubuntu-latest' && matrix.go_version == '1.22' }}
with:
config: .github/revive.toml
# Exclude patterns, separated by semicolons (optional)
exclude: "./internal/..."

Expand Down

0 comments on commit 50ace87

Please sign in to comment.