ci: Move static code analysis related jobs to static-code-analysis.yml

This commit is contained in:
Fu Hanxi
2020-11-30 17:40:24 +08:00
parent 7dd7c6c072
commit ffe0b7af32
7 changed files with 208 additions and 165 deletions

View File

@@ -1,12 +1,17 @@
#!/usr/bin/env python
import argparse
import re
from os.path import dirname, join, normpath, relpath
from os.path import join, normpath, dirname, relpath, exists
CLANG_TIDY_REGEX = re.compile(r'(.+|[a-zA-Z]:\\\\.+):([0-9]+):([0-9]+): ([^:]+): (.+)')
def normalize_clang_tidy_path(file_path, output_path, base_dir):
if not exists(file_path):
print('Skipping normalizing. This could only happen when skipping clang-tidy check '
'because of no c file modified. Please double check')
return
with open(output_path, 'w') as fw:
for line in open(file_path):
result = CLANG_TIDY_REGEX.match(line)