From fa4063220f99300e6b4f62eab71ba149d52da2f2 Mon Sep 17 00:00:00 2001 From: EvadeMaster <93124920+EvadeMaster@users.noreply.github.com> Date: Tue, 28 Mar 2023 15:47:34 +0700 Subject: [PATCH] ci: dart analyser (#761) * ci: dart analyser * ci(analyser): clarify the dart analysing step * refactor: ignore generated files * ci(analyser): apply suggestion from code-reviewer Co-Authored-By: Palm * ci(analyser): apply suggestion from code-reviewer Co-Authored-By: Palm * ci(analyser): apply suggestion from code-reviewer Co-authored-by: Palm --------- Co-authored-by: Palm --- .github/workflows/analyze.yml | 26 ++++++++++++++++++++++++++ analysis_options.yaml | 5 ++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/analyze.yml diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml new file mode 100644 index 00000000..04943885 --- /dev/null +++ b/.github/workflows/analyze.yml @@ -0,0 +1,26 @@ +name: Analyze Code + +on: + push: + branches: [ "main", "dev" ] + pull_request: + branches: [ "main", "dev" ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Setup Flutter + uses: subosito/flutter-action@v2 + with: + channel: 'stable' + cache: true + - name: Install Flutter dependencies + run: flutter pub get + - name: Generate files with Builder + run: flutter packages pub run build_runner build --delete-conflicting-outputs + - name: Analyze code + uses: ValentinVignal/action-dart-analyze@v0.15 + with: + fail-on: warning \ No newline at end of file diff --git a/analysis_options.yaml b/analysis_options.yaml index 39e73350..54664176 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -11,7 +11,10 @@ include: package:flutter_lints/flutter.yaml analyzer: exclude: - - lib/utils/env_class.g.dart + - lib/app/app.locator.dart + - lib/app/app.router.dart + - lib/models/patch.g.dart + - lib/models/patched_application.g.dart linter: rules: