Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add .lintr config and run lintr on Travis (.com)
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
linters: with_defaults( | ||
# lintr defaults: https://github.com/jimhester/lintr#available-linters | ||
# the following setup changes/removes certain linters | ||
assignment_linter = NULL, # do not force using <- for assignments | ||
object_name_linter = object_name_linter(c("snake_case", "CamelCase")), # only allow snake case and camel case object names | ||
cyclocomp_linter = NULL, # do not check function complexity | ||
commented_code_linter = NULL # allow code in comments | ||
line_length_linter = line_length_linter(100) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# OS --------------------------------------------------------------------------- | ||
os: linux | ||
dist: bionic | ||
|
||
# meta ------------------------------------------------------------------------- | ||
language: r | ||
cache: packages | ||
latex: false | ||
|
||
# Stages ----------------------------------------------------------------------- | ||
|
||
install: true | ||
script: | ||
- Rscript -e 'if (!requireNamespace("lintr")) install.packages("lintr")' | ||
- Rscript -e 'lintr::lint_package()' |