docker-linter-rubocop

Lint Ruby on the fly, using rubocop on docker

mtsmfm

1,299

0

0.2.2

MIT

GitHub

This package provides the following services:

docker-linter-rubocop

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

You must run a container installed rubocop via docker-compose because docker-linter-rubocop use docker exec to run rubocop.

Installation

Linter package must be installed on your docker container in order to use this plugin. If Linter is not installed, please follow the instruction.

docker-compose installation

Follow https://docs.docker.com/engine/installation/.

rubocop installation

Before using this plugin, you must ensure that rubocop on your docker container.

$ cd /path/to/your/project
$ touch docker-compose.yml
$ # edit your docker-compose.yml to run ruby
$ docker-compose run ruby bundle init
$ # add `gem 'rubocop'` to your Gemfile
$ docker-compose run ruby bundle init
$ docker-compose run ruby 'sh -c "trap : TERM INT; sleep infinity & wait"' # run your container forever because this package will use `docker exec` to run `rubocop`

Plugin installation

apm install docker-linter-rubocop

TODO

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:

Thank you for helping out!

Special Thanks

This package is started as fork off https://github.com/AtomLinter/linter-rubocop.