Skip to content

Commit

Permalink
ci: dart analyser (#761)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

* ci(analyser): apply suggestion from code-reviewer

Co-Authored-By: Palm <[email protected]>

* ci(analyser): apply suggestion from code-reviewer

Co-authored-by: Palm <[email protected]>

---------

Co-authored-by: Palm <[email protected]>
  • Loading branch information
validcube and PalmDevs authored Mar 28, 2023
1 parent d214a02 commit fa40632
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/analyze.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
with:
fail-on: warning
5 changes: 4 additions & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit fa40632

Please sign in to comment.