From 2b16e3609bf3e00d15c42968dfbaeac2663a48c9 Mon Sep 17 00:00:00 2001 From: Pavel Sulimau Date: Mon, 15 Apr 2024 22:25:21 +0200 Subject: [PATCH] fix!: Make `melos analyze` always use `dart analyze` (#695) * fix: make analyze bahavior consistent * Fix typo * Add dart.lineLength setting to .vscode/settings.json * Revert "Add dart.lineLength setting to .vscode/settings.json" This reverts commit 864ca1cbab05579847167d941022c4a243ad1ac5. --- docs/commands/analyze.mdx | 2 ++ packages/melos/lib/src/commands/analyze.dart | 19 ++----------------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/docs/commands/analyze.mdx b/docs/commands/analyze.mdx index a66b24916..51802e85f 100644 --- a/docs/commands/analyze.mdx +++ b/docs/commands/analyze.mdx @@ -20,6 +20,7 @@ melos analyze ## --fatal-infos Enforces a strict analysis by treating info-level issues as critical errors. +By default this option is disabled. ```bash melos analyze --fatal-infos @@ -27,6 +28,7 @@ melos analyze --fatal-infos ## --fatal-warnings Enables treating warnings as fatal errors. When enabled, any warning will cause the analyzer to fail. +By default this option is enabled. ```bash melos analyze --fatal-warnings diff --git a/packages/melos/lib/src/commands/analyze.dart b/packages/melos/lib/src/commands/analyze.dart index 45f61b690..b51634a77 100644 --- a/packages/melos/lib/src/commands/analyze.dart +++ b/packages/melos/lib/src/commands/analyze.dart @@ -110,10 +110,8 @@ mixin _AnalyzeMixin on _Melos { }) { final options = _getOptionsArgs(fatalInfos, fatalWarnings, concurrency); return [ - ..._analyzeCommandExecArgs( - useFlutter: workspace.isFlutterWorkspace, - workspace: workspace, - ), + workspace.sdkTool('dart'), + 'analyze', options, ]; } @@ -162,17 +160,4 @@ mixin _AnalyzeMixin on _Melos { group: group, ); } - - List _analyzeCommandExecArgs({ - required bool useFlutter, - required MelosWorkspace workspace, - }) { - return [ - if (useFlutter) - workspace.sdkTool('flutter') - else - workspace.sdkTool('dart'), - 'analyze', - ]; - } }