df_safer_dart_lints 0.7.3
df_safer_dart_lints: ^0.7.3 copied to clipboard
Analyzer plugin with lints for the df_safer_dart package. Uses annotations from the df_safer_dart_annotations package.
Changelog #
0.7.3 #
- Merge branch 'main' into prod
0.7.2 #
- Merge branch 'main' into prod
0.7.1 #
- docs: remove Discord, point contributors to issues and email
0.7.0 #
- chore: standardize README and CI/CD workflows, remove donation links, update contact info and repository links
- chore: resolve analyzer issues
0.6.0 #
- breaking:
df_safer_dart_lintsis now a native Dart analyzer plugin (analysis_server_plugin) instead of acustom_lintplugin, because Dart 3.13 deprecates the legacy plugin system thatcustom_lintrelies on. Diagnostics now appear indart analyzeand the IDE with no extra command (flutter analyze3.47 does not wait for plugin diagnostics, so usedart analyzein CI). To upgrade: removecustom_lintanddf_safer_dart_lintsfromdev_dependencies, remove- custom_lintfromanalyzer: plugins:, addplugins: df_safer_dart_lints: ^0.6.0at the top level ofanalysis_options.yaml, and replacedart run custom_lintwithdart analyze. See the README. - breaking: ignore comments must name the plugin, e.g.
// ignore: df_safer_dart_lints/must_handle_return. - breaking: requires Dart 3.13 or newer. Depends on
analysis_server_plugininstead ofcustom_lint_builder; the plugin resolves itsanalyzerin the analysis server's own environment, not in the consuming project. - feat: every rule keeps its name, message and severity and is on by
default; rules can now be disabled or re-levelled per project under
plugins: df_safer_dart_lints: diagnostics:. - breaking:
createPlugin()is replaced byDfSaferDartLintsPluginandcreateDfSaferDartRules().
0.5.2 #
- feat: new
sendable(warning) andsendable_or_error(error) lints reject arguments to@sendable/@sendableOrErrorparameters that cannot surviveSendPort.send. Closures, instance-method tear-offs, and local-function references are rejected; top-level functions and static methods are accepted. The rule is a no-op for non-function-typed parameters. - Bumps
df_safer_dart_annotationsto^0.3.1to pick up the new@sendable/@sendableOrErrorannotations.
0.5.1 #
- fix:
must_use_outcomenow usesisAssignableFromTypeinstead ofisSuperTypeOfwhen matching againstOutcome. The rule now fires on expressions whose static type is assignable toOutcome(including cases involving generic bounds and other subtyping nuances) that the stricter supertype-only check previously missed.
0.5.0 #
- fix:
must_be_strong_refno longer fires when a top-level function or a static method is passed to a@mustBeStrongRefparameter. Both have program-/class-lifetime references by definition, so they are valid "strong" refs. Previously only instance-method tear-offs were accepted. - feat:
must_handle_returnis no longer@Deprecated. Use it alongside@useResultfor the warning-vs-error split. The rule's doc comment now mentions@useResultas the standard alternative for new code. - perf:
must_use_unsafe_wrapperandmust_handle_returnskip doc-comment references with an O(1)node.parent is CommentReferencecheck instead of walking the parent chain. These rules fire on every identifier in a file, so the win is felt on every analyzer pass. - perf:
must_handle_returnreorders its checks so the cheap parent walk (_isResultUnused) runs before the element-metadata walk (_hasMustHandleReturnAnnotation).