[{"id":29525,"web_url":"https://patchwork.libcamera.org/comment/29525/","msgid":"<171568169639.2219466.17686582064090690422@ping.linuxembedded.co.uk>","date":"2024-05-14T10:14:56","subject":"Re: [PATCH] Documentation: Add option to treat Doxygen warnings as\n\terrors","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2024-05-13 13:43:23)\n> A new Doxygen warning introduced in a recent commit went unnoticed, both\n> in manual tests and in CI. Unlike C/C++ warnings that are treated as\n> errors, we don't fail the build with Doxygen warnings. This is due to\n> the fact that the libcamera documentation compiles cleanly only with quite\n> recent versions of Doxygen. Enabling the WARN_AS_ERROR Doxygen option\n> unconditionally could bother many users.\n> \n> To improve the situation, add a meson option to treat Doxygen warnings\n> as errors. The option is disabled by default, preserving the current\n> behaviour, and will be enabled in CI builds.\n> \n\nI like this. CI is the place to catch it!\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  Documentation/Doxyfile.in | 1 +\n>  Documentation/meson.build | 1 +\n>  meson_options.txt         | 5 +++++\n>  3 files changed, 7 insertions(+)\n> \n> diff --git a/Documentation/Doxyfile.in b/Documentation/Doxyfile.in\n> index 2be8d47b8419..abafcf6c6c66 100644\n> --- a/Documentation/Doxyfile.in\n> +++ b/Documentation/Doxyfile.in\n> @@ -20,6 +20,7 @@ TOC_INCLUDE_HEADINGS   = 0\n>  CASE_SENSE_NAMES       = YES\n>  \n>  QUIET                  = YES\n> +WARN_AS_ERROR          = @WARN_AS_ERROR@\n>  \n>  INPUT                  = \"@TOP_SRCDIR@/include/libcamera\" \\\n>                           \"@TOP_SRCDIR@/src/ipa/ipu3\" \\\n> diff --git a/Documentation/meson.build b/Documentation/meson.build\n> index 3872e0a8f522..30d395234952 100644\n> --- a/Documentation/meson.build\n> +++ b/Documentation/meson.build\n> @@ -15,6 +15,7 @@ if doxygen.found() and dot.found()\n>      cdata.set('TOP_SRCDIR', meson.project_source_root())\n>      cdata.set('TOP_BUILDDIR', meson.project_build_root())\n>      cdata.set('OUTPUT_DIR', meson.current_build_dir())\n> +    cdata.set('WARN_AS_ERROR', get_option('doc_werror') ? 'YES' : 'NO')\n>  \n>      doxygen_predefined = []\n>      foreach key : config_h.keys()\n> diff --git a/meson_options.txt b/meson_options.txt\n> index c61eb55584b5..7aa412491e91 100644\n> --- a/meson_options.txt\n> +++ b/meson_options.txt\n> @@ -20,6 +20,11 @@ option('documentation',\n>          type : 'feature',\n>          description : 'Generate the project documentation')\n>  \n> +option('doc_werror',\n> +        type : 'boolean',\n> +        value : false,\n> +        description : 'Treat documentation warnings as errors')\n> +\n>  option('gstreamer',\n>          type : 'feature',\n>          value : 'auto',\n> \n> base-commit: 3cb20bc2301c03d01a631eb637ab47031d2b91e6\n> -- \n> Regards,\n> \n> Laurent Pinchart\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id AFCF6BDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 14 May 2024 10:15:02 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AC2D96346B;\n\tTue, 14 May 2024 12:15:01 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 62B2063469\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 14 May 2024 12:14:59 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2CC6022A;\n\tTue, 14 May 2024 12:14:52 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"aaj2WuB9\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1715681692;\n\tbh=iI822AbGeGwDrhZvPlTJJJwEH2RrnMm9yVx4TYYfnX0=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=aaj2WuB9DKYqVoduJBbzEmgW5BSXvHgC4pYaTn6dcbKpKOrGpNfg1sABbdttDnYja\n\tjTyTWhy0sln1fDIg2fCW9dibgoETopiKjuyiQcyO1JVO7RILLMScI1BMDF7i2EcCl2\n\t+y3/TwGUrTszeoWTRC9Bl+bTdPTpRt3KKPFZK7hw=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20240513124323.8933-1-laurent.pinchart@ideasonboard.com>","References":"<20240513124323.8933-1-laurent.pinchart@ideasonboard.com>","Subject":"Re: [PATCH] Documentation: Add option to treat Doxygen warnings as\n\terrors","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Tue, 14 May 2024 11:14:56 +0100","Message-ID":"<171568169639.2219466.17686582064090690422@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]