Integration with Other Tools :: RuboCop Docs (original) (raw)
All popular editors provide some form of linter integration. Typically this is done either via LSP (if supported by the underlying server) or by shelling out to a linter and processing its output so it could be displayed inside the editor.
As noted above, the rubocop
binary starts relatively slowly which makes it problematic in the shelling out case. The RuboCop "Server" functionality has designed to address this problem and provide lightning fast editor integration.
LSP
The Language Server Protocol is the modern standard for providing cross-editor support for various programming languages. The RuboCop LSP functionality has designed to provide built-in language server. The following is a LSP client for interacting with the built-in server:
And the following Ruby LSP servers are using RuboCop internally to provide code linting functionality:
Emacs
rubocop.el is a simple Emacs interface for RuboCop. It allows you to run RuboCop inside Emacs and quickly jump between problems in your code.
flycheck > 0.9 also supports RuboCop and uses it by default when available.
Vim
Sublime Text
You may also consider using one of the LSP servers mentioned above which utilize RuboCop by using the Sublime-LSP plugin and follow its documentation for configuration.
Brackets
The brackets-rubocopextension displays RuboCop results in Brackets. It can be installed via the extension manager in Brackets.
TextMate2
The textmate2-rubocopbundle displays formatted RuboCop results in a new window. Installation instructions can be found here.
LightTable
The lt-rubocop plugin provides LightTable integration.
RubyMine / Intellij IDEA
RuboCop support is available as of the 2017.1 releases.
Visual Studio Code
The ruby extension provides RuboCop integration for Visual Studio Code. RuboCop is also used for the formatting capabilities of this extension.
Other Editors
Here’s one great opportunity to contribute to RuboCop - implement RuboCop integration for your favorite editor.