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

Feature lintr310 #10

Merged
merged 3 commits into from
Nov 30, 2023
Merged

Feature lintr310 #10

merged 3 commits into from
Nov 30, 2023

Conversation

dschlaep
Copy link
Member

@dschlaep dschlaep commented Nov 30, 2023

Updates for lintr v3.1.x (issue #11)

* [implicit_assignment_linter] Avoid implicit assignments in function calls. For example, instead of `if (x <- 1L) { ... }`, write `x <- 1L; if (x) { ... }`
* [unnecessary_lambda_linter] Pass grepl directly as a symbol to vapply() instead of wrapping it in an unnecessary anonymous function. For example, prefer lapply(DF, sum) to lapply(DF, function(x) sum(x))
* [matrix_apply_linter] Use rowMeans(colMeans(x)) or colMeans(x) if x has 2 dimensions rather than apply(x, MARGIN = 2, FUN = mean)
* [unnecessary_nested_if_linter] Don't use nested `if` statements, where a single `if` with the combined conditional expression will do. For example, instead of `if (x) { if (y) { ... }}`, use `if (x && y) { ... }`.
- warning: [scalar_in_linter] Use == to match length-1 scalars, not %in%. Note that == preserves NA where %in% does not.
- warning: [if_not_else_linter] In a simple if/else statement, prefer `if (A) x else y` to the less-readable `if (!A) y else x`
- style: [undesirable_function_linter] Function "structure" is undesirable
- warning: [implicit_assignment_linter] Avoid implicit assignments in function calls. For example, instead of `if (x <- 1L) { ... }`, write `x <- 1L; if (x) { ... }`.
Copy link

codecov bot commented Nov 30, 2023

Codecov Report

Attention: 28 lines in your changes are missing coverage. Please review.

Comparison is base (7087f07) 6.52% compared to head (a71d138) 6.58%.

Files Patch % Lines
R/Functions_Selfdescribing.R 18.18% 9 Missing ⚠️
R/Extractions_Main.R 82.14% 5 Missing ⚠️
R/Functions_Metrics_008_SW2toTable.R 0.00% 4 Missing ⚠️
R/Functions_Metrics_005_TranspirationSeasonality.R 0.00% 2 Missing ⚠️
R/Functions_Supporting.R 66.66% 2 Missing ⚠️
R/rSW2metrics-package.R 0.00% 2 Missing ⚠️
R/Functions_AcrossYears.R 0.00% 1 Missing ⚠️
R/Functions_Metrics_001_SEUG.R 0.00% 1 Missing ⚠️
R/Functions_Metrics_002_newRR.R 0.00% 1 Missing ⚠️
R/Functions_Metrics_003_ATlinkages.R 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                   Coverage Diff                   @@
##           release/devel_v0.3.0     #10      +/-   ##
=======================================================
+ Coverage                  6.52%   6.58%   +0.06%     
=======================================================
  Files                        18      18              
  Lines                      5458    5464       +6     
=======================================================
+ Hits                        356     360       +4     
- Misses                     5102    5104       +2     

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

@dschlaep dschlaep merged commit a5c9558 into release/devel_v0.3.0 Nov 30, 2023
9 checks passed
@dschlaep dschlaep deleted the feature_lintr310 branch November 30, 2023 16:26
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.

1 participant