Skip to main content

Changelog

⚠️ For Individuals version changelog, please visit pub.dev.

1.5.0: Dart 3 support

Dart 3.0 support for existing rules as well as 17 new rules for records and patterns 🚀.
  • Rules update:
    19 new rules (17 for Dart 3.0 🔥)
    Common:
    • avoid-one-field-records
    • move-records-to-typedefs
    • avoid-bottom-type-in-records
    • avoid-nested-records
    • avoid-function-type-in-records
    • avoid-positional-record-field-access
    • avoid-mixing-named-and-positional-fields
    • avoid-long-records
    • match-positional-field-names-on-assignment
    • avoid-redundant-positional-field-name
    • avoid-nested-switch-expressions
    • avoid-bottom-type-in-patterns
    • avoid-explicit-pattern-field-name
    • prefer-wildcard-pattern
    • no-equal-switch-expression-cases
    • prefer-simpler-patterns-null-check
    • avoid-duplicate-patterns
    • prefer-returning-conditional-expressions
    Flutter:
    • avoid-stateless-widget-initialized-fields

    Dart 3.0 support for existing rules
    • avoid-banned-types
    • avoid-returning-widgets
    • avoid-similar-names
    • prefer-correct-identifier-length
    • avoid-collapsible-if
    • avoid-dynamic
    • avoid-explicit-type-declaration
    • avoid-non-null-assertion
    • avoid-shadowing
    • avoid-unnecessary-type-assertions
    • avoid-unnecessary-type-casts
    • avoid-unrelated-type-assertions
    • avoid-unrelated-type-casts
    • avoid-unsafe-collection-methods
    • avoid-iterable-of
    • prefer-trailing-comma
    • unnecessary-trailing-comma

    Improved rules (false-positives and new cases):
    • prefer-const-border-radius
    • avoid-unused-generics
    • function-always-returns-null
    • avoid-border-all
    • avoid-watch-outside-build
    • prefer-enums-by-name
    • avoid-equal-expressions

1.4.0: May Update

New command to find unused dependencies, 22 new rules (5 for Provider 🔥), wrap with custom widget assist and more!
  • New command dcm check-dependencies 🔥: Allows you to checks missing, under-promoted, over-promoted, and unused dependencies. Works well with commented code and conditional imports!
  • Rules update:
    22 new rules 🔥
    Common:
    • avoid-redundant-pragma-inline
    • prefer-unwrapping-future-or
    • avoid-unnecessary-negations
    • avoid-banned-file-names
    • avoid-unused-generics
    • avoid-inverted-boolean-checks
    • avoid-banned-types
    • function-always-returns-null
    • prefer-visible-for-testing-on-members
    • avoid-throw-objects-without-tostring
    • avoid-unsafe-collection-methods
    Flutter:
    • prefer-action-button-tooltip
    • avoid-inherited-widget-in-initstate
    • avoid-late-context
    • avoid-state-constructors
    • avoid-unnecessary-stateful-widgets
    Bloc:
    • check-is-not-closed-after-async-gap
    Provider 🚀🚀🚀:
    • avoid-watch-outside-build
    • avoid-read-inside-build
    • dispose-providers
    • prefer-multi-provider
    • avoid-instantiating-in-value-provider

    Improved rules (false-positives and new cases):
    • avoid-unnecessary-type-assertions
    • missing-test-assertion
    • no-equal-arguments
    • prefer-widget-private-members
    • avoid-unused-parameters
    • avoid-redundant-async
    • avoid-collection-methods-with-unrelated-types
    • use-setstate-synchronously
    • avoid-substring
    • format-comment
    • prefer-declaring-const-constructor
  • Metrics update 🚀:
    4 new metrics 🔥
    Common:
    • Number of implemented interfaces (NOII)
    • Number of added methods (NOAM)
    • Number of overridden methods (NOOM)
    • Number of external imports (NOEI)
  • New "Wrap with..." assist: Allows you to add custom "Wrap with a widget" assists! 🚀
  • VS Code extension updates:
    • Supports new "Wrap with ..." assist.
    • Supports locating Dart SDK via FVM.
  • IntelliJ plugin update:
    • Supports new "Wrap with ..." assist.
    • Supports locating Dart SDK via FVM.

1.3.0: April Update

Reworked metrics (ability to ignore, improved reports, new metrics), dcm fix on save, baseline support, new rules, command improvements and more!
  • Completely reworked metrics 🚀:
    • Metrics calculation is moved to a separate command dcm calculate-metrics
    • Ability to ignore metrics!
    • Reworked reports: only enabled metrics are displayed, ability to sort columns, reports display additional info like max, min, avg for each metric
    • Only enabled metrics are calculated

    8 new metrics 🔥
    Common:
    • Number of imports (NOI)
    • Depth of inheritance tree (DIT)
    • Coupling between object classes (CBO)
    • Response for a class (RFC)
    • Tight class cohesion (TCC)
    • Weighted methods per class (WMC)
    Flutter:
    • Number of used widgets (NUW)
    • Widgets nesting level (WNL)
  • Rules update:
    11 new rules 🔥
    Common:
    • prefer-explicit-parameter-names
    • prefer-correct-switch-length
    • avoid-equal-expressions
    • avoid-declaring-call-method
    • prefer-bytes-builder
    • prefer-early-return
    • banned-usage
    • avoid-missed-calls
    Flutter:
    • dispose-fields
    • avoid-empty-setstate
    • prefer-widget-private-members

    Improved rules (false-positives and new cases):
    • avoid-collection-methods-with-unrelated-types
    • avoid-dynamic
    • avoid-redundant-async
    • avoid-unnecessary-nullable-return-type
    • prefer-moving-to-variable
    • unnecessary-trailing-comma
  • dcm fix improvements:

    Command now applies only to files that had any issues.

    + 2 rule supported:
    • prefer-correct-edge-insets
    • prefer-immediate-return
  • Command improvements:
    • All commands now have aliases to type them faster 🚀
    • Unused files search now detects one level of cyclic usage
    • Unnecessary nullable correctly handles tear-offs, redirecting constructors and external members
    • Improved memory consumption by unused code and unnecessary nullable checks
    • dcm analyze now prints a summary
  • VS Code extension updates:
    • Supports dcm.source.fixAll to apply dcm fix on save 🚀🚀🚀
    • Adds a command to fix all issues in a file with a shortcut ctrl / cmd + shift + S.
  • IntelliJ plugin update:
    • Adds a command to fix all issues in file with a shortcut ctrl / cmd + shift + S
    • Supports "Extract to new file" code action
    • Provides code actions in analysis_options
    • Shows configurable rule icons in analysis_options
    • Fixed quick fix actions order
    • Supports option + enter shortcut in problems view
  • New command dcm init to calculate baseline 🔥: Allows you to generate a baseline for your project used both by IDE and CLI to gradually adopt DCM and skip fixing all existing issues.
  • Updates from Individuals version: all updates up to 5.7.0

1.2.0: March Update

Updated dcm fix and unused code check commands, assist to extract a class to a new file, 22 new rules and more! 🚀
  • More rules supported by dcm fix 🔥:
    • avoid-border-all
    • avoid-duplicate-exports
    • avoid-explicit-type-declarations
    • avoid-late-keyword
    • avoid-redundant-else
    • avoid-self-assignment
    • avoid-unnecessary-conditionals
    • avoid-unused-parameters
    • binary-expression-operand-order
    • double-literal-format
    • newline-before-return
    • prefer-const-border-radius
    • prefer-declaring-const-constructor
    • prefer-iterable-of
    • prefer-return-await
    • proper-super-calls
    • unnecessary-trailing-comma
    • arguments-ordering
  • New dcm fix options:
    • --include-rules - allows you to add rules that are not listed in your config, but you want to apply their fixes as well
    • --exclude-rules - allows you to exclude rules listed in your config from fixes calculation
    • --only-rules - allows you to run calculate fixes only for the given list of rules
    • --dry-run - allows you to see the proposed changes without applying them
    • --apply-to - allows you to run fixes only for the listed files
  • Support for removing unused code via dcm fix: dcm fix now supports removing unused code via --type option.
  • Improved unused code check: Unused code now correctly handles complex cases with conditionally exported files.
  • Performance improvements: Improved rules and quick fixes calculation.
  • Deprecating anti-patterns: Anti-patterns long-parameter-list and long-method were removed, use corresponding rules avoid-long-parameter-list and avoid-long-functions instead.
  • Extended support for analysis_options.yaml: Rules that have an additional configuration are highlights with ⚙️ icon. New code actions to disable, configure, open rule documentation or change severity are now available.
  • Extract to a new file assist: New refactoring assist to extract classes to a new file. It also supports extracting state if a widget was selected.
  • New rules 🚀:
    Common:
    • avoid-long-parameter-list
    • avoid-long-functions
    • prefer-return-await
    • unnecessary-trailing-comma
    • avoid-duplicate-named-imports
    • avoid-shadowing
    Flutter:
    • proper-super-calls
    • add-copy-with
    Bloc:
    • avoid-cubits
    • avoid-bloc-public-methods
    • avoid-passing-bloc-to-bloc
    • prefer-multi-bloc-provider
    • prefer-correct-bloc-provider
    Equatable:
    • extend-equatable
    Pubspec:
    • prefer-publish-to-none
    • prefer-correct-package-name
    • prefer-semver-version
    • avoid-dependency-overrides
    • prefer-caret-version-syntax
    • avoid-any-version
    • prefer-correct-screenshots
    • banned-dependencies

1.1.0: February Update

Improved unused code, dcm fix and more! 🚀
  • Improved check unused code 🔥: the command now searches for all type of unused code.
  • Applying quick fixes with dcm fix 🎯: new command to apply quick fixes produced.
  • New command - Check Exports Completeness: Checks that an exported API exports all used types (even transitive).
  • New rules 🚀:
    • avoid-self-assignment
    • avoid-redundant-else
    • no-equal-switch-case
    • avoid-explicit-type-declaration
    • avoid-self-compare
    • avoid-nested-switches
    • avoid-similar-names
    • no-equal-conditions
    • avoid-collapsible-if
    • avoid-incomplete-copy-with
  • Reporting of unused "//ignore" comments: All ignore comments that do not affect any produced diagnostic are now reported as unused.
  • Analysis options changes are picked up after each save: No need to restart the analysis server anymore. All the changes to config are now picked up after the save and applied to the affected files!
  • Quick fixes 🔥:
    • quick fix for "list-all-equatable-fields".
    • quick fix for "avoid-redundant-async-on-load".
  • Updates from Individuals version: all updates up to 5.6.0

1.0.0: Teams Version Release

Initial release of Teams version, including VS Code extension and IntelliJ / Android Studio plugin releases.
  • New rules 🚀: avoid-unnecessary-nullable-return-type, avoid-unrelated-type-casts, format-test-name, prefer-declaring-const-constructor, prefer-provide-intl-description.
  • New command: dcm share-feedback to open the feedback form.
  • Quick fixes 🔥:
    • new quick fix "fix all in a file".
    • new quick fix "fix all of type".
    • new quick fix "ignore" and "ignore in file".
    • existing rules that now support quick fixes: - avoid-duplicate-exports - avoid-late-keyword - avoid-redundant-async - avoid-top-level-members-in-tests - avoid-unnecessary-type-assertions - avoid-unnecessary-type-casts - avoid-unrelated-type-assertions - avoid-unused-parameters - newline-before-return - no-equal-then-else - prefer-match-file-name - member-ordering.
  • avoid-late-keyword updates: new config options allow-initialized and ignored-types.
  • prefer-moving-to-variable updates: correctly handle prefixed enums and static instance fields, ignore method invocations in a variable declaration.
  • no-magic-number updates: ignore enum constant arguments.
  • VS Code Extension: you can read more about the VS Code extension here.
  • IntelliJ plugin: you can read more about the VS Code extension here.