Skip to content

Fix searching for errors in sphinx build

Brandon Chinn requested to merge wip/sphinx-error into master

Building sphinx docs on master currently fails with user error (Errors found in the Sphinx log.). This happens because the check for errors is a naive "ERROR:" `isInfixOf` log, but the log contains a WARNING that matches that condition:

/Users/bchinn/repos/ghc/docs/users_guide/exts/data_kinds.rst:146: WARNING: Lexing literal_block "data T = A'\ntype S = 'A'   -- ERROR: looks like a character\ntype R = ' A'  -- OK: promoted `A'`" as "haskell" resulted in an error at token: ' '. Retrying in relaxed mode.

This PR updates the logic to explicitly match on the second word in the line. It also updates the logic to check for CRITICAL in addition to ERROR.

Merge request reports