From 4c3ea714fad195d37ede4dfcb2da2f567d728afb Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Fri, 1 Jul 2022 21:41:40 +0000 Subject: [PATCH] .github: doxygen: use the newer and better FAIL_ON_WARNINGS Unlike the older 'YES', FAIL_ON_WARNINGS reports all warnings. Signed-off-by: Marc Herbert --- .github/workflows/pull-request.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 8169f81a5d77..6f537ec0a62c 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -45,12 +45,22 @@ jobs: - name: apt get doxygen graphviz run: sudo apt-get -y install ninja-build doxygen graphviz - - name: list all warnings, warnings are not failures + - name: Show warnings but fail only on errors run: cmake -GNinja -S doc -B docbuild && ninja -C docbuild -v doc - # Build again (it's very quick) so warnings don't go unnoticed - - name: fail and stop on first warning - run: printf 'WARN_AS_ERROR = YES\n' >> doc/sof.doxygen.in && + # Build again (it's very quick) so warnings don't go unnoticed. + # For older doxygen versions that don't have FAIL_ON_WARNINGS, use + # WARN_AS_ERROR = YES instead. 'YES' is inferior because it stops + # on the first error. + # + # Note some doxygen bug(s) can cause some specific error types to + # escape WARN_AS_ERROR, example: + # https://github.com/doxygen/doxygen/issues/7970 and + # https://github.com/thesofproject/sof/pull/5978 + + - name: Fail on warnings + run: printf + 'WARN_AS_ERROR = FAIL_ON_WARNINGS\n' >> doc/sof.doxygen.in && ninja -C docbuild -v doc