Exit with failure code if clang-tidy finds linter issues (flutter/engine#29633)

This commit is contained in:
Jenn Magder
2021-11-10 09:16:31 -08:00
committed by GitHub
parent 50f7f84e9c
commit 6ebd593543

View File

@@ -12,8 +12,14 @@
//
// User environment variable FLUTTER_LINT_ALL to run on all files.
import 'dart:io' as io;
import 'package:clang_tidy/clang_tidy.dart';
Future<int> main(List<String> arguments) async {
return ClangTidy.fromCommandLine(arguments).run();
final int result = await ClangTidy.fromCommandLine(arguments).run();
if (result != 0) {
io.exit(result);
}
return result;
}