File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -152,7 +152,16 @@ def run_clang_tidy(args=None) -> Tuple[int, str]:
152152 other_args = ["-p" , compile_db_path ] + other_args
153153
154154 clang_tidy_args , source_files = _split_source_files (other_args )
155- if hook_args .jobs > 1 and len (source_files ) > 1 :
155+
156+ # Parallel execution is unsafe when arguments include flags that write to a
157+ # shared output path (e.g., --export-fixes fixes.yaml). In that case, force
158+ # serial execution to avoid concurrent writes/overwrites.
159+ unsafe_parallel = any (
160+ arg == "--export-fixes" or arg .startswith ("--export-fixes=" )
161+ for arg in clang_tidy_args
162+ )
163+
164+ if hook_args .jobs > 1 and len (source_files ) > 1 and not unsafe_parallel :
156165 return _exec_parallel_clang_tidy (
157166 ["clang-tidy" ] + clang_tidy_args , source_files , hook_args .jobs
158167 )
You can’t perform that action at this time.
0 commit comments