* Fix a documentation build failure caused by missing _ underscore in footnote citation.
* Get archive/LangRef.html building again. I'm not sure this is the most desirable way to address the failure to locate archive/LangRef.html but I confirmed this causes the desired _build/html/archive/LangRef.html to be created when making docs.
- Update the Pygments lexer we use for parsing Swift-like code.
- State more explicitly which highlighting should be used in which
code blocks.
- Disable highlighting altogether in certain cases (such as SIL.rst,
which has equal amounts grammar and SIL excerpts).
This should fix the warnings-as-error issues coming from Sphinx > 1.3.4.
Based on a patch by Jeremy Fergason!
https://bugs.swift.org/browse/SR-620
Replace the project global linting rule excludes (as defined in .pep8) with
fine-grained "# noqa" annotations.
By using noqa annotation the excludes are made on a per line basis instead of
globally.
These annotations are used where we make deliberate deviations from the standard
linting rules.
To lint the Python code in the project:
$ flake8
To install flake8:
$ pip install flake8
See https://flake8.readthedocs.org/en/latest/ for details.
To enable checking of the PEP-8 naming conventions, install the optional
extension pep8-naming:
$ pip install pep8-naming
To enable checking of blind "except:" statements, install the optional
extension flake8-blind-except:
$ pip install flake8-blind-except
To enable checking of import statement order, install the optional
extension flake8-import-order:
$ pip install flake8-import-order
* E101: indentation contains mixed spaces and tabs
* E111: indentation is not a multiple of four
* E128: continuation line under-indented for visual indent
* E302: expected 2 blank lines, found 1
* W191: indentation contains tabs
Fixes:
* multiple statements on one line (colon) (E701)
* missing whitespace around arithmetic operator (E226)
* missing whitespace around operator (E225)
* closing bracket does not match visual indentation (E124)
* blank line contains whitespace (W293)
* continuation line missing indentation or outdented (E122)
* continuation line over-indented for hanging indent (E126)
* missing expected blank line (E301)
* trailing whitespace (W291)
* unexpected spaces around keyword / parameter equals (E251)
* whitespace after '(', '[' or '{' (E201)
* whitespace before ')', ']' or '}' (E202)
* whitespace before ',' or ':' (E203)
(it was already on in Makefile builds)
Also, fix the ReST errors it found.
Also, monkeypatch pygments so it can see our lexers when we build
documentation. This keeps all doc builds from producing heaps of
warnings.
Swift SVN r6023
- I've converted every document except the LangRef, which is more trouble to
convert because of the use of styling to embed notes.
- 'make html' with sphinx-build in your path to build the docs.
Now back to my regularly scheduled breaking things. :)
Swift SVN r2410