【发布时间】:2016-10-26 13:41:18
【问题描述】:
我在我的 Visual Studio Code 中安装了 Ruby 和 ruby-rubocop 扩展,但是这个警告显示在我的编辑器中:
Value is not an accepted value. Valid values: ["rubocop"] (737, 20)
当我点击警告重定向到settings.json (/),特别是"ruby.format": "",。
// ruby language settings
// Defines where the Ruby extension will look to find Modules, Classes and methods.
"ruby.locate": {
"exclude": "{**/@(test|spec|tmp|.*),**/@(test|spec|tmp|.*)/**,**/*_spec.rb}",
"include": "**/*.rb"
},
// Path to the Ruby interpreter. Set this to an absolute path to select from multiple installed Ruby versions.
"ruby.interpreter.commandPath": "ruby",
// Path to the rct-complete command. Set this to an absolute path to select from multiple installed Ruby versions.
"ruby.rctComplete.commandPath": "rct-complete",
// Select the type of formatter to use. If 'rubocop' is selected, the ruby.lint.rubocop options will be passed to the formatter.
"ruby.format": "",
// Set individual ruby linters to use
"ruby.lint": {},
在我的 .vscode/settings.json 中,我尝试了 "ruby.format": "rubocop", 和 "ruby.format": ["rubocop"],,但警告不断显示。
【问题讨论】:
标签: ruby visual-studio-code rubocop