Skip to content

chore/golangci lint batch v4#65

Merged
krzysztofdrys merged 6 commits into
mainfrom
chore/golangci-lint-batch-v4
Feb 17, 2026
Merged

chore/golangci lint batch v4#65
krzysztofdrys merged 6 commits into
mainfrom
chore/golangci-lint-batch-v4

Conversation

@krzysztofdrys
Copy link
Copy Markdown
Collaborator

  • chore: fix more lint warnings
  • chore(linter): add more linters, fix warnings

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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., Iconicon, IconsCollectioniconsCollection)
  • 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 to len(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) >= 0len(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.

Comment thread e2e-tests/browser_extension/browser_extension_2fa_request_test.go
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread e2e-tests/system/api_test.go Outdated
Comment thread cmd/migrate/main.go
tobiaszheller
tobiaszheller previously approved these changes Feb 3, 2026
Copy link
Copy Markdown
Collaborator

@tobiaszheller tobiaszheller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgm, left few comments, other on priv

Comment thread e2e-tests/system/api_test.go Outdated
}

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
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think setting lll linter to 160 chars is also valid approach.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I did this. I removed nolint:lll, but I didn't change code I adapted to 120 lines.

Comment thread internal/common/crypto/prng.go Outdated
krzysztofdrys and others added 4 commits February 5, 2026 08:54
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ces_mysql_repository.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@krzysztofdrys krzysztofdrys merged commit dd357fa into main Feb 17, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants