Skip to content

Commit

Permalink
Skip cmake formatter on high core count systems
Browse files Browse the repository at this point in the history
  • Loading branch information
ThadHouse committed Jan 11, 2024
1 parent 3da80e2 commit 73ef5c0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion wpiformat/wpiformat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,12 @@ def main():
run_pipeline(task_pipeline, args, files)

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

# Check tasks are all batch tasks
invalid_tasks = [
Expand Down

0 comments on commit 73ef5c0

Please sign in to comment.