【问题标题】:Value is not an accepted value. Valid values: ["rubocop"] (737, 20)值不是可接受的值。有效值:["rubocop"] (737, 20)
【发布时间】: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


    【解决方案1】:

    重启Visual Studio Code解决"ruby.format": "rubocop"的问题,配置。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多