You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: indentation clash (formatter vs lintr) #1883
VS Code indents with 4 spaces by default, and vscode-R doesn't override this for R. However, lintr expects indentation of 2 spaces. This leads to a harmless, but annoying linting markup for any new R file:
Steps to reproduce
Open a new file and type and write some code with indentation, e.g. a function call over multiple lines:
plot(
1:10
)
Again, the 4 spaces is what gets produced automatically. But lintr will complain that it should only be 2.
[indentation_linter] Indentation should be 2 spaces but is 4 spaces.
Expected behavior
The indentation behaviour or vscode-R should accord with its default linter. My own preference is for that to be 2 spaces, which is the standard that most R linters follow (incl. lintr, air, etc.)
We could set this part of the r block in configurationDefaults.
Activity
feat(R): enforce `=` assignment across lintr, jarl, Air