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 in docker if possible #6639

Closed
wants to merge 1 commit into from

Conversation

nikpivkin
Copy link
Contributor

Description

I have a different version of golangci-lint installed on my machine than the ones listed in the magefile or GitHub workflow. Because of this, I get different results when running linter, which makes it difficult to maintain code quality without submitting changes to Github. I suggest running golangci in the docker if it is running.

Checklist

  • I've read the guidelines for contributing to this repository.
  • I've followed the conventions in the PR title.
  • I've added tests that prove my fix is effective or that my feature works.
  • I've updated the documentation with the relevant information (if needed).
  • I've added usage information (if the PR introduces new options)
  • I've included a "before" and "after" example to the description (if the PR is a user interface change).

@nikpivkin nikpivkin marked this pull request as ready for review May 6, 2024 14:25
@nikpivkin nikpivkin requested a review from knqyf263 as a code owner May 6, 2024 14:25
@knqyf263
Copy link
Collaborator

knqyf263 commented May 6, 2024

It's easy to install a different version of golangci-lint. Why doesn't it work for you?

@nikpivkin
Copy link
Contributor Author

The developer may forget to update the linter. Or Trivy may not be using the latest linter version.

@knqyf263
Copy link
Collaborator

knqyf263 commented May 7, 2024

The developer may forget to update the linter.

What if we show a warning if the golangci-lint version is different? Or even fail on that.

@knqyf263
Copy link
Collaborator

The developer may forget to update the linter.

What if we show a warning if the golangci-lint version is different? Or even fail on that.

I implemented my idea. Please let me know if it works for you.
#6700

@nikpivkin
Copy link
Contributor Author

@knqyf263 lgtm

@nikpivkin nikpivkin closed this May 17, 2024
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.

None yet

2 participants