diff --git a/.travis.yml b/.travis.yml index c9d87282..2d1225ad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,12 +3,14 @@ language: python python: - '3.6' install: -- pip install Sphinx sphinx_rtd_theme +- pip install Sphinx sphinx_rtd_theme doc8 before_install: - chmod +x ./docs/scripts/sphinx_build_link_check.sh +- chmod +x ./docs/scripts/doc8_style_check.sh script: - cd docs - "./scripts/sphinx_build_link_check.sh" +- "./scripts/doc8_style_check.sh" notifications: slack: secure: i2YByZfJB5RDtM+51eR3Bs2C8Sj00pljlllpZdMsbap/2uKepN+2qvuU+xhkfU64+sSqwE/VgknCO1v7SdB9PmtuZX+7LFUnWzoCSLLsqoDBFROTCb/siTR5OhxEMOWhKTXjsNsAb0jsx+fbfhohUdh5xDHxKxloAqa07Sg3W083yyd02VRAlsyw5a0iJo0Xq35z/FSsPH7y2rIVTQjj15M24qoQS9R4mqIF/HLGO21p527T0w+U7sZegCMayBgc0+fW8b/IbzfPWHNQ6pKv/zTIGQUDTkxmxdVOVokJ6KWVnLTgRjMNv3/mV6t/8r8HYuO9i9le3jVFX7BE7jxS1kQATR27UjKj1p3IA6xRIggxeH8apq22/GpCoCJZzlA/LRWX06IMhFu9MzB2OQeI2opn7FekIINjJIcmwL8Azsws14xD84H8rdbBD23kCWlzq/38u9wdHitLv7lEHAvdLlZbJAoF9vb1Ui0m5OylhQ4auW3ZqiXKfYshgdcLmMStQGiIsDvB4RORBDTHAig+XbBzP3YuAvQE/JvrJO7C7392rSqkZgClIs5a0+ZqJdvLcX3F8+WXkqFoQ7vQ01STTzhGBxA/deizvk7MvX4uMY2T4xxU6OPai1px608q34pDiuEchBpasU1sHJagO8rrWOEfjlbT7RuS7t5PIhwR648= diff --git a/docs/scripts/doc8_style_check.sh b/docs/scripts/doc8_style_check.sh new file mode 100755 index 00000000..91d7fb0b --- /dev/null +++ b/docs/scripts/doc8_style_check.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# halt script on error +set -e +# Check for Style Code Violations +# (Here D000 is ignored to bypass the include statement errors as the files we are including are +# not in the same source folder as the include statement.) +# [ToDo 1. Expand Scan to All Docs (source/) 2. Fix this D000 workaround if possible] +# Doc Contribution Guide is at scancode-toolkit/contribute/contrib_doc.rst +doc8 --max-line-length 100 source/ --ignore D000 --quiet \ No newline at end of file diff --git a/docs/source/doc_maintenance.rst b/docs/source/doc_maintenance.rst index 49d9dc89..d60fcab3 100644 --- a/docs/source/doc_maintenance.rst +++ b/docs/source/doc_maintenance.rst @@ -101,3 +101,9 @@ examples:: The AboutCode webhook with ReadTheDocs should rebuild the documentation. You can review your results online. + +Documentation Style Guides +-------------------------- + +The ``scancode-toolkit`` documentation is compliant to our doc style standards, enforced using +``doc8``. For more details refer :ref:`contrib_doc_dev`. diff --git a/docs/source/scancode-toolkit/contribute/contrib_doc.rst b/docs/source/scancode-toolkit/contribute/contrib_doc.rst index 0c705c3a..0aa75e90 100644 --- a/docs/source/scancode-toolkit/contribute/contrib_doc.rst +++ b/docs/source/scancode-toolkit/contribute/contrib_doc.rst @@ -22,7 +22,7 @@ How To Run Style Tests In the project root, run the following command:: - $ doc8 --max-line-length 100 docs/source/scancode-toolkit + $ doc8 --max-line-length 100 docs/source/scancode-toolkit --ignore D000 .. note::