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

ci: run golangci-lint #76

Merged
merged 2 commits into from
Apr 20, 2022
Merged

ci: run golangci-lint #76

merged 2 commits into from
Apr 20, 2022

Conversation

fho
Copy link
Contributor

@fho fho commented Apr 19, 2022

Add a github action workflow to run golangci-lint.
golangci-lint is configured to only show new issues from PRs.

When all existing issues in the main branch are fixed (or excluded),
only-new-issues could be set to false.

@fho fho marked this pull request as ready for review April 20, 2022 09:40
@lukebakken lukebakken added this to the 1.3.5 milestone Apr 20, 2022
Copy link
Contributor

@lukebakken lukebakken left a comment

Choose a reason for hiding this comment

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


lbakken@shostakovich ~/development/rabbitmq/amqp091-go (golangci_lint =)
$ make check
golangci-lint run ./...
make: golangci-lint: No such file or directory
make: *** [Makefile:19: check] Error 127

Should golangci-lint be installed automatically? If not, we should document it.

@fho
Copy link
Contributor Author

fho commented Apr 20, 2022


lbakken@shostakovich ~/development/rabbitmq/amqp091-go (golangci_lint =)
$ make check
golangci-lint run ./...
make: golangci-lint: No such file or directory
make: *** [Makefile:19: check] Error 127

Should golangci-lint be installed automatically? If not, we should document it.

👍
I don't think we should install it via "make check".
I'll document it in https://github.com/rabbitmq/amqp091-go/blob/main/CONTRIBUTING.md#prerequisites, please correct me if you have another place in mind.

@lukebakken
Copy link
Contributor

I'll document it in https://github.com/rabbitmq/amqp091-go/blob/main/CONTRIBUTING.md#prerequisites, please correct me if you have another place in mind.

That would be great. These instructions worked for me:

https://golangci-lint.run/usage/install/#local-installation

fho added 2 commits April 20, 2022 16:23
Add a github action workflow to run golangci-lint.
golangci-lint is configured to only show new issues from PRs.

When all existing issues in the main branch are fixed (or excluded),
only-new-issues could be set to false.

ci: add golangci.yml config file

add a config file to be able to include the integrationtests, this
prevents that code used only in integrationtests is reported as unused
Add a makefile target called "check" that runs golangci-lint

make: remove vet target

The vet target is not needed anymore, "go vet" is also run via the check
target by golangci-lint

Add install for `golangci-lint`
@lukebakken lukebakken merged commit ce3b499 into rabbitmq:main Apr 20, 2022
@lukebakken
Copy link
Contributor

Thanks!

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