-
Notifications
You must be signed in to change notification settings - Fork 1
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
[CRITICAL BUG] Skip styling if no box::use() is found #138
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #138 +/- ##
==========================================
- Coverage 97.21% 96.71% -0.51%
==========================================
Files 23 24 +1
Lines 1114 1125 +11
==========================================
+ Hits 1083 1088 +5
- Misses 31 37 +6 ☔ View full report in Codecov by Sentry. |
R/zzz.R
Outdated
namespaced_function_calls = if (getRversion() >= 4.3) { | ||
namespaced_function_calls() | ||
} else { | ||
NULL | ||
}, |
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.
For some reason, installing box.linters 0.10.3 from CRAN has a different result from devtools::install_local()
. If treesitter
is not installed, namespaced_function_calls()
remains active despite the !is_treesitter_installed()
check inside namespaced_function_calls()
.
I decided to perform the R version check here, instead of inside namespaced_function_calls()
because it probably won't work there just like how !is_treesitter_installed()
is not working now.
return( | ||
lintr::Linter(function(source_expression) { | ||
return(list()) | ||
}) | ||
) |
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.
Saw some warnings about starting lintr 3.0.0 all linter configs should return a function. Returning an empty linter function here.
CI good now. R CMD check on CI did not like |
@@ -1,3 +1,7 @@ | |||
# box.linters (development version) | |||
|
|||
* Fix critical bug of style_box_use_*() converting all lines to NA if there is no `box::use()` call found. |
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.
Please add the R version fix to the changelog.
Have you read the Contributing Guidelines?
Issue #134
Includes a bugfix for R >= 4.3 compatibility. See comments below.
Definition of Done
R CMD check
, linter, unit tests, spelling)..Rd
files withroxygen2::roxygenise()
)