dart_code_linter
Dart Code Linter is a software analytics tool that helps developers analyse and improve software quality. Dart Code Linter is based on a fork of Dart Code Metrics.
4.2.1
137K downloads/mo
#996 most downloaded on pub.dev
bancolombia/dart-code-linter
What this package is like to depend on
Last release 5 days ago
18 Aug 2026
Ships unpredictably
gaps range from 2 weeks to 4 months
Nearly every release is documented
notes for 35 of 36 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
41 releases · first in 2023
27 releases in the last 12 months
see the full history below
Release timeline
41 releases · Sep 2023 to Aug 2026Releases
latest 41-
4.2.118 Aug 2026Release notes
Open source →What's Changed
- fix(prefer-dot-shorthands): add support for unnamed constructors by @juan-campuzano in #266
Full Changelog: v4.2.0...v4.2.1
Release notes
Open source →- Fix
prefer-dot-shorthandsto also flag unnamed constructor calls (suggesting.new(...)) and enum/static member access used as aswitchstatement/expression case pattern matched against the switch's scrutinee type — both were previously left unflagged.
-
4.2.011 Aug 2026Release notes
Open source →Release notes
Open source →- Add the
avoid-non-configurable-callbacks-in-init-staterule, which flags aState.initStatethat configures a widget-supplied object (e.g.widget.controller.setNavigationDelegate(...)) with a callback object whose named callbacks never reference the widget's own fields — a sign the behavior is fully hardcoded with no way for callers of the widget to customize it. - Add the
avoid-non-exhaustive-switch-on-sealed-classesrule, which flags adefault/wildcard (_) case in aswitchstatement or expression over a sealed type. Relying on a fallback case defeats the compiler's exhaustiveness checking for sealed hierarchies, so newly added subtypes can silently fall through instead of forcing an explicit decision at each call site. - Add the
prefer-dot-shorthandsrule (with auto-fix), which flags enum/static member access, static method calls, and named constructor calls that repeat a type name already inferable from context (a call argument's declared parameter type, or an explicitly typed variable's initializer) — Dart 3.10's dot-shorthand syntax lets these collapse to.valueinstead ofType.value. The rule only fires on files whose language version is 3.10 or later, since the shorthand syntax does not compile below that.
- Add the
-
4.1.929 Jul 2026Release notes
Open source →What's Changed
- feat(unused-code): detect unused private class members behind a flag (#176) by @Akhrameev in #259
Full Changelog: v4.1.8...v4.1.9
Release notes
Open source →- Add opt-in detection of unused private members in type declarations (methods, fields, getters, setters and named constructors) to
check-unused-code. Private members cannot be referenced from outside the declaring library, which rules out the reflection and cross-library false positives that make public members unreliable to analyze. Mirroring the SDK'sunused_elementsemantics, a sole private constructor is never reported: it is the intentional prevent-instantiation/extension pattern (an entirely unused class is still reported by the class-level check). Enabled via the--analyze-private-membersCLI flag or theunused-code.analyze-private-membersanalysis-options key; disabled by default.
-
4.1.822 Jul 2026Release notes
Open source →What's Changed
- chore: support analyzer 14 (dart_style 3.1.11 unblocked the bump) by @Akhrameev in #257
Full Changelog: v4.1.7...v4.1.8
Release notes
Open source →- Raise the
analyzerceiling to<15.0.0, enabling analyzer 14.x support now thatdart_style3.1.11 added compatibility with it. Add 14.0.0 and 14.1.0 rows to thescripts/test_analyzer_compat.pymatrix (analyzer_plugin0.14.13/0.14.14,analysis_server_plugin0.3.19/0.3.20).
-
4.1.715 Jul 2026Release notes
Open source →What's Changed
- fix(analyzer-plugin): replace deprecated getChildAssumingFile with getFile (#250) by @Akhrameev in #254
- fix(avoid-unused-parameters): remove deprecated MethodDeclaration.isAbstract flagged by pana (#251) by @Akhrameev in #253
Full Changelog: v4.1.6...v4.1.7
Release notes
Open source →- Replace the deprecated
Folder.getChildAssumingFilewithResourceProvider.getFilein the analyzer plugin's UUID bootstrap, resolving the pana static-analysis deprecation warning on analyzer 13.x. The call stays compatible across the full>=10.0.0 <14.0.0range (Folder.getFileonly exists in analyzer 13.3.0+). - Replace the deprecated
MethodDeclaration.isAbstractwith a structuralast_compat.isAbstractMethod()helper inavoid-unused-parameters, keeping the call non-deprecated across the full>=10.0.0 <14.0.0range (isCompleteonly exists in analyzer 13.2+).
-
4.1.602 Jul 2026Release notes
Open source →What's Changed
- feat(prefer-enums-by-name): add guarded auto-fix to convert firstWhere to values.byName (4.1.6) by @Akhrameev in #248
- fix(lint-analyzer): resolve ExtensionTypeDeclaration.primaryConstructor deprecation via ast_compat helper (#249) by @Akhrameev in #252
Full Changelog: v4.1.5...v4.1.6
Release notes
Open source →- Add an auto-fix to the
prefer-enums-by-namerule that convertsEnum.values.firstWhere((e) => e.name == x)toEnum.values.byName(x). The fix is offered only when the call is safely convertible: a single-parameter== namearrow closure, noorElse, and a lookup that does not reference the closure parameter. - Fix a deprecation warning for
ExtensionTypeDeclaration.primaryConstructor(deprecated on analyzer 13.1+ in favor ofnamePart, which doesn't exist before 13.1) by reading the extension type's name structurally through a newast_compathelper instead of the version-specific getter.
-
4.1.519 Jun 2026Release notes
Open source →What's Changed
- fix(lint-analyzer): apply fixes back-to-front to avoid RangeError on multiple fixes (#188) by @Akhrameev in #246
- feat(avoid-duplicate-exports): add auto-fix to delete the duplicate export directive by @Akhrameev in #247
Full Changelog: v4.1.4...v4.1.5
Release notes
Open source →- Add an auto-fix to the
avoid-duplicate-exportsrule that deletes the duplicate export directive (the earlier export already covers the same URI, so the removal is behavior-preserving). - Fix a
RangeErrorcrash in thefixcommand when a file had multiple auto-fixable issues; fixes are now applied from the end of the file towards the start so earlier edits no longer invalidate later offsets.
-
4.1.416 Jun 2026Release notes
Open source →What's Changed
- feat(no-blank-line-before-single-return): add auto-fix and fix trailing-brace false positive by @Akhrameev in #245
Full Changelog: v4.1.3...v4.1.4
Release notes
Open source →- Add an auto-fix to the
no-blank-line-before-single-returnrule that removes the blank line(s) before a singlereturnstatement in a block, preserving any comments. - Fix a false positive in
no-blank-line-before-single-returnwhere a trailing comment on the block's opening brace (e.g.{ // comment) was reported even without a blank line before the return.
-
4.1.316 Jun 2026Release notes
Open source →What's Changed
- feat(avoid-unnecessary-type-casts): add auto-fix to remove redundant cast by @Akhrameev in #244
Full Changelog: v4.1.2...v4.1.3
Release notes
Open source →- Add an auto-fix to the
avoid-unnecessary-type-castsrule that removes the redundantascast (e.g.value as Stringbecomesvalue).
-
4.1.204 Jun 2026Release notes
Open source →What's Changed
- fix(no-magic-number): remove self-reported parameter_assignments analyzer warnings by @Akhrameev in #243
Full Changelog: v4.1.1...v4.1.2
Release notes
Open source →- Remove two self-reported
parameter_assignmentsanalyzer warnings in theno-magic-numberrule implementation by replacing++countwithcount + 1in the literal-counting callbacks (no behavioral change).
-
4.1.104 Jun 2026Release notes
Open source →- Add config option
prefer-match-file-name.ignore-enumsandprefer-match-file-name.ignore-typedefsto suppress reports for enum and typedef declarations whose name doesn't match the file name.
- Add config option
-
4.1.003 Jun 2026Release notes
Open source →- Add support for
analysis_server_plugin(analyzer 13.x). - Add support for
analyzer13.x via a cross-version AST shim (lib/src/utils/ast_compat.dart) that recognises the reshaped named-argument, record-field, default-parameter and label nodes structurally. - Widen
analyzerconstraint to>=10.0.0 <14.0.0. - Extend
make test-analyzer-compat-fullto cover analyzer 10.x, 11.x, 12.x and 13.x; skip versions whose Dart SDK constraint is incompatible with the host SDK instead of failing.
- Add support for
-
4.0.525 May 2026Release notes
Open source →- Add
ignored-invocationsandignored-targetsoptions toprefer-moving-to-variablerule to suppress reports for specific method/getter names or target receivers. - Add autofix for
newline-before-returnwith comment-aware, whitespace-preserving behavior and edge-case fixture coverage.
- Add
-
4.0.421 May 2026Release notes
Open source →- Honor per-line
// ignore: <metric-id>comments for function- and class-level metric violations (both leading and trailing forms). File-level metrics keep their// ignore_for_file:behavior.
- Honor per-line
-
4.0.328 Apr 2026Release notes
Open source →- Fix
prefer-moving-to-variablerule not detecting duplicate invocations in expression function bodies (=> expr).
- Fix
-
4.0.207 Apr 2026Release notes
Open source →- Update
packageVersionconstant to match pubspec version (was hardcoded as3.2.0).
- Update
-
4.0.106 Apr 2026Release notes
Open source →- Relax
analyzerconstraint to >=10.0.0 <13.0.0 to support Flutter stable withmeta1.17.0. - Relax
analyzer_pluginconstraint to >=0.14.0 <0.16.0. - Add support for
analyzer12.x (replace removedLibraryIdentifierwith version-agnostic approach). - Remove
dependency_overridesfrom main and example pubspecs.
- Relax
-
4.0.018 Mar 2026Release notes
Open source →- BREAKING: Update minimum Dart SDK to >=3.5.0 (compatible with Flutter 3.24+).
- Update
analyzerto >=11.0.0 <12.0.0. - Update
analyzer_pluginto ^0.14.5. - Fix element comparison for substituted elements in
always-remove-listenerrule. - Add Packaged AI Assets for MCP integration (
extension/mcp/).
-
3.2.110 Nov 2025 -
3.2.021 Oct 2025Release notes
Open source →- Update
analyzerconstraint to ^8.2.0. Only works withdart >= 3.9.0. - Add rule
use-design-system-items. - Add rule
only-barrel-import. - Allow to specify more than one suggestion for each rule.
- Update
-
3.2.0-alpha.221 Oct 2025 pre-release -
3.2.0-alpha.120 Oct 2025 pre-releaseRelease notes
Open source →- Add rule
use-design-system-items. - Add rule
only-barrel-import. - Allow to specify more than one suggestion for each rule.
- Bump
analyzerto ^8.0.0
- Add rule
-
3.1.118 Sep 2025 -
3.1.018 Sep 2025Release notes
Open source →- Add rule
prefer-media-query-direct-access. - Add rule
prefer-named-record-fields.
- Add rule
-
3.1.0-beta.317 Sep 2025 pre-release -
3.1.0-beta.217 Sep 2025 pre-release -
3.1.0-beta.115 Sep 2025 pre-release -
3.0.022 Jul 2025Nothing published for this version
-
2.0.013 Feb 2025 -
1.3.003 Jan 2025Release notes
Open source →- Added
fatal-warnings-thresholdfatal-performance-thresholdandfatal-style-thresholdto set the failure threshold for analyze command
- Added
-
1.2.118 Nov 2024 -
1.2.012 Nov 2024Release notes
Open source →- Added fix command
- Added prefer single quotes rule
- Added prefer first or null rule
- Added no blank line before single return rule
- Fixed rule avoid dynamic to extensions definition
-
1.1.526 Sep 2024Release notes
Open source →- Removed deprecated fields in analysis options and collection method
- Fixed changelog URL for update available warning
-
1.1.418 Sep 2024 -
1.1.309 Apr 2024 -
1.1.208 Feb 2024 -
1.1.121 Sep 2023 -
1.1.021 Sep 2023 -
1.0.220 Sep 2023 -
1.0.118 Sep 2023 -
1.0.018 Sep 2023