Skip to content

Commit

Permalink
Changed '-' to '_' in check-config, so checks will be found.
Browse files Browse the repository at this point in the history
TODO: Find out if this breaks the config of these checks.
  • Loading branch information
Konstantin Martini committed Mar 10, 2016
1 parent b45b978 commit 6f20768
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .turnstile.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
checks:
- specification
- branch-release
- branch_release
- codevalidator
- protect-master
- protect_master
specification:
allowed_schemes: ['https']
allowed_formats: ['uri', 'github']
Expand Down
5 changes: 4 additions & 1 deletion turnstile/checks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ def run_checks(hook_name, user_configuration, repository_configuration, check_ob
logger = output.get_sub_logger(hook_name.replace('_', '-'), 'run_checks')
failed_checks = 0
checklist = repository_configuration.get('checks', [])
check_functions = get_checks(hook_name)
checklist = [x.replace('-', '_') for x in checklist]
logger.debug('Configured Checks: %s', checklist)
check_functions = list(get_checks(hook_name))
logger.debug('Available Checks: %s', [f[0] for f in check_functions])
checks_to_run = (check for check_name, check in check_functions if check_name in checklist)
for check in checks_to_run:

Expand Down

0 comments on commit 6f20768

Please sign in to comment.