Skip to content

Conversation

@silverwind
Copy link
Member

@silverwind silverwind commented Oct 31, 2025

https://github.com/golangci/golangci-lint/releases/tag/v2.6.0

  • modernize linter is enabled, this is the same as gopls modernize
  • perfsprint linter is disabled because it conflicts with modernize (maybe there is a middle ground)
  • gocritic deprecatedComment is disabled as it conflicts with go-swagger

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 31, 2025
@github-actions github-actions bot added topic/code-linting modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code modifies/internal labels Oct 31, 2025
@silverwind
Copy link
Member Author

silverwind commented Oct 31, 2025

I think I will revert these string builder changes and disable the offending rule, it seems useless.

@silverwind
Copy link
Member Author

silverwind commented Oct 31, 2025

The stringsbuilder rule is from modernize actually:

https://github.com/golang/tools/blob/ed067b1f257070c651750130ce5081e4afc1915f/gopls/doc/analyzers.md#stringsbuilder-replace--with-stringsbuilder

It says "This avoids quadratic memory allocation and improves performance." so maybe it is worth it.

I will fix those var names.

@silverwind silverwind marked this pull request as draft October 31, 2025 09:39
@silverwind silverwind marked this pull request as ready for review November 1, 2025 10:46
@silverwind
Copy link
Member Author

I manually cleaned up the stringsbuilder cases, should be ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code modifies/internal topic/code-linting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants