diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml new file mode 100644 index 0000000000..0494388553 --- /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 39e7335051..54664176c3 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: