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

Changed to golangci-lint and introduced LintChanges command #3057

Merged

Conversation

dgannon991
Copy link
Member

@dgannon991 dgannon991 commented Apr 4, 2024

What does this change

Swapped to using golangci-lint as it's much more thorough. Also introduced a new command for LintChanges as there are LOTS of errors in the existing codebase.

What issue does it fix

Closes #3048

Notes for the reviewer

The prerequisite PR (getporter/magefiles#36) will need to be merged first. Then I can update this one to use the correct version of the magefile.

Checklist

  • Did you write tests?
  • Did you write documentation?
  • Did you change porter.yaml or a storage document record? Update the corresponding schema file.
  • If this is your first pull request, please add your name to the bottom of our Contributors list. Thank you for making Porter better! 🙇‍♀️

Signed-off-by: David Gannon <19214156+dgannon991@users.noreply.github.com>
@dgannon991 dgannon991 force-pushed the feat/3048/add-golangci-lint-command branch from 89d2c6e to b6d5ee0 Compare April 4, 2024 20:22
@dgannon991
Copy link
Member Author

@schristoff - this will need the previous PR approving first, then a tweak from me, then I can publish it (if I've understood properly, shout if I've got that wrong!)

As part of this, I changed the pipeline check to run LintChanges instead of just Lint, as the project currently has many lint issues, and it looks like it'll take a fair bit of work to fix them all. Happy if you'd rather I do them all in a one, but this approach seemed safer, as it'll force you to tidy up each file as it's worked on :)

@schristoff
Copy link
Member

I'm going to guess go.mod is set to the last release of magefiles. When you bump it hopefully we get happy tests :)

Signed-off-by: David Gannon <19214156+dgannon991@users.noreply.github.com>
@dgannon991 dgannon991 marked this pull request as ready for review April 29, 2024 20:31
Signed-off-by: David Gannon <19214156+dgannon991@users.noreply.github.com>
Signed-off-by: David Gannon <19214156+dgannon991@users.noreply.github.com>
Signed-off-by: David Gannon <19214156+dgannon991@users.noreply.github.com>
Signed-off-by: David Gannon <19214156+dgannon991@users.noreply.github.com>
Copy link
Member

@schristoff schristoff left a comment

Choose a reason for hiding this comment

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

Wow, this looks like a lot. Thank you for working on this!!!!

@schristoff schristoff merged commit 67f1dd8 into getporter:main May 18, 2024
15 checks passed
@dgannon991 dgannon991 deleted the feat/3048/add-golangci-lint-command branch May 19, 2024 10:29
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.

Change from staticcheck to golangci-lint
2 participants