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

fix: G602 support for nested conditionals with bounds check #1201

Merged
merged 4 commits into from
Sep 4, 2024

Conversation

xWiiLLz
Copy link
Contributor

@xWiiLLz xWiiLLz commented Aug 30, 2024

Trying to fix #1200 with this PR.
Suggestions/comments more than welcome

@codecov-commenter
Copy link

codecov-commenter commented Aug 30, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 50.00000% with 14 lines in your changes missing coverage. Please review.

Project coverage is 67.84%. Comparing base (4ae73c8) to head (cd0c651).
Report is 15 commits behind head on master.

Files with missing lines Patch % Lines
analyzers/slice_bounds.go 50.00% 13 Missing and 1 partial ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1201      +/-   ##
==========================================
+ Coverage   67.35%   67.84%   +0.49%     
==========================================
  Files          74       75       +1     
  Lines        4046     4186     +140     
==========================================
+ Hits         2725     2840     +115     
- Misses       1195     1210      +15     
- Partials      126      136      +10     

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

Copy link
Member

@ccojocar ccojocar left a comment

Choose a reason for hiding this comment

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

Thanks for contributing this fix. I left a few comments, it would be great if you could address them. Thanks again!

analyzers/slice_bounds.go Outdated Show resolved Hide resolved
analyzers/slice_bounds.go Outdated Show resolved Hide resolved
@ccojocar ccojocar merged commit ea5b276 into securego:master Sep 4, 2024
6 checks passed
@xWiiLLz xWiiLLz deleted the fix/G602-nested-conditionals branch September 11, 2024 18:26
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.

G602: False positives for slices with bounds check on a higher hierarchy
3 participants