Repository navigation
Closed
Labels
Milestone
Description
Splitting off a subset of #884 as a TODO list for 3.0.0 release; the rest of the linters can be done after that.
-
AnyDuplicatedLinter- Require usage of anyDuplicated() > 0 over any(duplicated(.)) New any_duplicated_linter #986 -
AnyIsNALinter- Require usage of anyNA over any(is.na(.)) New any_is_na_linter #975 -
ClassEqualsLinter- Block comparison of class with == New class_equals_linter #989 -
StopPasteLintercondition_message_linter- Block usage of paste() and paste0() with messaging functions using ... New stop_paste_linter #999 -
MultipleStopifnotLinterConsecutiveStopifnotLinter- Force consecutive stopifnot() calls into just one New consecutive_stopifnot_linter #1005 -
ElseSameLineLinter- Require else to come on the same line as the preceding brace New else_same_line_linter #1002 -
ExpectComparisonLinter- Require usage of expect_gt(x, y) over expect_true(x > y) (and similar) Expect comparison #955 -
ExpectIdenticalLinter- Require usage of expect_identical(x, y) where appropriate New expect_identical_linter #958 -
ExpectIsLinter- Redirect away from deprecated testthat::expect_is() expect_is_linter, or just use undesirable_function_linter? #946 -
ExpectLengthLinter- Require usage of expect_length(x, n) over expect_equal(length(x), n) New expect_length_linter #950 -
ExpectNamedLinter- Require usage of expect_named(x, n) over expect_equal(names(x), n) New expect_named_linter #949 -
ExpectNotLinter- Require usage of expect_false(.) over expect_true(!.) New expect_not_linter #945 -
ExpectNullLinter- Require usage of expect_null(x) over expect_equal(x, NULL) and similar expect_null_linter #887 -
ExpectS3ClassLinter- Require usage of expect_s3_class() or expect_s4_class() where appropriate. expect_s3_class_linter and expect_s4_class_linter #943 -
ExpectS4ClassLinter- Require usage of expect_s4_class(x, k) over expect_true(is(x, k)) expect_s3_class_linter and expect_s4_class_linter #943 -
ExpectTrueFalseAndConditionLinterconjunct_test_linter- Force && conditions in expect_true(), expect_false() to be written separately New conjunct_expecation_linter #948 -
ExpectTrueFalseLinter- Require usage of expect_true(x) over expect_equal(x, TRUE) New expect_true_false_linter #947 -
ExpectTypeLinter- Require usage of expect_type(x, type) over expect_equal(typeof(x), type) expect_type_linter #924 -
FixedRegexLinter- Require usage of 'fixed=TRUE' in regular expressions where appropriate New fixed_regex_linter #1021 -
FunctionBraceLinter- Require multi-line functions to use braces New function_brace_linter #987 -
IfelseCensorLinter- Block usage of ifelse where pmin or pmax is more appropriate New ifelse_censor_linter #1007 -
IfElseMatchBracesLinter- Require both or neither if/else branches to use curly braces New if_else_match_braces_linter #983 -
InnerCombineLinter- Require c() to be applied before relatively expensive vectorized functions New inner_combine_linter #1012 -
LiteralCoercionLinter- Require usage of correctly-typed literals over literal coercions New literal_coercion_linter #995 -
NestedIfelseLinter- Block usage of nested ifelse() calls New nested_ifelse_linter #996 -
NumericLeadingZeroLinter- Require usage of a leading zero in all fractional numerics New numeric_leading_zero_linter #992 -
OuterNegationLinter- Require usage of !any(.) over all(!.), !all(.) over any(!.) New outer_negation_linter #988 -
PasteSepLinter- Block usage of paste() with sep='' New paste_sep_linter #997 -
PasteToStringLinter- Block usage of paste() with collapse=', ' New paste_to_string_linter #1013 -
PipeCallLinter- Force explicit calls in magrittr pipes New pipe_call_linter enforcing calls (not symbols) in magrittr pipes #801 -
RedundantIfelseLinter- Prevent ifelse() from being used to produce TRUE/FALSE New redundant_ifelse_linter #1000 -
GrepSubsetLinterRegexSubsetLinter- Require usage of grep(value = TRUE) over x[grep(x)] New regex_subset_linter #1004 -
StopifnotAndConditionLinterconjunct_test_linter- Force && conditions in stopifnot() to be written separately Extend conjunct_expectation_linter to include stopifnot(), rename to conjunct_test_linter #1011 -
StringsAsFactorsLinter- Identify cases where stringsAsFactors should be supplied explicitly New strings_as_factors_linter #1020 -
SystemFileLinter- Block usage of file.path() with system.file() New system_file_linter #1006 -
UnreachableCodeLinter- Block unreachable code and comments following return statements New unreachable_code_linter #1003 -
VectorLogicLinter- Enforce usage of scalar && in conditional statements New vector_logic_linter #978 -
YodaTestLinter- Block obvious 'yoda tests' New yoda_test_linter #957
Activity
AshesITR commentedon May 3, 2022
Do we want to expose
google_lintersas an alternative todefault_lintersin 3.0.0, or hold off for now?NB it would require changing some configuration options for some of the (default) linters IINM, so wouldn't be equivalent to
linters_with_tags("google"), even if that tag was introduced (which it still should).MichaelChirico commentedon May 3, 2022
my instinct is to hold off for now... want to prioritize 3.0.0 now & don't think it's quite as straightforward to deliver this. want to think a bit more carefully as well as discuss internally what that object should be.