space between right parenthesis and curly brace
is nice for if () {
but not so much for function(){}
as Rstudio diagnostics complains for ifs but not for functions
$ifelse
[1] "use an if () {} else {} block"
Is there a way to get custom output of lintr in R in the cmd ?
I know there exist a function that will give me the output in XML. I was wondering is it possible to change the output I get in cmd.
For e.g CMD output gives me:path/of/file:row:col:,essage-type:message
Can this be modified to:LINE:row:message-type:message
?
That is what I am asking.
I am using:
R - 3.6.3 - 32-bit
lintr - 2.0.1
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
name: lint
jobs:
lint:
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v1
- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}
- name: Restore R package cache
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
- name: Install dependencies
run: |
install.packages(c("remotes"))
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("lintr")
shell: Rscript {0}
- name: Install package
run: R CMD INSTALL .
- name: Lint
run: lintr::lint_package()
shell: Rscript {0}