Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rubocop_auto_correct seems incompatible with require (in .rubocop.yml) #66

Open
amazing-jay opened this issue Jun 17, 2021 · 0 comments

Comments

@amazing-jay
Copy link

Please add some general information about your environment:
  • Operating System - OSX Big Sur
  • Sublime Text version - 3 (Build 4107)
  • Details about your config e.g. do you use rbenv, rvm or your_own_command to run rubocop?
    rvm with gemsets & config looks like this:
{
  // Here you can provide your own command line
  // which is used to run rubocop. The path will be
  // replaced by the file or folder which needs
  // to be checked.
  //
  // If check_for_rvm or check_for_rbenv is enabled,
  // it will be prefixed with a call to rvm or rbenv.
  // If none of them are enabled, the command will be
  // executed without any additions.
  "rubocop_command": "",

  // If you want use RVM to run RuboCop, just
  // set this to true.
  //
  // Note: If check_for_rvm and check_for_rbenv are both enabled,
  // the plugin will use RVM.
  "check_for_rvm": true,

  // The path to RVM's rvm-auto-ruby binary
  "rvm_auto_ruby_path":  "~/.rvm/bin/rvm-auto-ruby",

  // If you want to use rbenv to run RuboCop, just
  // set this to true.
  //
  // Note: If check_for_rvm and check_for_rbenv are both enabled,
  // the plugin will use RVM.
  "check_for_rbenv": false,

  // The path to rbenv's binary
  "rbenv_path":  "~/.rbenv/bin/rbenv",

  // If you want issues to be marked automatically inside the view
  // set this to true.
  //
  // Attention ST2 users: Using that functionality consumes a bit
  // of time, so ST2 might be a bit unresponsive when saving. As soon
  // as you encounter performance problems during saving a ruby file you
  // should set this to false.
  "mark_issues_in_view": false,

  // Auto correct feature warning message
  "show_auto_correct_warning": false,

  // Optional general config file for rubocop.
  "rubocop_config_file": ""
}
Steps to reproduce:

Add this to your Sublime User Key Bindings (preferences)
{ "keys": ["super+shift+s"], "command": "rubocop_auto_correct" }

Works correctly if project .rubocop.yml file doesn't require any extensions; fails silently otherwise.
e.g. this .rubocop.yml file fails:

require:
  - rubocop-performance

but it works as soon as you comment out the value:

require:
#  - rubocop-performance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant