mirror of
https://github.com/ansible-collections/community.routeros.git
synced 2025-07-14 20:24:41 +02:00
Add filter documentation (#87)
* Add filter documentation. * Update no-unwanted-files sanity check.
This commit is contained in:
parent
d56410b468
commit
02ecc0ca9d
6 changed files with 152 additions and 0 deletions
|
@ -6,6 +6,7 @@ from __future__ import (absolute_import, division, print_function)
|
|||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import os.path
|
||||
import sys
|
||||
|
||||
|
||||
|
@ -26,6 +27,11 @@ def main():
|
|||
skip_directories = (
|
||||
)
|
||||
|
||||
yaml_directories = (
|
||||
'plugins/test/',
|
||||
'plugins/filter/',
|
||||
)
|
||||
|
||||
for path in paths:
|
||||
if path in skip_paths:
|
||||
continue
|
||||
|
@ -33,8 +39,16 @@ def main():
|
|||
if any(path.startswith(skip_directory) for skip_directory in skip_directories):
|
||||
continue
|
||||
|
||||
if os.path.islink(path):
|
||||
print('%s: is a symbolic link' % (path, ))
|
||||
elif not os.path.isfile(path):
|
||||
print('%s: is not a regular file' % (path, ))
|
||||
|
||||
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:
|
||||
print('%s: extension must be one of: %s' % (path, ', '.join(allowed_extensions)))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue