Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 8ca79a9

Browse files
authored
Exit with failure code if clang-tidy finds linter issues (#29633)
1 parent 5d579bd commit 8ca79a9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tools/clang_tidy/bin/main.dart

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,14 @@
1212
//
1313
// User environment variable FLUTTER_LINT_ALL to run on all files.
1414

15+
import 'dart:io' as io;
16+
1517
import 'package:clang_tidy/clang_tidy.dart';
1618

1719
Future<int> main(List<String> arguments) async {
18-
return ClangTidy.fromCommandLine(arguments).run();
20+
final int result = await ClangTidy.fromCommandLine(arguments).run();
21+
if (result != 0) {
22+
io.exit(result);
23+
}
24+
return result;
1925
}

0 commit comments

Comments
 (0)