Belle II Software
development
calibration_cppcheck.py
1
#!/usr/bin/env python3
2
3
10
11
"""
12
Perform code quality cppchecks for every commit to the calibration package.
13
"""
14
15
import
re
16
from
b2test_utils
import
check_error_free
17
18
if
__name__ ==
"__main__"
:
19
# Comment: this is a temporary workaround, since this package is affected by cppcheck warnings
20
# from other packages. check_error_free skips all the lines identified by findall, so here we skip all the lines
21
# that do no not contain the name of the tested package. The output will be incomplete and a bit obscure,
22
# but at least the test will correctly check if there are cppcheck warnings affecting this package.
23
ignoreme =
'nofile:0:0:'
24
check_error_free(
"b2code-cppcheck"
,
"cppcheck"
,
"calibration"
,
25
lambda
x: re.findall(ignoreme, x)
or
x ==
"'"
)
calibration
tests
calibration_cppcheck.py
Generated on Fri Nov 8 2024 02:34:37 for Belle II Software by
1.9.6