Belle II Software
release-08-01-10
display_cppcheck.py
1
#!/usr/bin/env python3
2
# -*- coding: utf-8 -*-
3
4
11
12
"""
13
Perform code quality cppchecks for every commit to the display package.
14
"""
15
16
import
re
17
from
b2test_utils
import
check_error_free
18
19
if
__name__ ==
"__main__"
:
20
# Comment: this is a temporary workaround, since this package is affected by cppcheck warnings
21
# from other packages. check_error_free skips all the lines identified by findall, so here we skip all the lines
22
# that do no not contain the name of the tested package. The output will be incomplete and a bit obscure,
23
# but at least the test will correctly check if there are cppcheck warnings affecting this package.
24
ignoreme =
r"^((?!display\/).)*$"
25
check_error_free(
"b2code-cppcheck"
,
"cppcheck"
,
"display"
,
26
lambda
x: re.findall(ignoreme, x)
or
x ==
"'"
)
display
tests
display_cppcheck.py
Generated on Mon Sep 23 2024 14:01:35 for Belle II Software by
1.9.1