-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
shaark
committed
Dec 5, 2024
1 parent
25e51c7
commit fef0045
Showing
17 changed files
with
162 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
lint_test/avoid_debug_print_in_release_test/avoid_debug_print_in_release_prefix_test.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
lint_test/avoid_debug_print_in_release_test/avoid_debug_print_in_release_test.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
lint_test/avoid_using_api/external_source/lib/banned_library.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
//ignore_for_file:consider_making_a_member_private | ||
// expect_lint: avoid_global_state | ||
int banned = 5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,65 @@ | ||
// ignore_for_file: no_empty_block, prefer_match_file_name, unused_element, member_ordering | ||
// ignore_for_file: no_empty_block, prefer_match_file_name, unused_element, member_ordering, avoid_global_state, avoid_unused_parameters | ||
/// Check the `consider_making_a_member_private` rule | ||
/// | ||
// expect_lint:consider_making_a_member_private | ||
const int unusedGlobalVariables = 0; | ||
|
||
//no lint | ||
const int usedGlobalVariables = 0; | ||
|
||
// expect_lint:consider_making_a_member_private | ||
void unusedGLobalFunction() {} | ||
|
||
//no lint | ||
void usedGLobalFunction() {} | ||
|
||
class X { | ||
// expect_lint:consider_making_a_member_private | ||
void unusedX() {} | ||
|
||
// no lint | ||
void usedX() {} | ||
// expect_lint:consider_making_a_member_private | ||
final int unusedFinalX = 0; | ||
// expect_lint:consider_making_a_member_private | ||
static final int unusedStaticX = 0; | ||
|
||
// expect_lint:consider_making_a_member_private | ||
int unusedMutableX = 0; | ||
|
||
// expect_lint:consider_making_a_member_private | ||
int get unusedGetX => 0; | ||
|
||
// expect_lint:consider_making_a_member_private | ||
set unusedSetX(int y) {} | ||
|
||
// no lint | ||
void usedMethodX() {} | ||
|
||
// expect_lint:consider_making_a_member_private | ||
static void unusedStaticMethodX() {} | ||
|
||
// no lint | ||
X(); | ||
|
||
// expect_lint:consider_making_a_member_private | ||
X.withValue({ | ||
required this.unusedMutableX, | ||
}); | ||
|
||
// expect_lint:consider_making_a_member_private | ||
factory X.factory() => X(); | ||
|
||
// no lint | ||
factory X.usedFactory() => X(); | ||
} | ||
|
||
class Y { | ||
// no lint | ||
void _y() { | ||
final x = X(); | ||
x.usedX(); | ||
X.usedFactory(); | ||
x.usedMethodX(); | ||
usedGLobalFunction(); | ||
usedGlobalVariables; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...c_number_allowed_in_widget_params_test/no_magic_number_allowed_in_widget_params_test.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...nal_expressions_ignore_nested_test/prefer_conditional_expressions_ignore_nested_test.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters