Skip to content

Commit

Permalink
add .lintr config and run lintr on Travis (.com)
Browse files Browse the repository at this point in the history
  • Loading branch information
pat-s committed Mar 31, 2020
1 parent 60f2479 commit 4f9476b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .lintr
@@ -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)
)
15 changes: 15 additions & 0 deletions .travis.yml
@@ -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()'

0 comments on commit 4f9476b

Please sign in to comment.