From b16d1002aa563da2740ed221cf87865b380d440a Mon Sep 17 00:00:00 2001 From: Jeongseok Lee Date: Sat, 16 Mar 2024 18:52:14 -0700 Subject: [PATCH] [lint] Format code --- pixi.toml | 30 +++++++++++++++++++----------- tools/check_format.sh | 4 ++-- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/pixi.toml b/pixi.toml index be5df1fb40066..09a2732b2a515 100644 --- a/pixi.toml +++ b/pixi.toml @@ -45,11 +45,13 @@ freeglut = ">=3.2.2,<3.3" [target.linux-64.tasks] configure = "cmake -G Ninja -S . -B build -DDART_VERBOSE=ON" -lint = { cmd= "cmake --build build --target format && black . && isort .", depends_on = ["configure"] } -check-lint = { cmd= "black . --check && isort . --check", depends_on = ["configure"] } -build = { cmd = "cmake --build build -j", depends_on = [ +lint = { cmd = "cmake --build build --target format && black . && isort .", depends_on = [ "configure", ] } +check-lint = { cmd = "cmake --build build --target check-format && black . --check && isort . --check", depends_on = [ + "configure", +] } +build = { cmd = "cmake --build build -j", depends_on = ["configure"] } build_dartpy = { cmd = "cmake --build build -j --target dartpy", depends_on = [ "configure", ] } @@ -68,11 +70,13 @@ clang-format-14 = ">=14.0.6,<14.1" [target.osx-64.tasks] configure = "cmake -G Ninja -S . -B build -DDART_VERBOSE=ON" -lint = { cmd= "cmake --build build --target format && black . && isort .", depends_on = ["configure"] } -check-lint = { cmd= "cmake --build build --target check-format && black . --check && isort . --check", depends_on = ["configure"] } -build = { cmd = "cmake --build build -j", depends_on = [ +lint = { cmd = "cmake --build build --target format && black . && isort .", depends_on = [ + "configure", +] } +check-lint = { cmd = "cmake --build build --target check-format && black . --check && isort . --check", depends_on = [ "configure", ] } +build = { cmd = "cmake --build build -j", depends_on = ["configure"] } build_dartpy = { cmd = "cmake --build build -j --target dartpy", depends_on = [ "configure", ] } @@ -91,11 +95,13 @@ clang-format-14 = ">=14.0.6,<14.1" [target.osx-arm64.tasks] configure = "cmake -G Ninja -S . -B build -DDART_VERBOSE=ON" -lint = { cmd= "cmake --build build --target format && black . && isort .", depends_on = ["configure"] } -check-lint = { cmd= "cmake --build build --target check-format && black . --check && isort . --check", depends_on = ["configure"] } -build = { cmd = "cmake --build build -j", depends_on = [ +lint = { cmd = "cmake --build build --target format && black . && isort .", depends_on = [ "configure", ] } +check-lint = { cmd = "cmake --build build --target check-format && black . --check && isort . --check", depends_on = [ + "configure", +] } +build = { cmd = "cmake --build build -j", depends_on = ["configure"] } build_dartpy = { cmd = "cmake --build build -j --target dartpy", depends_on = [ "configure", ] } @@ -117,8 +123,10 @@ freeglut = ">=3.2.2,<3.3" [target.win-64.tasks] configure = "cmake -S . -B build -G 'Visual Studio 17 2022' -DCMAKE_BUILD_TYPE=Release -DDART_MSVC_DEFAULT_OPTIONS=ON -DBUILD_SHARED_LIBS=OFF -DDART_VERBOSE=ON" -lint = { cmd= "black . && isort .", depends_on = ["configure"] } -check-lint = { cmd= "black . --check && isort . --check", depends_on = ["configure"] } +lint = { cmd = "black . && isort .", depends_on = ["configure"] } +check-lint = { cmd = "black . --check && isort . --check", depends_on = [ + "configure", +] } build = { cmd = "cmake --build build --config Release -j", depends_on = [ "configure", ] } diff --git a/tools/check_format.sh b/tools/check_format.sh index 78d219c78b406..5857559fbdbca 100755 --- a/tools/check_format.sh +++ b/tools/check_format.sh @@ -4,12 +4,12 @@ if [ "$#" -lt 2 ]; then exit 0 fi -num_changes=`$1 -style=file -output-replacements-xml "${@:2}" | grep -c "