Skip to content
pubscout

dart_code_metrics_presets

2.34.0, released 5 weeks ago by dcm.dev

Predefined configuration presets of lint rules and metrics for DCM.

WASM-readySingle maintainer
$ flutter pub add dart_code_metrics_presets
Source repository

What it does

Provides ready-to-use configuration presets for DCM (Dart Code Metrics) covering general Dart and Flutter rules, pubspec checking, and specific package integrations like Riverpod, Bloc, or Flame. It allows development teams to quickly enforce code quality standards without writing complex rule sets from scratch.

AI-written summary of version 2.34.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are using DCM as a code quality tool in your Dart or Flutter project.
  • You want standard, pre-configured sets of lint rules for popular packages like Riverpod, Bloc, or Flame.

Skip it when

  • You are not using DCM for code analysis.
  • You require fully custom lint rules without any predefined presets.

Strengths

  • Saves configuration time by providing ready-made rule presets.
  • Includes presets tailored for many popular third-party packages.
  • Allows easy overriding or disabling of individual rules.

Weaknesses

  • Strictly depends on DCM being used in your workflow.
  • Preset rules and thresholds may require fine-tuning for specific project needs.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0

Add the package as a dev dependency and extend a preset configuration in your DCM config file.

dart_code_metrics:
  extends:
    - package:dart_code_metrics_presets/all.yaml

Alternatives

Packages that do the same job and could replace dart_code_metrics_presets.

  • lints

    If you prefer official Dart linting rules without requiring DCM.

  • flutter_lints

    If you want the official recommended Flutter lints instead of DCM presets.