Skip to content

Set up golangci-lint locally for comprehensive linting #2

@mheadd

Description

@mheadd

Summary

While our CI uses golangci-lint in GitHub Actions, developers should have it installed locally to catch issues before pushing. This provides faster feedback and catches more issues than the basic go vet checks.

Tasks:

  • Document installation instructions in README:
    • macOS: brew install golangci-lint
    • Linux: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin
    • Windows: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
  • Update developer setup documentation
  • Add VS Code settings recommendations for auto-linting
  • Consider adding pre-commit hooks with golangci-lint

Current Status:

  • .golangci.yml configuration file already exists
  • CI workflow uses golangci-lint successfully
  • make lint falls back to basic checks if golangci-lint not installed

Benefits:

  • Catches 15+ types of common Go issues
  • Finds unused code, inefficient constructs, style violations
  • Provides consistent code quality across the team

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions