Skip to content

Commit

Permalink
I166 (#170)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
sufftea authored May 2, 2024
1 parent e55da4c commit e5fb3e9
Show file tree
Hide file tree
Showing 12 changed files with 325 additions and 251 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
- Add a rule prefer_guard_clause for reversing nested if statements (https://github.com/solid-software/solid_lints/issues/91)
- 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`
- The `avoid_debug_print_in_release` no longer reports a warning if the `debugPrint` call is wrapped in a `!kReleaseMode` check.

## 0.1.5

Expand Down
2 changes: 1 addition & 1 deletion example/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ custom_lint:
- avoid_unnecessary_setstate
- double_literal_format
- avoid_unnecessary_type_assertions
- avoid_debug_print
- avoid_debug_print_in_release
- avoid_using_api:
severity: info
entries:
Expand Down
2 changes: 1 addition & 1 deletion lib/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ custom_lint:
- avoid_unnecessary_type_casts
- avoid_unrelated_type_assertions
- avoid_unused_parameters
- avoid_debug_print
- avoid_debug_print_in_release
- avoid_final_with_getter

- cyclomatic_complexity:
Expand Down
4 changes: 2 additions & 2 deletions lib/solid_lints.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
library solid_metrics;

import 'package:custom_lint_builder/custom_lint_builder.dart';
import 'package:solid_lints/src/lints/avoid_debug_print/avoid_debug_print_rule.dart';
import 'package:solid_lints/src/lints/avoid_debug_print_in_release/avoid_debug_print_in_release_rule.dart';
import 'package:solid_lints/src/lints/avoid_final_with_getter/avoid_final_with_getter_rule.dart';
import 'package:solid_lints/src/lints/avoid_global_state/avoid_global_state_rule.dart';
import 'package:solid_lints/src/lints/avoid_late_keyword/avoid_late_keyword_rule.dart';
Expand Down Expand Up @@ -62,7 +62,7 @@ class _SolidLints extends PluginBase {
PreferLastRule.createRule(configs),
PreferMatchFileNameRule.createRule(configs),
ProperSuperCallsRule.createRule(configs),
AvoidDebugPrint.createRule(configs),
AvoidDebugPrintInReleaseRule.createRule(configs),
PreferEarlyReturnRule.createRule(configs),
AvoidFinalWithGetterRule.createRule(configs),
];
Expand Down
131 changes: 0 additions & 131 deletions lib/src/lints/avoid_debug_print/avoid_debug_print_rule.dart

This file was deleted.

This file was deleted.

Loading

0 comments on commit e5fb3e9

Please sign in to comment.