Skip to content

Commit 0e758a4

Browse files
committed
Skip cmake formatter on high core count systems
1 parent 3da80e2 commit 0e758a4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

wpiformat/wpiformat/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,12 @@ def main():
512512
run_pipeline(task_pipeline, args, files)
513513

514514
# Lint is run last since previous tasks can affect its output.
515-
task_pipeline = [CMakeFormat(), PyFormat(), Lint()]
515+
# CMakeFormat doesn't work on high core count machines.
516+
if mp.cpu_count() > 60:
517+
task_pipeline = [PyFormat(), Lint()]
518+
print("warning: Skipping CMake formatter due to too high CPU count.")
519+
else:
520+
task_pipeline = [CMakeFormat(), PyFormat(), Lint()]
516521

517522
# Check tasks are all batch tasks
518523
invalid_tasks = [

0 commit comments

Comments
 (0)