Skip to content

*: enable formatters in golangci-lint#1754

Merged
pjbgf merged 1 commit intogo-git:mainfrom
ferhatelmas:ferhat/formatters
Nov 26, 2025
Merged

*: enable formatters in golangci-lint#1754
pjbgf merged 1 commit intogo-git:mainfrom
ferhatelmas:ferhat/formatters

Conversation

@ferhatelmas
Copy link
Contributor

fixes #1751

  • not enabling goimports because gci covers same functionality.

Copy link
Contributor

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 formatters in golangci-lint, applying automated formatting changes across the entire codebase. The changes are purely stylistic and do not alter functionality, focusing on code consistency and adherence to Go best practices.

Key formatting changes applied:

  • Reorganized imports with proper grouping (standard library, external, internal)
  • Converted octal literals to use the 0o prefix (e.g., 06440o644)
  • Replaced naked returns with explicit return statements
  • Replaced interface{} with any (Go 1.18+ syntax)
  • Merged function parameter names with identical types
  • Fixed indentation in comments and documentation
  • Applied var to := conversions where appropriate
  • Improved struct literal and slice formatting

Reviewed changes

Copilot reviewed 251 out of 257 changed files in this pull request and generated no comments.

Show a summary per file
File Description
worktree*.go Import reordering, explicit returns, octal literal updates
utils/** Replaced interface{} with any in sync pools and function signatures
plumbing/** Extensive formatting: imports, returns, octal literals, parameter merging
storage/** Import reordering and test file consistency
*.go (root) Import organization and minor formatting adjustments

All changes are consistent with modern Go formatting conventions and the PR successfully achieves its goal of enabling formatters in golangci-lint without introducing any functional changes.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@ferhatelmas ferhatelmas force-pushed the ferhat/formatters branch 3 times, most recently from b3f51d3 to e3d90cf Compare November 26, 2025 14:15
fixes go-git#1751

* not enabling goimports because gci
covers same functionality.

Signed-off-by: ferhat elmas <elmas.ferhat@gmail.com>
@ferhatelmas
Copy link
Contributor Author

@pjbgf it's ready to review

Copy link
Member

@pjbgf pjbgf left a comment

Choose a reason for hiding this comment

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

@ferhatelmas thanks for implementing this and getting the project better formatted. 🙇

@pjbgf pjbgf merged commit d11db7d into go-git:main Nov 26, 2025
16 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.

golangci-lint: Enable formatters

3 participants