diff --git a/tests/sanity/extra/no-unwanted-files.py b/tests/sanity/extra/no-unwanted-files.py index 59815f540f..4522f77e2b 100755 --- a/tests/sanity/extra/no-unwanted-files.py +++ b/tests/sanity/extra/no-unwanted-files.py @@ -6,6 +6,7 @@ from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os +import os.path import sys @@ -38,6 +39,11 @@ 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):