Skip to content

Commit 7229d3e

Browse files
authored
Merge pull request #30 from AyanSinhaMahapatra/CI-upgrade
Add doc8 style checks to Travis-CI
2 parents 84dbcdf + cf71274 commit 7229d3e

4 files changed

Lines changed: 19 additions & 2 deletions

File tree

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ language: python
33
python:
44
- '3.6'
55
install:
6-
- pip install Sphinx sphinx_rtd_theme
6+
- pip install Sphinx sphinx_rtd_theme doc8
77
before_install:
88
- chmod +x ./docs/scripts/sphinx_build_link_check.sh
9+
- chmod +x ./docs/scripts/doc8_style_check.sh
910
script:
1011
- cd docs
1112
- "./scripts/sphinx_build_link_check.sh"
13+
- "./scripts/doc8_style_check.sh"
1214
notifications:
1315
slack:
1416
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=

docs/scripts/doc8_style_check.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
# halt script on error
3+
set -e
4+
# Check for Style Code Violations
5+
# (Here D000 is ignored to bypass the include statement errors as the files we are including are
6+
# not in the same source folder as the include statement.)
7+
# [ToDo 1. Expand Scan to All Docs (source/) 2. Fix this D000 workaround if possible]
8+
# Doc Contribution Guide is at scancode-toolkit/contribute/contrib_doc.rst
9+
doc8 --max-line-length 100 source/ --ignore D000 --quiet

docs/source/doc_maintenance.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,9 @@ examples::
101101

102102
The AboutCode webhook with ReadTheDocs should rebuild the documentation. You can review your
103103
results online.
104+
105+
Documentation Style Guides
106+
--------------------------
107+
108+
The ``scancode-toolkit`` documentation is compliant to our doc style standards, enforced using
109+
``doc8``. For more details refer :ref:`contrib_doc_dev`.

docs/source/scancode-toolkit/contribute/contrib_doc.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ How To Run Style Tests
2222

2323
In the project root, run the following command::
2424

25-
$ doc8 --max-line-length 100 docs/source/scancode-toolkit
25+
$ doc8 --max-line-length 100 docs/source/scancode-toolkit --ignore D000
2626

2727
.. note::
2828

0 commit comments

Comments
 (0)