All Projects → runtastic → rubocop_runner

runtastic / rubocop_runner

Licence: MIT license
runs rubocop for changed files, can be used as pre-commit hook

Programming Languages

ruby
36898 projects - #4 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to rubocop runner

Policial
Review pull requests for style guide violations
Stars: ✭ 36 (+33.33%)
Mutual labels:  rubocop
Igcommit
Git pre-receive hook to check commits and code style
Stars: ✭ 135 (+400%)
Mutual labels:  rubocop
laravel-git-hook
Automatic git deployment for Laravel
Stars: ✭ 16 (-40.74%)
Mutual labels:  git-hook
Ama
"Ask Me Anything" with Rails 5.2 Application
Stars: ✭ 61 (+125.93%)
Mutual labels:  rubocop
Rubocop Rails config
RuboCop configuration which has the same code style checking as official Ruby on Rails.
Stars: ✭ 106 (+292.59%)
Mutual labels:  rubocop
Rubocop
A Ruby static code analyzer and formatter, based on the community Ruby style guide.
Stars: ✭ 11,593 (+42837.04%)
Mutual labels:  rubocop
Rubocop Packaging
A RuboCop extension focused on enforcing upstream best practices and coding conventions.
Stars: ✭ 29 (+7.41%)
Mutual labels:  rubocop
rubocop-graphql
Rubocop extension for enforcing graphql-ruby best practices
Stars: ✭ 143 (+429.63%)
Mutual labels:  rubocop
Ruby Style Guide
Shopify’s Ruby Style Guide
Stars: ✭ 127 (+370.37%)
Mutual labels:  rubocop
rubocop-rails
RuboCop configuration which has the same code style checking as official Ruby on Rails
Stars: ✭ 63 (+133.33%)
Mutual labels:  rubocop
Pronto Rubocop
Pronto runner for Rubocop, ruby code analyzer
Stars: ✭ 62 (+129.63%)
Mutual labels:  rubocop
Cookstyle
A linting tool that helps you to write better Chef Infra cookbooks by detecting and automatically correcting style, syntax, and logic mistakes in your code.
Stars: ✭ 95 (+251.85%)
Mutual labels:  rubocop
Expertiza
Expertiza is a web application through which students can submit and peer-review learning objects (articles, code, web sites, etc). The Expertiza project is supported by the National Science Foundation.
Stars: ✭ 160 (+492.59%)
Mutual labels:  rubocop
Meowcop
A RuboCop configuration focusing Lint. Recommended by Sider
Stars: ✭ 51 (+88.89%)
Mutual labels:  rubocop
vscode-linter
Extension for code linting, all in one package. New linters can be easily added through an extension framework.
Stars: ✭ 47 (+74.07%)
Mutual labels:  rubocop
Rubocop Rake
A RuboCop plugin for Rake
Stars: ✭ 32 (+18.52%)
Mutual labels:  rubocop
Onkcop
OnkCop is a RuboCop configration gem.
Stars: ✭ 144 (+433.33%)
Mutual labels:  rubocop
git-emojis-hook
Simple git hook to provide strong guidelines for commit message with emojis
Stars: ✭ 46 (+70.37%)
Mutual labels:  git-hook
rubocop-auto-correct
Auto-correct ruby source code by using rubocop in Atom.
Stars: ✭ 29 (+7.41%)
Mutual labels:  rubocop
ready
A program to run tasks before a commit.
Stars: ✭ 16 (-40.74%)
Mutual labels:  git-hook

RubocopRunner

Gem Version

This gem provides you with a rake task to install rubocop as a git pre-commit hook. If rubocop finds any issues it will abort the commit. It will try to auto-correct all issues in the files that are being commited, but will abort the commit even if all issues can be auto-corrected so that you can verify the changes before actually commiting them.

Although this gem has no tests it's battle tested and is in use at runtastic since years.

Installation

Add these lines to your application's Gemfile:

gem 'rubocop_runner', '~> 2.1', require: false

And then execute:

$ bundle

Or install it yourself as:

$ gem install rubocop_runner

Usage

To create a rubocop runner pre-commit hook once just run

ruby -rrubocop_runner -e "RubocopRunner.install"

To make it easy for every developer on the project you can also add this to your Rakefile:

require 'rubocop_runner/rake_task'
RubocopRunner::RakeTask.new

Afterwards, just run the rake rubocop:install task to install the pre-commit hook.

Development

After checking out the repo, run bin/setup to install dependencies. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/runtastic/rubocop_runner. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

Check out our career page if you'd like to work with us.

License

The gem is available as open source under the terms of the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].