Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Add golangci-lint checks #109

Merged
merged 1 commit into from
Jan 26, 2025
Merged

build: Add golangci-lint checks #109

merged 1 commit into from
Jan 26, 2025

Conversation

pjbgf
Copy link
Member

@pjbgf pjbgf commented Jan 25, 2025

Implement make validate to run golangci-lint checks and call it from the Test GitHub workflow.

An initial set of rules have been enabled, and the violations fixed. Over time a larger number of rules will be enabled.

Implement make validate to run golangci-lint checks and call it from
the Test GitHub workflow.

An initial set of rules have been enabled, and the violations fixed.
Over time a larger number of rules will be enabled.

Signed-off-by: Paulo Gomes <[email protected]>
@pjbgf pjbgf requested a review from aymanbagabas January 25, 2025 09:28
fs.s.New("/", 0755|os.ModeDir, 0)
_, err := fs.s.New("/", 0755|os.ModeDir, 0)
if err != nil {
log.Printf("failed to create root dir: %v", err)
Copy link
Member

Choose a reason for hiding this comment

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

Is this intended? You probably want to return the error here

Copy link
Member

Choose a reason for hiding this comment

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

LGTM otherwise

Copy link
Member Author

Choose a reason for hiding this comment

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

This was intentional as I didn't want to change the API on this PR, so the error is at least being logged. I was trying to keep the changes to a minimum while fixing the linter errors. The overall API will be revisited in future changes, and this revisited.

@pjbgf pjbgf merged commit 6589147 into go-git:main Jan 26, 2025
13 checks passed
@pjbgf pjbgf deleted the linter branch January 26, 2025 07:06
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