dense-analysis / ale

Check syntax in Vim/Neovim asynchronously and fix files, with Language Server Protocol (LSP) support
BSD 2-Clause "Simplified" License
13.56k stars 1.44k forks source link

Function with_defaults was deprecated in lintr version 3.0.0. Use linters_with_defaults or modify_defaults instead. #4644

Open Spixmaster opened 1 year ago

Spixmaster commented 1 year ago

The command for linter lintr uses a deprecated function.

(finished - exit code 0) ['/bin/zsh', '-c', 'cd ''/home/matheus'' && Rscript --no-save --no-restore --no-site-file --no-init-file -e ''suppressPackageStartupMessages(library(lintr));lint(cache = FALSE, commandArgs(TRUE), with_defaults())'' ''/tmp/vWGRtrr/12/a.r''']

Error message:

Function with_defaults was deprecated in lintr version 3.0.0. Use linters_with_defaults or modify_defaults instead.
mcooper commented 2 months ago

I tried to open a PR, but I dont have access rights. You just need to change [this line](https://github.com/dense-analysis/ale/blob/954682108d21b412561fb32e3fa766c7ee539984/ale_linters/r/lintr.vim#L6] like so:

-let g:ale_r_lintr_options = get(g:, 'ale_r_lintr_options', 'linters_with_defaults()')
+let g:ale_r_lintr_options = get(g:, 'ale_r_lintr_options', 'with_defaults()')