Skip to content

Commit 4fd6557

Browse files
Update changelog & add better suggestion/context to avoid_debug_print_rule
1 parent dde8e6f commit 4fd6557

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
- Added `avoid_final_with_getter` rule
44
- Improve `avoid_late_keyword` - `ignored_types` to support ignoring subtype of the node type (https://github.com/solid-software/solid_lints/issues/157)
55
- Abstract methods should be omitted by `proper_super_calls` (https://github.com/solid-software/solid_lints/issues/159)
6+
- Add a rule prefer_guard_clause for reversing nested if statements (https://github.com/solid-software/solid_lints/issues/91)
7+
- add exclude params support to avoid_returning_widgets rule (https://github.com/solid-software/solid_lints/issues/131)
8+
- add quick fix to avoid_final_with_getter (https://github.com/solid-software/solid_lints/pull/164)
69

710

811
## 0.1.5

lib/src/lints/avoid_debug_print/avoid_debug_print_rule.dart

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import 'package:solid_lints/src/models/solid_lint_rule.dart';
99
/// A `avoid_debug_print` rule which forbids calling or referencing
1010
/// debugPrint function from flutter/foundation.
1111
///
12+
/// See more here: https://github.com/flutter/flutter/issues/147141
13+
///
1214
/// ### Example
1315
///
1416
/// #### BAD:
@@ -23,8 +25,12 @@ import 'package:solid_lints/src/models/solid_lint_rule.dart';
2325
/// #### GOOD:
2426
///
2527
/// ```dart
26-
/// log('');
28+
/// if (kDebugMode) {
29+
/// debugPrint('');
30+
/// }
2731
/// ```
32+
///
33+
///
2834
class AvoidDebugPrint extends SolidLintRule {
2935
/// The [LintCode] of this lint rule that represents
3036
/// the error when debugPrint is called
@@ -96,7 +102,7 @@ class AvoidDebugPrint extends SolidLintRule {
96102
}
97103
}
98104

99-
/// Returns null if doesnt have right operand
105+
/// Returns null if doesn't have right operand
100106
SyntacticEntity? _getRightOperand(List<SyntacticEntity> entities) {
101107
/// Example var t = 15; 15 is in 3d position
102108
if (entities.length < 3) {

0 commit comments

Comments
 (0)