From 166072d32c6917248ea4dd99f88ad4adde9aa980 Mon Sep 17 00:00:00 2001 From: Yuri Prykhodko <40931732+solid-yuriiprykhodko@users.noreply.github.com> Date: Thu, 4 Apr 2024 22:53:45 +0300 Subject: [PATCH 1/2] Use custom_lint instead of DCM --- .github/workflows/flutter.yaml | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/.github/workflows/flutter.yaml b/.github/workflows/flutter.yaml index 1cd1a91..12d42a6 100644 --- a/.github/workflows/flutter.yaml +++ b/.github/workflows/flutter.yaml @@ -27,36 +27,9 @@ jobs: - name: Get dependencies if: steps.check_files.outputs.files_exists == 'true' run: flutter pub get - - - name: Setup Dart Code Metrics - if: steps.check_files.outputs.files_exists == 'true' - run: dart pub get dart_code_metrics - - name: Dart Code Metrics - if: steps.check_files.outputs.files_exists == 'true' - run: | - dirs_to_analyse="" - if [ -d lib ]; then dirs_to_analyse+=" lib"; fi - if [ -d test ]; then dirs_to_analyse+=" test"; fi - if [ -d example ]; then dirs_to_analyse+=" example"; fi - - if [ dirs_to_analyse != "" ] - then - dart run dart_code_metrics:metrics \ - analyze \ - $dirs_to_analyse \ - --fatal-warnings \ - --fatal-performance \ - --fatal-style - dart run dart_code_metrics:metrics \ - check-unused-files \ - $dirs_to_analyse \ - --fatal-unused - dart run dart_code_metrics:metrics \ - check-unused-code \ - $dirs_to_analyse \ - --fatal-unused - fi + - name: Run custom_lint + run: dart run custom_lint - name: Check formatting if: steps.check_files.outputs.files_exists == 'true' From f79c558354b29dd0b5438b4f1983eccf51eb7a9d Mon Sep 17 00:00:00 2001 From: Yuri Prykhodko <40931732+solid-yuriiprykhodko@users.noreply.github.com> Date: Thu, 4 Apr 2024 22:54:40 +0300 Subject: [PATCH 2/2] Add missing predicate --- .github/workflows/flutter.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/flutter.yaml b/.github/workflows/flutter.yaml index 12d42a6..e17e6fc 100644 --- a/.github/workflows/flutter.yaml +++ b/.github/workflows/flutter.yaml @@ -29,6 +29,7 @@ jobs: run: flutter pub get - name: Run custom_lint + if: steps.check_files.outputs.files_exists == 'true' run: dart run custom_lint - name: Check formatting