Skip to content

Commit 9a7f2d3

Browse files
Remove dead .clang-format/.clang-tidy fallback chain in format.ps1 (closes #222)
1 parent 42b121e commit 9a7f2d3

1 file changed

Lines changed: 4 additions & 25 deletions

File tree

format.ps1

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)