Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
README.md
rubocop-pre-commit

README.md

A collection of git hooks of possible utility. (I optimistically created a repo to hold multiple hooks despite having only written one.)

Hooks

rubocop-pre-commit

A pre-commit hook that aborts commits containing style violations.

bschmeck@osprey
[master] ~/src/example_repo > git ci -m "Example for a blog post"
Running rubocop against spec/example_repo/example_spec.rb
Rubocop found 13 offenses.  Aborting commit.
spec/example_repo/example_spec.rb:9 Metrics/LineLength: Line is too long. [125/100]

More details.

Installation

  1. Clone this repo
  2. Symlink the rubocop-pre-commit script to pre-commit in the .git/hooks directory of the desired repo(s)
  3. Ensure the pre-commit file is executable
You can’t perform that action at this time.