Giter VIP home page Giter VIP logo

lintr's Introduction

lintr

R build status codecov.io CRAN_Status_Badge

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:

install.packages("lintr")

Or the development version from GitHub:

devtools::install_github("r-lib/lintr")

Usage

# in a project:
lintr::use_lintr(type = "tidyverse")
usethis::use_github_action("lint-project")
lintr::lint_dir()

# in a package:
lintr::use_lintr(type = "tidyverse")
usethis::use_github_action("lint")
lintr::lint_package()

To see a list of linters included for each configuration:

# tidyverse (default)
names(lintr::linters_with_defaults())

# full
names(lintr::linters_with_tags(tags = NULL))

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.

lintr's People

Contributors

jimhester avatar michaelchirico avatar ashesitr avatar indrajeetpatil avatar fangly avatar renkun-ken avatar russhyde avatar dragosmg avatar gaborcsardi avatar saurfang avatar michaelquinn32 avatar schloerke avatar jrnold avatar krlmlr avatar jennybc avatar huisman avatar jonkeane avatar jhossepaul avatar f-ritter avatar fabian-s avatar kpagacz avatar laurentgatto avatar eitsupi avatar infotroph avatar bfgray3 avatar yu-iskw avatar dmurdoch avatar mwaldstein avatar maelle avatar enchufa2 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.