Repository navigation
0.6.0
Jarl 0.6.0
Breaking changes
- The JSON output produced with
--output-format jsonhas changed. Infix, the
fieldsstartandendare replaced by a fieldrangethat contains the
two values (#650).
New and improved rules
-
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-end
are used) (#638).which_greplnow supports namedwhich(x = ...)arguments and native pipe
chains such asx |> grepl(pattern = ...) |> which(). Calls with additional
which()arguments are reported without an automatic fix (#560, @Yousa-Mirage).
CLI improvements
-
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).
TOML improvements
-
New argument
[lint.per-file-ignores]injarl.tomlto deactivate rules on
specific files (#500). -
New argument
skipped-functionsfor thetrue_false_symbolrule injarl.toml
to list functions whose arguments are allowed to contain theTandF
symbols (#542).
Other improvements
-
Several new ways to install Jarl:
-
Fixed outdated paths in the contributing guide (#658, @christopherkenny).
Bug fixes
-
--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 like
if (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(), and
expect_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).
Install jarl 0.6.0
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/etiennebacher/jarl/releases/download/0.6.0/jarl-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/etiennebacher/jarl/releases/download/0.6.0/jarl-installer.ps1 | iex"Download jarl 0.6.0
| File | Platform | Checksum |
|---|---|---|
| jarl-aarch64-apple-darwin.tar.gz | Apple Silicon macOS | checksum |
| jarl-x86_64-apple-darwin.tar.gz | Intel macOS | checksum |
| jarl-x86_64-pc-windows-msvc.zip | x64 Windows | checksum |
| jarl-x86_64-pc-windows-msvc.msi | x64 Windows | checksum |
| jarl-aarch64-unknown-linux-gnu.tar.gz | ARM64 Linux | checksum |
| jarl-x86_64-unknown-linux-gnu.tar.gz | x64 Linux | checksum |
| jarl-aarch64-unknown-linux-musl.tar.gz | ARM64 MUSL Linux | checksum |
| jarl-x86_64-unknown-linux-musl.tar.gz | x64 MUSL Linux | checksum |