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 assume return into a separate hook in the generalized hook framework #279

Closed yuxincs closed 1 month ago

yuxincs commented 2 months ago

This PR refactors the logic that returns nonnil producer in the new generalized hook framework into a new strongly-typed hook for better maintainability and slightly better performance (fewer look ups in all hook points). It introduces no functionality changes.

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.61%. Comparing base (c59c3f4) to head (152ec48). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #279 +/- ## ======================================= Coverage 87.60% 87.61% ======================================= Files 63 64 +1 Lines 7916 7922 +6 ======================================= + Hits 6935 6941 +6 Misses 799 799 Partials 182 182 ```

: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, c59c3f4) 3271 errors on test branch (98a9116)