Lorenz Walthert

Results 539 comments of Lorenz Walthert

> having a way to selectively deactivate linters based on environment variables, so that some linters are only active in CI. I think this sounds like introducing intransparency. Another option...

Also note that theoretically, {lintr} does not have to offer the functionality to deactivate linters based on environment variables, even if we wanted to use env variables (or pre-commit arguments...

Yeah ok. Here's how I'd do it. * For local, you could also use `language: script` to use the global R library (so forget about `additional_dependencies:`). `devtool::load_all()` and then lint...

Like this: ```r - repo: local hooks: - id: local-lintr name: Run lintr with global R environment entry: Rscript -e "devtools::load_all(); output 0) stop('Files not lint free')" language: system files:...

Pre-commit passes the file names to `entry` as unnamed arguments.

Thanks for your snipped. Also, you may want to print `lilntr::lint()` output, so in case the hook does not pass, the problems are displayed. For CI, this does not work...

Not sure it skips the local hook by default, you could also skip it explicitly as mentioned in the pre-commit.ci docs: ```yaml ci: skip: [pylint] repos: - repo: local hooks:...

Dropping {tibble} from {styler} also removes 6 dependencies.

@assignUser should we `exclude: '(\.Rd|^tests/testthat/_snaps/.*\.md)$`?

I thought about it again and I think we should merge the hook, but use `system` as a language, `r`. Hence, we'd fallback on the system installation of {pkgdown} and...