diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2019-12-04 08:41:38 +0100 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2019-12-04 08:51:32 +0100 |
commit | bc4dbcf79307b934d7f78f212e544cc3a3773fc7 (patch) | |
tree | 0e50e9acf87663bb2dfa234eb6faeefbacb55357 | |
parent | ed69744e7d5e798b67b8e71d65d7de5c74493b51 (diff) |
Travis CI: Run `makerst.py` to check for documentation errors
-rw-r--r-- | .travis.yml | 3 | ||||
-rwxr-xr-x | doc/tools/makerst.py | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml index 7bf968ba4c..e7a13e3811 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,7 @@ cache: matrix: include: - - name: Static checks (clang-format) + - name: Static checks (clang-format) + Documentation checks stage: check env: STATIC_CHECKS=yes os: linux @@ -129,6 +129,7 @@ before_script: script: - if [ "$STATIC_CHECKS" = "yes" ]; then sh ./misc/travis/clang-format.sh; + doc/tools/makerst.py --dry-run doc/classes modules; else scons -j2 CC=$CC CXX=$CXX platform=$PLATFORM tools=$TOOLS target=$TARGET $OPTIONS $EXTRA_ARGS && if [ "$TEST_PROJECT" = "yes" ]; then diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py index de53259827..91240e9550 100755 --- a/doc/tools/makerst.py +++ b/doc/tools/makerst.py @@ -14,7 +14,7 @@ GODOT_DOCS_PATTERN = re.compile(r'^http(?:s)?://docs\.godotengine\.org/(?:[a-zA- def print_error(error, state): # type: (str, State) -> None - print(error) + print("ERROR: {}".format(error)) state.errored = True @@ -982,7 +982,11 @@ def make_enum(t, state): # type: (str, State) -> str if c in state.classes and e in state.classes[c].enums: return ":ref:`{0}<enum_{1}_{0}>`".format(e, c) - print_error("Unresolved enum '{}', file: {}".format(t, state.current_class), state) + + # Don't fail for `Vector3.Axis`, as this enum is a special case which is expected not to be resolved. + if "{}.{}".format(c, e) != "Vector3.Axis": + print_error("Unresolved enum '{}', file: {}".format(t, state.current_class), state) + return t |