Skip to content

Commit

Permalink
refactor: Enable new DCM rule: avoid-cascade-after-if-null (#2676)
Browse files Browse the repository at this point in the history
Enable new DCM rule: avoid-cascade-after-if-null
Reference: https://dcm.dev/docs/rules/common/avoid-cascade-after-if-null/
  • Loading branch information
luanpotter authored Aug 26, 2023
1 parent 10e4109 commit 158fc34
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions packages/flame_jenny/jenny/test/test_scenario.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ Future<void> testScenario({
List<String>? commands,
YarnProject? yarn,
}) async {
final yarnProject = yarn ?? YarnProject()
..strictCharacterNames = false;
final yarnProject = (yarn ?? YarnProject())..strictCharacterNames = false;
commands?.forEach(yarnProject.commands.addOrphanedCommand);

Future<void> testBody() async {
Expand Down
1 change: 1 addition & 0 deletions packages/flame_lint/lib/analysis_options_with_dcm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ dart_code_metrics:
rules:
# dart rules
- avoid-banned-imports
- avoid-cascade-after-if-null
# flutter rules
- prefer-define-hero-tag

0 comments on commit 158fc34

Please sign in to comment.