chore/golangci lint batch v4#65
Conversation
krzysztofdrys
commented
Jan 30, 2026
- chore: fix more lint warnings
- chore(linter): add more linters, fix warnings
There was a problem hiding this comment.
Pull request overview
This PR enables additional golangci-lint linters and fixes the resulting warnings across the codebase. The changes focus primarily on code formatting and style improvements to comply with Go best practices.
Changes:
- Enabled 22 additional linters in
.golangci.yml(gocognit, goconst, gocritic, gocyclo, godot, lll, etc.) - Fixed line length violations by splitting long function signatures and method calls across multiple lines
- Corrected parameter naming conventions (e.g.,
Icon→icon,IconsCollection→iconsCollection) - Added proper spacing in comments and nolint directives
- Refactored push notification logic in browser extension request handler for better maintainability
- Fixed a bug where
len(result) >= 0(always true) was changed tolen(result) > 0
Reviewed changes
Copilot reviewed 39 out of 40 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
.golangci.yml |
Enabled 22 additional linters (gocognit, goconst, gocritic, gocyclo, godot, lll, etc.) |
internal/common/crypto/prng.go |
Fixed comment spacing |
internal/api/support/service/service.go |
Split long function signature across multiple lines |
internal/api/mobile/service/service.go |
Added lll nolint directive and split route registrations |
internal/api/mobile/app/queries/*.go |
Split long function signatures for line length compliance |
internal/api/mobile/app/command/pair_mobile_with_extension.go |
Split function signatures across lines |
internal/api/mobile/adapters/mobile_device_extensions_gorm_repository.go |
Split function signature |
internal/api/icons/service/service.go |
Added lll nolint and split route registrations |
internal/api/icons/app/command/icons_requests.go |
Split long function calls and signatures |
internal/api/icons/app/command/icons.go |
Split error message formatting |
internal/api/icons/adapters/*.go |
Fixed parameter naming (Icon→icon, IconsCollection→iconsCollection) |
internal/api/browser_extension/service/service.go |
Split route registrations across lines |
internal/api/browser_extension/ports/http.go |
Fixed bug: len(result) >= 0 → len(result) > 0 |
internal/api/browser_extension/app/query/*.go |
Split function signatures |
internal/api/browser_extension/app/command/request_2fa_token.go |
Refactored push logic into sendPush method |
internal/api/browser_extension/app/command/remove_*.go |
Fixed comment punctuation |
internal/api/browser_extension/adapters/*.go |
Added nolint directives for long lines |
e2e-tests/**/*_test.go |
Split long function calls and improved test readability |
e2e-tests/helpers.go |
Split function signatures |
e2e-tests/icons/web_services_dump_test.go |
Refactored to avoid duplicate random ID generation |
cmd/migrate/main.go |
Deferred DB connection until after dialect check, added nolint |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
73d8126 to
a7e37ef
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 39 out of 40 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tobiaszheller
left a comment
There was a problem hiding this comment.
lgm, left few comments, other on priv
| } | ||
|
|
||
| func (r *BrowserExtension2FaRequestsMysqlRepository) FindPendingByExtensionId(extensionId uuid.UUID) []*domain.BrowserExtension2FaRequest { | ||
| func (r *BrowserExtension2FaRequestsMysqlRepository) FindPendingByExtensionId(extensionId uuid.UUID) []*domain.BrowserExtension2FaRequest { // nolint:lll // struct name is too long to make line shorter |
There was a problem hiding this comment.
I think setting lll linter to 160 chars is also valid approach.
There was a problem hiding this comment.
ok, I did this. I removed nolint:lll, but I didn't change code I adapted to 120 lines.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ces_mysql_repository.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 37 out of 37 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.