aboutsummaryrefslogtreecommitdiffstats
path: root/build/scripts/clang_tidy.py
diff options
context:
space:
mode:
authorAlexSm <alex@ydb.tech>2023-12-21 15:05:38 +0100
committerGitHub <noreply@github.com>2023-12-21 15:05:38 +0100
commite98bcbc74422492351c51646dba3849a138a8ffc (patch)
tree38ad7a09b1f9c201ce8a7e3d69f2017388769224 /build/scripts/clang_tidy.py
parent559d7083cd8378cb25b9e966dedcca21d413e338 (diff)
downloadydb-e98bcbc74422492351c51646dba3849a138a8ffc.tar.gz
Import libs 1 (#590)
* Import libs 1 * Add new file without extension * Add file missed in export config
Diffstat (limited to 'build/scripts/clang_tidy.py')
-rw-r--r--build/scripts/clang_tidy.py22
1 files changed, 0 insertions, 22 deletions
diff --git a/build/scripts/clang_tidy.py b/build/scripts/clang_tidy.py
index e93b35774b..8d1c6a0f0a 100644
--- a/build/scripts/clang_tidy.py
+++ b/build/scripts/clang_tidy.py
@@ -113,32 +113,10 @@ def find_header(p, h):
raise Exception('can not find inc dir')
-def fix_cmd(cmd, bin):
- sp = '--sysroot='
-
- for x in cmd:
- if '-isystem' in x and '/share/include' in x:
- # reparent compiler headers dir into clang-tidy install path
- yield '-isystem' + find_header(os.path.dirname(os.path.dirname(bin)), 'stddef.h')
- elif x.startswith(sp):
- yield '-nostdinc'
- sr = x[len(sp) :]
- yield '-isystem' + sr + '/usr/include'
- yield '-isystem' + sr + '/usr/include/x86_64-linux-gnu'
- elif x == '-nostdinc++':
- if '.c.o' in str(cmd):
- pass
- else:
- yield x
- else:
- yield x
-
-
def main():
args, clang_cmd = parse_args()
if '/wrapcc.py' in str(clang_cmd):
clang_cmd = list(filter_cmd(clang_cmd))
- clang_cmd = list(fix_cmd(clang_cmd, args.clang_tidy_bin))
setup_script(args)
clang_tidy_bin = args.clang_tidy_bin
output_json = args.tidy_json