Add golangci-lint static analysis and integrate into CI - #10
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a .golangci.yaml configuration file to enable several Go linters and simplifies a single-case switch statement to an if statement in vehicle_data_test.go. Feedback on the linter configuration notes that the custom revive rules block overrides the default ruleset entirely, disabling other default checks, and suggests removing the linters-settings block if the default ruleset is desired.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| linters-settings: | ||
| revive: | ||
| rules: | ||
| - name: exported | ||
| severity: warning |
There was a problem hiding this comment.
In revive, providing a custom rules list in the configuration completely overrides the default ruleset rather than extending it. By only listing the exported rule here, all other default stylistic and convention checks of revive (such as var-naming, error-strings, indent-error-flow, etc.) are disabled.
If your intention is to use the default revive ruleset (which already includes the exported rule as a warning), you can safely remove this entire linters-settings block.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #10 +/- ##
=======================================
Coverage 84.24% 84.24%
=======================================
Files 5 5
Lines 273 273
=======================================
Hits 230 230
Misses 26 26
Partials 17 17 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This Pull Request integrates
golangci-lintstatic analysis into the repository:revive), formatting, security audits (gosec), and code optimization warnings (gocritic).golangci-lintautomatically via GitHub Actions on every push/PR.gocriticreadability rule.All tests and linter checks run and pass cleanly locally.