Skip to content

sergey-kintsel/vscode-ruby-rubocop

 
 

Repository files navigation

Rubocop for Visual Studio Code

Visual Studio Code でrubocopを実行するエクステンションです。

rubocop is code analyzer for ruby.

ruby rubocop in Code Market Place

execute rubocop

  • by execute command "Ruby: execute rubocop" (press F1)
  • on Saving .rb file

exec on save

Installation

Installation of ruby and rubocop is required.

gem install rubocop
  • Type F1 (or Command + Shift + P)
  • execute "Extensions: install extension"
  • type rubocop and execute ext install ruby-rubocop

Configuration

Specify configuration (via navigating to File > Preferences > Workspace Settings and editing file settings.json):

{
  //  or "ruby.rubocop.executePath": "/Users/you/.rbenv/shims/"
  // if not specified searches for 'rubocop' executable available on PATH
  "ruby.rubocop.executePath": "D:/bin/Ruby22-x64/bin/",

  // If not specified, it assumes a null value by default.
  "ruby.rubocop.configFilePath": "/path/to/config/.rubocop.yml",

  // default true
  "ruby.rubocop.onSave": true
}

todo

  • more configurable command line option (like -R)
  • integration with rbenv

development

Don't forget npm install

Formatting code using vvakame/typescript-formatter

tsfmt -r src/*

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%