-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add customer linter config for ocr3 offchain
- Loading branch information
Showing
9 changed files
with
120 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"ccip": patch | ||
--- | ||
|
||
#updated golangci-lint with custom rules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
run: | ||
timeout: 60s | ||
linters: | ||
enable: | ||
- exhaustive | ||
- exportloopref | ||
- revive | ||
- goimports | ||
- gosec | ||
- misspell | ||
- rowserrcheck | ||
- errorlint | ||
- unconvert | ||
- sqlclosecheck | ||
- noctx | ||
- depguard | ||
linters-settings: | ||
exhaustive: | ||
default-signifies-exhaustive: true | ||
goimports: | ||
local-prefixes: "github.com/smartcontractkit/ccipocr3" | ||
gosec: | ||
excludes: | ||
errorlint: | ||
errorf: true # Disallow formatting of errors without %w | ||
revive: | ||
confidence: 0.8 | ||
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: if-return | ||
- name: increment-decrement | ||
- name: var-naming | ||
- name: var-declaration | ||
- name: package-comments | ||
- name: range | ||
- name: receiver-naming | ||
- name: time-naming | ||
- name: unexported-return | ||
- name: indent-error-flow | ||
- name: errorf | ||
- name: empty-block | ||
- name: superfluous-else | ||
# - name: unused-parameter | ||
- name: unreachable-code | ||
- name: redefines-builtin-id | ||
- name: waitgroup-by-value | ||
- name: unconditional-recursion | ||
- name: struct-tag | ||
- name: string-format | ||
- name: string-of-int | ||
- name: range-val-address | ||
- name: range-val-in-closure | ||
- name: modifies-value-receiver | ||
- name: modifies-parameter | ||
- name: identical-branches | ||
- name: get-return | ||
#- name: flag-parameter | ||
- name: early-return | ||
- name: defer | ||
- name: constant-logical-expr | ||
- name: confusing-naming | ||
- name: confusing-results | ||
- name: bool-literal-in-expr | ||
- name: atomic | ||
depguard: | ||
rules: | ||
main: | ||
list-mode: lax | ||
deny: | ||
- pkg: github.com/test-go/testify/assert | ||
desc: Use github.com/stretchr/testify/assert instead | ||
- pkg: github.com/test-go/testify/mock | ||
desc: Use github.com/stretchr/testify/mock instead | ||
- pkg: github.com/test-go/testify/require | ||
desc: Use github.com/stretchr/testify/require instead | ||
issues: | ||
exclude-rules: | ||
- path: test | ||
text: "^G404:" | ||
linters: | ||
- gosec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters