| 48 | return len(result_map) - npass |
| 49 | |
| 50 | def __init__(self): |
| 51 | self.project_name = None |
| 52 | self.cpp_header_map = {} |
| 53 | self.cpp_src_map = {} |
| 54 | self.python_map = {} |
| 55 | pylint_disable = ['superfluous-parens', |
| 56 | 'too-many-instance-attributes', |
| 57 | 'too-few-public-methods'] |
| 58 | # setup pylint |
| 59 | self.pylint_opts = ['--extension-pkg-whitelist=numpy', |
| 60 | '--disable=' + ','.join(pylint_disable)] |
| 61 | |
| 62 | self.pylint_cats = set(['error', 'warning', 'convention', 'refactor']) |
| 63 | # setup cpp lint |
| 64 | cpplint_args = ['.', '--extensions=' + (','.join(CXX_SUFFIX))] |
| 65 | _ = cpplint.ParseArguments(cpplint_args) |
| 66 | cpplint._SetFilters(','.join(['-build/c++11', |
| 67 | '-build/namespaces', |
| 68 | '-build/include,', |
| 69 | '+build/include_what_you_use', |
| 70 | '+build/include_order'])) |
| 71 | cpplint._SetCountingStyle('toplevel') |
| 72 | cpplint._line_length = 100 |
| 73 | |
| 74 | def process_cpp(self, path, suffix): |
| 75 | """Process a cpp file.""" |