Browse Source

Add config section for doc8 in setup.cfg and ignore _build dir

Matt Westcott 4 years ago
parent
commit
878f2784cb
4 changed files with 7 additions and 3 deletions
  1. 1 1
      .circleci/config.yml
  2. 1 1
      Makefile
  3. 1 1
      docs/Makefile
  4. 4 0
      setup.cfg

+ 1 - 1
.circleci/config.yml

@@ -23,7 +23,7 @@ jobs:
       - run:
           shell: /bin/bash -e
           command: pipenv run jinjalint --parse-only wagtail | grep -v 'welcome_page.html:6:70' | tee /dev/tty | wc -l | grep -q '0'
-      - run: pipenv run doc8 --ignore D001 docs
+      - run: pipenv run doc8 docs
       - run: DATABASE_NAME=wagtail.db pipenv run python -u runtests.py
 
   frontend:

+ 1 - 1
Makefile

@@ -23,7 +23,7 @@ lint:
 	jinjalint --parse-only wagtail | grep -v 'welcome_page.html:6:70' | tee /dev/tty | wc -l | grep -q '0'
 	npm run lint:css --silent
 	npm run lint:js --silent
-	doc8 --ignore D001 docs
+	doc8 docs
 
 test:
 	python runtests.py

+ 1 - 1
docs/Makefile

@@ -60,7 +60,7 @@ spelling:
 	@echo "Spellcheck complete."
 
 lint:
-	doc8 --ignore D001 --ignore-path _build
+	doc8 --config ../setup.cfg
 
 dirhtml:
 	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml

+ 4 - 0
setup.cfg

@@ -14,6 +14,10 @@ ignore = D100,D101,D102,D103,D105,E501,W503,N806
 exclude = wagtail/project_template/*,node_modules,venv
 max-line-length = 120
 
+[doc8]
+ignore = D001
+ignore-path = _build,docs/_build
+
 [isort]
 line_length=100
 multi_line_output=4