From 46c06b024b8764b3231f3563b1cd5406646aac48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Duarte?= Date: Thu, 24 Aug 2023 21:20:11 +0100 Subject: [PATCH] Exclude mock files from being formatted or linted --- .github/workflows/format_lint_test.yaml | 2 +- uni/analysis_options.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/format_lint_test.yaml b/.github/workflows/format_lint_test.yaml index 9b4b9055b..0fb4e2d6d 100644 --- a/.github/workflows/format_lint_test.yaml +++ b/.github/workflows/format_lint_test.yaml @@ -20,7 +20,7 @@ jobs: with: flutter-version: ${{ env.FLUTTER_VERSION }} - - run: dart format $(find . -type f -name "*.dart" -a -not -name "*.g.dart") --set-exit-if-changed + - run: dart format $(find . -type f -name "*.dart" -a -not -name "*.g.dart" -a -not -name "*.mocks.dart") --set-exit-if-changed lint: name: "Lint" diff --git a/uni/analysis_options.yaml b/uni/analysis_options.yaml index 92d895f92..6acf469de 100644 --- a/uni/analysis_options.yaml +++ b/uni/analysis_options.yaml @@ -4,6 +4,7 @@ analyzer: # Exclude auto-generated files from dart analysis exclude: - "**.g.dart" + - "**.mocks.dart" # Custom linter rules. A list of all rules can be found at # https://dart-lang.github.io/linter/lints/options/options.html