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