File tree Expand file tree Collapse file tree 3 files changed +72
-0
lines changed Expand file tree Collapse file tree 3 files changed +72
-0
lines changed Original file line number Diff line number Diff line change 1+ name : code-quality
2+
3+ on :
4+ pull_request :
5+ branches : [main]
6+ push :
7+ branches : [main]
8+
9+ jobs :
10+ check :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout
14+ 15+
16+ - name : Install Dart and Flutter
17+ 18+ with :
19+ flutter-version : ' 3.16.5'
20+ cache : true
21+ cache-key : ' flutter-macos-stable-3.16.5-apple'
22+ cache-path : ' ${{ runner.tool_cache }}/flutter/macos-stable-3.16.5-apple'
23+ pub-cache-key : ' flutter-pub-macos-stable-3.16.5-apple'
24+
25+ - name : Install dependencies
26+ run : flutter clean && flutter pub get
27+
28+ - name : Install DCM
29+ uses : CQLabs/setup-dcm@v1
30+ with :
31+ github_token : ${{ secrets.GITHUB_TOKEN }}
32+
33+ - name : Run DCM
34+ 35+ with :
36+ github_token : ${{ secrets.GITHUB_TOKEN }}
37+ github_pat : ${{ secrets.PAT }}
38+ ci_key : ${{ secrets.DCM_CI_KEY }}
39+ email : ${{ secrets.DCM_EMAIL }}
Original file line number Diff line number Diff line change 99# packages, and plugins designed to encourage good coding practices.
1010include : package:flutter_lints/flutter.yaml
1111
12+ dart_code_metrics :
13+ monorepo : true
14+ extends :
15+ - package:dart_code_metrics_presets/all.yaml
16+ - recommended
17+ metrics :
18+ cyclomatic-complexity : 20
19+ number-of-parameters : 4
20+ maximum-nesting-level : 5
21+ weight-of-class : 0.33
22+ tight-class-cohesion : 0.33
23+ weighted-methods-per-class : 35
24+ response-for-class : 55
25+ coupling-between-object-classes : 12
26+ number-of-added-methods : 10
27+ depth-of-inheritance-tree : 5
28+ widgets-nesting-level : 10
29+ source-lines-of-code : 50
30+ number-of-used-widgets : 20
31+ maintainability-index : 50
32+ lines-of-code : 100
33+ halstead-volume : 150
34+ technical-debt :
35+ threshold : 1
36+ todo-cost : 161
37+ ignore-cost : 320
38+ ignore-for-file-cost : 396
39+ as-dynamic-cost : 322
40+ deprecated-annotations-cost : 37
41+ file-nullsafety-migration-cost : 41
42+ unit-type : " INR"
43+
1244linter :
1345 # The lint rules applied to this project can be customized in the
1446 # section below to disable rules from the `package:flutter_lints/flutter.yaml`
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ dev_dependencies:
4646 # package. See that file for information about deactivating specific lint
4747 # rules and activating additional ones.
4848 flutter_lints : ^2.0.0
49+ dart_code_metrics_presets : ^2.12.0
4950
5051# For information on the generic Dart part of this file, see the
5152# following page: https://dart.dev/tools/pub/pubspec
You can’t perform that action at this time.
0 commit comments