Skip to content

0.6.0

Choose a tag to compare

@github-actions github-actions released this 24 Aug 21:24

Jarl 0.6.0

Breaking changes

  • The JSON output produced with --output-format json has changed. In fix, the
    fields start and end are replaced by a field range that contains the
    two values (#650).

New and improved rules

  • New rules:

  • Improved rules:

    • any_is_na now also reports NA %notin% x cases (#470, @Yousa-Mirage)
    • equals_na now also reports x %notin% NA cases (#469, @Yousa-Mirage)
    • expect_s3_class now also reports expect_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()
      (from testthat), expect_defunct() and expect_deprecated() (from lifecycle),
      and try() (#543, @maelle, #654).
    • outdated_suppression now has a safe fix that removes the unused
      suppression comment (or comments if # jarl-ignore-start and # jarl-ignore-end
      are used) (#638).
    • which_grepl now supports named which(x = ...) arguments and native pipe
      chains such as x |> 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 --exclude to exclude files or directories from the checks,
    mirroring the exclude argument in jarl.toml (#520).

  • Passing --statistics in 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 sarif to 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 example jarl rule any_is_na (#566).

  • Jarl now provides shell completions for bash, zsh, fish, powershell,
    and elvish. See Shell completions for more
    information (#567).

TOML improvements

  • New argument [lint.per-file-ignores] in jarl.toml to deactivate rules on
    specific files (#500).

  • New argument skipped-functions for the true_false_symbol rule in jarl.toml
    to list functions whose arguments are allowed to contain the T and F
    symbols (#542).

Other improvements

  • Several new ways to install Jarl:

    • it is available on PyPI under the name jarl-linter, enabling its
      installation via uv, pipx, and other tools (#466).
    • it is available on conda-forge, enabling its installation via mise and
      pixi (@salim-b).
    • it is available on Homebrew, enabling its installation via brew.
  • Fixed outdated paths in the contributing guide (#658, @christopherkenny).

Bug fixes

  • --statistics now reports syntax errors and returns a non-zero status when
    parsing fails (#577, @Yousa-Mirage).

  • --fix-only now implies --fix and 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_symbol no longer reports T and F when they are used as
    objects in subset expressions, such as T[1:2] (#582, @Yousa-Mirage).

  • implicit_assignment no longer flags chained assignments like
    if (TRUE) a <- b <- 1, aligning with lintr behavior (#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 @examples and @examplesIf now 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_code that was not running on braced expressions (#512).

  • Fixed false positives in assignment rule. Jarl could recommend replacing <-
    by = in places where this would change the meaning of the code (#515).

  • implicit_assignment now includes alist(), 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_equals now skips cases that use rlang's !! and !!! operators
    (#625).

  • The fix for comparison_negation is 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.toml is 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 | sh

Install 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