sscpac / statick

Making code quality easier.
https://sscpac.github.io/statick/
Creative Commons Zero v1.0 Universal
73 stars 14 forks source link

Updates for new tool versions. #495

Closed tdenewiler closed 9 months ago

tdenewiler commented 9 months ago

Black and npm-groovy-lint have newer versions available. Using those newer versions cause issues with tool plugin performance, unit tests and formatting.

codecov[bot] commented 9 months ago

Codecov Report

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

Comparison is base (3df6304) 96.62% compared to head (5780767) 100.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #495 +/- ## =========================================== + Coverage 96.62% 100.00% +3.37% =========================================== Files 59 59 Lines 3378 3376 -2 =========================================== + Hits 3264 3376 +112 + Misses 114 0 -114 ```

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

tdenewiler commented 9 months ago

The only file that really changed is statick/statick/statick_tool/plugins/tool/groovylint_tool_plugin.py. The rest are black formatting. I would be happy to make the black changes separately, but that PR would not pass CI due to failing unit tests. Fixing unit tests on their own would not pass CI due to failing black (see #494). This merged version passes CI. Let me know if you want separate ones if this is difficult to read so many changes at once.

tdenewiler commented 9 months ago

Fixes #493.

xydesa commented 9 months ago

weirdly the codecov checks show 100% coverage, but inside the PR diff I see a couple instances of missed lines in the groovylint_tool_plugin: https://github.com/sscpac/statick/pull/495/files#diff-9af53fec4a41eef21a2d36b197a0b0ff13c6e0de6ce177c363adc6426b747b55R57

xydesa commented 9 months ago

Can you update the changelog? include the versions of black and groovylint that changed.

xydesa commented 9 months ago

This branch worked on my system with npm-groovy-lint v11.1.1 installed. I get the old type groovy output with just the "summary" dictionary in it, no errors. unit tests pass for me.

tdenewiler commented 9 months ago

I have always had issues with codecov reporting. My sense is the tool reports on the first set of unit tests that are uploaded then does not always update the PR comment after other, related unit test results are uploaded. The website version always has the reports merged, but the PR comments are often wrong (but intermittently they get it right).