From 0556ff612e99dc178622764c418162d798df2b72 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Fri, 27 Sep 2024 14:15:54 -0400 Subject: [PATCH] Simplify/fix dart formatting in CI --- .github/workflows/flutterfmt.sh | 10 ---------- .github/workflows/flutterfmt.yml | 4 ++-- 2 files changed, 2 insertions(+), 12 deletions(-) delete mode 100755 .github/workflows/flutterfmt.sh diff --git a/.github/workflows/flutterfmt.sh b/.github/workflows/flutterfmt.sh deleted file mode 100755 index a003ccb..0000000 --- a/.github/workflows/flutterfmt.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -DIRS="lib test" -EXIT=0 - -for DIR in $DIRS; do - OUT="$(dart format -l 120 --suppress-analytics "$DIR" | sed -e "s/^Formatted \(.*\)/::error file=$DIR\/\1::Not formatted/g")" - echo "$OUT" | grep "::error" && EXIT=1 -done - -exit $EXIT \ No newline at end of file diff --git a/.github/workflows/flutterfmt.yml b/.github/workflows/flutterfmt.yml index 597e914..60ec34b 100644 --- a/.github/workflows/flutterfmt.yml +++ b/.github/workflows/flutterfmt.yml @@ -23,5 +23,5 @@ jobs: - name: Check out code uses: actions/checkout@v3 - - name: flutter format - run: $GITHUB_WORKSPACE/.github/workflows/flutterfmt.sh + - name: Check formating + run: dart format -l120 lib/ test/ --set-exit-if-changed --suppress-analytics \ No newline at end of file