v2.31.0
dart_code_metrics_presets
DCM 的預設預設,一個用於 Flutter 開發團隊的程式碼品質工具。
38喜歡 10.6萬近 30 天下載150Pub 分數
AndroidiOSWebmacOSWindowsLinux
DCM 的預設設定
以下為英文專案原文快照,最新內容請造訪 GitHub。
Pub Version License package publisher
DCM is an advanced linter for Dart and Flutter that helps you analyze and improve your code quality. You can find all available lint rules here.
This repository contains a list of predefined DCM presets for lints:
pubspec.yaml files.and for metrics:
Take these steps to enable a preset:
Install this package as a dev dependency:
dart pub add --dev dart_code_metrics_presets
or:
flutter pub add --dev dart_code_metrics_presets
For DCM configuration add the extents entry:
dart_code_metrics:
extends:
- package:dart_code_metrics_presets/all.yaml
To disable a rule, simply set its value to false:
dart_code_metrics:
extends:
- package:dart_code_metrics_presets/all.yaml
rules:
- avoid-banned-imports: false
To reconfigure a rule, that is included into a preset:
dart_code_metrics:
extends:
- package:dart_code_metrics_presets/all.yaml
rules:
- arguments-ordering:
child-last: true
Any other preset can be passed to the extends entry. To create a custom preset create a yaml file with the same structure as for regular DCM configuration.