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 }}
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.
I installed ruby, ruby-debug-ide, ruby-debug-basex19 and rubocop.
Expected behavior
configure vscode-ruby to use rubocop
save a ruby file with an error
vscode-ruby runs rubocop and reports a problem
Actual behavior
configure vscode-ruby to use rubocop
save a ruby file with an error
no error is reported
Steps to reproduce the problem
configure vscode-ruby to use rubocop with:
"ruby.lint": {
"rubocop": true
}
save a ruby file with an error e.g.:
def hello
puts "hello"
no error is reported
I uninstalled vscode-ruby, cloned vscode-ruby master from github and did run it in debugging mode via vscode.
I got the following error:
Linter error: rubocop SyntaxError: Unexpected end of JSON input
at RuboCop.processResult (/home/tom/Data/projects/vscode-ruby/lint/lib/linters/RuboCop.js:21:22)
at ChildProcess.global._exeLinter.spawned.on.e (/home/tom/Data/projects/vscode-ruby/lint/lib/linter.js:76:20)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at Process.global.ChildProcess._handle.onexit (internal/child_process.js:215:12)
Once I removed the "-s" parameter from the rubocop call, the JSON error was gone and the error in my ruby file got reported correctly on save. With "-s" rubocop expects data from STDIN and does not accept a filename of a file to parse. Maybe this is the origin of the JSON input error?
The text was updated successfully, but these errors were encountered:
I suspect the author of VS code is only testing against the latest version of Rubocop and so upgrading will probably help you out. Things are working for me with version 0.49.1 of Rubocop. Also make sure that the you are loading vscode with the correct environment as it may be picking up on the wrong rubocop if you have more than one version installed on your system.
Your environment
vscode-ruby
version: 0.10.4 + 0.11.0 (master)I installed
ruby
,ruby-debug-ide
,ruby-debug-basex19
andrubocop
.Expected behavior
Actual behavior
Steps to reproduce the problem
I uninstalled vscode-ruby, cloned vscode-ruby master from github and did run it in debugging mode via vscode.
I got the following error:
Once I removed the "-s" parameter from the rubocop call, the JSON error was gone and the error in my ruby file got reported correctly on save. With "-s" rubocop expects data from STDIN and does not accept a filename of a file to parse. Maybe this is the origin of the JSON input error?
The text was updated successfully, but these errors were encountered: