-1
我安裝在我的Visual Studio代碼Ruby和Ruby-rubocop延伸,但這種警告是表示我的編輯:值不是可接受的值。有效值:「rubocop」(737,20)
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"],
但警告繼續顯示。