diff options
author | iaz1607 <iaz1607@yandex-team.ru> | 2022-02-10 16:45:37 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:37 +0300 |
commit | e5437feb4ac2d2dc044e1090b9312dde5ef197e0 (patch) | |
tree | f5a238c69dd20a1fa2092127a31b8aff25020f7d /build/scripts/clang_tidy_arch.py | |
parent | f4945d0a44b8770f0801de3056aa41639b0b7bd2 (diff) | |
download | ydb-e5437feb4ac2d2dc044e1090b9312dde5ef197e0.tar.gz |
Restoring authorship annotation for <iaz1607@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'build/scripts/clang_tidy_arch.py')
-rw-r--r-- | build/scripts/clang_tidy_arch.py | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/build/scripts/clang_tidy_arch.py b/build/scripts/clang_tidy_arch.py index 7caf623a3d..b142a8d48a 100644 --- a/build/scripts/clang_tidy_arch.py +++ b/build/scripts/clang_tidy_arch.py @@ -1,33 +1,33 @@ -import os -import argparse -import json - - -def parse_args(): - parser = argparse.ArgumentParser() - parser.add_argument("--output-file") - parser.add_argument("--build-root") - parser.add_argument("--source-root") - return parser.parse_known_args() - - -def main(): - args, unknown_args = parse_args() - inputs = unknown_args - result_json = {} - for inp in inputs: - if os.path.exists(inp) and inp.endswith("tidyjson"): - with open(inp, 'r') as afile: - file_content = afile.read().strip() - if not file_content: - continue - errors = json.loads(file_content) - testing_src = errors["file"] - result_json[testing_src] = errors - - with open(args.output_file, 'w') as afile: - json.dump(result_json, afile, indent=4) # TODO remove indent - - -if __name__ == "__main__": - main() +import os +import argparse +import json + + +def parse_args(): + parser = argparse.ArgumentParser() + parser.add_argument("--output-file") + parser.add_argument("--build-root") + parser.add_argument("--source-root") + return parser.parse_known_args() + + +def main(): + args, unknown_args = parse_args() + inputs = unknown_args + result_json = {} + for inp in inputs: + if os.path.exists(inp) and inp.endswith("tidyjson"): + with open(inp, 'r') as afile: + file_content = afile.read().strip() + if not file_content: + continue + errors = json.loads(file_content) + testing_src = errors["file"] + result_json[testing_src] = errors + + with open(args.output_file, 'w') as afile: + json.dump(result_json, afile, indent=4) # TODO remove indent + + +if __name__ == "__main__": + main() |