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

Commit 5a77b8a

Browse files
committed
fixed format error
1 parent 80eb9b5 commit 5a77b8a

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

tools/clang_tidy/test/clang_tidy_test.dart

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,18 @@ Suppressed 3474 warnings (3466 in non-user code, 8 NOLINT).
3939
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4040
1 warning treated as error''';
4141

42+
void _withTempFile(String prefix, void Function(String path) func) {
43+
final String filePath =
44+
path.join(io.Directory.systemTemp.path, '$prefix-temp-file');
45+
final io.File file = io.File(filePath);
46+
file.createSync();
47+
try {
48+
func(file.path);
49+
} finally {
50+
file.deleteSync();
51+
}
52+
}
53+
4254
Future<int> main(List<String> args) async {
4355
if (args.isEmpty) {
4456
io.stderr.writeln(
@@ -116,17 +128,6 @@ Future<int> main(List<String> args) async {
116128
));
117129
});
118130

119-
void _withTempFile(String prefix, void Function(String path) func) {
120-
final String filePath = path.join(io.Directory.systemTemp.path, '$prefix-temp-file');
121-
final io.File file = io.File(filePath);
122-
file.createSync();
123-
try {
124-
func(file.path);
125-
} finally {
126-
file.deleteSync();
127-
}
128-
}
129-
130131
test('shard-id valid', () async {
131132
_withTempFile('shard-id-valid', (String path) {
132133
final Options options = Options.fromCommandLine( <String>[

0 commit comments

Comments
 (0)