Skip to content

Suggestion to add golangci-lint to this project #1501

@lazysegtree

Description

@lazysegtree

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions