Problem
lintr::lint_package() reports 259 issues across the codebase after migration.
Summary by Linter
| # |
Done |
Linter |
Count |
Type |
| 1 |
[ ] |
line_length_linter |
178 |
style - lines > 80 chars |
| 2 |
[ ] |
commented_code_linter |
18 |
style - commented-out code |
| 3 |
[ ] |
object_usage_linter |
16 |
potential bugs |
| 4 |
[ ] |
quotes_linter |
10 |
style - quote consistency |
| 5 |
[ ] |
object_name_linter |
8 |
style - naming conventions |
| 6 |
[ ] |
trailing_blank_lines_linter |
8 |
style - extra blank lines |
| 7 |
[ ] |
indentation_linter |
7 |
style - inconsistent indent |
| 8 |
[ ] |
return_linter |
5 |
style - explicit returns |
| 9 |
[ ] |
brace_linter |
3 |
style - brace placement |
| 10 |
[ ] |
commas_linter |
2 |
style - spacing after commas |
| 11 |
[ ] |
paren_body_linter |
2 |
style - space after parens |
| 12 |
[ ] |
semicolon_linter |
2 |
style - trailing semicolons |
object_usage_linter Details (#3 - Priority)
These 16 issues flag potential bugs or missing declarations:
NSE (Non-Standard Evaluation) false positives:
spk_join.R:59,61 - .data pronoun (dplyr NSE)
spk_join.R:86 - across, all_of (dplyr verbs)
spk_layer_info.R:32,47 - name, driver columns
spk_q_layer_info.R:67-68 - layer_name, time_exported, name
spk_rast_rm_empty.R:30 - spk_rast_not_empty function reference
Unused local variables:
spk_join.R:96 - changed_details assigned but not used
spk_q_layer_info.R:51 - nodes assigned but not used
spk_stac_calc.R:201 - id assigned but not used
spk_stac_calc.R:240,250,258 - t0, t1, t2 timing vars
Proposed Solution
- Configure
.lintr to set line length to 120 chars (CLAUDE.md specifies 120)
- Add globalVariables() for NSE column names (already partially done in utils.R)
- Review unused variables - some are legitimate (timing vars used conditionally), others can be removed
- Incrementally fix style issues in future commits
Configuration
Create .lintr file:
linters: linters_with_defaults(
line_length_linter(120)
)
Problem
lintr::lint_package()reports 259 issues across the codebase after migration.Summary by Linter
line_length_lintercommented_code_linterobject_usage_linterquotes_linterobject_name_lintertrailing_blank_lines_linterindentation_linterreturn_linterbrace_lintercommas_linterparen_body_lintersemicolon_linterobject_usage_linter Details (#3 - Priority)
These 16 issues flag potential bugs or missing declarations:
NSE (Non-Standard Evaluation) false positives:
spk_join.R:59,61-.datapronoun (dplyr NSE)spk_join.R:86-across,all_of(dplyr verbs)spk_layer_info.R:32,47-name,drivercolumnsspk_q_layer_info.R:67-68-layer_name,time_exported,namespk_rast_rm_empty.R:30-spk_rast_not_emptyfunction referenceUnused local variables:
spk_join.R:96-changed_detailsassigned but not usedspk_q_layer_info.R:51-nodesassigned but not usedspk_stac_calc.R:201-idassigned but not usedspk_stac_calc.R:240,250,258-t0,t1,t2timing varsProposed Solution
.lintrto set line length to 120 chars (CLAUDE.md specifies 120)Configuration
Create
.lintrfile: