Skip to content

Commit

Permalink
Merge branch 'release' of github.com:dart-lang/linter into release
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
  • Loading branch information
pq committed Nov 29, 2022
2 parents 6b63a30 + 663d15b commit d9ca30d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion example/all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ linter:
- prefer_constructors_over_static_methods
- prefer_contains
- prefer_double_quotes
- prefer_equal_for_default_values
- prefer_expression_function_bodies
- prefer_final_fields
- prefer_final_in_for_each
Expand Down
8 changes: 7 additions & 1 deletion lib/src/rules/prefer_equal_for_default_values.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ import '../analyzer.dart';
const _desc = r'Use `=` to separate a named parameter from its default value.';

const _details = r'''
**DEPRECATED:** In Dart 2.19,
the Dart analyzer reports the old `:` syntax as a warning
and will report it as an error in Dart 3.0.
As a result, this rule is unmaintained
and will be removed in a future Linter release.
From the [style guide](https://dart.dev/guides/language/effective-dart/usage):
**DO** use `=` to separate a named parameter from its default value.
Expand All @@ -20,7 +26,6 @@ m({a: 1})
```dart
m({a = 1})
```
''';

class PreferEqualForDefaultValues extends LintRule {
Expand All @@ -33,6 +38,7 @@ class PreferEqualForDefaultValues extends LintRule {
name: 'prefer_equal_for_default_values',
description: _desc,
details: _details,
maturity: Maturity.deprecated,
group: Group.style);

@override
Expand Down

0 comments on commit d9ca30d

Please sign in to comment.