[libcamera-devel] [PATCH 1/4] Add .clang-tidy

Kieran Bingham kieran.bingham at ideasonboard.com
Thu Oct 22 11:56:17 CEST 2020


Hi Tomi,

On 22/10/2020 09:17, Tomi Valkeinen wrote:
> Having .clang-tidy file will give us a 'clang-tidy' meson build target,
> so doing a full clang-tidy run can be done just by:
> 
> ninja -C build clang-tidy
> 
> I did not look at if more checks should be enabled or not. I disabled
> clang-diagnostic-c99-designator as that feature was used in the code,
> and I see no harm with the feature.

Ha, I already have one of these in my tree. Though mine is just a blank
file (which is enough to enable the ninja target).


> Signed-off-by: Tomi Valkeinen <tomi.valkeinen at iki.fi>

Therefore, I think adding this officially is a good idea ;-)

I wonder if we could integrate this into checkstyle so that it reports
any additional warnings introduced by new patches - but that could be
quite difficult to implement as clang-tidy will look at the bigger tree,
so I'll leave it as a pipe dream for now ;-)

Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>

> ---
>  .clang-tidy | 3 +++
>  1 file changed, 3 insertions(+)
>  create mode 100644 .clang-tidy
> 
> diff --git a/.clang-tidy b/.clang-tidy
> new file mode 100644
> index 00000000..4c47fa8c
> --- /dev/null
> +++ b/.clang-tidy
> @@ -0,0 +1,3 @@
> +Checks:		-clang-diagnostic-c99-designator
> +FormatStyle:	file
> +
> 

-- 
Regards
--
Kieran


More information about the libcamera-devel mailing list