Etienne Bacher
etiennebacher.bsky.social
Etienne Bacher
@etiennebacher.bsky.social
PhD in economics from LISER, Luxembourg, now looking for research software engineer or data science positions. Mostly here to talk about #rstats

https://github.com/etiennebacher
Would love that too, just like ruff is a formatter and a linter in python, but that's part of a broader discussion to have. For now I'm focused on improving and polishing Jarl as a linter only
November 28, 2025 at 6:11 PM
Everything related to code formatting should be handled by Air (or another formatter but Air is my favorite). I just don't see the added value of having this in Jarl.
November 28, 2025 at 4:59 PM
New documentation:

- vignette "Tutorial: add a new rule" with lots of details to walk you through the process of implementing a new rule in Jarl
- new sections on how to use Jarl in Helix and Neovim
November 28, 2025 at 2:48 PM
New rules: 5 general rules and 5 rules for testthat in particular.

Those for testthat are opt-in by default and can be activated by using:

* `--extend-select TESTTHAT` in the CLI
* `extend-select = ["TESTTHAT"]` in jarl.toml
November 28, 2025 at 2:48 PM
FYI polars has a read_excel function, you don't need the pandas step: docs.pola.rs/api/python/d...
polars.read_excel — Polars documentation
docs.pola.rs
November 25, 2025 at 2:25 PM
Please make a PR or open an issue with the steps if you manage to do it, I spent way too much time trying to figure out vim/neovim yesterday (without success, even just opening a file was a pain 😅)
November 22, 2025 at 12:14 PM
A bit hard to answer in just a few characters but I have an issue for this here: github.com/etiennebache...
Think about families of lints · Issue #104 · etiennebacher/jarl
It could be nice to have "families" of lints, e.g. for dplyr, data.table, etc. The problem is that this cannot be with patterns alone, I need access to namespaces, not necessarily to define the rul...
github.com
November 22, 2025 at 9:45 AM
Good idea ;) I don't know if the OP gets notified on all answers so just in case: @niccrane.bsky.social, see above
November 21, 2025 at 9:15 PM
How did you guess? 😄

bsky.app/profile/etie...
#rstats Please welcome Jarl, a new R linter.

Jarl is a CLI tool with extensions in VS Code, Positron, and Zed. It can check thousands of lines of R code in milliseconds.

Jarl provides several output formats, a Github Actions workflow, and more.

Blog post: www.etiennebacher.com/posts/2025-1...
November 21, 2025 at 5:47 PM
Wonderful, thanks! I have added this method to the installation section
November 21, 2025 at 2:22 PM
All rules are purely implemented in Rust so Jarl is less flexible than the flir R package regarding implementing your own rules.

I might add them in Jarl and have them opt-in only, but I'm still thinking about it. It's also related to having "families of rules", like having `select = ["TESTTHAT"]`
November 21, 2025 at 10:35 AM
Awesome, I still need to add tests for this but good to know, thanks for checking!
November 21, 2025 at 10:12 AM
I'm not sure about those because they require some knowledge about the project environment that Jarl currently doesn't have.

These rules require knowing if the functions come from testthat or tinytest for instance.
November 21, 2025 at 9:49 AM
I don't think so. To be honest I haven't tested on quarto docs yet so I would say no.
November 21, 2025 at 8:50 AM
Shortly: it uses the abstract syntax tree (AST) of the code to identify function calls, arguments, if conditions, etc. It uses tree-sitter in the background to parse this AST and detect specific patterns.

I'll try to add a detailed tutorial on how to add a new rule (and these concepts) this weekend
November 20, 2025 at 6:23 PM
Jarl is built on top of the Air formatter and implements a growing list of lintr rules.

Thanks to @davisvaughan.bsky.social and @lionelhenry.bsky.social for help and advice, lintr developers for their tireless work compiling all those rules, and @rconsortium.bsky.social for funding the dvp of Jarl!
November 20, 2025 at 4:50 PM
I think we're in the same boat. I want to promote the use of targets, but my colleagues dont necessarily want to spend the time learning it, which I can also understand. And even if I can use it in projects where I control the tech, it just makes it harder to share with others later if needed
November 6, 2025 at 7:44 PM
Depends also on your colleagues I guess, it adds some complexity and not everyone wants to learn it
November 6, 2025 at 4:32 PM
It can be useful to translate some code into another syntax. For instance, in tidypolars, I translate the standard R syntax to the polars syntax. The function translate() is called recursively to translate a function call, then the arguments of this call, etc.
github.com/etiennebache...
tidypolars/R/utils-expr.R at main · etiennebacher/tidypolars
More efficient tidyverse code, using polars in the background - etiennebacher/tidypolars
github.com
November 6, 2025 at 12:43 PM
For polars, I don't know how you measure the memory usage, but if you use the numbers reported by bench::mark() then those are wrong because R cannot measure the memory used by the Rust code that runs in the background
October 28, 2025 at 12:30 PM
If you just want to please lintr, I'd use `# nolint: line_length_linter` on this line instead (or in the lintr config file)
October 23, 2025 at 7:46 AM
Just FYI, I don't know if it's on purpose or not, but the date of the post is 28 August so it doesn't appear as the latest post on the blog homepage
October 20, 2025 at 4:21 PM