Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch exceptions in Substring.Replacement.applyAll #3211

Merged
merged 1 commit into from Nov 14, 2023

Conversation

fthomas
Copy link
Member

@fthomas fthomas commented Nov 13, 2023

No description provided.

@fthomas fthomas added this to the 0.27.0 milestone Nov 13, 2023
Copy link

codecov bot commented Nov 13, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6ab25ce) 91.07% compared to head (a0d68e4) 91.07%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3211   +/-   ##
=======================================
  Coverage   91.07%   91.07%           
=======================================
  Files         163      163           
  Lines        3406     3407    +1     
  Branches      287      310   +23     
=======================================
+ Hits         3102     3103    +1     
  Misses        304      304           
Files Coverage Δ
...ain/scala/org/scalasteward/core/edit/EditAlg.scala 97.14% <100.00%> (ø)
...scalasteward/core/edit/update/data/Substring.scala 100.00% <100.00%> (ø)
.../main/scala/org/scalasteward/core/io/FileAlg.scala 100.00% <ø> (ø)

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

@fthomas
Copy link
Member Author

fthomas commented Nov 14, 2023

I just want to note that exceptions thrown by applyAll are currently caught by Cats Effect and adapted by https://github.com/scala-steward-org/scala-steward/blob/v0.26.0/modules/core/src/main/scala/org/scalasteward/core/io/FileAlg.scala#L69 as can be observed from the log excerpt in #3206 (comment). Not sure where CE catches the exceptions although they are thrown outside the F-context, but it is better to be explicit about applyAll being able to throw as is done here and hopefully everywhere else in the code base.

@fthomas fthomas merged commit c12d4a4 into main Nov 14, 2023
10 checks passed
@fthomas fthomas deleted the topic/catch-exceptions-in-applyAll branch November 14, 2023 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants