Static code analysis and style checking for R
open sourceMITfree
lintr is a linter for R: it checks code against a style, finds syntax errors and possible semantic problems, and reports them. Linters are chosen in a configuration file, it runs in continuous integration (usethis generates a GitHub Actions workflow) and on the fly in RStudio, VS Code, Emacs, Vim and Sublime Text, and it complements the styler package, which restyles code automatically.
Problems it solves
- lint R code in CI
- enforce the tidyverse style guide in an R package
- find possible bugs in R scripts before running them
Features
- style, syntax and semantic checks for R
- configurable linters
- GitHub Actions workflow through usethis
- editor integration for RStudio, VS Code, Emacs, Vim and Sublime Text
Alternatives
The same job
These do what lintr does.
- ShellCheck A shell script static analysis tool
- golangci-lint Fast linters runner for Go
- Clippy The official Rust linter: 800+ lints for common mistakes and unidiomatic code
- RuboCop RSpec RuboCop extension with cops for RSpec test files
- Vale A markup-aware linter for prose
- PHPCompatibility PHP_CodeSniffer sniffs that check PHP code for cross-version compatibility
