Skip to content

Commit e5fb3e9

Browse files
authored
I166 (#170)
* Rename to avoid_debug_print_in_release * Implement kDebugMode check * add doc comments * Look for the checks all the way up the tree; check for !kReleaseMode instead * Refactor & fix issues * fix comments * fix more comments
1 parent e55da4c commit e5fb3e9

File tree

12 files changed

+325
-251
lines changed

12 files changed

+325
-251
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
- Add a rule prefer_guard_clause for reversing nested if statements (https://github.com/solid-software/solid_lints/issues/91)
77
- add exclude params support to avoid_returning_widgets rule (https://github.com/solid-software/solid_lints/issues/131)
88
- add quick fix to avoid_final_with_getter (https://github.com/solid-software/solid_lints/pull/164)
9-
9+
- Renamed `avoid_debug_print` to `avoid_debug_print_in_release`
10+
- The `avoid_debug_print_in_release` no longer reports a warning if the `debugPrint` call is wrapped in a `!kReleaseMode` check.
1011

1112
## 0.1.5
1213

example/analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ custom_lint:
1919
- avoid_unnecessary_setstate
2020
- double_literal_format
2121
- avoid_unnecessary_type_assertions
22-
- avoid_debug_print
22+
- avoid_debug_print_in_release
2323
- avoid_using_api:
2424
severity: info
2525
entries:

lib/analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ custom_lint:
5050
- avoid_unnecessary_type_casts
5151
- avoid_unrelated_type_assertions
5252
- avoid_unused_parameters
53-
- avoid_debug_print
53+
- avoid_debug_print_in_release
5454
- avoid_final_with_getter
5555

5656
- cyclomatic_complexity:

lib/solid_lints.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
library solid_metrics;
22

33
import 'package:custom_lint_builder/custom_lint_builder.dart';
4-
import 'package:solid_lints/src/lints/avoid_debug_print/avoid_debug_print_rule.dart';
4+
import 'package:solid_lints/src/lints/avoid_debug_print_in_release/avoid_debug_print_in_release_rule.dart';
55
import 'package:solid_lints/src/lints/avoid_final_with_getter/avoid_final_with_getter_rule.dart';
66
import 'package:solid_lints/src/lints/avoid_global_state/avoid_global_state_rule.dart';
77
import 'package:solid_lints/src/lints/avoid_late_keyword/avoid_late_keyword_rule.dart';
@@ -62,7 +62,7 @@ class _SolidLints extends PluginBase {
6262
PreferLastRule.createRule(configs),
6363
PreferMatchFileNameRule.createRule(configs),
6464
ProperSuperCallsRule.createRule(configs),
65-
AvoidDebugPrint.createRule(configs),
65+
AvoidDebugPrintInReleaseRule.createRule(configs),
6666
PreferEarlyReturnRule.createRule(configs),
6767
AvoidFinalWithGetterRule.createRule(configs),
6868
];

lib/src/lints/avoid_debug_print/avoid_debug_print_rule.dart

Lines changed: 0 additions & 131 deletions
This file was deleted.

lib/src/lints/avoid_debug_print/models/avoid_debug_print_func_model.dart

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)