Skip to content

Conversation

Johnnei
Copy link
Contributor

@Johnnei Johnnei commented Mar 13, 2025

A test for our Scala 3 implementation for @SuppressWarnings.

Start of support for fine grained silencing through skipping any tree that is annotated with SuppressWarnings to aid in #944 .

Todo:

  • Extracting the constants out of the array is very unwieldy, surely this can be done nicer -> not a lot better it seems
  • Inspection specific silencing

Copy link

codecov bot commented Mar 13, 2025

Codecov Report

Attention: Patch coverage is 84.21053% with 3 lines in your changes missing coverage. Please review.

Project coverage is 83.96%. Comparing base (fa90063) to head (27b37e9).
Report is 89 commits behind head on master.

Files with missing lines Patch % Lines
...3/com/sksamuel/scapegoat/InspectionTraverser.scala 84.21% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #946      +/-   ##
==========================================
- Coverage   88.08%   83.96%   -4.13%     
==========================================
  Files         142       21     -121     
  Lines        1578      343    -1235     
  Branches      278       35     -243     
==========================================
- Hits         1390      288    -1102     
+ Misses        188       55     -133     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Johnnei Johnnei changed the title feat: Support Suppression of all warnings feat: Support Suppression of warnings on Scala 3 Mar 17, 2025
@Johnnei Johnnei marked this pull request as ready for review March 17, 2025 16:07
@Johnnei
Copy link
Contributor Author

Johnnei commented Mar 17, 2025

@saeltz Could you have a look at this one? Still feel like the pattern matching is a bit unwieldy but didn't find an obvious path to simplify it.

Copy link
Collaborator

@saeltz saeltz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

The pattern match indeed looks unwieldy. Scalafix is doing something very similar, though: https://github.com/scalacenter/scalafix/blob/main/scalafix-core/src/main/scala/scalafix/internal/patch/EscapeHatch.scala#L239-L260

@saeltz saeltz merged commit d63e5f1 into scapegoat-scala:master Mar 17, 2025
13 of 15 checks passed
@saeltz
Copy link
Collaborator

saeltz commented Mar 17, 2025

@mccartney, I think this qualifies for a new patch release.

@mccartney
Copy link
Collaborator

Thank you both. Triggered the release of https://github.com/scapegoat-scala/scapegoat/releases/tag/v3.1.7

@Johnnei Johnnei deleted the sc3-supress branch March 22, 2025 08:51
@Johnnei Johnnei restored the sc3-supress branch October 6, 2025 15:53
@Johnnei Johnnei deleted the sc3-supress branch October 6, 2025 15:54
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.

3 participants