diff --git a/CHANGELOG.md b/CHANGELOG.md index eb1ce24..3f95c7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ - add exclude params support to avoid_returning_widgets rule (https://github.com/solid-software/solid_lints/issues/131) - add quick fix to avoid_final_with_getter (https://github.com/solid-software/solid_lints/pull/164) - Renamed `avoid_debug_print` to `avoid_debug_print_in_release` -- Now, `avoid_debug_print_in_release` doesn't trigger if the `debugPrint` call is wrapped in a `!kReleaseMode` check. +- The `avoid_debug_print_in_release` no longer reports a warning if the `debugPrint` call is wrapped in a `!kReleaseMode` check. ## 0.1.5 diff --git a/lib/src/lints/avoid_debug_print_in_release/avoid_debug_print_in_release_rule.dart b/lib/src/lints/avoid_debug_print_in_release/avoid_debug_print_in_release_rule.dart index c000ebb..1a3e7aa 100644 --- a/lib/src/lints/avoid_debug_print_in_release/avoid_debug_print_in_release_rule.dart +++ b/lib/src/lints/avoid_debug_print_in_release/avoid_debug_print_in_release_rule.dart @@ -6,8 +6,8 @@ import 'package:custom_lint_builder/custom_lint_builder.dart'; import 'package:solid_lints/src/models/rule_config.dart'; import 'package:solid_lints/src/models/solid_lint_rule.dart'; -/// A `avoid_debug_print` rule which forbids calling or referencing -/// debugPrint function in release mode. +/// An `avoid_debug_print_in_release` rule which forbids calling or referencing +/// debugPrint function from flutter/foundation in release mode. /// /// See more here: https://github.com/flutter/flutter/issues/147141 /// @@ -50,7 +50,9 @@ class AvoidDebugPrintInReleaseRule extends SolidLintRule { final rule = RuleConfig( configs: configs, name: lintName, - problemMessage: (_) => "Avoid using 'debugPrint' in release mode", + problemMessage: (_) => """ +Avoid using 'debugPrint' in release mode. Wrap +your `debugPrint` call in a `!kReleaseMode` check.""", ); return AvoidDebugPrintInReleaseRule._(rule);