@@ -33,31 +33,10 @@ if (-not $clangTidy) {
3333 exit 1
3434}
3535
36- # Determine clang-tidy checks to use. Priority:
37- # 1) CLANG_TIDY_CHECKS env var
38- # 2) repo .clang-tidy file (let clang-tidy find it)
39- # 3) fix-oriented default checks that stay quiet unless they can rewrite code
40- $repoTidyFile = Join-Path $scriptDir " .clang-tidy"
41- $clangTidyChecks = $env: CLANG_TIDY_CHECKS
42- if (-not $clangTidyChecks ) {
43- if (-not (Test-Path $repoTidyFile )) {
44- # Default to checks that usually provide mechanical fixes instead of
45- # flooding the run with non-actionable audit diagnostics.
46- $clangTidyChecks = " readability-braces-around-statements,readability-isolate-declaration,readability-redundant-control-flow"
47- } else {
48- $clangTidyChecks = " "
49- }
50- }
51- $repoClangFormat = Join-Path $scriptDir " .clang-format"
52- # If repo provides a .clang-format, prefer it; otherwise use an inline
53- # style that enforces four-space indents and no tabs.
54- if (Test-Path $repoClangFormat ) {
55- $clangFormatStyle = " file"
56- $clangTidyFormatArg = " -format-style=file"
57- } else {
58- $clangFormatStyle = " {BasedOnStyle: LLVM, IndentWidth: 4, UseTab: Never, ColumnLimit: 120}"
59- $clangTidyFormatArg = " -format-style=$clangFormatStyle "
60- }
36+ # clang-tidy checks: fix-oriented defaults that stay quiet unless they can rewrite code.
37+ $clangTidyChecks = " readability-braces-around-statements,readability-isolate-declaration,readability-redundant-control-flow"
38+ $clangFormatStyle = " {BasedOnStyle: LLVM, IndentWidth: 4, UseTab: Never, ColumnLimit: 120}"
39+ $clangTidyFormatArg = " -format-style=$clangFormatStyle "
6140$roots = @ (
6241 (Join-Path $scriptDir " src" ),
6342 (Join-Path $scriptDir " ext" ),
0 commit comments