Hi, I am receiving >1000 errors from `pre-commit r...
# tools
n
Hi, I am receiving >1000 errors from
pre-commit run --all-files
most of them are about left-padding spaces in R files (where 2 spaces are not unusual). I am agnostic to the amount of spaces that should be used. Is there some way to have pre-commit / prettier fix that automatically?
j
if this is in your pipeline repo, you can tell editorconfig to ignore the indentation on R scripts by adding this to the
.editorconfig
file
Copy code
[*.R]
indent_style = unset
indent_size = unset
or in case you want a fixed style you can use something like
Copy code
indent_size = 4
indent_style = space
n
Great, thanks
I think it actually makes sense to change them to 4 for consistency 🙂
p
Usually pre-commit fixes these errors for you already when it flags those errors
So if you do
git add
and try again it'll usually have fixed the formatting for you
this is locally - use the magic
@nf-core-bot please fix linting
comment on a PR comment to do the same in an automated commit