From e6d2426a5a1a946cc9d61464c27c03fab5044c32 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Mon, 26 Feb 2024 03:22:26 -0800 Subject: [PATCH] tools: use parallel to run clang-tidy --- Justfile | 10 ++-------- shell.nix | 1 + 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/Justfile b/Justfile index 687f266..5fe2ccb 100644 --- a/Justfile +++ b/Justfile @@ -1,16 +1,10 @@ builddir := 'build' -with_cpphpp := 'find src -type f \( -name "*.cpp" -o -name "*.hpp" \) -print0 | xargs -0' -with_cpp := 'find src -type f -name "*.cpp" -print0 | xargs -0' - fmt: - {{with_cpphpp}} clang-format -i + find src -type f \( -name "*.cpp" -o -name "*.hpp" \) -print0 | xargs -0 clang-format -i lint: - {{with_cpp}} clang-tidy --load={{ env_var("TIDYFOX") }} - -fixlint: - {{with_cpp}} clang-tidy --load={{ env_var("TIDYFOX") }} + find src -type f -name "*.cpp" -print0 | parallel -q0 --eta clang-tidy --load={{ env_var("TIDYFOX") }} configure target='debug' *FLAGS='': cmake -B {{builddir}} \ diff --git a/shell.nix b/shell.nix index 357b037..a2c94be 100644 --- a/shell.nix +++ b/shell.nix @@ -10,6 +10,7 @@ in pkgs.mkShell { nativeBuildInputs = with pkgs; [ just clang-tools_17 + parallel cmake pkg-config