Skip to content

Commit

Permalink
fix!: Make melos analyze always use dart analyze (#695)
Browse files Browse the repository at this point in the history
* 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 864ca1c.
  • Loading branch information
Pavel-Sulimau authored Apr 15, 2024
1 parent 048ab30 commit 2b16e36
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
2 changes: 2 additions & 0 deletions docs/commands/analyze.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ 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
```

## --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
Expand Down
19 changes: 2 additions & 17 deletions packages/melos/lib/src/commands/analyze.dart
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,8 @@ mixin _AnalyzeMixin on _Melos {
}) {
final options = _getOptionsArgs(fatalInfos, fatalWarnings, concurrency);
return <String>[
..._analyzeCommandExecArgs(
useFlutter: workspace.isFlutterWorkspace,
workspace: workspace,
),
workspace.sdkTool('dart'),
'analyze',
options,
];
}
Expand Down Expand Up @@ -162,17 +160,4 @@ mixin _AnalyzeMixin on _Melos {
group: group,
);
}

List<String> _analyzeCommandExecArgs({
required bool useFlutter,
required MelosWorkspace workspace,
}) {
return [
if (useFlutter)
workspace.sdkTool('flutter')
else
workspace.sdkTool('dart'),
'analyze',
];
}
}

0 comments on commit 2b16e36

Please sign in to comment.