incubator-answer icon indicating copy to clipboard operation
incubator-answer copied to clipboard

Setup golangci-lint for static analysis of backend

Open ferhatelmas opened this issue 1 month ago • 3 comments

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)

ferhatelmas avatar Nov 25 '25 23:11 ferhatelmas

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.

LinkinStars avatar Nov 26 '25 08:11 LinkinStars

Sure, feel free to assign it to me

ferhatelmas avatar Nov 26 '25 12:11 ferhatelmas

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.

LinkinStars avatar Dec 01 '25 07:12 LinkinStars