diff options
Diffstat (limited to 'test/sanity/code-smell/obsolete-files.py')
-rw-r--r-- | test/sanity/code-smell/obsolete-files.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/sanity/code-smell/obsolete-files.py b/test/sanity/code-smell/obsolete-files.py new file mode 100644 index 0000000..3c1a4a4 --- /dev/null +++ b/test/sanity/code-smell/obsolete-files.py @@ -0,0 +1,17 @@ +"""Prevent files from being added to directories that are now obsolete.""" +from __future__ import annotations + +import os +import sys + + +def main(): + """Main entry point.""" + paths = sys.argv[1:] or sys.stdin.read().splitlines() + + for path in paths: + print('%s: directory "%s/" is obsolete and should not contain any files' % (path, os.path.dirname(path))) + + +if __name__ == '__main__': + main() |