mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-25 00:00:26 +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"
|
- "lib/generated_plugin_registrant.dart"
|
||||||
enable-experiment:
|
enable-experiment:
|
||||||
- nonfunction-type-aliases
|
- nonfunction-type-aliases
|
||||||
|
plugins:
|
||||||
|
- dart_code_metrics
|
||||||
|
|
||||||
linter:
|
linter:
|
||||||
rules:
|
rules:
|
||||||
@ -125,3 +127,26 @@ linter:
|
|||||||
|
|
||||||
# === pub rules ===
|
# === pub rules ===
|
||||||
- package_names
|
- 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
|
name: _fe_analyzer_shared
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "20.0.0"
|
version: "22.0.0"
|
||||||
analyzer:
|
analyzer:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: analyzer
|
name: analyzer
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
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:
|
archive:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -246,6 +260,13 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.1"
|
version: "3.0.1"
|
||||||
|
csslib:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: csslib
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "0.17.0"
|
||||||
csv:
|
csv:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -253,6 +274,13 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.0.0"
|
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:
|
dart_git:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -647,6 +675,13 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.1.0"
|
||||||
|
html:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: html
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "0.15.0"
|
||||||
http:
|
http:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
@ -102,6 +102,7 @@ dev_dependencies:
|
|||||||
monarch: ^0.2.0
|
monarch: ^0.2.0
|
||||||
build_runner: ^1.10.3
|
build_runner: ^1.10.3
|
||||||
dashbook: ^0.1.3
|
dashbook: ^0.1.3
|
||||||
|
dart_code_metrics: ^4.1.0
|
||||||
|
|
||||||
flutter:
|
flutter:
|
||||||
uses-material-design: true
|
uses-material-design: true
|
||||||
|
Reference in New Issue
Block a user