custom_lint
Lint rules are a powerful way to improve the maintainability of a project. Custom Lint allows package authors and developers to easily write custom lint rules.
0.8.1
727K downloads/mo
#425 most downloaded on pub.dev
invertase/dart_custom_lint
What this package is like to depend on
Last release 11 months ago
09 Sep 2025
Release timing varies
gaps range from 9 days to 5 months
Nearly every release is documented
notes for 59 of 59 stable releases
1 version withdrawn
withdrawn after publishing
4 years old
61 releases · first in 2022
1 release in the last 12 months
see the full history below
Release timeline
61 releases · Apr 2022 to Sep 2025Releases
latest 60 of 61-
0.8.109 Sep 2025 -
0.8.025 Jul 2025 -
0.7.725 Jul 2025 withdrawn -
0.7.618 Jul 2025 -
0.7.527 Feb 2025 -
0.7.427 Feb 2025Release notes
Open source →- Upgrade Freezed to 3.0
- Support Dart workspaces (thanks to @Rexios80)
- Suppport analyzer_plugin 0.13.0 (thanks to @Rexios80)
- Support custom hosted dependencies (thansk to @MobiliteDev)
-
0.7.308 Feb 2025 -
0.7.229 Jan 2025 -
0.7.108 Jan 2025 -
0.7.027 Oct 2024Release notes
Open source →custom_lint --fixand the generated "Fix all <code>" assists now correctly handle imports.- Now supports a broad number of analyzer version.
-
0.6.1010 Oct 2024Release notes
Open source →- Support installing custom_lint plugins in
dependencies:instead ofdev_dependencies(thanks to @dickermoshe).
- Support installing custom_lint plugins in
-
0.6.909 Oct 2024 -
0.6.808 Oct 2024Release notes
Open source →- Fix CI
- Fix custom_lint not warning non-Dart files when necessary.
- Custom_lint no-longer tries to analyze projects that lack a
.dart_tool/package_config.json
-
0.6.708 Sep 2024Release notes
Open source →- Removed offline package resolution for the analyzer plugin. The logic seemed broken at times, so removing it should make custom_lint more stable.
-
0.6.608 Sep 2024Release notes
Open source →- Fixed an error in the CLI when Flutter generates code under
.dart_tool/or has dependencies on iOS libraries (thanks to @Kurogoma4D)
- Fixed an error in the CLI when Flutter generates code under
-
0.6.515 Aug 2024Release notes
Open source →- Upgraded to analyzer ^6.6.0. This is a quick fix to unblock the stable Flutter channel. A more robust fix will come later.
- Fixed a bug where isSuperTypeOf throws if the element is null (thanks to @charlescyt)
-
0.6.416 Mar 2024 -
0.6.316 Mar 2024Release notes
Open source →- Fixed Unimplemented error when running
pub get. - Hot-reload and debug mode is now disabled by default.
- Fixed Unimplemented error when running
-
0.6.219 Feb 2024Release notes
Open source →custom_lint --format jsonno-longer outputs non-JSON logs (thanks to @kzrnm)- Upgrade analyzer to support 6.4.0
- Fix null exception when using
TypeChecker.isSuperTypeOf(thanks to @charlescyt)
-
0.6.004 Feb 2024 -
0.5.1127 Jan 2024Release notes
Open source →- Added support for
analysis_options.yamlthat are nt at the root of the project (thanks to @mrgnhnt96)
- Added support for
-
0.5.809 Jan 2024Release notes
Open source →// ignorecomments now correctly respect indentation when they are inserted (thanks to @PiotrRogulski)
-
0.5.720 Nov 2023Release notes
Open source →- Support JSON output format via CLI parameter
--format json|default(thanks to @kuhnroyal)
- Support JSON output format via CLI parameter
-
0.5.630 Oct 2023 -
0.5.526 Oct 2023 -
0.5.420 Oct 2023Release notes
Open source →- Sort lints by severity in the command line (thanks to @kuhnroyal)
- Fix watch mode not quitting with
q(thanks to @kuhnroyal) - Improve the command line's output (thanks to @kuhnroyal)
- Update uuid to 4.0.0
- Fixed a port leak
- Fix connection issues on Docker/windows (thanks to @hamsbrar)
-
0.5.329 Aug 2023Release notes
Open source →- The command line now supports ignoring warnings/infos with
--no-fatal-warnings/--no-fatal-infos(thanks to @yamarkz)
- The command line now supports ignoring warnings/infos with
-
0.5.216 Aug 2023Release notes
Open source →- Support both analyzer 5.12.0 and 6.0.0 at the same time.
- Attempt at fixing the windows crash
-
0.5.103 Aug 2023 -
0.5.021 Jun 2023Release notes
Open source →- Now resolves packages using
pub getif custom_lint failed to resolve packages offline. This should reduce the likelyness of a version conflict in mono-repositories. The conflict may still happen if two projects in a mono-repo use incompatible constraints. Like:name: foo dependencies: package: ^1.0.0name: bar dependencies: package: ^2.0.0 - The command line now shows the lints' severity (thanks to @praxder)
- Now requires Dart 3.0.0
- Now resolves packages using
-
0.4.012 May 2023Release notes
Open source →- Report uncaught exceptions inside
context.addPostRunCallback - Added support for analyzer 5.12.0
- Report uncaught exceptions inside
-
0.3.419 Apr 2023Release notes
Open source →- custom_lint now automatically generate quick-fixes for "ignore for line/file".
- Update the socket communication logic to avoid possible problem is the message contains a \n.
- fixes custom_lint on windows
-
0.3.306 Apr 2023Release notes
Open source →- Reduce the likelyness of a dependency version conflict.
- Fix
dart analyzecrashing on large projects in the CI due to custom_lint incorrectly trying to run plugins in debug mode. - Fix the
custom_lintcommand line never terminating in some cases where plugins fail to start (thanks to @kuhnroyal). - Upgraded
analyzerto>=5.7.0 <5.11.0 LintRuleNodeRegistryand other AstVisitor-like now are based offGeneralizingAstVisitorinstead ofGeneralizingAstVisitor- Upgraded
cli_utilto^0.4.0 - The command line no-longer throws if ran on an empty project or a project with no plugins enabled
- Exposes the Pubspec in CustomLintContext
-
0.3.209 Mar 2023Release notes
Open source →- Revert "Fixed an issue that caused a "Port already in use" error when trying to start custom_lint". This had the opposite effect of what's expected.
-
0.3.009 Mar 2023Release notes
Open source →- Update analyzer to >=5.7.0 <5.8.0
- Fixed an issue that caused a "Port already in use" error when trying to start custom_lint
-
0.2.1228 Feb 2023 -
0.2.1127 Feb 2023Release notes
Open source →- Improved the error message when there is a version conflict in mono-repos (thanks to @@adsonpleal)
- Bump minimum Dart SDK to
sdk: ">=2.19.0 <3.0.0"
-
0.2.510 Feb 2023Release notes
Open source →Fix custom_lint not correctly killing sub-processes when the IDE stops custom_lint.
-
0.2.231 Jan 2023 -
0.2.020 Jan 2023Release notes
Open source →Large Breaking change This new version introduces large changes to how lints/fixes/assists are defined.
Long story short, besides thecreatePluginmethod, the entire syntax changed.See the readme, examples, and docs around how to use the new syntax.
The new syntax has multiple benefits:
-
It is now possible to enable/disable lints inside the
analysis_options.yamlas followed:# optional include: path/to/another/analysis_options.yaml custom_lint: rules: # enable a lint rule - my_lint_rule # A lint rule that is explicitly disabled - another_lint_rule: falseEnabling/disabling lints is supported by default with the new syntax. Nothing to do~
-
Performance improvement when using a large number of lints. The workload of analyzing files is now shared between lints.
-
The new syntax makes the code simpler to maintain. Before, the
PluginBase.getLintsrapidly ended-up doing too much. Now, it is simple to split the implementation in multiple bits
-
-
0.1.2-dev10 Jan 2023 pre-release -
0.1.109 Jan 2023Release notes
Open source →- Fix an issue where plugins were hot-reloaded when the file analyzed changed.
- Optimized analysis such that
PluginBase.getLints()is theorically not reinvoked unless the file analyzed changed.
-
0.1.006 Jan 2023Release notes
Open source →-
Breaking: The plugin entrypoint has moved.
Plugins no-longer should define a/bin/custom_lint.dartfile. Instead they should define a/lib/<my_package_name>.dart -
Breaking: The plugin entrypoint is modified. Plugins no-longer define a "main", but instead define a
createPluginfunction:Before:
// /bin/custom_lint.dart void main(List<String> args, SendPort sendPort) { startPlugin(sendPort, MyPlugin()); }After:
// /lib/<my_package_name.dart MyPlugin createPlugin() => MyPlugin(); -
Add assist support. Inside your plugins, you can now override
handleGetAssists:import 'package:analyzer_plugin/protocol/protocol_generated.dart' as analyzer_plugin; class MyPlugin extends PluginBase { // ... Future<analyzer_plugin.EditGetAssistsResult> handleGetAssists( ResolvedUnitResult resolvedUnitResult, { required int offset, required int length, }) async { // TODO return some assists for the given offset } }
-
-
0.0.1609 Dec 2022 -
0.0.1506 Dec 2022Release notes
Open source →-
Custom_lint now has a built-in mechanism for testing lints. Simply write a file that should contain lints for your plugin. Then, using a syntax similar to
// ignore, write a// expect_lint: codein the line before your lint:// expect_lint: riverpod_final_provider var provider = Provider(...);When doing this, there are two possible cases:
- The line after the
expect_lintcorrectly contains the expected lint.
In that case, the lint is ignored (similarly to if we used// ignore) - The next line does not contain the lint.
In that case, the
expect_lintcomment will have an error.
This allows testing your plugins by simply running
custom_linton your test/example folder. Then, if any expected lint is missing, the command will fail. But if your plugin correctly emits the lint, the command will succeed. - The line after the
-
Upgrade analyzer/analzer_plugin
-
-
0.0.1423 Nov 2022 -
0.0.1323 Nov 2022Release notes
Open source →- Add debugger and hot-reload support (Thanks to @TimWhiting)
- Correctly respect
excludeobtains from the analysis_options.yaml - Fix
dart analyzeincorrectly failing due to showing the "plugin is starting" lint.
-
0.0.1207 Oct 2022Release notes
Open source →- Fix custom_lint plugins not working in release mode and when using git dependencies (thanks to @TimWhiting)
- Fix command line exit code not being set properly (thansk to @andrzejchm)
-
0.0.1107 Oct 2022 -
0.0.1003 Oct 2022 -
0.0.10+104 Oct 2022 -
0.0.905 Jul 2022Release notes
Open source →- Lint fixes can now be used when placing the cursor on the last character of a lint
- improve pub score
-
0.0.9+106 Jul 2022 -
0.0.814 Jun 2022 -
0.0.714 Jun 2022 -
0.0.613 Jun 2022Release notes
Open source →feat!: getLints now is expected to return a
Stream<Lint>instead ofIterable<Lint>fix: a bug where the lints shown by the IDE could get out of sync with the actual content of the file
-
0.0.507 Jun 2022Release notes
Open source →Fixed error reporting if a custom_lint plugin throws but the exception comes from a package instead of the plugin itself.
-
0.0.407 Jun 2022Release notes
Open source →- Fixed a bug where the command line could show IDE-only meant for debugging
-
0.0.316 May 2022Release notes
Open source →PluginBase.getLints now receive a
ResolvedUnitResultinstead of aLibraryElement. -
0.0.214 Apr 2022Release notes
Open source →-
Compilation errors are now visible within the
pubspec.yamlof applications that are using the plugin. -
Plugins that are currently loading are now highlighted inside the
pubspec.yamlof applications that are using the plugin. -
If a plugin throws when trying to analyze a Dart file, the IDE will now show the exception at the top of the analyzed file.
-
Compilation errors, exceptions and prints are now accessible within a log file (
custom_lint.log) inside applications using the plugin.
-