diff --git a/.github/revive.toml b/.github/revive.toml new file mode 100644 index 0000000..3af7233 --- /dev/null +++ b/.github/revive.toml @@ -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] \ No newline at end of file diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 86e08de..1501498 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -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/..."