forked from mongodb/mongo-go-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GODRIVER-1066 Use golangci-lint to replace and expand linters. (mongo…
- Loading branch information
1 parent
84e54a3
commit 22266fc
Showing
38 changed files
with
158 additions
and
296 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
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,64 @@ | ||
run: | ||
timeout: 5m | ||
|
||
linters: | ||
disable-all: true | ||
# TODO(GODRIVER-2156): Enable all commented-out linters. | ||
enable: | ||
# - deadcode | ||
- errcheck | ||
# - errorlint | ||
- goimports | ||
# - gosimple | ||
- govet | ||
- ineffassign | ||
# - misspell | ||
# - nakedret | ||
- revive | ||
- staticcheck | ||
# - structcheck | ||
- typecheck | ||
# - unused | ||
# - unconvert | ||
# - unparam | ||
# - varcheck | ||
|
||
linters-settings: | ||
errcheck: | ||
exclude: .errcheck-excludes | ||
govet: | ||
disable: | ||
- cgocall | ||
- composites | ||
staticcheck: | ||
checks: [ | ||
"all", | ||
"-SA1019", # Disable deprecation warnings for now. | ||
"-SA1012", # Disable "do not pass a nil Context" to allow testing nil contexts in tests. | ||
] | ||
|
||
issues: | ||
exclude: | ||
# Ignore capitalization warning for this weird field name. | ||
- "var-naming: struct field CqCssWxW should be CqCSSWxW" | ||
# Ignore warnings for common "wiremessage.Read..." usage because the safest way to use that API | ||
# is by assigning possibly unused returned byte buffers. | ||
- "SA4006: this value of `wm` is never used" | ||
- "SA4006: this value of `rem` is never used" | ||
- "ineffectual assignment to wm" | ||
- "ineffectual assignment to rem" | ||
skip-dirs-use-default: false | ||
skip-dirs: | ||
- (^|/)vendor($|/) | ||
- (^|/)testdata($|/) | ||
- (^|/)data($|/) | ||
- (^|/)etc($|/) | ||
exclude-rules: | ||
- path: examples/ | ||
linters: | ||
- revive | ||
- errcheck | ||
- path: x/mongo/driver/operation/ | ||
linters: | ||
- staticcheck # TODO: Re-enable once GODRIVER-2154 is done. | ||
- ineffassign # TODO: Re-enable once GODRIVER-2154 is done. |
This file was deleted.
Oops, something went wrong.
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
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.