Skip to content

Commit

Permalink
Merge a3c0796 into fe4e79b
Browse files Browse the repository at this point in the history
  • Loading branch information
flohcim committed Oct 7, 2013
2 parents fe4e79b + a3c0796 commit f33627c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Change history
1.0b5 (unreleased)
------------------

- Fix code analysis method by making it call each check only if the option
is activated.
[flohcim]

- Keep backward compatibility with 'string-formatting' option.
[hvelarde]

Expand Down
26 changes: 13 additions & 13 deletions plone/recipe/codeanalysis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,23 +243,23 @@ def uninstall_pre_commit_hook(self):

def code_analysis(options):
checks = [
['flake8', code_analysis_flake8(options)],
['jshint', code_analysis_jshint(options)],
['csslint', code_analysis_csslint(options)],
['zptlint', code_analysis_zptlint(options)],
['deprecated-aliases', code_analysis_deprecated_aliases(options)],
['utf8-header', code_analysis_utf8_header(options)],
['clean-lines', code_analysis_clean_lines(options)],
['prefer-single-quotes', code_analysis_prefer_single_quotes(options)],
['pep3101', code_analysis_pep3101(options)],
['imports', code_analysis_imports(options)],
['debug-statements', code_analysis_debug_statements(options)],
['find-untranslated', code_analysis_find_untranslated(options)],
['flake8', code_analysis_flake8],
['jshint', code_analysis_jshint],
['csslint', code_analysis_csslint],
['zptlint', code_analysis_zptlint],
['deprecated-aliases', code_analysis_deprecated_aliases],
['utf8-header', code_analysis_utf8_header],
['clean-lines', code_analysis_clean_lines],
['prefer-single-quotes', code_analysis_prefer_single_quotes],
['pep3101', code_analysis_pep3101],
['imports', code_analysis_imports],
['debug-statements', code_analysis_debug_statements],
['find-untranslated', code_analysis_find_untranslated],
]
status_codes = []
for option, check in checks:
if option in options and options[option] != 'False':
status_codes.append(check)
status_codes.append(check(options))

# Check all status codes and return with exit code 1 if one of the code
# analysis steps did not return True
Expand Down

0 comments on commit f33627c

Please sign in to comment.