Static Code Analysis for R

Static Code Analysis for R - Published in JOSS (2025)

https://github.com/r-lib/lintr

Science Score: 100.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Committers with academic emails
    5 of 105 committers (4.8%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

linter r

Keywords from Contributors

tidyverse reproducibility correlation ropensci visualisation targets r-targetopia make standardization twitter
Last synced: 4 months ago · JSON representation ·

Repository

Static Code Analysis for R

Basic Info
  • Host: GitHub
  • Owner: r-lib
  • License: other
  • Language: R
  • Default Branch: main
  • Homepage: https://lintr.r-lib.org
  • Size: 30.2 MB
Statistics
  • Stars: 1,253
  • Watchers: 20
  • Forks: 193
  • Open Issues: 304
  • Releases: 15
Topics
linter r
Created about 11 years ago · Last pushed 4 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation Support

README.md

lintr

R build status codecov.io CRAN_Status_Badge lifecycle DOI

{lintr} provides static code analysis for R. It checks for adherence to a given style, identifying syntax errors and possible semantic issues, then reports them to you so you can take action. Watch lintr in action in the following animation:

{lintr} is complementary to the {styler} package which automatically restyles code, eliminating some of the problems that {lintr} can detect.

Installation

Install the stable version from CRAN:

R install.packages("lintr")

Or the development version from GitHub:

```R

install.packages("remotes")

remotes::install_github("r-lib/lintr") ```

Usage

And then you can create a configuration file and run selected linters:

```R lintr::use_lintr(type = "tidyverse")

in a project:

lintr::lint_dir()

in a package:

lintr::lint_package() ```

To see a list of linters included for each configuration:

```R

tidyverse (default)

names(lintr::linterswithdefaults())

full

names(lintr::all_linters()) ```

Setting up GitHub Actions

{usethis} provides helper functions to generate lint workflows for GitHub Actions:

```R

in a project:

usethis::usegithubaction("lint-project")

in a package:

usethis::usegithubaction("lint") ```

You can also run lintr during continuous integration or within your IDE or text editor. See vignette("continuous-integration") and vignette("editors") for more details.

Without further configuration, this will run the default linters. See vignette("lintr") to learn how to modify these defaults.

Code of Conduct

Please note that the lintr project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Owner

  • Name: R infrastructure
  • Login: r-lib
  • Kind: organization

JOSS Publication

Static Code Analysis for R
Published
April 03, 2025
Volume 10, Issue 108, Page 7240
Authors
Jim Hester ORCID
Netflix
Florent Angly ORCID
The University of Queensland
Michael Chirico ORCID
Google
Russ Hyde
Jumping Rivers
Ren Kun
Unknown
Indrajeet Patil ORCID
Carl Zeiss AG, Germany
Alexander Rosenstock
Mathematisches Institut der Heinrich-Heine-Universität Düsseldorf
Editor
Oskar Laverny ORCID
Tags
linter tidyverse

Citation (CITATION.cff)

cff-version: "1.2.0"
authors:
- family-names: Hester
  given-names: Jim
  orcid: "https://orcid.org/0000-0002-2739-7082"
- family-names: Angly
  given-names: Florent
  orcid: "https://orcid.org/0000-0002-8999-0738"
- family-names: Chirico
  given-names: Michael
  orcid: "https://orcid.org/0000-0003-0787-087X"
- family-names: Hyde
  given-names: Russ
- family-names: Kun
  given-names: Ren
- family-names: Patil
  given-names: Indrajeet
  orcid: "https://orcid.org/0000-0003-1995-6531"
- family-names: Rosenstock
  given-names: Alexander
doi: 10.5281/zenodo.15090477
message: If you use this software, please cite our article in the
  Journal of Open Source Software.
preferred-citation:
  authors:
  - family-names: Hester
    given-names: Jim
    orcid: "https://orcid.org/0000-0002-2739-7082"
  - family-names: Angly
    given-names: Florent
    orcid: "https://orcid.org/0000-0002-8999-0738"
  - family-names: Chirico
    given-names: Michael
    orcid: "https://orcid.org/0000-0003-0787-087X"
  - family-names: Hyde
    given-names: Russ
  - family-names: Kun
    given-names: Ren
  - family-names: Patil
    given-names: Indrajeet
    orcid: "https://orcid.org/0000-0003-1995-6531"
  - family-names: Rosenstock
    given-names: Alexander
  date-published: 2025-04-03
  doi: 10.21105/joss.07240
  issn: 2475-9066
  issue: 108
  journal: Journal of Open Source Software
  publisher:
    name: Open Journals
  start: 7240
  title: Static Code Analysis for R
  type: article
  url: "https://joss.theoj.org/papers/10.21105/joss.07240"
  volume: 10
title: Static Code Analysis for R

GitHub Events

Total
  • Fork event: 10
  • Create event: 122
  • Release event: 1
  • Issues event: 183
  • Watch event: 56
  • Delete event: 104
  • Member event: 1
  • Issue comment event: 426
  • Push event: 704
  • Gollum event: 3
  • Pull request review event: 428
  • Pull request review comment event: 296
  • Pull request event: 246
Last Year
  • Fork event: 10
  • Create event: 122
  • Release event: 1
  • Issues event: 183
  • Watch event: 56
  • Delete event: 104
  • Member event: 1
  • Issue comment event: 426
  • Push event: 704
  • Gollum event: 3
  • Pull request review event: 428
  • Pull request review comment event: 296
  • Pull request event: 246

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 1,898
  • Total Committers: 105
  • Avg Commits per committer: 18.076
  • Development Distribution Score (DDS): 0.646
Past Year
  • Commits: 139
  • Committers: 12
  • Avg Commits per committer: 11.583
  • Development Distribution Score (DDS): 0.353
Top Committers
Name Email Commits
Michael Chirico c****m@g****m 672
Jim Hester j****r@g****m 381
AshesITR a****k@w****e 246
Indrajeet Patil p****e@g****m 228
Florent Angly f****y@g****m 57
Kun Ren r****n@o****m 46
Russ Hyde r****a@g****m 31
Hugo Gruson 1****o 20
dependabot[bot] 4****] 14
Dragoș Moldovan-Grünfeld d****d@g****m 11
Gábor Csárdi c****r@g****m 9
Forest Fang f****g@o****m 8
Kirill Müller k****r@i****h 8
MEO265 9****5 7
Michael Quinn m****n@g****m 7
Salim B g****t@s****e 6
Barret Schloerke s****e@g****m 6
jrnold j****d@g****m 5
Kirill Müller k****r 5
JhossePaul m****a@h****m 4
Jonathan Keane j****e@g****m 4
olivroy 5****y 4
Jennifer (Jenny) Bryan j****n@g****m 4
Jack Wasey j****k@j****m 3
nathaneastwood n****d@m****m 3
Bruce Lee f****r@d****h 3
Daniel Possenriede p****e@g****m 3
F-Noelle f****e@g****m 3
Fabian Scheipl f****l@g****m 3
Konrad Pagacz k****z@g****m 3
and 75 more...

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 649
  • Total pull requests: 629
  • Average time to close issues: 7 months
  • Average time to close pull requests: 27 days
  • Total issue authors: 118
  • Total pull request authors: 29
  • Average comments per issue: 2.49
  • Average comments per pull request: 2.56
  • Merged pull requests: 533
  • Bot issues: 0
  • Bot pull requests: 13
Past Year
  • Issues: 110
  • Pull requests: 234
  • Average time to close issues: 24 days
  • Average time to close pull requests: 10 days
  • Issue authors: 35
  • Pull request authors: 11
  • Average comments per issue: 0.79
  • Average comments per pull request: 1.14
  • Merged pull requests: 179
  • Bot issues: 0
  • Bot pull requests: 7
Top Authors
Issue Authors
  • MichaelChirico (274)
  • IndrajeetPatil (91)
  • AshesITR (38)
  • Bisaloo (24)
  • etiennebacher (9)
  • latot (6)
  • m-muecke (6)
  • eitsupi (6)
  • maelle (6)
  • olivroy (5)
  • MEO265 (5)
  • klmr (4)
  • pawelru (4)
  • TimTaylor (3)
  • jmbarbone (3)
Pull Request Authors
  • MichaelChirico (425)
  • IndrajeetPatil (139)
  • Bisaloo (25)
  • dependabot[bot] (21)
  • AshesITR (20)
  • MEO265 (8)
  • F-Noelle (8)
  • olivroy (7)
  • salim-b (5)
  • jimhester (2)
  • lschneiderbauer (2)
  • hadley (2)
  • renkun-ken (2)
  • etiennebacher (2)
  • J-Moravec (2)
Top Labels
Issue Labels
feature (149) false-positive (69) new-linter (52) internals (44) bug (32) lint-metadata (30) false-negative (29) object linters 🏀 (27) documentation (26) performance (16) testing (15) indentation 📏 (14) rmd (14) help wanted :heart: (13) consistency :apple: :green_apple: (11) config (10) duplicate (10) breaking change :skull_and_crossbones: (9) google-linters (8) regression (8) good first issue :heart: (7) automation :robot: (6) blocked-internal (6) dev-workflow (5) out-of-scope (5) roxygen2 (5) blocked-external (5) reprex-needed (3) encoding (2) discussion :people_holding_hands: (1)
Pull Request Labels
google-linters (29) dependencies (21) testing (13) internals (12) documentation (9) dev-workflow (4) new-linter (4) feature (3) automation :robot: (2) performance (1) consistency :apple: :green_apple: (1) breaking change :skull_and_crossbones: (1) lint-metadata (1) config (1)

Packages

  • Total packages: 2
  • Total downloads:
    • cran 53,951 last-month
  • Total docker downloads: 3,097,581
  • Total dependent packages: 169
    (may contain duplicates)
  • Total dependent repositories: 764
    (may contain duplicates)
  • Total versions: 34
  • Total maintainers: 1
cran.r-project.org: lintr

A 'Linter' for R Code

  • Versions: 17
  • Dependent Packages: 169
  • Dependent Repositories: 764
  • Downloads: 53,951 Last month
  • Docker Downloads: 3,097,581
Rankings
Stargazers count: 0.2%
Forks count: 0.3%
Dependent repos count: 0.5%
Dependent packages count: 0.6%
Downloads: 1.0%
Average: 3.3%
Docker downloads count: 17.3%
Maintainers (1)
Last synced: 4 months ago
proxy.golang.org: github.com/r-lib/lintr
  • Versions: 17
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.5%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 4 months ago

Dependencies

.github/workflows/R-CMD-check-hard.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/check-all-examples.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/lint.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action v4.4.1 composite
  • actions/checkout v3 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-package-vigilant.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION cran
  • R >= 3.2 depends
  • backports * imports
  • codetools * imports
  • cyclocomp * imports
  • digest * imports
  • glue * imports
  • knitr * imports
  • rex * imports
  • stats * imports
  • utils * imports
  • xml2 >= 1.0.0 imports
  • xmlparsedata >= 1.0.5 imports
  • bookdown * suggests
  • crayon * suggests
  • httr >= 1.2.1 suggests
  • jsonlite * suggests
  • mockery * suggests
  • patrick * suggests
  • rlang * suggests
  • rmarkdown * suggests
  • rstudioapi >= 0.2 suggests
  • testthat >= 3.0.0 suggests
  • tibble * suggests
  • tufte * suggests
  • withr >= 2.5.0 suggests
tests/testthat/dummy_packages/assignmentLinter/DESCRIPTION cran
  • testthat >= 3.0.0 suggests
tests/testthat/dummy_packages/missing_dep/DESCRIPTION cran
  • myFancyUpstream * imports
tests/testthat/dummy_packages/no_export_dep/DESCRIPTION cran
  • datasets * imports
tests/testthat/dummy_packages/package/DESCRIPTION cran
  • lintr * imports
tests/testthat/dummy_packages/clean/DESCRIPTION cran
tests/testthat/dummy_packages/clean_subdir/r/DESCRIPTION cran
tests/testthat/dummy_packages/cp1252/DESCRIPTION cran
tests/testthat/dummy_packages/github_lintr_file/DESCRIPTION cran
.github/workflows/repo-meta-tests.yaml actions
  • actions/checkout v4 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.devcontainer/Dockerfile docker
  • rocker/r-base latest build
tests/testthat/dummy_packages/RConfig/DESCRIPTION cran
tests/testthat/dummy_packages/RConfigInvalid/DESCRIPTION cran