custom_lint_builder
A package to help writing custom linters
0.8.1
504K downloads/mo
#513 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 69 of 72 stable releases
1 version withdrawn
withdrawn after publishing
4 years old
75 releases · first in 2022
1 release in the last 12 months
see the full history below
Release timeline
75 releases · Apr 2022 to Sep 2025Releases
latest 60 of 75-
0.8.109 Sep 2025 -
0.8.025 Jul 2025 -
0.7.725 Jul 2025 withdrawnNothing published for this version
-
0.7.618 Jul 2025 -
0.7.527 Feb 2025 -
0.7.427 Feb 2025 -
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 2024 -
0.6.909 Oct 2024 -
0.6.808 Oct 2024 -
0.6.708 Sep 2024 -
0.6.608 Sep 2024 -
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 2024 -
0.6.219 Feb 2024Release notes
Open source →- Upgrade analyzer to support 6.4.0
- Fix null exception when using
TypeChecker.isSuperTypeOf(thanks to @charlescyt)
-
0.6.114 Feb 2024 -
0.6.004 Feb 2024 -
0.5.1403 Feb 2024 -
0.5.1303 Feb 2024 -
0.5.1202 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.1026 Jan 2024 -
0.5.926 Jan 2024 -
0.5.809 Jan 2024Release notes
Open source →// ignorecomments now correctly respect indentation when they are inserted (thanks to @PiotrRogulski)
-
0.5.720 Nov 2023 -
0.5.630 Oct 2023 -
0.5.526 Oct 2023 -
0.5.420 Oct 2023 -
0.5.329 Aug 2023 -
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 2023Nothing published for this version
-
0.5.1-dev10 Jul 2023 pre-releaseNothing published for this version
-
0.5.021 Jun 2023 -
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 2023 -
0.3.306 Apr 2023Release notes
Open source →- Upgraded
analyzerto>=5.7.0 <5.11.0 LintRuleNodeRegistryand other AstVisitor-like now are based offGeneralizingAstVisitorinstead ofGeneralizingAstVisitor- Exposes the Pubspec in CustomLintContext
- Upgraded
-
0.3.209 Mar 2023 -
0.3.109 Mar 2023 -
0.2.1228 Feb 2023 -
0.2.1127 Feb 2023Release notes
Open source →- Fixes
LintCode.urlno-longer showing-up in the IDE - Fix quick-fixes not working on the last offset of an analysis error
- Bump minimum Dart SDK to
sdk: ">=2.19.0 <3.0.0"
- Fixes
-
0.2.1020 Feb 2023Release notes
Open source →Fix
filesToAnalyzeonly working on the file name instead of the file path. -
0.2.913 Feb 2023 -
0.2.813 Feb 2023Release notes
Open source →Fix exception thrown by
TypeChecker.isExactlyTypeifDartType.elementisnull. -
0.2.712 Feb 2023Release notes
Open source →Extract
LintRuleand similar other utilities to a separate package:custom_lint_core.
custom_lint_builderre-exportscustom_lint_core, so the utilities are still available. -
0.2.610 Feb 2023 -
0.2.510 Feb 2023Release notes
Open source →- Fix custom_lint not correctly killing sub-processes when the IDE stops custom_lint.
- Export incorrectly unexported
matcherNormalizedPrioritizedSourceChangeSnapshot
-
0.2.409 Feb 2023Release notes
Open source →- Added
<DartLintRule/DartFix/DartAssist>.testRun&testAnalyzeAndRunmethods, which enables programmatically running a lint/assist/fix against a Dart file. - Added
matcherNormalizedPrioritizedSourceChangeSnapshottest matcher, which allows checking that a list of file edits matches against a JSON snapshot of the changes.
- Added
-
0.2.309 Feb 2023 -
0.2.231 Jan 2023 -
0.2.130 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
-