Setup golangci-lint for static analysis of backend
Is your feature request related to a problem? Please describe
Currently, we lack automated static analysis for Go code, which means code quality issues, bugs, and style inconsistencies are only caught during manual code review or not at all.
Describe the solution you'd like
Integrate golangci-lint into the repository with a curated set of linters (e.g., errcheck, staticcheck, gosec, govet), a .golangci.yml config file, and CI pipeline integration to run on every PR.
Describe alternatives you've considered
- Running individual linters manually (fragmented, inconsistent)
- Using go vet alone (limited coverage)
- Relying solely on code review for catching issues (doesn't scale)
I think adding golangci-lint is a good suggestion. Would you be interested in helping us implement it? We can tackle this step by step. For example, we could start by adding it without enforcing it, then fix existing issues, and finally integrate it into the CI pipeline once all current issues are resolved.
Sure, feel free to assign it to me
We've added some basic lint rules and modified the code that didn't meet requirements after running lint. If you have other recommended lint rules, please continue to submit them.