Added linting to CI workflow (#23)

Customized linting rules on CI (#23)
This commit is contained in:
Waldir Leoncio 2021-11-10 14:08:21 +01:00
parent fca9caa731
commit 2ff9d5ffe9

View file

@ -96,6 +96,24 @@ jobs:
covr::codecov()
shell: Rscript {0}
# Judging coding style ----------------------------------- #
- name: Linting package
run: |
install.packages("lintr")
style_rules <- list(
assignment_linter, closed_curly_linter, commas_linter,
todo_comment_linter, equals_na_linter,
function_left_parentheses_linter, infix_spaces_linter,
line_length_linter, no_tab_linter, open_curly_linter,
paren_brace_linter, absolute_path_linter, nonportable_path_linter,
pipe_continuation_linter, semicolon_terminator_linter,
single_quotes_linter, spaces_inside_linter,
trailing_blank_lines_linter, trailing_whitespace_linter,
undesirable_function_linter, undesirable_operator_linter
) # TODO: expand style rules as package matures
lintr::lint_package(linters = style_rules)
shell: Rscript {0}
# Uploading check results -------------------------------- #
- name: Uploading check results
if: failure()