Skip to content

Commit

Permalink
Added setup.py to flake8 tests
Browse files Browse the repository at this point in the history
Added setup.py to flake8 tests since it is code. Also minor updates to
slightly modernize.

Note: In the future {#} should probably be ported to {} as numbering is
no longer needed (and disliked by many).
  • Loading branch information
ashcrow committed Jan 12, 2017
1 parent f03d2d4 commit 9a259ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ excludes=.tox,utils,files
lint_disable=fixme,locally-disabled,file-ignored,duplicate-code

[flake8]
exclude=.tox/*,setup.py,utils/*,inventory/*
exclude=.tox/*,utils/*,inventory/*
max_line_length = 120
ignore = E501,T003
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from yamllint.cli import Format
from yamllint import linter


def find_files(base_dir, exclude_dirs, include_dirs, file_regex):
''' find files matching file_regex '''
found = []
Expand Down Expand Up @@ -111,7 +112,8 @@ def run(self):

if has_errors or has_warnings:
print('yammlint issues found')
exit(1)
raise SystemExit(1)


class OpenShiftAnsiblePylint(PylintCommand):
''' Class to override the default behavior of PylintCommand '''
Expand Down

0 comments on commit 9a259ef

Please sign in to comment.