Visual Studio Code でrubocopを実行するエクステンションです。
This extension provides interfaces to rubocop for vscode.
rubocop is code analyzer for ruby.
ruby rubocop in Code Market Place
This extention may have a plobrem when rvm or chruby environment. We recommend vscode-ruby. It can also lint ruby code.
- lint by execute command "Ruby: lint by rubocop" (cmd+shift+p and type command)
- auto invoke when saving file
- auto correct command "Ruby: autocorrect by rubocop"
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):
{
// If not specified searches for 'rubocop' executable available on PATH (default and recommended)
"ruby.rubocop.executePath": "",
// You can use specific path
// "ruby.rubocop.executePath": "/Users/you/.rbenv/shims/"
// "ruby.rubocop.executePath": "/Users/you/.rvm/gems/ruby-2.3.2/bin/"
// "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
}
You can change keybinding (via editing keybindings.json
)
{ "key": "ctrl+alt+l", "command": "ruby.rubocopAutocorrect",
"when": "editorLangId == 'ruby'" }
- more configurable command line option (like -R)
- integration with rbenv
- testing & CI support
Please install packages with yarn.
yarn install
You could install TSLint extension for .ts files.
Formatting code using vvakame/typescript-formatter
tsfmt -r src/*
このソフトウェアはMITライセンスの元で公開されています。LICENSE.txt をご覧下さい。
This software is released under the MIT License, see LICENSE.txt.