Belle II Software development
code-quality-cppcheck.py
1#!/usr/bin/env python3
2
3
10
11"""
12Perform code quality cppchecks for every commit to the analysis package.
13Eventually these checks can be included as git hooks.
14"""
15
16import re
17from b2test_utils import check_error_free
18
19if __name__ == "__main__":
20 # ignore the nofile .. [missingInclude] that is always at the end of cppcheck
21 ignoreme = 'Cppcheck cannot find all the include files'
22 check_error_free("b2code-cppcheck", "cppcheck", "analysis",
23 lambda x: re.findall(ignoreme, x) or x == "'")