diff --git a/tools/githooks/lib/src/pre_push_command.dart b/tools/githooks/lib/src/pre_push_command.dart index 83ec738d5cbf9..472a19db8bb46 100644 --- a/tools/githooks/lib/src/pre_push_command.dart +++ b/tools/githooks/lib/src/pre_push_command.dart @@ -33,6 +33,8 @@ class PrePushCommand extends Command { } Future _runClangTidy(String flutterRoot, bool verbose) async { + io.stdout.writeln('Starting clang-tidy checks.'); + final Stopwatch sw = Stopwatch()..start(); // First ensure that out/host_debug/compile_commands.json exists by running // //flutter/tools/gn. final io.File compileCommands = io.File(path.join( @@ -63,6 +65,8 @@ class PrePushCommand extends Command { errSink: errBuffer, ); final int clangTidyResult = await clangTidy.run(); + sw.stop(); + io.stdout.writeln('clang-tidy checks finished in ${sw.elapsed}'); if (clangTidyResult != 0) { io.stderr.write(errBuffer); return false; @@ -70,15 +74,20 @@ class PrePushCommand extends Command { return true; } - Future _runFormatter(String flutterRoot, bool verbose) { + Future _runFormatter(String flutterRoot, bool verbose) async { + io.stdout.writeln('Starting formatting checks.'); + final Stopwatch sw = Stopwatch()..start(); final String ext = io.Platform.isWindows ? '.bat' : '.sh'; - return _runCheck( + final bool result = await _runCheck( flutterRoot, path.join(flutterRoot, 'ci', 'format$ext'), [], 'Formatting check', verbose: verbose, ); + sw.stop(); + io.stdout.writeln('formatting checks finished in ${sw.elapsed}'); + return result; } Future _runCheck(