From 6a046ed7891310cfdf0e6daaed2f677e0e361404 Mon Sep 17 00:00:00 2001 From: Aidan Fitzgerald Date: Tue, 9 Oct 2018 12:19:30 -0400 Subject: [PATCH] Create script to check roles for missing documentation --- tests/check_role_docs.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 tests/check_role_docs.py diff --git a/tests/check_role_docs.py b/tests/check_role_docs.py new file mode 100755 index 000000000..da0bbd62e --- /dev/null +++ b/tests/check_role_docs.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python3 + +''' +This script checks every role in the project and prints its name to stdout if +the role directory does not contain a README file. + +For ease of use, you can pipe the output of this script to a file or to a +clipboard utility (e.g. pbcopy on macOS, xclip on Linux). +''' + +import os, glob + +for role in os.listdir("roles"): + readme_glob = os.path.join("roles", role, "README.*") + if not glob.glob(readme_glob): + print(role)