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

Add golangci-lint to workflow #1

Merged
merged 2 commits into from
Jul 7, 2024

Conversation

zztkm
Copy link
Collaborator

@zztkm zztkm commented Jul 7, 2024

By introducing a linter into your project, you can reduce the cost of code checking.
The golangci-lint we will introduce this time is a tool that runs linters at high speed and is well known in the Go community.

The default linter is here: https://golangci-lint.run/usage/linters/#enabled-by-default


(Copilot summary)

This pull request primarily focuses on improving the Go workflow and updating the error logging in tests. The most significant changes include the addition of a linting step in the GitHub Actions workflow for Go and the modification of an error logging statement in main_test.go.

Linting and Testing:

  • .github/workflows/go.yml: Added a new linting step to the GitHub Actions workflow for Go. This uses the golangci/golangci-lint-action@v6 with the latest version. This will help in maintaining the code quality by catching and reporting any linting issues before the code is merged.

Error Logging:

  • main_test.go: Updated the error logging statement in the path function. The fmt.Println(fmt.Sprintf()) has been replaced with fmt.Printf(), which is a more efficient way to format and print the log message.

zztkm added 2 commits July 7, 2024 15:25
By introducing a linter into your project, you can reduce the cost of code checking.
The golangci-lint we will introduce this time is a tool that runs linters at high speed and is well known in the Go community.

The default linter is here: https://golangci-lint.run/usage/linters/#enabled-by-default
Copy link
Owner

@ivixvi ivixvi left a comment

Choose a reason for hiding this comment

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

LGTM
Thanks contributing!

@ivixvi ivixvi merged commit 520eb69 into ivixvi:main Jul 7, 2024
1 check passed
@zztkm zztkm deleted the feature/add-golangci-lint branch July 7, 2024 08:10
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