Find and Fix Lints in R Code
Overview
Lints are code patterns that are not optimal because they are inefficient, forget corner cases, or are less readable. 'flir' provides a small set of functions to detect those lints and automatically fix them. It builds on 'astgrepr', which itself uses the 'Rust' crate 'ast-grep' to parse and navigate R code.
New features
- New linters:
expect_s3_class_linter()(@trevorld, #110)expect_s4_class_linter()(@trevorld, #109)nzchar_linter()(@trevorld, #102)vector_logic_linter()(@trevorld, #111)- New vignette "Tips and tricks" that lists some solutions for problems one may encounter when writing new rules (#94).
Bug fixes
- When using external rules with the
with-<pkg>syntax, if the YAML file contains several rules separated by "---", thenflirwould only use the first one. This is now fixed (#95).
Show all changes in 0.6.0Hide the rest of the changes in 0.6.0
list_linters()now usespath = "."by default (#99).lint_text()andfix_text()now work correctly with custom rules when the working directory is neither an R package nor an RStudio project (#119).
Changes
expect_type_linter()now has less false positives for non-typeis.*()functions and also provides more fixes (@trevorld, #110).
From NEWS.md in the release
Install
Health
- OK13 OK2026-09-01
- ERROR12 OK, 1 ERROR2026-08-25
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-07-19
Show 16 earlier changesHide 16 earlier changes
- ERROR12 OK, 1 ERROR2026-07-18
- OK13 OK2026-06-27
- ERROR12 OK, 1 ERROR2026-06-24
- OK13 OK2026-06-18
- ERROR12 OK, 1 ERROR2026-06-16
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK13 OK2026-05-26
- ERROR12 OK, 1 ERROR2026-05-24
- OK13 OK2026-05-07
- ERROR12 OK, 1 ERROR2026-05-05
- OK13 OK2026-05-04
- ERROR12 OK, 1 ERROR2026-04-30
- OK14 OK2026-03-22
- ERROR13 OK, 1 ERROR2026-03-20
- OK14 OK2026-03-10
Documentation
- Help pages
- 60 (1 internal)includes a package overview page
- Examples that run
- 100%3 run in a plain check
- Exported functions with examples
- 5%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 0%
- Adding new rules HTML
- Automatic fixes HTML
- Sharing rules across packages HTML
- tips-and-tricks HTML
Downloads
Repository
- PRs merged (all time)
- 93%
- Median days to close, 50 most recently updated closed issues
- 1
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
12 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/etiennebacher/flir on 2026-10-18.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-09-16 · The repository has a site deploy workflow
pkgdown site last built 2026-09-16
Show all practicesHide 1 practice
Dependencies
Installing flir adds 12 packages (10 with compiled code, 12 MB of source tarballs). Heaviest: data.table 5.7 MB, astgrepr 3.6 MB, fs 1.4 MB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 0.6.0Latest2025-12-14 · current release · diff ↗ ·
added 4 exports
expect_s3_class_linter, expect_s4_class_linter, nzchar_linter, vector_logic_linter - 0.5.02025-06-28
- RR 4.5.0 released · 2025-04-11
Package metadata
- First published
- 2025-06-28
- Total releases
- 2 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.2
- Download size
- 1.8 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("flir")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.