Skip to content

Commit e8cc0c3

Browse files
authored
[clang-format]: Fix JSON casing (#168156)
This commit aligns the user clang-format output to always show JSON, not Json.
1 parent 47da0f1 commit e8cc0c3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

clang/docs/ClangFormat.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ to format C/C++/Java/JavaScript/JSON/Objective-C/Protobuf/C# code.
5050
CSharp: .cs
5151
Java: .java
5252
JavaScript: .js .mjs .cjs .ts
53-
Json: .json .ipynb
53+
JSON: .json .ipynb
5454
Objective-C: .m .mm
5555
Proto: .proto .protodevel
5656
TableGen: .td

clang/tools/clang-format/ClangFormat.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ static cl::opt<std::string> AssumeFileName(
8888
" CSharp: .cs\n"
8989
" Java: .java\n"
9090
" JavaScript: .js .mjs .cjs .ts\n"
91-
" Json: .json .ipynb\n"
91+
" JSON: .json .ipynb\n"
9292
" Objective-C: .m .mm\n"
9393
" Proto: .proto .protodevel\n"
9494
" TableGen: .td\n"
@@ -489,7 +489,7 @@ static bool format(StringRef FileName, bool ErrorOnIncompleteFormat = false) {
489489
auto Err =
490490
Replaces.add(tooling::Replacement(AssumedFileName, 0, 0, "x = "));
491491
if (Err)
492-
llvm::errs() << "Bad Json variable insertion\n";
492+
llvm::errs() << "Bad JSON variable insertion\n";
493493
}
494494

495495
auto ChangedCode = tooling::applyAllReplacements(Code->getBuffer(), Replaces);

clang/tools/clang-format/git-clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def main():
115115
"ts", # TypeScript
116116
"cs", # C Sharp
117117
"json",
118-
"ipynb", # Json
118+
"ipynb", # JSON
119119
"sv",
120120
"svh",
121121
"v",

0 commit comments

Comments
 (0)