Skip to content

mdesantis/linter-rubocop

This branch is 312 commits behind AtomLinter/linter-rubocop:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ac7f134 · Jun 17, 2019
Apr 24, 2019
May 30, 2019
Jun 14, 2019
May 7, 2016
May 7, 2016
Sep 4, 2015
Apr 24, 2019
Jun 17, 2019
Nov 10, 2018
Sep 16, 2016
Jun 17, 2019
Jun 17, 2019

Repository files navigation

linter-rubocop

Gitter Build Status Plugin installs! Package version! Dependencies!

This linter plugin for Linter provides an interface to rubocop. It will be used with files that have the “Ruby” syntax.

Installation

Linter package must be installed in order to use this plugin. If Linter is not installed, please follow the instructions here.

rubocop installation

Before using this plugin, you must ensure that rubocop, version 0.37 or greater, is installed on your system. To install rubocop, do the following:

  1. Install ruby.

  2. Install rubocop by typing the following in a terminal:

    gem install rubocop

Now you can proceed to install the linter-rubocop plugin.

Plugin installation

apm install linter-rubocop

Settings

You can configure linter-rubocop by editing ~/.atom/config.cson (choose Open Your Config in Atom menu):

Using RVM

If you're using RVM and receiving errors in Atom that indicate Rubocop can't be found, you may need to change /bin to /wrappers in the path that gets returned from which rubocop before using it as your command setting. For example, change:

"linter-rubocop":
  command: "/Users/JohnDoe/.rvm/gems/ruby-2.2.4@global/bin/rubocop"

To:

"linter-rubocop":
  command: "/Users/JohnDoe/.rvm/gems/ruby-2.2.4@global/wrappers/rubocop"

Using rbenv

If you're using rbenv, it's recommended that you set your command to point to the Rubocop shim. This way, when you upgrade Ruby, the command will be a pointer to a Rubocop executable, regardless of your current Ruby version.

"linter-rubocop":
  command: "/Users/JohnDoe/.rbenv/shims/rubocop"

Using chruby

If you're using chruby , it's recommended that you set your command to execute chruby-exec to set version and run rubocop. Alternatively, you can reference the full intended path.

"linter-rubocop":
  command: "/usr/local/bin/chruby-exec 2.5.0 -- rubocop"

or

"linter-rubocop":
  command: "/Users/JohnDoe/.gem/ruby/2.5.1/bin/rubocop"

Contributing

If you would like to contribute enhancements or fixes, please do the following:

  1. Fork the plugin repository.
  2. Hack on a separate topic branch created from the latest master.
  3. Commit and push the topic branch.
  4. Make a pull request.
  5. Welcome to the club!

Please note that modifications should follow these coding guidelines:

  • Indent is 2 spaces.
  • Code should pass npm run lint (eslint).
  • Vertical whitespace helps readability, don’t be afraid to use it.

Thank you for helping out!

Donation

Share the love!

Gratipay donate button PayPal donate button BitCoin donate button

About

Linter plugin for Ruby, using rubocop

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%