Skip to content

Find and Fix Lints in R Code

0packages dependsuggested by 1
3.6Kdownloads / year
72.0%test coverage
13/13flavors OK

Overview

About

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.

Changes in 0.6.0

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 "---", then flir would 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 uses path = "." by default (#99).
  • lint_text() and fix_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-type is.*() functions and also provides more fixes (@trevorld, #110).

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 16.4 min · r-release-macos-x86_64
Status changes
  • 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
Advisories

none known

Documentation

In release 0.6.0
READMEYes · 515 wordsVignettesYes · 4 · dynamicNEWSYes · 100% structured · mentions 0.6.0Citation fileNoWebsiteYes · pkgdown
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%

Downloads

3.6K
CRAN downloads in the past year
Rank #6,951 · ~10/day · ~299/mo
Daily download trend is not available in this view yet.
42330 days
1.2K90 days
3.6K1 year
Compare downloads with other packages →
Also on55 r2u

Repository

90Stars
3Forks
13Open issues
0Open PRs
20Releases
371Commits
3Commit identities
371 commits · Last activity 2026-09-16 · 0% stars, 30d
Responsiveness
How these are sampled
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

2025-09-22 · 842026-09-16 · 90
PracticesBeta

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.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Governance and community (2)
Contributing guideIssue templates
Docs source (4)
README.Rmdpkgdown

GitHub Pages site last deployed 2026-09-16 · The repository has a site deploy workflow

pkgdown site last built 2026-09-16

CRAN release process (1)
cran-comments.md
Show all practicesHide 1 practice
Lint, format, editor (3)
Lint workflowjarlRStudio project
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
22 external dependencies (excludes base and recommended)

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.

Depends (1)
R >= 4.2
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect
Suggested by 1
Suggests, most downloaded first

People & History

People (3)
Author, Maintainer since 0.5.0 (2025), Copyright holder
Author · added in 0.6.0
Contributor · added in 0.6.0
Releases (2)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • 0.6.0Latest
    record
    2025-12-14 · current release · diff ↗ ·
    added 4 exports
    expect_s3_class_linter, expect_s4_class_linter, nzchar_linter, vector_logic_linter
  • 0.5.0
    record
    2025-06-28
  • R
    R 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")
Bacher, E., lintr authors, & Davis, T. L. (2025). flir: Find and Fix Lints in R Code (Version 0.6.0) [Computer software]. https://doi.org/10.32614/CRAN.package.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.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for flir version 0.6.0 [Data set]. HJJB, LLC. Data release v2026-10-21. https://doi.org/10.5281/zenodo.21843040

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.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy