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

chore(build): add golangci-lint to the pipeline as a non-blocking step #742

Merged
merged 9 commits into from
Oct 18, 2024

Conversation

mildwonkey
Copy link
Contributor

@mildwonkey mildwonkey commented Oct 16, 2024

This is a fairly simple golang linter pipeline. It's not required so we don't have to fix anything before merging if we don't want, which will give us some time to tweak the linters (disable linters or individual rules as needed) - like all metrics it's important that we care about and act on the information instead of just add noise.

I will set myself a weekly reminder for the next 4 weeks to revisit the results during our sync and upgrade this check to required once we're happy with it. I'll keep an eye on the PRs and track what checks are useful vs not and upgrade as we go.

📢 👋🏻 Let me know what you think of annotating the PR; I don't know if I like it or not. I have strongly mixed feelings on it 😂 Maybe I'll like it more when I'm confident we agree with the linters


Enabled Linters

I don't think I have a strong opinion on most of these and I'm entirely willing to change the list as many times as we feel like; I like prealloc but I'm already worried it'll have too many false positives to be worthwhile. I'm also not sure how seriously I take the printf: non-constant format string in call errors but I'll make another pass at fixing them and see how I feel about it afterwards.

Also, while I included gosec in here, we might want to move that into a security specific pipeline. I don't have an opinion there, let me know if you do 🤷🏻

Defaults:

  • errcheck
  • gosimple
  • govet
  • ineffassign
  • staticcheck
  • unused

Added by me:

  • gosec
  • gofmt
  • goimports
  • prealloc

@mildwonkey mildwonkey force-pushed the mildwonkey/go-linters branch 2 times, most recently from 6ba64c8 to a918815 Compare October 17, 2024 12:34
@mildwonkey mildwonkey changed the title let's see what this does chore(build): add golangci-lint to the pipeline as a non-blocking step Oct 17, 2024
@mildwonkey
Copy link
Contributor Author

I noticed before that the PR Title check doesn't seem to see the change after editing a PR description (even if I re-run the job it was still failing with the original PR description) so I slipped a fix into this PR and added edit to the list of triggers.

@mildwonkey mildwonkey marked this pull request as ready for review October 17, 2024 12:58
@mildwonkey mildwonkey requested a review from a team as a code owner October 17, 2024 12:58
Co-authored-by: Brandt Keller <43887158+brandtkeller@users.noreply.github.com>
Copy link
Member

@brandtkeller brandtkeller left a comment

Choose a reason for hiding this comment

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

thank you for doing a better job at naming jobs than I have in the past 😆

@brandtkeller brandtkeller merged commit fedb0c9 into main Oct 18, 2024
7 of 8 checks passed
@brandtkeller brandtkeller deleted the mildwonkey/go-linters branch October 18, 2024 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants