Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace package:tuneup with the Dart analyzer. #542

Merged
merged 1 commit into from
Apr 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions tools/sz_repo_cli/lib/src/commands/src/analyze_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,6 @@ class AnalyzeCommand extends ConcurrentCommand {
@override
Duration get defaultPackageTimeout => Duration(minutes: 5);

@override
Future<void> runSetup() async {
print('Activating tuneup package...');
await runProcessSucessfullyOrThrow(
'fvm', ['dart', 'pub', 'global', 'activate', 'tuneup'],
workingDirectory: repo.sharezoneFlutterApp.location.path);
}

@override
Future<void> runTaskForPackage(Package package) {
return package.analyzePackage();
Expand Down
12 changes: 5 additions & 7 deletions tools/sz_repo_cli/lib/src/common/src/package.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,14 @@ abstract class Package {

Future<void> analyzePackage() async {
await getPackages();
await _runTuneup();
await _runDartAnalyze();
await _checkForCommentsWithBadSpacing();
}

Future<void> _runTuneup() async {
await runProcessSucessfullyOrThrow(
'fvm',
['dart', 'pub', 'global', 'run', 'tuneup', 'check', '--fail-on-todos'],
workingDirectory: location.path,
);
Future<void> _runDartAnalyze() {
return runProcessSucessfullyOrThrow(
'fvm', ['dart', 'analyze', '--fatal-infos', '--fatal-warnings'],
workingDirectory: location.path);
}

Future<void> _checkForCommentsWithBadSpacing() async {
Expand Down