-
Notifications
You must be signed in to change notification settings - Fork 869
Description
Code linters can be strict, but they do help in maintaining code quality.
I just ran golangci-lint with some basic linters enabled. There were some linter reporting that were a bit too strict, but some of them were actual issues that should be fixed, and good optimizations - like unparam, ineffassign, gosimple, goconst, usestdlibvars some suggestions from gocritic, revive, staticcheck
We could incrementally enable linting. Start with only one linter, and incrementally enable them and fix code issues.
Sample linter config I used - https://github.com/lazysegtree/go-git/blob/golangci_lint/.golangci.yaml
Linter reported issues - https://github.com/lazysegtree/go-git/blob/golangci_lint/sample_linter_errors.txt