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
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
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
}
- more configurable command line option (like -R)
- integration with rbenv
Don't forget npm install
Formatting code using vvakame/typescript-formatter
tsfmt -r src/*