mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
(cherry picked from commit 1e4b8e30a9
)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
f8842e39be
commit
6f5152d053
1 changed files with 8 additions and 0 deletions
|
@ -26,6 +26,11 @@ def main():
|
||||||
skip_directories = (
|
skip_directories = (
|
||||||
)
|
)
|
||||||
|
|
||||||
|
yaml_directories = (
|
||||||
|
'plugins/test/',
|
||||||
|
'plugins/filter/',
|
||||||
|
)
|
||||||
|
|
||||||
for path in paths:
|
for path in paths:
|
||||||
if path in skip_paths:
|
if path in skip_paths:
|
||||||
continue
|
continue
|
||||||
|
@ -35,6 +40,9 @@ def main():
|
||||||
|
|
||||||
ext = os.path.splitext(path)[1]
|
ext = os.path.splitext(path)[1]
|
||||||
|
|
||||||
|
if ext in ('.yml', ) and any(path.startswith(yaml_directory) for yaml_directory in yaml_directories):
|
||||||
|
continue
|
||||||
|
|
||||||
if ext not in allowed_extensions:
|
if ext not in allowed_extensions:
|
||||||
print('%s: extension must be one of: %s' % (path, ', '.join(allowed_extensions)))
|
print('%s: extension must be one of: %s' % (path, ', '.join(allowed_extensions)))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue