uber-go / nilaway

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

Refactor CFG preprocess logic #249

Closed yuxincs closed 5 months ago

yuxincs commented 6 months ago

This PR refactors the CFG preprocess logic. Specifically, we have extracted the rich check effect construction out of the preprocessing logic such that it is now in its standalone file. This offers a lot better modularity for the already-enormous assertiontree package.

Now in BackpropAcrossFunc function we are calling preprocess and rich-check-effect-generating functions separately.

codecov-commenter commented 6 months ago

Codecov Report

Attention: Patch coverage is 95.93496% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 87.56%. Comparing base (a27654d) to head (e6141ce).

Files Patch % Lines
...ertion/function/assertiontree/rich_check_effect.go 95.65% 3 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #249 +/- ## ======================================= Coverage 87.56% 87.56% ======================================= Files 62 62 Lines 7832 7832 ======================================= Hits 6858 6858 Misses 796 796 Partials 178 178 ```

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

github-actions[bot] commented 6 months ago

Golden Test

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

3296 errors on base branch (main, a27654d) 3296 errors on test branch (222a900)