Skip to content

Add golangci-lint to workflow#1

Merged
ivixvi merged 2 commits intoivixvi:mainfrom
zztkm:feature/add-golangci-lint
Jul 7, 2024
Merged

Add golangci-lint to workflow#1
ivixvi merged 2 commits intoivixvi:mainfrom
zztkm:feature/add-golangci-lint

Conversation

@zztkm
Copy link
Copy Markdown
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
Copy Markdown
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
@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