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

maint: use nolint instead of nosec for gosec #948

Merged
merged 2 commits into from
Mar 20, 2024

Conversation

GabrielNagy
Copy link
Contributor

@GabrielNagy GabrielNagy commented Mar 20, 2024

The nosec directive is broken as of gosec 2.19 -- we can work around this by using the nolint directive from golangci-lint. The main drawback is that this disables the entire linter, not just one rule, but I still kept the rule name for reference.

After this is merged we can bump golangci-lint to 1.56.2 1.57.0.

The nosec directive is broken as of gosec 2.19 -- we can work around
this by using the nolint directive from golangci-lint. The main drawback
is that this disables the entire linter, not just one rule, but I still
kept the rule name for reference.

After this is merged we can bump golangci-lint to 1.56.2.
@GabrielNagy GabrielNagy requested a review from a team as a code owner March 20, 2024 12:17
@codecov-commenter
Copy link

codecov-commenter commented Mar 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.04%. Comparing base (2020684) to head (63e0bbe).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #948   +/-   ##
=======================================
  Coverage   86.04%   86.04%           
=======================================
  Files          78       78           
  Lines        6886     6886           
=======================================
  Hits         5925     5925           
  Misses        621      621           
  Partials      340      340           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

This has been deprecated since v1.48.0 and now fully deactivated with
v1.57.0 of golangci-lint, meaning it will not run at all anymore.

Unfortunately there isn't a good replacement for this yet, but we'll
have to live without it until something else comes up.
Copy link
Member

@denisonbarbosa denisonbarbosa left a comment

Choose a reason for hiding this comment

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

Yeah, I bumped into this in authd as well, but it looks like it's only broken for G30X though, because we use the nosec directive for exec.Command and it works 🤔...
Anyway, nice change!

@GabrielNagy GabrielNagy merged commit 744e28b into main Mar 20, 2024
4 checks passed
@GabrielNagy GabrielNagy deleted the replace-nosec-with-nolint branch March 20, 2024 13:34
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.

4 participants