Helps You to Code Cleaner

Check your R code for some of the most common layout flaws. Many tried to teach us how to write code less dreadful, be it implicitly as B. W. Kernighan and D. M. Ritchie (1988) in 'The C Programming Language' did, be it explicitly as R.C. Martin (2008) in 'Clean Code: A Handbook of Agile Software Craftsmanship' did. So we should check our code for files too long or wide, functions with too many lines, too wide lines, too many arguments or too many levels of nesting. Note: This is not a static code analyzer like pylint or the like. Checkout < https://cran.r-project.org/package=lintr> instead.


pipeline status
coverage report

CRAN_Status_Badge RStudio_downloads_monthly RStudio_downloads_total

cleanr

Check your R code for some of the most common layout flaws.

Introduction

After installation, please read the help page:

help("cleanr-package", package = "cleanr")
#> Helps You to Code Cleaner
#> 
#> Description:
#> 
#>      Check your R code for some of the most common layout flaws.
#> 
#> Details:
#> 
#>      Many tried to teach us how to write code less dreadful, be it
#>      implicitly as B. W. Kernighan and D. M. Ritchie in The C
#>      Programming Language did, be it explicitly as R.C. Martin in Clean
#>      Code: A Handbook of Agile Software Craftsmanship did.
#> 
#>      So we should check our code for files too long or wide, functions
#>      with too many lines, too wide lines, too many arguments or too
#>      many levels of nesting.
#> 
#> Note:
#> 
#>      This is not a static code analyzer like pylint or the like. If
#>      you're looking for a static code analyzer, check out lintr
#>      (<https://cran.r-project.org/package=lintr>).
#> 
#> See Also:
#> 
#>      Packages 'codetools'
#>      (<https://cran.r-project.org/package=codetools>), 'formatR'
#>      (<https://cran.r-project.org/package=formatR>) and 'lintr'
#>      (<https://cran.r-project.org/package=lintr>).

Installation

You can install cleanr from gitlab via:

if (! require("remotes")) install.packages("remotes")
remotes::install_gitlab("fvafrcu/cleanr")

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("cleanr")

1.4.0 by Andreas Dominik Cullmann, 3 years ago


https://gitlab.com/fvafrcu/cleanr


Browse source code at https://github.com/cran/cleanr


Authors: Andreas Dominik Cullmann [aut, cre]


Documentation:   PDF Manual  


BSD_2_clause + file LICENSE license


Imports checkmate, fritools, pkgload, rprojroot

Suggests devtools, rasciidoc, rmarkdown, RUnit, testthat, usethis


Suggested by fakemake, packager.


See at CRAN