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] Remove unnecessary usage of nolint:gosec #12112

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

zzzk1
Copy link
Contributor

@zzzk1 zzzk1 commented Jan 17, 2025

Description

Link to tracking issue

Fixes #11425

Testing

Documentation

@zzzk1 zzzk1 requested review from djaglowski, a team, bogdandrutu and dmitryax as code owners January 17, 2025 03:37
Copy link

codecov bot commented Jan 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.67%. Comparing base (c14d4f9) to head (de25735).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12112      +/-   ##
==========================================
- Coverage   91.67%   91.67%   -0.01%     
==========================================
  Files         461      461              
  Lines       24749    24740       -9     
==========================================
- Hits        22689    22680       -9     
  Misses       1678     1678              
  Partials      382      382              

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

@bogdandrutu
Copy link
Member

Remove incorrect usage of // nolint:gosec introduced by PR #10935

I don't think they were incorrect, but the rules were relaxed.

Copy link
Member

@bogdandrutu bogdandrutu left a comment

Choose a reason for hiding this comment

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

No need for chlog here.

@zzzk1 zzzk1 changed the title [chore] Remove incorrect usage of nolint:gosec [chore] Remove unnecessary usage of nolint:gosec Jan 17, 2025
@zzzk1
Copy link
Contributor Author

zzzk1 commented Jan 17, 2025

Remove incorrect usage of // nolint:gosec introduced by PR #10935

I don't think they were incorrect, but the rules were relaxed.

So, all we need to do is add exclude rules and then ignore them, right?

.golangci.yml Outdated
Comment on lines 228 to 230
- text: "G115:"
linters:
- gosec
Copy link
Member

Choose a reason for hiding this comment

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

I am confused, I did not see that you excluded it.

bogdandrutu

This comment was marked as resolved.

Copy link
Member

@bogdandrutu bogdandrutu left a comment

Choose a reason for hiding this comment

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

I missed that you excluded. We should not exclude the rule, but fix the usage.

@zzzk1
Copy link
Contributor Author

zzzk1 commented Jan 17, 2025

@bogdandrutu G115 has not been fixed yet: https://golangci-lint.run/product/changelog/. I tried using a condition like if a <= math.MaxInt64() (where a is of type uint64), but it did not work.

@zzzk1 zzzk1 force-pushed the Remove-NoLint-Usage-wrong branch from d18283b to df7ffa6 Compare January 17, 2025 15:52
@zzzk1 zzzk1 force-pushed the Remove-NoLint-Usage-wrong branch from df7ffa6 to de25735 Compare January 17, 2025 16:44
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.

Remove usage of nolint:gosec added by #10935
2 participants