Skip to content

*: enable revive linter#1771

Merged
pjbgf merged 2 commits intogo-git:mainfrom
ferhatelmas:ferhat/revive
Dec 4, 2025
Merged

*: enable revive linter#1771
pjbgf merged 2 commits intogo-git:mainfrom
ferhatelmas:ferhat/revive

Conversation

@ferhatelmas
Copy link
Contributor

related to #1753

Copilot AI review requested due to automatic review settings December 2, 2025 23:17
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 the revive linter to enforce Go code quality standards across the codebase. The changes focus on improving code style, documentation, and naming conventions without altering functionality.

Key changes include:

  • Enabling revive linter in golangci configuration
  • Adding package and exported item documentation throughout the codebase
  • Improving variable naming to avoid shadowing (e.g., closecloseBracket, newnewRef)
  • Marking unused parameters with underscore (_) convention
  • Simplifying if-else blocks by removing unnecessary else statements
  • Renaming path_util package to pathutil for consistency
  • Fixing constant naming conventions (e.g., Version_0Version0, ConfigStorerStorer)

Reviewed changes

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

Show a summary per file
File Description
.golangci.yaml Added revive linter to enabled linters list
worktree*.go Marked unused function parameters with underscore
storage/** Added documentation comments and improved variable naming
plumbing/** Added package docs, improved naming (close→closeBracket, new→newRef)
config/** Renamed ConfigStorer→Storer, improved constant names, added error docs
internal/pathutil/ Renamed from path_util, added package documentation
utils/** Added package and exported function documentation
Multiple test files Renamed close→cancel for context cancellation functions
submodule.go Improved variable naming (new→opts)
remote.go Fixed variable shadowing issues (new→newRef, proxyUrl→proxyURL)

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

Signed-off-by: ferhat elmas <elmas.ferhat@gmail.com>
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 just a few nits, otherwise LGTM.

@ferhatelmas
Copy link
Contributor Author

PTAL. I pushed a separate commit for easier iteration.

Signed-off-by: ferhat elmas <elmas.ferhat@gmail.com>
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 working on this. 🙇

@pjbgf pjbgf added the breaking label Dec 4, 2025
@pjbgf pjbgf merged commit b5fe417 into go-git:main Dec 4, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants