summaryrefslogtreecommitdiffstats
path: root/test/sanity/code-smell/shebang.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/sanity/code-smell/shebang.py')
-rwxr-xr-xtest/sanity/code-smell/shebang.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/sanity/code-smell/shebang.py b/test/sanity/code-smell/shebang.py
index 0d50ff0fdc..04cfed8a39 100755
--- a/test/sanity/code-smell/shebang.py
+++ b/test/sanity/code-smell/shebang.py
@@ -74,6 +74,8 @@ def main():
is_module = False
is_integration = False
+ dirname = os.path.dirname(path)
+
if path.startswith('lib/ansible/modules/'):
is_module = True
elif path.startswith('lib/') or path.startswith('test/runner/lib/'):
@@ -87,14 +89,14 @@ def main():
elif path.startswith('test/integration/targets/'):
is_integration = True
- dirname = os.path.dirname(path)
-
if dirname.endswith('/library') or dirname.endswith('/plugins/modules') or dirname in (
# non-standard module library directories
'test/integration/targets/module_precedence/lib_no_extension',
'test/integration/targets/module_precedence/lib_with_extension',
):
is_module = True
+ elif dirname == 'plugins/modules':
+ is_module = True
if is_module:
if executable: