From 562534ea0ca287974d01b71d5ca3cf7224e0f187 Mon Sep 17 00:00:00 2001 From: Indrajeet Patil Date: Fri, 6 Sep 2024 20:24:26 +0200 Subject: [PATCH] Leave out `sort_linter()` from efficiency linters https://github.com/r-lib/lintr/issues/2653#issuecomment-2333476336 --- NEWS.md | 2 +- inst/lintr/linters.csv | 2 +- man/efficiency_linters.Rd | 1 - man/linters.Rd | 4 ++-- man/seq_linter.Rd | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/NEWS.md b/NEWS.md index d017c606a..96ca2a808 100644 --- a/NEWS.md +++ b/NEWS.md @@ -18,7 +18,7 @@ * `cyclocomp_linter()` is no longer part of the default linters (#2555, @IndrajeetPatil) because the tidyverse style guide doesn't contain any guidelines on meeting certain complexity requirements. Note that users with `cyclocomp_linter()` in their configs may now need to install {cyclocomp} intentionally, in particular in CI/CD pipelines. * `scalar_in_linter` is now configurable to allow other `%in%` like operators to be linted. The data.table operator `%chin%` is no longer linted by default; use `in_operators = "%chin%"` to continue linting it. (@F-Noelle) * `lint()` and friends now normalize paths to forward slashes on Windows (@olivroy, #2613). -* `undesirable_function_linter()`, `undesirable_operator_linter()`, and `list_comparison_linter()` were removed from the tag `efficiency` (@IndrajeetPatil, #2655). If you use `linters_with_tags("efficiency")` to include these linters, you'll need to adjust your config to keep linting your code against them. We did not find any such users on GitHub. +* `undesirable_function_linter()`, `undesirable_operator_linter()`, `seq_linter()`, and `list_comparison_linter()` were removed from the tag `efficiency` (@IndrajeetPatil, #2655). If you use `linters_with_tags("efficiency")` to include these linters, you'll need to adjust your config to keep linting your code against them. We did not find any such users on GitHub. ## Bug fixes diff --git a/inst/lintr/linters.csv b/inst/lintr/linters.csv index 1f070f45f..0e5cf5582 100644 --- a/inst/lintr/linters.csv +++ b/inst/lintr/linters.csv @@ -93,7 +93,7 @@ sample_int_linter,efficiency readability robustness scalar_in_linter,readability consistency best_practices efficiency configurable semicolon_linter,style readability default configurable semicolon_terminator_linter,defunct -seq_linter,robustness efficiency consistency best_practices default +seq_linter,robustness consistency best_practices default single_quotes_linter,style consistency readability deprecated sort_linter,readability best_practices efficiency spaces_inside_linter,style readability default diff --git a/man/efficiency_linters.Rd b/man/efficiency_linters.Rd index 458375e27..f96327dac 100644 --- a/man/efficiency_linters.Rd +++ b/man/efficiency_linters.Rd @@ -34,7 +34,6 @@ The following linters are tagged with 'efficiency': \item{\code{\link{routine_registration_linter}}} \item{\code{\link{sample_int_linter}}} \item{\code{\link{scalar_in_linter}}} -\item{\code{\link{seq_linter}}} \item{\code{\link{sort_linter}}} \item{\code{\link{string_boundary_linter}}} \item{\code{\link{unnecessary_concatenation_linter}}} diff --git a/man/linters.Rd b/man/linters.Rd index 50f8baf7d..03dc24bc2 100644 --- a/man/linters.Rd +++ b/man/linters.Rd @@ -24,7 +24,7 @@ The following tags exist: \item{\link[=correctness_linters]{correctness} (7 linters)} \item{\link[=default_linters]{default} (25 linters)} \item{\link[=deprecated_linters]{deprecated} (6 linters)} -\item{\link[=efficiency_linters]{efficiency} (29 linters)} +\item{\link[=efficiency_linters]{efficiency} (28 linters)} \item{\link[=executing_linters]{executing} (6 linters)} \item{\link[=package_development_linters]{package_development} (14 linters)} \item{\link[=pkg_testthat_linters]{pkg_testthat} (12 linters)} @@ -125,7 +125,7 @@ The following linters exist: \item{\code{\link{sample_int_linter}} (tags: efficiency, readability, robustness)} \item{\code{\link{scalar_in_linter}} (tags: best_practices, configurable, consistency, efficiency, readability)} \item{\code{\link{semicolon_linter}} (tags: configurable, default, readability, style)} -\item{\code{\link{seq_linter}} (tags: best_practices, consistency, default, efficiency, robustness)} +\item{\code{\link{seq_linter}} (tags: best_practices, consistency, default, robustness)} \item{\code{\link{sort_linter}} (tags: best_practices, efficiency, readability)} \item{\code{\link{spaces_inside_linter}} (tags: default, readability, style)} \item{\code{\link{spaces_left_parentheses_linter}} (tags: default, readability, style)} diff --git a/man/seq_linter.Rd b/man/seq_linter.Rd index ece1e853c..63c2efd73 100644 --- a/man/seq_linter.Rd +++ b/man/seq_linter.Rd @@ -56,5 +56,5 @@ lint( \link{linters} for a complete list of linters available in lintr. } \section{Tags}{ -\link[=best_practices_linters]{best_practices}, \link[=consistency_linters]{consistency}, \link[=default_linters]{default}, \link[=efficiency_linters]{efficiency}, \link[=robustness_linters]{robustness} +\link[=best_practices_linters]{best_practices}, \link[=consistency_linters]{consistency}, \link[=default_linters]{default}, \link[=robustness_linters]{robustness} }