Skip to content
Snippets Groups Projects
Commit f09af77c authored by Florian Schmaus's avatar Florian Schmaus
Browse files

Add cppcheck

parent 08224cd2
No related branches found
No related tags found
No related merge requests found
Pipeline #59098 passed
...@@ -87,6 +87,10 @@ format: all ...@@ -87,6 +87,10 @@ format: all
tidy: all tidy: all
$(NINJA) -C build clang-tidy $(NINJA) -C build clang-tidy
.PHONY: cppcheck
cppcheck: all
$(NINJA) -C build $@
PHONY: iwyu PHONY: iwyu
iwyu: all iwyu: all
$(NINJA) -C build $@ $(NINJA) -C build $@
......
<?xml version="1.0"?>
<suppressions>
<suppress>
<id>syntaxError</id>
</suppress>
</suppressions>
...@@ -16,9 +16,20 @@ boost_thread_dep = dependency('boost', modules : ['thread'], required: false) ...@@ -16,9 +16,20 @@ boost_thread_dep = dependency('boost', modules : ['thread'], required: false)
tools_dir = join_paths(meson.source_root(), 'tools') tools_dir = join_paths(meson.source_root(), 'tools')
compile_commands_json = join_paths(meson.build_root(), 'compile_commands.json')
run_target('iwyu', run_target('iwyu',
command: join_paths(tools_dir, 'check-iwyu')) command: join_paths(tools_dir, 'check-iwyu'))
run_target('cppcheck',
command: [
'cppcheck',
'--project=' + compile_commands_json,
'--suppress-xml=' + join_paths(meson.source_root(), 'cppcheck-suppressions.xml'),
'--error-exitcode=2',
'--quiet',
], )
conf_data = configuration_data() conf_data = configuration_data()
option_urcu = get_option('userspace_rcu') option_urcu = get_option('userspace_rcu')
conf_data.set('EMPER_LIBURCU', option_urcu) conf_data.set('EMPER_LIBURCU', option_urcu)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment