uber-go / nilaway

Static analysis tool to detect potential nil panics in Go code
Apache License 2.0
3.19k stars 66 forks source link

Break splitBlocksOn into a new hook #280

Closed yuxincs closed 1 month ago

yuxincs commented 2 months ago

Similar to #279, this PR breaks the logic that splits the CFG block upon seeing a trusted function into a separate strongly-typed hook for better maintainability and slightly better performance (due to fewer lookups in hook points). It introduces no functionality changes.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 74.45255% with 35 lines in your changes missing coverage. Please review.

Project coverage is 87.63%. Comparing base (45bee80) to head (f9f73a6). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
hook/split_blocks_on.go 72.44% 18 Missing and 17 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #280 +/- ## ========================================== - Coverage 87.83% 87.63% -0.21% ========================================== Files 63 65 +2 Lines 7885 7916 +31 ========================================== + Hits 6926 6937 +11 - Misses 776 798 +22 + Partials 183 181 -2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

github-actions[bot] commented 2 months ago

Golden Test

[!NOTE]
✅ NilAway errors reported on standard libraries are identical.

3271 errors on base branch (main, 45bee80) 3271 errors on test branch (e14d87d)