feat(meson): add cppcheck, run with ninja build cppcheck

This commit is contained in:
2026-03-17 00:50:30 +01:00
parent bb31304614
commit 417b4f9239
+18
View File
@@ -39,6 +39,24 @@ tgbot_dep = declare_dependency(
dependencies: deps, 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
example = executable( example = executable(
'example', 'example',