Custom hooks for overcommit.
Feel free to submit your own! Just make a pull request. :-)
Name | Description |
---|---|
SearchPattern | Match each modified line against list of regular expressions |
Search files staged to commit for a list of regex patterns.
Matches found in modified lines are considered to be errors. If an unmodified line in a file staged for commit matches, it will show as a warning.
In your .overcommit.yml
:
PreCommit:
SearchPattern:
enabled: true
description: 'Checking for string matches'
include: '**/*.rb'
patterns:
- "@FIXME"
- "@NOTE"
- "require 'pp'"