-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: more stringent golangci-lint rules
Applies more stringent `golangci-lint` rules to the repository, borrowed from https://github.com/nix-community/go-nix. Also fixes a bug where we were not returning errors when calling `walk.Reader.Read()` in `cmd/format` Signed-off-by: Brian McGee <[email protected]> Co-authored-by: Jeremy Fleischman <[email protected]> Signed-off-by: Brian McGee <[email protected]>
- Loading branch information
1 parent
7b6fc1b
commit fc88f98
Showing
25 changed files
with
285 additions
and
191 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,39 @@ | ||
# taken from https://github.com/nix-community/go-nix/blob/main/.golangci.yml | ||
linters: | ||
enable: | ||
- errname | ||
- exhaustive | ||
- gci | ||
- gochecknoglobals | ||
- gochecknoinits | ||
- goconst | ||
- godot | ||
- gofumpt | ||
- goheader | ||
- goimports | ||
- gosec | ||
- importas | ||
- ireturn | ||
- lll | ||
- makezero | ||
- misspell | ||
- nakedret | ||
- nestif | ||
- nilerr | ||
- nilnil | ||
- nlreturn | ||
- noctx | ||
- nolintlint | ||
- prealloc | ||
- predeclared | ||
- revive | ||
- rowserrcheck | ||
- stylecheck | ||
- tagliatelle | ||
- tenv | ||
- testpackage | ||
- unconvert | ||
- unparam | ||
- wastedassign | ||
- whitespace | ||
- wsl |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package build | ||
|
||
var ( | ||
Name = "treefmt" | ||
Version = "v0.0.1+dev" | ||
Name = "treefmt" //nolint:gochecknoglobals | ||
Version = "v0.0.1+dev" //nolint:gochecknoglobals | ||
) |
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.