Browse Source

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
changes/32/177832/8
Antoine Musso 4 years ago
parent
commit
168127b60a
3 changed files with 13 additions and 0 deletions
  1. +5
    -0
      bin/dib-lint
  2. +4
    -0
      diskimage_builder/elements/disable-selinux/README.rst
  3. +4
    -0
      diskimage_builder/elements/rpm-distro/README.rst

+ 5
- 0
bin/dib-lint View File

@@ -71,6 +71,11 @@ rc=0
TMPDIR=$(mktemp -d /tmp/tmp.XXXXXXXXXX)
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
for i in $(find $ELEMENTS_DIR -type f \
-not -name \*.rst \


+ 4
- 0
diskimage_builder/elements/disable-selinux/README.rst View File

@@ -0,0 +1,4 @@
disable-selinux
---------------

Including this element disables SELinux.

+ 4
- 0
diskimage_builder/elements/rpm-distro/README.rst View File

@@ -0,0 +1,4 @@
rpm-distro
----------

Base element for distributions based on RPM.

Loading…
Cancel
Save