Skip to content

Commit b1ac7ba

Browse files
author
Dave Abrahams
committed
[docs] Fix all ReST/Sphinx warnings, turn sphinx warnings into errors
Also revert r10607, which this change obsoletes Swift SVN r10611
1 parent 07ce530 commit b1ac7ba

31 files changed

+63
-10
lines changed

docs/ABI.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
.. @raise litre.TestsAreMissing
24
.. _ABI:
35

docs/CMakeLists.txt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,14 @@ SET(SWIFT_SPHINX_PAPER_SIZE "letter"
1010
CACHE STRING "Paper size for generated documentation")
1111

1212
SET(SPHINX_ARGS
13+
-W
1314
-D latex_paper_size=${SWIFT_SPHINX_PAPER_SIZE}
1415
-d ${CMAKE_BINARY_DIR}/doctrees)
1516

1617
if(SPHINX_EXECUTABLE)
1718
add_custom_target(docs_html ALL
1819
${SPHINX_EXECUTABLE} ${SPHINX_ARGS} -b html
19-
. ${CMAKE_BINARY_DIR}/docs/html
20-
# filter only stderr; see http://stackoverflow.com/a/15936384/125349
21-
# unfortunately I can't get CMake to pass this form through correctly
22-
# 2> >(grep -v "\"WARNING: document isn't included in any toctree\"" 1>&2)
23-
2>&1 | grep -v "\"WARNING: document isn't included in any toctree\""
20+
. ${CMAKE_BINARY_DIR}/docs/html
2421
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
2522
COMMENT "Building HTML documentation")
2623

docs/Expressions.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
.. @raise litre.TestsAreMissing
24
35
===================

docs/Generics Syntax Tradeoffs.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
.. @raise litre.TestsAreMissing
24
35
This document summarizes a few email and meeting discussions we have had. Thanks

docs/Import.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
IMPORT SYNTAX
24
=============
35
::

docs/Literals.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
.. @raise litre.TestsAreMissing
24
35
Literals

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ BUILDDIR = _build
1010
# Internal variables.
1111
PAPEROPT_a4 = -D latex_paper_size=a4
1212
PAPEROPT_letter = -D latex_paper_size=letter
13-
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
13+
ALLSPHINXOPTS = -W -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
1414
# the i18n builder cannot share the environment and doctrees with the others
1515
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
1616

docs/Modules.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
.. @raise litre.TestsAreMissing
24
.. default-role:: term
35
.. title:: Modules User Model

docs/ModulesBuild.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
.. @raise litre.TestsAreMissing
24
.. default-role:: term
35
.. title:: Modules Build Model

docs/Objective-C Interoperability.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
.. @raise litre.TestsAreMissing
24
35
============================

docs/StringDesign.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
.. @raise litre.TestsAreMissing
24
35
.. raw:: html

docs/TextFormatting.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
Text Formatting in Swift
24
========================
35

@@ -108,7 +110,7 @@ Output Streams
108110
..............
109111

110112
The most fundamental part of this design is ``OutputStream``, a thing
111-
into which we can stream text: [#character]_
113+
into which we can stream text: [#character1]_
112114

113115
::
114116

@@ -454,7 +456,7 @@ to tip the balance in favor of the current design.
454456
generic ``format`` with arguments that depend on the type being
455457
formatted, so an ad-hoc convention would be just fine.
456458
457-
.. [#character] We don't support streaming individual code points
459+
.. [#character1] We don't support streaming individual code points
458460
directly because it's possible to create invalid sequences of code
459461
points. For any code point that, on its own, represents a valid
460462
``Character`` (a.k.a. Unicode `extended grapheme cluster`__), it is

docs/classes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
.. @raise litre.TestsAreMissing
24
35
Swift classes in detail

docs/proposals/ClassConstruction.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
=================================================
24
Integrating Swift Constructors with Objective-C
35
=================================================

docs/proposals/Clonable.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
.. @raise litre.TestsAreMissing
24
35
==========

docs/proposals/Constructors.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
Constructors and Initialization in Swift
24
========================================
35

docs/proposals/Enums.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
Swift supports what type theory calls "algebraic data types", or ADTs, which
24
are an amalgam of two familiar C-family language features, enums and unions.
35
They are similar to enums in that they allow collections of independent symbolic
@@ -51,7 +53,7 @@ C programmers with no interest in learning about ADTs can use 'enum' like they
5153
always have.
5254

5355
"Union" doesn't exist to Cocoa programmers
54-
---------------------------------------
56+
------------------------------------------
5557

5658
Cocoa programmers really don't think about unions at all. The frameworks vend
5759
no public unions. If a Cocoa programmer knows what a union is, it's as a

docs/proposals/Error Handling.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
.. @raise litre.TestsAreMissing
24
.. ErrorHandlingModel:
35

docs/proposals/Initialization.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
Initialization
24
==============
35

docs/proposals/Inplace.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
.. @raise litre.TestsAreMissing
24
35
==============================================

docs/proposals/KeywordArguments.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
Summary
24
-------
35

docs/proposals/Memory and Concurrency Model.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
.. @raise litre.TestsAreMissing
24
.. _MemoryAndConcurrencyModel:
35

docs/proposals/MutationModel.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
.. raw:: html
24

35
<style>

docs/proposals/OperatorMethods.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
==================
24
Operator Methods
35
==================

docs/proposals/OptionSets.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
SUMMARY: Option sets should be structs of Bools, with a protocol to provide
24
bitwise-ish operations.
35

docs/proposals/ProgramStructureAndCompilationModel.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
.. @raise litre.TestsAreMissing
24
.. _ProgramStructureAndCompilationModel:
35

docs/proposals/TypeState.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
.. @raise litre.TestsAreMissing
24
35
General Type State Notes

docs/proposals/ValueSemantics.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
.. @raise litre.TestsAreMissing
24
.. _ValueSemantics:
35

docs/proposals/valref.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
.. @raise litre.TestsAreMissing
24
.. _valref:
35

docs/weak.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
=================
24
Weak References
35
=================

www/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ BUILDDIR = _build
1010
# Internal variables.
1111
PAPEROPT_a4 = -D latex_paper_size=a4
1212
PAPEROPT_letter = -D latex_paper_size=letter
13-
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
13+
ALLSPHINXOPTS = -W -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
1414
# the i18n builder cannot share the environment and doctrees with the others
1515
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
1616

0 commit comments

Comments
 (0)