mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-09 14:53:00 +03:00
[PR #389] [MERGED] Add basic static analysis for backend #841
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/pocket-id/pocket-id/pull/389
Author: @Rich7690
Created: 3/27/2025
Status: ✅ Merged
Merged: 3/27/2025
Merged by: @stonith404
Base:
main← Head:main📝 Commits (1)
2af4b12refactor(backend): add golangcilint📊 Changes
8 files changed (+67 additions, -9 deletions)
View changed files
➕
.github/workflows/backend-linter.yml(+36 -0)➕
backend/.golangci.yml(+21 -0)📝
backend/internal/bootstrap/db_bootstrap.go(+3 -3)📝
backend/internal/service/geolite_service.go(+1 -1)📝
backend/internal/service/ldap_service.go(+2 -2)📝
backend/internal/service/oidc_service.go(+1 -0)📝
backend/internal/service/user_service.go(+1 -1)📝
backend/internal/utils/email/composer.go(+2 -2)📄 Description
Hey there,
This PR is probably a bit random and unexpected, but as a big fan of the project I saw an opportunity and thought taking a few minutes to contribute would be helpful. I'm not sure if the maintainers are familiar with golangci-lint or not so forgive me if I'm over explaining, but given that this project is starting to gain more popularity I thought you might benefit heavily from some automatic static analysis so you can save review time on common errors, vulnerabilities or style things you want to be consistent.
I started this PR with a very small subset of the available linters for the Go backend to keep it small, but there are quite a lot you can enforce if you want. See here. I'd be happy to help keep this part of the CI maintained if you think its valuable.
Let me know if you have any questions or concerns.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.