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

Additional types for bad defer check #897

Merged
merged 2 commits into from
Nov 30, 2022

Conversation

TimonOmsk
Copy link
Contributor

Simply adds some additional type for bad-close check.

Will fix #890 but maybe we need to redesign the check in future to catch possible cases(Close() method with error ret value)

@codecov-commenter
Copy link

Codecov Report

Base: 74.37% // Head: 74.59% // Increases project coverage by +0.22% 🎉

Coverage data is based on head (52e9ffb) compared to base (a0b7ebb).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #897      +/-   ##
==========================================
+ Coverage   74.37%   74.59%   +0.22%     
==========================================
  Files          51       51              
  Lines        3180     3208      +28     
==========================================
+ Hits         2365     2393      +28     
  Misses        746      746              
  Partials       69       69              
Impacted Files Coverage Δ
rules/bad_defer.go 98.36% <100.00%> (+1.39%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ccojocar ccojocar merged commit 44f484f into securego:master Nov 30, 2022
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.

Should defer resp.Body.Close() not be marked as G307?
3 participants