Skip to main content

Changelog


1.14.0: February Update

New command to find duplicate code, 4 new rules, new built-in preset to avoid installing an additional package and more 🚀🚀🚀
  • Rules update:
    4 new rules 🔥
    Common:
    • avoid-empty-test-groups
    • avoid-not-encodable-in-to-json
    • avoid-contradictory-expressions
    • avoid-excessive-expressions

    Improved rules (false-positives and new cases):
  • New command to find duplicated code 🚀: New command "dcm check-code-duplication" to find duplicate methods, functions and constructors.
  • General command improvements:
    • Fixed an issue with commands picking up packages that are excluded in the root analysis_options file
  • Analyze widgets improvements:
    • Fixed an issue with the similarity column in HTML reports being visible even if similarity is not enabled
  • Exports completeness improvements:
    • Generated code is now correctly excluded from the command results
    • Fixed an issue for declarations in part files displaying an incorrect file path
  • Baseline improvements:
    • Added a new option for both VS Code and IntelliJ to disable baseline
    • Fixed file paths not being platform independent
    • Fixed an issue with the "Update baseline" code action not updating the correct baseline file
  • Preview improvements:
    • Added a new config option to exclude baseline issues from the command output
  • Unused code improvements:
    • Changing excludes should now properly trigger reanalysis of affected packages (unused code IDE integration)
    • Improved transitive conditional reexports detection
  • Fix improvements:
    • Improved performance for both "Fix on save" and "dcm fix"
  • Trial period improvements:
    • Removed the "recommended rules by default" behavior for trial licenses
    • "dcm analyze" now suggests enabling rules for external packages (e.g. bloc), if they are not yet enabled
  • Configuration improvements:
    • Added validation for rules with empty configuration (e.g. - avoid-unused-parameters:)
    • Fixed an issue where rules config as a yaml map was not being validated correctly
  • Presets:
    • Added a new built-in preset called 'recommended' that does not require a package as a dependency
    • Recommended preset now includes some rules from 1.13.0

1.13.0: January Update

Similar widgets report, unused files in IDE, new mode for check-unused-code, 8 new rules and much more 🚀
  • Rules update:
    8 new rules 🔥
    Common:
    • avoid-duplicate-collection-elements
    • avoid-duplicate-map-keys
    • move-variable-outside-iteration
    • avoid-nullable-tostring
    • avoid-duplicate-initializers
    • avoid-unused-after-null-check
    • avoid-unassigned-stream-subscriptions
    Flutter:
    • avoid-undisposed-instances

    Improved rules (false-positives and new cases):
    • another 14 rules were rewritten to optimize their checks
    • avoid-misused-test-matchers
    • avoid-inferrable-type-arguments
    • always-remove-listener
    • avoid-async-call-in-sync-function
    • move-variable-closer-to-its-usage
    • use-setstate-synchronously
    • check-is-not-closed-after-async-gap
    • no-equal-switch-case
    • no-equal-switch-expression-cases
    • avoid-accessing-other-classes-private-members
    • no-equal-nested-conditions
    • avoid-accessing-collections-by-constant-index
    • avoid-conditional-hooks
    • prefer-switch-with-enums
    • avoid-unrelated-type-assertions
    • avoid-unnecessary-return
    • avoid-unsafe-collection-methods
    • prefer-moving-to-variable
    • avoid-function-type-in-records
    • dispose-fields
    • avoid-unnecessary-type-assertions
    • unnecessary-trailing-comma
    • avoid-unrelated-type-casts
    • new config option (ignore-contains) for prefer-switch-with-enums
  • General command improvements:
    • Added a hint for the monorepo mode when the '--monorepo' flag is not passed
    • Renamed the '--monorepo' flag description
    • Completely rewrote the exports analyzer improving performance of 'check-exports-completeness' and all other commands that depend on it
    • Fixed an issue with an incorrect path separator for Windows devices that affected several commands and 4 rules. Should now work as expected!
  • Unused code improvements:
    • Added a new mode to include class member hierarchies into the analysis. You can enable it via the '--no-exclude-overridden' CLI flag
    • Added ignore and fix code actions (unused code IDE integration)
    • Added new 'unused-code-exclude' config entry to analysis_options that is used by both CLI and the IDE integration
    • Excluded toJson method from the list of always used methods. The check now relies on jsonEncode invocations
    • Improved overall command performance
    • Reduced start time (unused code IDE integration)
    • Reduced highlighted area of unused code issues to only declaration names (unused code IDE integration)
    • Fixed recursive calls incorrectly marked as used
    • Fixed a memory leak related to conditional imports calculation (unused code IDE integration)
    • Fixed conditional files not being reanalyzed correctly after a file change (unused code IDE integration)
    • Fixed conditional elements incorrectly marked as used in certain cases
    • Fixed reanalysis of transitive files after a file change (unused code IDE integration)
    • Fixed an issue with collecting local references that do no affect the analysis
  • Unused files improvements:
    • Added unused files display in IDE. You can enable it via 'show unused files' IDE config option (Note, enabling 'Show unused code' is required for this feature to work)
    • Files in lib that are referenced only in tests should now be reported as unused
    • Improved overall command performance
  • Analyze widget improvements:
    • Added reporting of similar widgets. You can enable this check via the '--show-similarity' CLI flag
    • Added used metrics configuration to the HTML report
    • Improved detection of widgets coming from Flutter
    • Fixed an issue with the non-unique widget names not being added to the report
    • Fixed missing newlines in the console reporter
    • Fixed incorrect total widgets counter
  • Run improvements:
    • Improved overall command performance
    • Fixed an issue with excluded files not updating between different command runs
  • Unused L10n improvements:
    • Improved overall command performance
    • Fixed an issue with handing non-null checks
  • Check dependencies improvements:
    • Improved overall command performance
  • Unnecessary nullable improvements:
    • Improved overall command performance
    • Fixed detection of .call() invocations and excluded references from documentation comments
  • GitHub Action:
    • Successful runs with 'pull_request_comment_on_fail' should now delete the previously created failed run comment
    • Fixed an issue with the 'setup-dcm' action failing to use the cached executable

1.12.0: December Update

New command to run multiple DCM checks, 7 new rules, custom analysis_options file support, performance improvements and more 🚀🚀🚀
  • Rules update:
    7 new rules 🔥
    Common:
    • prefer-switch-with-enums
    • avoid-misused-test-matchers
    • prefer-any-or-every
    • avoid-duplicate-test-assertions
    Flutter Hooks:
    • prefer-use-prefix
    • avoid-conditional-hooks
    • avoid-hooks-outside-build

    Improved rules (false-positives and new cases):
    • 58 rules have been rewritten to optimize their checks. We hope this makes your overall experience a little better!
    • avoid-unnecessary-reassignment
    • avoid-inferrable-type-arguments
    • avoid-unnecessary-setstate
    • prefer-return-await
    • no-magic-number
    • avoid-collection-methods-with-unrelated-types
    • avoid-collection-mutating-methods
    • avoid-unused-parameters
    • parameters-ordering
    • prefer-correct-handler-name
    • avoid-bottom-type-in-patterns
    • avoid-bottom-type-in-records
    • no-equal-switch-expression-cases
    • no-equal-switch-case
    • avoid-collapsible-if
    • no-equal-conditions
    • avoid-redundant-else
    • avoid-unused-instances
    • avoid-async-call-in-sync-function
    • prefer-test-matchers
    • avoid-unnecessary-return
    • match-lib-folder-structure
    • new config options (ignore-functions and ignore-public) for prefer-correct-handler-name
    • new config options (ignore-fields, ignore-parameters, ignore-type-arguments andignore-return-types) for prefer-typedefs-for-callbacks
    • new config option (ignored-invocations) for function-always-returns-null
    • new config option (ignored-invocations) for avoid-inferrable-type-arguments
    • avoid-unassigned-late-fields-keyword has been renamed to avoid-unassigned-late-fields (how did it get there...)
  • Custom analysis_options file support: Analysis server now correctly picks up and validates additional config files (e.g. analysis_options.1.1.0.yaml, dcm_analysis_options.yaml or /dcm/**.yaml).
  • New command to run multiple checks on CI/CD at once: New command "dcm run" to run multiple DCM commands at once with the merged output. Faster CI/CD as a side effect 🚀.
  • Analyze widget improvements:
    • Support for widgets that indirectly extend Stateful or Stateless widgets
    • Support for widgets that don't override "createState" (e.g. ConsumerWidget)
    • Passing "--no-congratulate" now correctly leads to an empty output if the command completes successfully
    • New CLI option "--fatal-level" to fail the command when a widget with the given or lower quality is found
    • Fixed JSON reporter
  • Calculate metrics improvements:
    • HTML report no longer has a line indicator if no metrics were calculated for this line
    • Passing "--no-congratulate" now correctly leads to an empty output if the command completes successfully
    • "--set-exit-on-violation-level" CLI option has been renamed to "--fatal-level"
  • Unused code improvements:
    • "Enum.values" now correctly marks all enum constants as used even if some of them are not referenced in the code directly
  • General command improvements:
    • Support for "--json-path" CLI option for all commands that can produce JSON output
    • Code Climate reporter not longer produces output for files without issues
    • Unified exit codes - now exit code 2 means the command produced some analysis issues and exit code 1 means an error with the command itself
    • Some CLI flags are now marked as non-negatable
    • Fixed empty JSON and Code Climate output (available in 1.12.1)
  • Performance improvements: Analysis server no longer sends empty list of diagnostics if the previous result is the same.
  • Website improvements: Rules page now has filters to help you find relevant rules faster! You can also share the link with the applied filters 🚀
  • GitHub Action: New input "pull_request_comment_on_fail" to add a comment to the PR only when any DCM checks fail.
  • Presets update: Recommended preset now includes some rules from 1.10.0 and 1.11.0 releases.
  • VS Code extension update:
    • Support for "dart.analysisExcludedFolders" config option
    • Support for "dart.onlyAnalyzeProjectsWithOpenFiles" config option
    • Validation for the SDK path config option
  • IntelliJ plugin update:
    • Performance issues are finally fixed. Multithreading is hard!
    • New filters menu to filter errors in the problems view by severity
    • Validation for the SDK path config option

1.11.0: November Update

20 new rules, new command to analyze widgets quality and usage, redesigned HTML reports with dark theme support and more 🚀
  • Rules update:
    20 new rules 🔥
    Common:
    • prefer-null-aware-spread
    • prefer-unique-test-names
    • avoid-inferrable-type-arguments
    • avoid-duplicate-cascades
    • prefer-specific-cases-first
    • avoid-duplicate-switch-case-conditions
    • match-lib-folder-structure
    • avoid-missing-test-files
    • prefer-both-inlining-annotations
    • avoid-collection-mutating-methods
    • prefer-explicit-type-arguments
    • avoid-unnecessary-super
    • prefer-correct-setter-parameter-name
    • prefer-prefixed-global-constants
    • prefer-correct-callback-field-name
    • prefer-explicit-function-type
    • prefer-typedefs-for-callbacks
    • prefer-correct-handler-name
    • prefer-addition-subtraction-assignments
    • avoid-banned-annotations

    Improved rules (false-positives and new cases):
    • avoid-single-child-column-or-row
    • prefer-named-imports
    • dispose-fields
    • avoid-non-null-assertion
    • avoid-explicit-type-declaration
    • avoid-unnecessary-call
    • avoid-redundant-async
    • prefer-moving-to-variable
    • avoid-passing-self-as-argument
    • always-remove-listener
    • avoid-unnecessary-futures
    • avoid-bloc-public-methods
    • avoid-unused-parameters
    • prefer-getter-over-method
    • avoid-async-call-in-sync-function
    • avoid-accessing-collections-by-constant-index
    • prefer-match-file-name
    • avoid-function-type-in-records
    • avoid-missed-calls
    • avoid-passing-default-values
    • use-setstate-synchronously
    • double-literal-format
    • prefer-declaring-const-constructor
    • check-is-not-closed-after-async-gap
    • avoid-inherited-widget-in-initstate
    • quick fix for avoid-nullable-parameters-with-default-values
    • new config option (ignore-upcast) for avoid-unnecessary-getter
    • new config option (ignore-abstract) for prefer-declaring-const-constructor
    • new config option (explicit-trailing-zero) for double-literal-format
    • new config option (ignored-names) for prefer-trailing-comma
    • avoid-unnecessary-late has been renamed to avoid-unnecessary-local-late
  • Improved baseline: Now a baseline.json file will not be created if the context has zero analysis issues.
  • Improved CLI help output: The list of available commands is now split in two: regular commands and commands to manage the license.
  • Improved unused code check: Referencing fields only in copyWith is now not considered as usage.
  • New command for widgets quality and usage analysis: New command to help you analyze the quality and usage of your widgets. It shows the number widgets / blocs / context.read / context.watch being used, the number of widgets using a particular widget and a widget quality score (based on metrics).
  • Improved metrics command:
    • Hint to use the HTML reporter if a command supports one
    • Hint to use reportAll CLI flag
    • New '--open' option to automatically open HTML report after it's created
    • Fixed sort order for cells with violations
    • Metrics in the report summary now have documentation links
    • Support for // ignore: metrics comments
  • Improved HTML reports:
    • New design!
    • Dark theme support
    • Persistent sorting
  • Improved exports completeness command: Breaking change (!!) - the command now takes the --fatal-found option instead of --fatal-unused.
  • IntelliJ plugin update:
    • Reduced the number of ProblemsView re-renders
    • Supports for IntelliJ modules
    • Bump minimal supported IDE version to 2022.3.3

1.10.0: October Update

14 new rules, new command to deactivate the current device and general UX improvements 🚀
  • Rules update:
    14 new rules 🔥
    Common:
    • avoid-local-functions
    • prefer-named-imports
    • avoid-nullable-parameters-with-default-values
    • avoid-extensions-on-records
    • avoid-accessing-collections-by-constant-index
    • avoid-long-files
    • avoid-unnecessary-getter
    • match-getter-setter-field-names
    • avoid-wildcard-cases-with-enums
    • avoid-unnecessary-late
    Flutter:
    • avoid-single-child-column-or-row
    • prefer-sliver-prefix
    GetIt:
    • avoid-functions-in-register-singleton
    Intl:
    • prefer-providing-intl-examples

    Improved rules (false-positives and new cases):
    • avoid-missing-interpolation
    • avoid-shadowing
    • avoid-bloc-public-methods
    • prefer-getter-over-method
    • avoid-passing-default-values
    • unnecessary-trailing-comma
    • move-variable-closer-to-its-usage
    • avoid-recursive-calls
    • avoid-nullable-interpolation
    • avoid-referencing-discarded-variables
    • avoid-passing-self-as-argument
    • avoid-unnecessary-reassignment
    • quick fix for prefer-dedicated-media-query-methods
    • new config option (default) for parameters-ordering
    • new config option (super) for parameters-ordering
    • new config option (required) for parameters-ordering
    • new config option (skip-checked-fields) for avoid-non-null-assertion
    • new config option (trailing-lists) for unnecessary-trailing-comma
    • new config option (ignore-abstract) for prefer-declaring-const-constructor
    • prefer-provide-intl-description has been renamed to prefer-providing-intl-description
  • Improved baseline support: Now when a baseline.json file is created or removed, the analysis server will automatically restart to pick up the changes.
  • New command to deactivate current device 🚀: Helps you with migrating the DCM license from an old device to the new one.
  • Recommended rules are enabled by default for Trial licenses 🔥: To help you with evaluating DCM faster, new trials will have the recommended set of rules enabled even if DCM is not yet configured.
  • Improved logs for dcm fix: When dcm fix fails because of a certain rule you will now get a list of rules that could be the reason.
  • Reworked rules messages and highlighted regions: Rule messages are now more actionable and some rules now highligh smaller areas making these rules less annoying.

1.9.0: September Update

13 new rules, new presets and dedicated GitHub Action 🚀
  • Rules update:
    13 new rules 🔥
    Common:
    • prefer-getter-over-method
    • avoid-referencing-discarded-variables
    • avoid-unconditional-break
    • avoid-weak-cryptographic-algorithms
    • avoid-identical-exception-handling-blocks
    • avoid-recursive-calls
    • move-variable-closer-to-its-usage
    • avoid-missing-interpolation
    • avoid-unnecessary-if
    • avoid-passing-default-values
    • avoid-passing-self-as-argument
    • parameters-ordering
    Fake Async:
    • avoid-async-callback-in-fake-async

    Improved rules (false-positives and new cases):
    • prefer-correct-for-loop-increment
    • prefer-correct-identifier-length
    • avoid-unnecessary-reassignments
    • prefer-moving-to-variable
    • no-equal-nested-conditions
    • prefer-declaring-const-constructor
    • prefer-returning-conditional-expressions
    • avoid-explicit-type-declaration
    • avoid-shadowing
    • avoid-unnecessary-negations
    • unnecessary-trailing-comma
    • prefer-trailing-comma
    • prefer-correct-edge-insets-constructor
    • map-keys-ordering
    • no-equal-arguments
    • avoid-passing-async-when-sync-expected
    • avoid-recursive-widget-calls
    • avoid-unnecessary-call
    • avoid-unnecessary-futures
    • avoid-unnecessary-type-assertions
    • new config option (ignored-invocations) for avoid-nullable-interpolation
    • new config option (ignored-instances) for avoid-unused-instances
  • New recommended presets for rules and metrics 🚀: You can now enable two new presets "recommended" and "metrics_recommended" that should help you get started with DCM easier.
  • DCM GitHub Action 🔥: Dedicated GitHub Action to setup and run DCM checks.

1.8.0: August Update

17 new rules (2 for the Patrol testing library 🔥), new command dcm init preview to simplify DCM integration into existing projects, support for dart_frog files for check-unused-code and check-unused-files, Gitlab reporter format for all existing commands and more 🚀
  • Rules update:
    17 new rules 🔥
    Common:
    • avoid-map-keys-contains
    • prefer-correct-json-casts
    • avoid-async-call-in-sync-function
    • avoid-duplicate-mixins
    • avoid-nullable-interpolation
    • enum-constants-ordering
    • prefer-named-boolean-parameters
    • avoid-unused-instances
    • prefer-correct-for-loop-increment
    • prefer-public-exception-classes
    • match-class-name-pattern
    • newline-before-case
    • avoid-unnecessary-reassignment
    Flutter:
    • avoid-recursive-widget-calls
    • prefer-text-rich
    Patrol:
    • prefer-custom-finder-over-find
    • prefer-symbol-over-key

    Improved rules (false-positives and new cases):
    • avoid-barrel-files
    • arguments-ordering
    • avoid-importing-entrypoint-exports
    • format-comment
    • avoid-unnecessary-futures
    • avoid-redundant-async
    • function-always-returns-null
    • unnecessary-trailing-comma
    • avoid-mutating-parameters
    • prefer-first
    • prefer-last
    • avoid-unsafe-collection-methods
    • prefer-explicit-parameter-names
    • prefer-correct-error-name
    • newline-before-return
    • avoid-unnecessary-return
    • member-ordering
    • prefer-moving-to-variable
    • list-all-equatable-fields
    • avoid-long-functions
    • avoid-explicit-type-declaration
    • no-equal-then-else
    • new config option (ignore-if-case) for prefer-early-return
    • new config option (ignore-blocs) for dispose-fields
    • new config option (ignore-mixins) for avoid-unrelated-type-assertions
    • new config option (ignore-inline-functions) for no-equal-arguments
    • new config option (ignore-inline-functions) for avoid-unused-parameters
    • new config option (only-in-src) for avoid-importing-entrypoint-exports
  • New quick fixes for existing rules 🚀:
    • map-keys-ordering
  • New command "dcm init preview" to show number of issues generated by each rule 🔥: Allows you to run all existing rules against your codebase and see which of the rules are producing issues and how many.
  • Support for ignore commends for check-unused-code: Previously only top level ignore comments were supported by the check-unused-code command. With this release ignore comments can be applied to individual members as well.
  • check-dependencies automatically marks some dependencies that are not directly used in code as used: If a package has a freezed_annotation or json_serializable dependencies then build_runner and freezed are automatically marked as used.
  • Flutter plugins and dart_frog requests and middlewares are marked as used by default: Flutter web plugins and dart_frog can have special files that are not referenced by other files, but are still used. Both check-unused-files and check-unused-code now support these cases.
  • Improved getters and fields usage detection in extensions for check-unused-l10n: Fields and getters now correctly marked as used if an extension on the localization class uses these fields or getters.
  • Gitlab format support for all existing commands: All existing commands that designed to be used on CI now support --reporter=gitlab format.
  • Unused code in the IDE (Beta): You can now enable the display of unused code in the IDE settings. Note, this feature supports only the monorepo mode for now and will be improved in the upcoming releases.

1.7.0: July Update

Improved overall experience with the configuration, 25 new rules, 24 improved existing rules and 17 new quick fixes 🚀🚀🚀.
  • Rules update:
    25 new rules 🔥
    Common:
    • prefer-correct-future-return-type
    • prefer-correct-stream-return-type
    • avoid-nested-futures
    • avoid-nested-streams-and-futures
    • avoid-accessing-other-classes-private-members
    • avoid-generics-shadowing
    • avoid-uncaught-future-errors
    • prefer-parentheses-with-if-null
    • prefer-type-over-var
    • avoid-keywords-in-wildcard-pattern
    • avoid-misused-wildcard-pattern
    • avoid-mutating-parameters
    • avoid-unnecessary-call
    • no-equal-nested-conditions
    • avoid-negated-conditions
    • prefer-correct-error-name
    • map-keys-ordering
    • avoid-unnecessary-futures
    • avoid-shadowed-extension-methods
    • avoid-barrel-files
    • avoid-importing-entrypoint-exports
    Flutter:
    • avoid-missing-image-alt
    • avoid-unnecessary-overrides-in-state
    • prefer-dedicated-media-query-methods
    Intl:
    • prefer-date-format

    Improved rules (false-positives and new cases):
    • format-comment
    • avoid-dynamic
    • avoid-explicit-type-declaration
    • banned-usage
    • prefer-correct-identifier-length
    • no-equal-conditions
    • avoid-redundant-async
    • avoid-redundant-async-on-load
    • check-if-not-closed-after-async-gap
    • use-setstate-synchronously
    • unnecessary-trailing-comma
    • prefer-returning-conditional-expressions
    • avoid-unrelated-type-assertions
    • avoid-unrelated-type-casts
    • avoid-declaring-call-method
    • avoid-missing-enum-constant-in-map
    • prefer-declaring-const-constructors
    • avoid-throw-objects-without-tostring
    • no-boolean-literal-compare
    • prefer-immediate-return
    • avoid-unsafe-collection-methods
    • prefer-immediate-return
    • avoid-explicit-pattern-field-name
    • avoid-missed-calls
  • New quick fixes for existing rules 🔥:
    • avoid-explicit-pattern-field-name
    • avoid-missed-calls
    • avoid-unused-generics
    • avoid-redundant-pragma-inline
    • prefer-visible-for-testing-on-members
    • avoid-redundant-positional-field-name
    • avoid-unnecessary-negations
    • avoid-unsafe-collection-methods (only via IDE action)
    • no-boolean-literal-compare
    • prefer-conditional-expressions
    • match-positional-field-names-on-assignment (only via IDE action)
    • prefer-simpler-patterns-null-check
    • prefer-wildcard-pattern
    • no-equal-then-else
    • format-comment
    • prefer-last
    • prefer-first
  • Improved dcm fix for 4 existing rules: avoid-collapsible-if, avoid-redundant-else, arguments-ordering and member-ordering quick fixes are now calculated lazily, improving the overall performance for these rules to compute.
  • Support for Dart SDK installed via brew: Now, if the SDK is installed via brew is is correctly picked up by the CLI and IDE plugins. No need to pass it as the CLI option!
  • Support for ci_key and email env variables on CI/CD: If you run DCM on CI, you can now set DCM_CI_KEY and DCM_EMAIL env variables instead of passing ci_key and email via CLI options.
  • Gradual reanalysis after the analysis_options file is changed: Previously any change to the analysis_options resulted in the whole project reanalysis. Now, the package gets reanalyzed only if the parts of the config that can affect the analysis change.
  • Warning if a preset is not found: If a preset cannot be resolved a warning will be shown.
  • Proper reanalysis for dependant packages: Changes to analysis_options result in all dependent package reanalysis.

1.6.0: June Update

Improved baseline, customizable formatter, new rules and more! 🔥
  • Unification of the Individuals and Teams version codebase: Individuals version is now shares the codebase with the Teams version with some features limitation.
  • Customizable formatter with project-wide config 🔥: Allows you to enable a configurable formatter that works from both the IDE and the CLI.
  • Rules update:
    5 new rules 🔥
    Common:
    • avoid-unnecessary-return
    • avoid-future-tostring
    • avoid-unassigned-late-fields-keyword
    • prefer-test-matchers
    Intl:
    • prefer-number-format

    Improved rules (false-positives and new cases):
    • avoid-shadowing
    • member-ordering
    • collection-methods-with-unrelated-types
    • prefer-return-await
    • prefer-multi-bloc-provider
    • avoid-redundant-else
    • avoid-self-assignment
    • function-always-returns-null
    • avoid-watch-outside-build
    • avoid-unrelated-type-assertions
    • dispose-fields
    • list-all-equatable-fields
    • arguments-ordering
  • dcm fix support for fixing dependency issues: dcm fix now supports fixing the output from the dcm check-dependencies via the --type=dependencies option.
  • Support for fvm global: fvm default sdk is now gets picked up automatically for the CLI and the IDE integrations.
  • Improved baseline: Multiple fixes to how baseline works and a new code action to update the baseline for the selected file.
  • VS Code extension updates:
    • Supports formatting on save and via the IDE command.
  • IntelliJ plugin update:
    • A complete rewrite to eliminate all the performance issues.
    • Supports formatting via the IDE command.

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.