mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-23 23:31:51 +08:00
Add dart-code-metrics
I want version 4.2 as that has avoid-ignoring-return-values, but it needs a higher version of meta, which flutter_test does not allow.
This commit is contained in:
@ -17,6 +17,8 @@ analyzer:
|
||||
- "lib/generated_plugin_registrant.dart"
|
||||
enable-experiment:
|
||||
- nonfunction-type-aliases
|
||||
plugins:
|
||||
- dart_code_metrics
|
||||
|
||||
linter:
|
||||
rules:
|
||||
@ -125,3 +127,26 @@ linter:
|
||||
|
||||
# === pub rules ===
|
||||
- package_names
|
||||
|
||||
dart_code_metrics:
|
||||
metrics-exclude:
|
||||
- test/**
|
||||
- lib/settings/settings_screen.dart
|
||||
- lib/setup/screens.dart
|
||||
- lib/widgets/images/markdown_image.dart
|
||||
metrics:
|
||||
cyclomatic-complexity: 200
|
||||
maximum-nesting-level: 50
|
||||
number-of-parameters: 40
|
||||
source-lines-of-code: 5000
|
||||
number-of-methods: 100
|
||||
rules:
|
||||
- avoid-ignoring-return-values
|
||||
# - avoid-unused-parameters
|
||||
# - double-literal-format
|
||||
# - no-boolean-literal-compare
|
||||
# - no-equal-arguments
|
||||
# - no-magic-number
|
||||
# - no-object-declaration
|
||||
# - prefer-conditional-expressions
|
||||
|
||||
|
39
pubspec.lock
39
pubspec.lock
@ -7,14 +7,28 @@ packages:
|
||||
name: _fe_analyzer_shared
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "20.0.0"
|
||||
version: "22.0.0"
|
||||
analyzer:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: analyzer
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.4.0"
|
||||
version: "1.7.1"
|
||||
analyzer_plugin:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: analyzer_plugin
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.6.0"
|
||||
ansicolor:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: ansicolor
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.1"
|
||||
archive:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -246,6 +260,13 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.1"
|
||||
csslib:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: csslib
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.17.0"
|
||||
csv:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -253,6 +274,13 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "5.0.0"
|
||||
dart_code_metrics:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: dart_code_metrics
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "4.1.0"
|
||||
dart_git:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@ -647,6 +675,13 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
html:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: html
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.15.0"
|
||||
http:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -102,6 +102,7 @@ dev_dependencies:
|
||||
monarch: ^0.2.0
|
||||
build_runner: ^1.10.3
|
||||
dashbook: ^0.1.3
|
||||
dart_code_metrics: ^4.1.0
|
||||
|
||||
flutter:
|
||||
uses-material-design: true
|
||||
|
Reference in New Issue
Block a user