目录
#x27;-qualifying * fix * another qualification Co-authored-by: AshesITR <alexander.rosenstock@web.de> * Use a more hermetic environment --------- Co-authored-by: Michael Chirico <michaelchirico4@gmail.com> Co-authored-by: Michael Chirico <chiricom@google.com>" href="/NSCCN/lintr/commits/449ed5ca55">Remove undesirable_operator_linter customizations (#2880)9个月前
  • CITATION.cffPost-publication clean-up and updates (#2845)1年前
  • COPYINGUpdate year in licence and copying files (#2552)2年前
  • DESCRIPTIONAdd Emmanuel as a contributor (#3016)2个月前
  • LICENSEInclude MIT licence (#2713)1年前
  • LICENSE.mdInclude MIT licence (#2713)1年前
  • NAMESPACEDelete defunct linters (#2978)5个月前
  • NEWS.mdFix false positive in `if_switch_linter()` for empty strings (#3018)2个月前
  • README.mdPost-publication clean-up and updates (#2845)1年前
  • codecov.yamlError on a `NOTE` in R CMD check (#1621)3年前
  • lintr.RprojStart fresh session each time in RStudio (#1857)3年前
  • 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:

    install.packages("lintr")

    Or the development version from GitHub:

    # install.packages("remotes")
    remotes::install_github("r-lib/lintr")

    Usage

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

    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:

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

    Setting up GitHub Actions

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

    # in a project:
    usethis::use_github_action("lint-project")
    
    # in a package:
    usethis::use_github_action("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.

    关于

    R语言代码静态分析工具,用于检查代码风格、语法错误和潜在问题

    44.9 MB
    邀请码
      Gitlink(确实开源)
    • 加入我们
    • 官网邮箱:gitlink@ccf.org.cn
    • QQ群
    • QQ群
    • 公众号
    • 公众号

    版权所有:中国计算机学会技术支持:开源发展技术委员会
    京ICP备13000930号-9 京公网安备 11010802032778号