-
-
Notifications
You must be signed in to change notification settings - Fork 523
Closed
Description
- To improve code quality and maintain consistency across the project, I'd like to propose adding
golangci-lintto the development workflow. - Relying solely on code reviews for style and bug detection, which is less efficient and more error-prone than automated linting.
- This tool helps catch common bugs, enforces style guidelines, and ensures adherence to Go best practices—all with minimal setup and configuration.
Why this matters:
- Identifies potential bugs early through static analysis
- Maintains consistent code style and formatting
- Reduces technical debt over time
- Speeds up code reviews with automated checks
Proposed steps
- Add a formatter section in the [.golangci.yml] linter file and format the entire codebase.
- This will rearrange imports and remove unnecessary whitespaces.
- Introduce only the staticcheck linter and lint the codebase to catch common bugs and issues.
- Add govet and gocritic linters, then lint the codebase again to catch more subtle issues.
- Ensure linting runs automatically on pull requests by integrating it into the CI/CD pipeline.
- Gradually add more useful linters as needed and lint the codebase accordingly.
I would like to take ownership of implementing this proposal. Please let me know if there are any specific requirements or preferences before I begin.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels