Skip to content

chore(lint): add prealloc as a linter - #3085

Merged
vmaerten merged 1 commit into
go-task:mainfrom
christiandins:perf/add-prealloc-linnter
Nov 3, 2026
Merged

vmaerten merged 1 commit into
go-task:mainfrom
christiandins:perf/add-prealloc-linnter

Conversation

@christiandins

@christiandins christiandins commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Description

Enable prealloc in the golangci-lint configuration. prealloc is a Go static analysis tool that identifies slice declarations that could potentially be preallocated, helping highlight opportunities to reduce allocations.
https://golangci-lint.run/docs/linters/configuration/#prealloc

Checklist

  • I have read and followed the Contribution Guide.
  • I have disclosed the use of any AI-generated content in this pull request per the AI Usage Policy.
  • I fully understand the changes and have hand-written the description (No AI) of this pull request.

@vmaerten vmaerten self-assigned this Nov 1, 2026
@vmaerten
vmaerten self-requested a review November 1, 2026 15:05

@vmaerten vmaerten left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you split in multiple PRs ? One for each change
You can keep this one for prealloc

@christiandins
christiandins force-pushed the perf/add-prealloc-linnter branch from e9d62e6 to ae6977e Compare November 2, 2026 13:38
@christiandins

Copy link
Copy Markdown
Contributor Author

sure, done.

@vmaerten

vmaerten commented Nov 3, 2026

Copy link
Copy Markdown
Member

Thanks for the contribution!

@vmaerten vmaerten changed the title golangci-lint: add prealloc as a linter chore(lint): add prealloc as a linter Nov 3, 2026
@vmaerten
vmaerten merged commit af911c6 into go-task:main Nov 3, 2026
20 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.

2 participants