dib-lint: test elements have README.rst file

Add a basic test to ensure that all elements have a README.rst file.
This way they will be exhaustively listed in the Sphinx documentation.

Add dummy README.rst for 'disable-selinux' and 'rpm-distro' elements.

Change-Id: Ia5252ddd89b5ae5c6e9a12a66ef10f912fd54da5
This commit is contained in:
Antoine Musso 2015-04-27 17:43:51 +02:00
parent 71ef0a8b3c
commit 168127b60a
3 changed files with 13 additions and 0 deletions

View File

@ -71,6 +71,11 @@ rc=0
TMPDIR=$(mktemp -d /tmp/tmp.XXXXXXXXXX) TMPDIR=$(mktemp -d /tmp/tmp.XXXXXXXXXX)
trap "rm -rf $TMPDIR" EXIT trap "rm -rf $TMPDIR" EXIT
# Elements have a README.rst file
for i in $(find $ELEMENTS_DIR -mindepth 1 -maxdepth 1 -type d); do
[ -f "${i}/README.rst" ] || error "$i lacks a README.rst"
done
# note .py files are run through flake8 directly in tox.ini # note .py files are run through flake8 directly in tox.ini
for i in $(find $ELEMENTS_DIR -type f \ for i in $(find $ELEMENTS_DIR -type f \
-not -name \*.rst \ -not -name \*.rst \

View File

@ -0,0 +1,4 @@
disable-selinux
---------------
Including this element disables SELinux.

View File

@ -0,0 +1,4 @@
rpm-distro
----------
Base element for distributions based on RPM.