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

Commit 6e33389

Browse files
committed
Use .clang-format when fixing files
1 parent b04ab6b commit 6e33389

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

tools/clang_tidy/lib/src/command.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,10 @@ class Command {
134134
filePath,
135135
if (checks != null)
136136
checks,
137-
if (fix)
137+
if (fix) ...<String>[
138138
'--fix',
139+
'--format-style=file',
140+
],
139141
'--',
140142
];
141143
args.addAll(tidyArgs.split(' '));

tools/clang_tidy/test/clang_tidy_test.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ Future<int> main(List<String> args) async {
275275
'../../buildtools/mac-x64/clang/bin/clang-tidy',
276276
filePath,
277277
'--fix',
278+
'--format-style=file',
278279
'--',
279280
'',
280281
filePath,

0 commit comments

Comments
 (0)