-
New rules:
apply_paste(#563)assignment_on_if_no_else(#605, @christopherkenny)function_return(#750)list_comparison(#572, @Yousa-Mirage)null_list(#785, @JosephBARBIERDARNAL)terminal_close(#811)todo_comment(#739, @Yousa-Mirage)
-
Improved rules:
- The
seq2rule now also reportsseq_len(length(...))and suggestsseq_along(...)(#761, @JosephBARBIERDARNAL). outer_negationnow reports cases with!both inside and outside the call (#779, @Yousa-Mirage).
- The
-
Jarl handles parsing errors better, which may lead to more code being analysed in files with parsing errors (#762). Thanks to Davis Vaughan for his work upstream in Air and Aether.
-
undesirable_operatornow accepts inline tables inoperatorsandextend-operatorsto attach custom messages to undesirable operators (#742). -
Jarl suggests more potential names when a rule name is unknown (#777).
-
New option
ignore-roxygeninjarl.tomlto ignore some rules only in roxygen@examplesand@examplesIfsections (#780). -
New CLI argument
--configto use a specific configuration file instead of the discovered ones, or to override some options of the configuration, e.g.--config "lint.select = ['any_is_na']"(#804).
-
Fix
comparison_negationprecedence and tidy-evaluation handling, detect nested parentheses and unparenthesized comparisons, and provide safe fixes (#787, @Yousa-Mirage). -
Fix
outer_negationhandling of operator precedence, pipes, andna.rm, and detect parenthesized and namespace-qualified calls. Its fix is now unsafe because it can change warnings and errors for inputs that are not logical (#779, @Yousa-Mirage). -
for_loop_indexnow detects reused variables in nested expressions, including function definitions and variable subscripts, while ignoring argument labels and fixed field names (#752, @Yousa-Mirage). -
Fix
system_filediagnostics and safe fixes for nestedfile.path()calls, preserving arguments and namespaces (#781, @Yousa-Mirage). -
Prevent
unused_objectfrom reporting objects exported byexportPattern()(#711, @Yousa-Mirage). -
Fix detection of backtick-quoted indices in
for_loop_dup_index(#753, @Yousa-Mirage).
This release doesn't contain any change compared to the 0.7.0 release found on Github.
For releases found on PyPI, 0.7.1 contains the fix in https://github.com/etiennebacher/jarl/commit/9ad3bd56c141673bbcbd47f99e6878007a6fa6a8 and 0.7.0 doesn't. This fix was made shortly after 0.7.0 was released, so I wanted to backport it and release a new 0.7.0. However, PyPI doesn't allow to publish twice the same version, even if the first release is deleted. Therefore, I release 0.7.1 so that all releases with 0.7.1 match, no matter where they are installed from.
::: {.callout-note icon=false title="Released on 2026-10-20" .low-opacity} :::
-
The command-line argument
--assignmentand thejarl.tomlargumentassignment(both deprecated since 0.5.0) are removed. Use the rule-specific option[lint.assignment]injarl.tomlinstead (#663, #758). -
The rule
browser(deprecated since 0.5.0) is removed. Use the ruleundesirable_functioninstead (#757). -
A fix can now edit several places of a file at once, so in the
jsonoutput format thefixobject contains a list of edits instead of a singlecontent/rangepair (#700):"fix": { "edits": [ { "range": [0, 13], "content": "anyNA(x)" } ], "to_skip": false }
- The
internal_functionrule is deprecated and disabled by default. Useundesirable_operatorinstead (#657).
-
New rules:
consecutive_signs(#745, @Yousa-Mirage)cyclomatic_complexity(#731)library_call(#701)undesirable_operator(#657, @christopherkenny)yoda_condition(#733, @Yousa-Mirage)
-
Improved rules:
-
expect_lengthno longer reports cases wherelength()is in theexpectedargument, e.g.expect_equal(nrow(x), length(y))(#684). -
nzcharnow also reports comparisons ofnchar(x)with zero, such asnchar(x) == 0, and its fixes preserve missing values withkeepNA = TRUE(#705, @Yousa-Mirage). -
The
expect_typerule no longer lintsexpect_true(is.null(x)), which was already reported by theexpect_nullrule (#680, @Yousa-Mirage).
-
-
jarl check --stdin-file-path <PATH>lints code read from stdin, using<PATH>for config discovery, package detection,excludepatterns and diagnostics (#749). -
The config file can be named
.jarl.tomlas well asjarl.toml. Both names are equivalent, and a directory containing both is now an error instead of silently usingjarl.toml(#717). -
Only use placeholder text in messages and suggestions (#722).
-
The LSP now also publishes diagnostics when opening a file (#685).
-
The CLI now prints a message suggesting
fix-roxygen = truewhen some fixes cannot be applied because the violation is in part of@examples(#702). -
The JSON output now contains information on the fix ("safe", "unsafe", or "none") (#747) and reports more information on syntax errors (
message,range,location) (#748).
-
Fix
string_boundaryfalse positives for mismatched substring widths and reordered named arguments, and mark its fixes as unsafe (#698, @Yousa-Mirage). -
Prevent
unused_functionandunused_objectfrom falsely reporting non-ASCII names (#706, @Yousa-Mirage). -
Recognize parenthesized
TRUEconditions inrepeatand preserve loop body comments when applying fixes (#754, @Yousa-Mirage). -
Handle uppercase
.RMD/.QMDextensions (and any other letter-case variant) files consistently (#709, @Yousa-Mirage). -
Prevent the
nzcharrule from treating quote characters as empty strings and support empty raw string literals (#696, @Yousa-Mirage). -
Jarl now properly checks the components of selector, extraction, and namespace AST nodes (
[[,@,$,::,:::) (#697, @Yousa-Mirage). -
The
githubandsarifoutput formats now report parsing errors to stderr instead of silently dropping them (#695, @Yousa-Mirage). -
Prevent the
sample_intrule from panicking on calls with missing arguments (#687, @Yousa-Mirage). -
Prevent the
outer_negationrule from rewriting unary+and-expressions as logical negations (#688, @Yousa-Mirage). -
Prevent fixes for
any_is_na,any_duplicated, andcondition_messagefrom dropping extra unnamed arguments (#677, @Yousa-Mirage). -
The
lengthsrule no longer crashes on calls whereXis missing from the syntax tree, e.g.sapply(FUN = length)orx |> sapply(FUN = length). The autofix now also produceslengths(x)instead of the invalidlengths(X = x)whenXis passed by name (#671, @Yousa-Mirage). -
Fix language server suppression quickfix positions for non-ASCII text and Rmd/Qmd chunk insertion positions (#676, #708, @Yousa-Mirage).
-
Prevent
unused_functionandunused_objectfrom falsely reporting non-ASCII names (#706, @Yousa-Mirage). -
Ensure that
--fixworks with multi-byte characters (#672, @Yousa-Mirage). -
Avoid invalid
literal_coercionfixes for strings containing quotes (#678, @Yousa-Mirage). -
The
pipe_consistencyrule no longer emits invalid fixes when convertingmagrittrpipes with a non-call RHS, such asx %>% sum(#683, @Yousa-Mirage). -
Prevent incorrect
dplyr_filter_outfixes caused by matchingis.na()guard arguments as substrings of other identifiers (#681, @Yousa-Mirage). -
In R Markdown and Quarto documents,
unreachable_codeno longer reports code in chunks following a chunk that would stop evaluation but is either unevaluated or haserror: true(#724).
::: {.callout-note icon=false title="Released on 2026-08-24" .low-opacity} :::
- The JSON output produced with
--output-format jsonhas changed. Infix, the fieldsstartandendare replaced by a fieldrangethat contains the two values (#650).
-
New rules:
condition_call(#503)condition_message(#545)empty_file(#477, @JosephBARBIERDARNAL)expect_s4_class(#553, @Yousa-Mirage)glue(#484, @novica)if_not_else(#551)literal_coercion(#504)missing_argument(#506)nested_pipe(#516)notin(#459, @Yousa-Mirage)pipe_consistency(#482)pipe_return(#502)rep_times_ignored(#556, @Yousa-Mirage)stopifnot_all(#547, @Yousa-Mirage)strings_as_factors(#546, @Yousa-Mirage)unnecessary_parentheses(#510, @JosephBARBIERDARNAL)unused_object(#589)
-
Improved rules:
any_is_nanow also reportsNA %notin% xcases (#470, @Yousa-Mirage)equals_nanow also reportsx %notin% NAcases (#469, @Yousa-Mirage)expect_s3_classnow also reportsexpect_true(is.<class>(x)),expect_true(inherits(x, class)), and dynamic class expressions. Dynamic class expressions are reported without an automatic fix (#555, @Yousa-Mirage).- Four more functions skipped by default from
implicit_assignment:expect_silent()(fromtestthat),expect_defunct()andexpect_deprecated()(fromlifecycle), andtry()(#543, @maelle, #654). outdated_suppressionnow has a safe fix that removes the unused suppression comment (or comments if# jarl-ignore-startand# jarl-ignore-endare used) (#638).which_greplnow supports namedwhich(x = ...)arguments and native pipe chains such asx |> grepl(pattern = ...) |> which(). Calls with additionalwhich()arguments are reported without an automatic fix (#560, @Yousa-Mirage).
-
The CLI now gives suggestions when some rule names don't exist (#501).
-
New CLI argument
--excludeto exclude files or directories from the checks, mirroring theexcludeargument injarl.toml(#520). -
Passing
--statisticsin the CLI now indicates which violations have an automatic unsafe fix (#554). -
Jarl now reports rule violations in files that contain syntax errors and provides clearer messages for syntax errors (#538, #569).
-
New
--output-format sarifto export to SARIF (#508, @dieghernan). -
Clearer output for
jarl check --help(#521). -
New command
jarl rule <rule_name>to print a rule's documentation in the terminal, for examplejarl rule any_is_na(#566). -
Jarl now provides shell completions for
bash,zsh,fish,powershell, andelvish. See Shell completions for more information (#567).
-
New argument
[lint.per-file-ignores]injarl.tomlto deactivate rules on specific files (#500). -
New argument
skipped-functionsfor thetrue_false_symbolrule injarl.tomlto list functions whose arguments are allowed to contain theTandFsymbols (#542). -
undesirable_functionnow accepts inline tables infunctionsandextend-functionsto attach custom suggestions to undesirable functions (#726).
-
Several new ways to install Jarl:
- it is available on PyPI under the name
jarl-linter, enabling its installation viauv,pipx, and other tools (#466). - it is available on
conda-forge, enabling its installation viamiseandpixi(@salim-b). - it is available on Homebrew, enabling its installation via
brew.
- it is available on PyPI under the name
-
Fixed outdated paths in the contributing guide (#658, @christopherkenny).
-
--statisticsnow reports syntax errors and returns a non-zero status when parsing fails (#577, @Yousa-Mirage). -
--fix-onlynow implies--fixand no longer applies unsafe fixes by default (#579, @Yousa-Mirage). -
Jarl now checks rule violations inside expressions on the left-hand side of
[,[[,$, and@(#581, @Yousa-Mirage). -
true_false_symbolno longer reportsTandFwhen they are used as objects in subset expressions, such asT[1:2](#582, @Yousa-Mirage). -
implicit_assignmentno longer flags chained assignments likeif (TRUE) a <- b <- 1, aligning withlintrbehavior (#480, @atsyplenkov). -
Automatic fixes now skip rewrites when comments are inside the rewritten expression, while still allowing leading and trailing comments (#461, @Yousa-Mirage).
-
Suppression comments in
@examplesand@examplesIfnow work correctly (#443). -
Fix alignment of diagnostic in console when source uses tabs (#445, #559).
-
Files that have "Generated by" in their first comment are ignored by Jarl (#486).
-
Fixed
unreachable_codethat was not running on braced expressions (#512). -
Fixed false positives in
assignmentrule. Jarl could recommend replacing<-by=in places where this would change the meaning of the code (#515). -
implicit_assignmentnow includesalist(),expect_no_condition(),expect_no_warning(),expect_no_error(),expect_no_message(), andexpect_no_match()in the list of functions skipped by default (#527, #639). -
Jarl no longer fails to parse
...()(#584, @Yousa-Mirage). -
redundant_equalsnow skips cases that userlang's!!and!!!operators (#625). -
The fix for
comparison_negationis now considered "unsafe" because it can produce different output depending on operator precedence around the comparison (#632). -
Fix the detection of
Depends: R (>= x.y.z)in some cases (#641). -
Replace panic by a proper error if
jarl.tomlis unreadable, for instance because of a permission error (#645). -
Ensure the LSP has the same file selections and exclusions capabilities as the CLI (#647).
::: {.callout-note icon=false title="Released on 2026-03-24" .low-opacity} :::
-
The command-line argument
--assignmentand thejarl.tomlargumentassignmentare both deprecated. Instead, you should use the following code injarl.toml:[lint.assignment] operator = "<-" # or "="More info on these rule-specific options in
jarl.tomlin the "Features" section below (#334). -
The rule
"browser"is deprecated. Calls tobrowser()are now detected with the rule"undesirable_function"(#336).
-
jarl.tomlnow accepts rule-specific options in subsections[lint.<rule_name>], such as:[lint] ... # In the rule `duplicated_arguments`, do not report calls to `my_function()` # and `list()` where multiple arguments have the same name. [lint.duplicated_arguments] extend-skipped-functions = ["my_function", "list"]These options are listed in the Configuration page (#333).
-
Jarl now also analyzes piped functions, e.g. the following code is reported by the
any_is_narule:is.na(x) |> any() x |> is.na() |> any()
(#338).
-
Jarl now checks R code in more places:
- chunks in Quarto and R Markdown documents. More information in the "R Markdown and Quarto" section (#50).
@examplesand@examplesIfsections inroxygen2comments (#385).
-
Added support for multiple
jarl.toml, i.e. each file now uses the nearestjarl.toml. For example, Jarl can check a folder where several subfolders have their ownjarl.toml(before, this would error). (#353) -
New option
includeinjarl.toml, to complementexclude(#349). -
New rules:
dplyr_filter_out(#393)dplyr_group_by_ungroup(#395)duplicated_function_definition(#358)expect_match(#364, @bjyberg)expect_no_match(#368, @bjyberg)invalid_chunk_suppression(#350)nzchar(#406, @maelle)quotes(#381, @bjyberg)undesirable_function(replacesbrowser) (#336)unused_function(#362)
-
The output in terminal with output format
fullorconciseis now organized in multiple sections (summary, warnings, notes) (#366). -
Hovering a diagnostic now shows the rule name (#377).
-
Jarl can be used with
pre-commitandprek, see Pre-commit tools (#379). -
The CLI now errors early when some incompatible arguments are used (#437).
-
fixed_regexcould loop infinitely trying to addfixed = TRUE. This is fixed (#388). -
Some fixes to ensure that automatic fixes don't introduce new violations or new parsing errors (#389).
-
Suppression comments now work better when inserted in piped chains (#397).
-
Fix a wrong parsing error when using
next()orbreak()(#417).
::: {.callout-note icon=false title="Released on 2026-02-05" .low-opacity} :::
-
The support for comments to hide violations (aka suppression comments, aka
# nolintcomments inlintr) has been entirely reworked (#218). It is no longer compatible withlintr's comments. Instead, Jarl now uses# jarl-ignorecomments and follows different rules regarding the syntax and location of those comments. Detailed documentation is available in the section "Suppression comments" on the website. As part of this rewrite, the following rules have been added:blanket_suppression(#243)misnamed_suppression(#309)misplaced_file_suppression(#305)misplaced_suppression(#307)unexplained_suppression(#304)unmatched_range_suppression(#312)unused_suppression(#310)
-
New CLI argument
--statisticsto show the number of violations per rule instead of the details of each violation. Jarl prints a hint to use this argument when more than 15 violations are reported (only when--output-formatisconciseorfull). This value can be configured with the environment variableJARL_N_VIOLATIONS_HINT_STAT. (#250, #266) -
Jarl now looks in parent folders for
jarl.toml. It searches until the user config folder is reached (the location of this folder depends on the OS:~/.configon Unix and~/AppData/Roamingon Windows). Jarl uses the firstjarl.tomlthat is found. This is useful to store settings that should be common to all projects (e.g.assignment = "<-") without creating ajarl.toml, which is a common situation for standalone R scripts. (#253) -
New rules:
equals_nan(#284)equals_null(#283)for_loop_dup_index(#327)if_always_true(#311, @bjyberg)internal_function(#291)redundant_ifelse(#260)unnecessary_nesting(#268)unreachable_code(#261)
-
When the output format is
fullorconcise, rule names now have a hyperlink leading to the website documentation (#278). -
any_is_nanow reportsNA %in% x(#286).
-
The following rules are now disabled by default. They still exist and the user can choose to use them, but they were deemed too noisy for limited benefit to be enabled by default:
assignment(#258)fixed_regex(#279)sample_int(#262)
-
equals_nanow reportsx %in% NAcases, as documented (#285). -
There are now binaries available for
linux-musl(x64andarm64) (#287).
-
When
output-formatisjsonorgithub, additional information displayed in the terminal (e.g. timing) isn't included anymore to avoid parsing errors (#254). -
Fixed a bug in the number of "fixable diagnostics" reported when the arg
fixableis present injarl.tomlbut--fixis not passed (#255). -
fixed_regexis now correctly classified as "Performance" instead of "Readability" rule internally (#279). -
Default values of function parameters are now analyzed too (#282).
-
duplicated_argumentsdoesn't report anymore cases where argument names"and'were conflated, e.g.switch(x, `"` = "double", `'` = "single")
(#288).
- New section in the
Integrationspage to show how to use Jarl in various CI/CD platforms (#289, @philipp-baumann).
::: {.callout-note icon=false title="Released on 2025-12-17" .low-opacity} :::
-
Jarl now excludes by default file paths matching the following patterns:
.git/,renv/,revdep/,cpp11.R,RcppExports.R,extendr-wrappers.R, andimport-standalone-*.R.A new CLI argument
--no-default-excludecan be used to check those files as well. This argument overrides thedefault-exclude = trueoption when set injarl.toml(#178, @novica).
--output-format jsonnow contains two fieldsdiagnosticsanderrors(#219).- Better support for namespaced function calls, both when reporting violations and when fixing them (#221).
- The
class_equalsrule now also reports cases likeidentical(class(x), "foo")andidentical("foo", class(x))(#234). - New rules:
expect_s3_class(#235)expect_type(#226)fixed_regex(#227)sprintf(#224)string_boundary(#225)vector_logic(#238)
# nolintcomments are now properly applied to nodes that are function arguments, e.g.does not report a violation anymore (#229).foo( # nolint any(is.na(x)) )
expect_namedno longer reports cases likeexpect_equal(x, names(y))because rewriting those asexpect_named(y, x)would potentially change the intent of the test and the way it is read (#220).
::: {.callout-note icon=false title="Released on 2025-11-29" .low-opacity} :::
- Important performance improvement when using
--fix, in particular in projects with many R files (#217).
::: {.callout-note icon=false title="Released on 2025-11-28" .low-opacity} :::
- For consistency between CLI arguments and
jarl.tomlarguments, the following CLI arguments are renamed (#199):--select-rulesbecomes--select--ignore-rulesbecomes--ignore--assignment-opbecomes--assignment
- New argument
extend-selectinjarl.tomland--extend-selectin the CLI to select additional rules on top of the existing selection. This can be useful to select opt-in rules in addition to the default set of rules (#193). - Added support for
seqandseq2rules (#187). - Added support for several rules related to
testthat. Those rules are disabled by default and can be enabled by combiningselectorextend-selectwith the rule name or theTESTTHATgroup rule name. Those rules are:expect_length(#211)expect_named(#212)expect_not(#204)expect_null(#202)expect_true_false(#191)
implicit_assignmentno longer reports cases insidequote()(#209).
- Added section on Neovim to the Editors page (#188, @bjyberg).
- Added page "Tutorial: add a new rule" (#183).
::: {.callout-note icon=false title="Released on 2025-11-23" .low-opacity} :::
- Added support for
list2dfrule (#179). - Added support for
browserrule (#185, @jonocarroll). - Added support for
system_filerule (#186).
- (Hopefully) Fixed wrong printing of ANSI characters in multiple terminals on Windows (#179, thanks @novica for the report).
- Added sections on RStudio and Helix to the Editors page.
- Added installation instructions using Scoop on Windows.
::: {.callout-note icon=false title="Released on 2025-11-20" .low-opacity} :::
- Fix discovery of
jarl.tomlby the Jarl extension (#175, thanks @DavisVaughan for the report). - Rule
duplicated_argumentno longer reportscli_functions where multiple arguments have the same name (#176, thanks @DavisVaughan for the report).
- The docs of
assignmentrule now explain how to change the preferred assignment operator.
::: {.callout-note icon=false title="Released on 2025-11-19" .low-opacity} :::
First release (announced)