Browse Source

Merge pull request #3087 from ashcrow/setuppy

Added setup.py to flake8 tests
Scott Dodson 8 years ago
parent
commit
0b8211cdea
2 changed files with 4 additions and 2 deletions
  1. 1 1
      setup.cfg
  2. 3 1
      setup.py

+ 1 - 1
setup.cfg

@@ -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

+ 3 - 1
setup.py

@@ -17,6 +17,7 @@ from yamllint.config import YamlLintConfig
 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 = []
@@ -111,7 +112,8 @@ class OpenShiftAnsibleYamlLint(Command):
 
         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 '''