REditorSupport / REditorSupport/vscode-R
Missing terminal newline lint is not reported in VSCode Problem Pane
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 139
- Avg merge
- 2h 46m
- Merged PRs (30d)
- 5
Description
Describe the bug
Missing terminal newline lint is not reported in VSCode Problem Pane
To Reproduce
- Create a new file (
Ctrl+N) - Select the R language (
Ctrl+K Mand selectR) - Write
x <- 1in the editor - Do not insert a terminal newline
- Save the file as
test.R(Ctrl+S) - The Problems Pane (
Ctrl+Shift+M) reports thatNo problems have been detected in the workspace lintr::lint()reports the lint as expected:
lintr::lint(
filename = "test.R",
linters = lintr::trailing_blank_lines_linter(),
parse_settings = FALSE
)
# xxx/test.R:1:7: style: [trailing_blank_lines_linter] Add a terminal newline.
# x <- 1
# ^
Can you fix this issue by yourself? (We appreciate the help)
No
Expected behavior
The lint should be reported in VSCode Problem Pane.
Environment (please complete the following information):
- OS: Windows 11
- VSCode Version: VSCodium 1.107.18627
- R Version: 4.4.0
- vscode-R version: 2.86
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the missing terminal-newline case with lintr::lint() and trailing_blank_lines_linter(), then compare its result with the VSCode Problems Pane output. Trace the VSCode extension's lint integration to determine why this diagnostic is omitted; done means the lint is reported in the Problems Pane for the provided test.R scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r, typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100