-
Notifications
You must be signed in to change notification settings - Fork 185
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
Move the cyclocomp namespace check into the factory #2785
base: main
Are you sure you want to change the base?
Conversation
Warnings are easy to overlook - not the biggest fan of this approach. |
Co-authored-by: AshesITR <alexander.rosenstock@web.de>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2785 +/- ##
==========================================
+ Coverage 99.57% 99.58% +0.01%
==========================================
Files 125 125
Lines 6840 6829 -11
==========================================
- Hits 6811 6801 -10
+ Misses 29 28 -1 ☔ View full report in Codecov by Sentry. |
R/with.R
Outdated
@@ -187,10 +187,11 @@ call_linter_factory <- function(linter_factory, linter_name, package) { | |||
linter <- tryCatch( | |||
linter_factory(), | |||
error = function(e) { | |||
cli_abort( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should return a "disabled" linter here too? Probably I'm overthinking it. Reverting for now.
Closes #2777
Two notable changes accompany this:
linters_with_tags()
(viacall_linter_factory()
) warns instead of errors when a linter fails to build. Again we return the "dumb" linter in this case. This is not strictly needed thanks to only warning from the factory, but I think it's a better design anyway.Mostly in tests I've opted anyway for
skip()
s, rather than an awkward construct where we optionallyexpect_warning()
, or swap betweenexpect_warning()
/expect_no_warning()
, or ...This exercise also flushed out some more tests that are implicitly reading our main project .lintr file, fixing which increases their hermeticity.