mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-06 03:56:54 +00:00
tests for mismatched args
This commit is contained in:
parent
dbe3cd46d7
commit
238d3da42e
6 changed files with 28 additions and 0 deletions
|
|
@ -11,6 +11,7 @@ class BranchNameChecker(CheckerTemplateMethod):
|
|||
self.parser.add_argument('-r', '--regex', help='Regex that git current branch must match.')
|
||||
|
||||
def _perform_checks(self):
|
||||
super(BranchNameChecker, self)._add_arguments_to_parser()
|
||||
regular_expression = self.args.regex
|
||||
pattern = re.compile(regular_expression)
|
||||
current_branch_name = get_current_branch_name()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue