I use ESS in Emacs for R development. No matter for what programming language (R, Rust, Python, etc.) I always set 4 spaces as a tab via a general setting in my Emacs init file :
(setq-default indent-tabs-mode nil)
(setq-default tab-width…
I use R in vscode, it throw many notes with blue wavy underlines, such as 'lines should not be more than 80 characters. lint_length_linte', 'Use <-, not =, for assignment.assignment_linter'.
Creating a '.lintr ' file in the project work for this…
I'm using lintr package to check for inconsistency with tidyverse coding standards in my package. However, the problem I'm dealing with, is that lintr package raises issues with exceeding 80 character per line even in roxygen documentation which I…
To check the code quality of my package I am using the package lintr using the command
lintr::lint_package()
and get one result that I want to ignore:
functions should have cyclomatic complexity of less than 15
How can I ignore this single "false…
I've been unsucessfully trying to setup lintr package with GitHub actions (circleCi would be good too, since it's a private repo) to check PR and pushes.
My project is a book so i don't need package build checks, but only enforcing style since…
Consider the following code snippet (comments at the end indicate line numbers and are not part of the problem):
set.seed(1) # 1
my_dat1 <- data.frame(x = runif(100, 1, 10), # 2
w = runif(100,…
I am trying to help our group of developers obtain similar code styles by using the lintr package when writing R code. To automate this step, I want our builds to fail if there are any mistakes (bad styles) in the code. We are using Jenkins for our…
I am writing some scripts in R and our standard is use lintr for standardization of the code.
Please advice how can I export the output of the lint function to a txt file for example.
Thanks in advance!
lintr throws error while using data.table functions like .SD, .SDcols, e.g:
/path/readData.R:130:29: warning: no visible binding for global variable ‘.SD’, Did you mean 'SSD'?
DT[, "row.sum" := rowSums(.SD), .SDcols = names(DT)]
…
I cannot figure out how to turn off specific linters using lintr. The documentation offers an example (for vim/syntastic, which is what I'm using), which is not very clear:
let g:syntastic_r_lintr_linters =…
object_name_linter and object_length_linter are both applying to any string literal and not just object names. I didn't expect it to apply to all strings (including file names, labels, or messages printed out). Am I missing something, or should I…
I am running R in Visual Studio Code. I would like to get rid off the Lines should not be more than 80 characters.line_length_linter warnings marked as wavy underlines. I would like to get a global effect so that the warnings are removed from all R…
I am unable to get lintr to work in RStudio. Any suggestion appreciated. I believe I have updated everything. (For context, I am a newbie. I could certainly be doing something dumb.) Here's what happens to me:
> library(lintr)
Error: package or…
I am writing an R package with the following lint test:
context("Require no code style errors")
library(lintr)
test_that("Package has no lintr errors", {
lintr::expect_lint_free()
})
The tests pass with `devtools::check():
$ Rscript -e…
I am having a problem with the R package lintr
I installed it
install.packages("lintr")
and everything works fine, the markers pane appears in RStudio and I can 'lint' R files e.g. like this
lintr::lint("model_Forecast.R")
Now typing this is…