From 417b4f9239c4c4aa7dc4b3181ae6c8f360d99a0d Mon Sep 17 00:00:00 2001 From: Francesco Date: Tue, 17 Mar 2026 00:50:30 +0100 Subject: [PATCH] feat(meson): add cppcheck, run with ninja build cppcheck --- meson.build | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/meson.build b/meson.build index 6366616..4569c6a 100644 --- a/meson.build +++ b/meson.build @@ -39,6 +39,24 @@ tgbot_dep = declare_dependency( dependencies: deps, ) +cppcheck = find_program('cppcheck', required: false) + +if cppcheck.found() + run_target( + 'cppcheck', + command: [ + cppcheck, + '--enable=all', + '--inconclusive', + '--std=c18', + '--check-level=exhaustive', + '--suppress=missingIncludeSystem', + '--project=' + + join_paths(meson.current_build_dir(), 'compile_commands.json'), + ], + ) +endif + # Example example = executable( 'example',