Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 67d3a2c

Browse filesBrowse files
stereotype441Commit Queue
authored andcommitted
[messages] Use all lower case in lint_names.g.dart.
Now that lint name matching is case insensitive (https://dart-review.googlesource.com/c/sdk/+/465964), it is no longer necessary for the lint names `no_runtimeType_toString`, `prefer_for_elements_to_map_fromIterable`, and `prefer_iterable_whereType` to be in mixed case in `lint_names.g.dart`. This change adjusts them to all lower case, and renames the corresponding declarations too. This paves the way for a follow-up CL that will change the case conventions in `pkg/linter/messages.yaml`. Change-Id: I6a6a6964381f9573dd735bde0ae8dfb103eef174 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/465991 Commit-Queue: Paul Berry <paulberry@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Samuel Rawlins <srawlins@google.com>
1 parent e87bd68 commit 67d3a2c
Copy full SHA for 67d3a2c
Expand file treeCollapse file tree

11 files changed

+19
-16
lines changed
Open diff view settings
Collapse file

‎pkg/analysis_server/test/src/services/correction/assist/convert_to_for_element_test.dart‎

Copy file name to clipboardExpand all lines: pkg/analysis_server/test/src/services/correction/assist/convert_to_for_element_test.dart
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ f(Iterable<int> i) {
6363
Future<void>
6464
test_mapFromIterable_differentParameterNames_usedInKey_conflictInValue_noAssistWithLint() async {
6565
createAnalysisOptionsFile(
66-
lints: [LintNames.prefer_for_elements_to_map_fromIterable],
66+
lints: [LintNames.prefer_for_elements_to_map_fromiterable],
6767
);
6868
verifyNoTestUnitErrors = false;
6969
await resolveTestCode('''
Collapse file

‎pkg/analysis_server/test/src/services/correction/fix/convert_to_for_element_test.dart‎

Copy file name to clipboardExpand all lines: pkg/analysis_server/test/src/services/correction/fix/convert_to_for_element_test.dart
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ void main() {
1919
@reflectiveTest
2020
class ConvertToForElementBulkTest extends BulkFixProcessorTest {
2121
@override
22-
String get lintCode => LintNames.prefer_for_elements_to_map_fromIterable;
22+
String get lintCode => LintNames.prefer_for_elements_to_map_fromiterable;
2323

2424
Future<void> test_singleFile() async {
2525
await resolveTestCode('''
@@ -51,7 +51,7 @@ class ConvertToForElementTest extends FixProcessorLintTest {
5151
FixKind get kind => DartFixKind.convertToForElement;
5252

5353
@override
54-
String get lintCode => LintNames.prefer_for_elements_to_map_fromIterable;
54+
String get lintCode => LintNames.prefer_for_elements_to_map_fromiterable;
5555

5656
/// More coverage in the `convert_to_for_element_line_test.dart` assist test.
5757
Future<void>
Collapse file

‎pkg/analysis_server/test/src/services/correction/fix/convert_to_where_type_test.dart‎

Copy file name to clipboardExpand all lines: pkg/analysis_server/test/src/services/correction/fix/convert_to_where_type_test.dart
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ void main() {
1919
@reflectiveTest
2020
class ConvertToWhereTypeBulkTest extends BulkFixProcessorTest {
2121
@override
22-
String get lintCode => LintNames.prefer_iterable_whereType;
22+
String get lintCode => LintNames.prefer_iterable_wheretype;
2323

2424
Future<void> test_singleFile() async {
2525
await resolveTestCode('''
@@ -49,7 +49,7 @@ class ConvertToWhereTypeTest extends FixProcessorLintTest {
4949
FixKind get kind => DartFixKind.convertToWhereType;
5050

5151
@override
52-
String get lintCode => LintNames.prefer_iterable_whereType;
52+
String get lintCode => LintNames.prefer_iterable_wheretype;
5353

5454
Future<void> test_default_declaredType() async {
5555
await resolveTestCode('''
Collapse file

‎pkg/linter/lib/src/lint_names.g.dart‎

Copy file name to clipboardExpand all lines: pkg/linter/lib/src/lint_names.g.dart
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ abstract final class LintNames {
310310

311311
static const String no_logic_in_create_state = 'no_logic_in_create_state';
312312

313-
static const String no_runtimeType_toString = 'no_runtimeType_toString';
313+
static const String no_runtimetype_tostring = 'no_runtimetype_tostring';
314314

315315
static const String no_self_assignments = 'no_self_assignments';
316316

@@ -400,8 +400,8 @@ abstract final class LintNames {
400400

401401
static const String prefer_final_parameters = 'prefer_final_parameters';
402402

403-
static const String prefer_for_elements_to_map_fromIterable =
404-
'prefer_for_elements_to_map_fromIterable';
403+
static const String prefer_for_elements_to_map_fromiterable =
404+
'prefer_for_elements_to_map_fromiterable';
405405

406406
static const String prefer_foreach = 'prefer_foreach';
407407

@@ -432,7 +432,7 @@ abstract final class LintNames {
432432

433433
static const String prefer_is_not_operator = 'prefer_is_not_operator';
434434

435-
static const String prefer_iterable_whereType = 'prefer_iterable_whereType';
435+
static const String prefer_iterable_wheretype = 'prefer_iterable_wheretype';
436436

437437
static const String prefer_mixin = 'prefer_mixin';
438438

Collapse file

‎pkg/linter/lib/src/rules/no_runtimeType_toString.dart‎

Copy file name to clipboardExpand all lines: pkg/linter/lib/src/rules/no_runtimeType_toString.dart
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const _desc = r'Avoid calling `toString()` on `runtimeType`.';
1919

2020
class NoRuntimeTypeToString extends AnalysisRule {
2121
NoRuntimeTypeToString()
22-
: super(name: LintNames.no_runtimeType_toString, description: _desc);
22+
: super(name: LintNames.no_runtimetype_tostring, description: _desc);
2323

2424
@override
2525
DiagnosticCode get diagnosticCode => diag.noRuntimetypeTostring;
Collapse file

‎pkg/linter/lib/src/rules/prefer_for_elements_to_map_fromIterable.dart‎

Copy file name to clipboardExpand all lines: pkg/linter/lib/src/rules/prefer_for_elements_to_map_fromIterable.dart
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const _desc = r'Prefer `for` elements when building maps from iterables.';
1818
class PreferForElementsToMapFromIterable extends AnalysisRule {
1919
PreferForElementsToMapFromIterable()
2020
: super(
21-
name: LintNames.prefer_for_elements_to_map_fromIterable,
21+
name: LintNames.prefer_for_elements_to_map_fromiterable,
2222
description: _desc,
2323
);
2424

Collapse file

‎pkg/linter/lib/src/rules/prefer_iterable_whereType.dart‎

Copy file name to clipboardExpand all lines: pkg/linter/lib/src/rules/prefer_iterable_whereType.dart
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const _desc = r'Prefer to use `whereType` on iterable.';
1818

1919
class PreferIterableWhereType extends AnalysisRule {
2020
PreferIterableWhereType()
21-
: super(name: LintNames.prefer_iterable_whereType, description: _desc);
21+
: super(name: LintNames.prefer_iterable_wheretype, description: _desc);
2222

2323
@override
2424
DiagnosticCode get diagnosticCode => diag.preferIterableWheretype;
Collapse file

‎pkg/linter/test/rules/no_runtimeType_toString_test.dart‎

Copy file name to clipboardExpand all lines: pkg/linter/test/rules/no_runtimeType_toString_test.dart
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ void main() {
1616
@reflectiveTest
1717
class NoRuntimeTypeToStringTest extends LintRuleTest {
1818
@override
19-
String get lintRule => LintNames.no_runtimeType_toString;
19+
String get lintRule => LintNames.no_runtimetype_tostring;
2020

2121
test_extension_onAbstractClass() async {
2222
await assertNoDiagnostics(r'''
Collapse file

‎pkg/linter/test/rules/prefer_for_elements_to_map_fromIterable_test.dart‎

Copy file name to clipboardExpand all lines: pkg/linter/test/rules/prefer_for_elements_to_map_fromIterable_test.dart
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class PreferForElementsToMapFromIterableTest extends LintRuleTest {
1919
// TODO(srawlins): Add tests with block-bodied closures.
2020

2121
@override
22-
String get lintRule => LintNames.prefer_for_elements_to_map_fromIterable;
22+
String get lintRule => LintNames.prefer_for_elements_to_map_fromiterable;
2323

2424
test_hasKeyAndValue_closuresAreSimple() async {
2525
await assertDiagnostics(
Collapse file

‎pkg/linter/test/rules/prefer_iterable_whereType_test.dart‎

Copy file name to clipboardExpand all lines: pkg/linter/test/rules/prefer_iterable_whereType_test.dart
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ void main() {
1717
@reflectiveTest
1818
class PreferIterableWhereTypeTest extends LintRuleTest {
1919
@override
20-
String get lintRule => LintNames.prefer_iterable_whereType;
20+
String get lintRule => LintNames.prefer_iterable_wheretype;
2121

2222
test_closureWithIs() async {
2323
await assertDiagnostics(

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.