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