-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
288 additions
and
105 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,70 @@ | ||
output: | ||
# Make output more digestible with quickfix in vim/emacs/etc. | ||
sort-results: true | ||
print-issued-lines: false | ||
|
||
linters: | ||
# We'll track the golangci-lint default linters manually | ||
# instead of letting them change without our control. | ||
disable-all: true | ||
enable: | ||
# golangci-lint defaults: | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- staticcheck | ||
- unused | ||
|
||
# Our own extras: | ||
- gofumpt | ||
- nolintlint # lints nolint directives | ||
- revive | ||
- errorlint | ||
|
||
linters-settings: | ||
govet: | ||
# These govet checks are disabled by default, but they're useful. | ||
enable: | ||
- niliness | ||
- reflectvaluecompare | ||
- sortslice | ||
- unusedwrite | ||
|
||
issues: | ||
# Print all issues reported by all linters. | ||
max-issues-per-linter: 0 | ||
max-same-issues: 0 | ||
|
||
# Don't ignore some of the issues that golangci-lint considers okay. | ||
# This includes documenting all exported entities. | ||
exclude-use-default: false | ||
|
||
exclude-rules: | ||
# Don't warn on unused parameters. | ||
# Parameter names are useful; replacing them with '_' is undesirable. | ||
- linters: [revive] | ||
text: 'unused-parameter: parameter \S+ seems to be unused, consider removing or renaming it as _' | ||
|
||
# staticcheck already has smarter checks for empty blocks. | ||
# revive's empty-block linter has false positives. | ||
# For example, as of writing this, the following is not allowed. | ||
# for foo() { } | ||
- linters: [revive] | ||
text: 'empty-block: this block is empty, you can remove it' | ||
|
||
# It's okay if internal packages and examples in docs/ | ||
# don't have package comments. | ||
- linters: [revive] | ||
path: '.+/internal/.+|^internal/.+|^docs/.+' | ||
text: 'should have a package comment' | ||
|
||
# It's okay for tests to use dot imports. | ||
- linters: [revive] | ||
path: '_test\.go$' | ||
text: 'should not use dot imports' | ||
|
||
# Ignore logger.Sync() errcheck failures in example_test.go | ||
# since those are intended to be uncomplicated examples. | ||
- linters: [errcheck] | ||
path: example_test.go | ||
text: 'Error return value of `logger.Sync` is not checked' |
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 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
Oops, something went wrong.