[clang-tools-extra] [clang-tidy] align all help message in run-clang-tidy (PR #96199)
Congcong Cai via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 24 07:00:58 PDT 2024
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/96199
>From 03bc40a343227cb839ec908492c0d904be9af654 Mon Sep 17 00:00:00 2001
From: Congcong Cai <congcongcai0907 at 163.com>
Date: Thu, 20 Jun 2024 14:36:51 +0000
Subject: [PATCH 1/3] [clang-tidy] align all help message in run-clang-tidy
[NFC]
---
.../clang-tidy/tool/run-clang-tidy.py | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
index 4dd20bec81d3b..76374933bfd15 100755
--- a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
+++ b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
@@ -264,17 +264,17 @@ def main():
help="allow alpha checkers from clang-analyzer.",
)
parser.add_argument(
- "-clang-tidy-binary", metavar="PATH", help="path to clang-tidy binary"
+ "-clang-tidy-binary", metavar="PATH", help="path to clang-tidy binary."
)
parser.add_argument(
"-clang-apply-replacements-binary",
metavar="PATH",
- help="path to clang-apply-replacements binary",
+ help="path to clang-apply-replacements binary.",
)
parser.add_argument(
"-checks",
default=None,
- help="checks filter, when not specified, use clang-tidy default",
+ help="checks filter, when not specified, use clang-tidy default.",
)
config_group = parser.add_mutually_exclusive_group()
config_group.add_argument(
@@ -350,16 +350,16 @@ def main():
help="number of tidy instances to be run in parallel.",
)
parser.add_argument(
- "files", nargs="*", default=[".*"], help="files to be processed (regex on path)"
+ "files", nargs="*", default=[".*"], help="files to be processed (regex on path)."
)
- parser.add_argument("-fix", action="store_true", help="apply fix-its")
+ parser.add_argument("-fix", action="store_true", help="apply fix-its.")
parser.add_argument(
- "-format", action="store_true", help="Reformat code after applying fixes"
+ "-format", action="store_true", help="Reformat code after applying fixes."
)
parser.add_argument(
"-style",
default="file",
- help="The style of reformat code after applying fixes",
+ help="The style of reformat code after applying fixes.",
)
parser.add_argument(
"-use-color",
@@ -388,7 +388,7 @@ def main():
help="Additional argument to prepend to the compiler command line.",
)
parser.add_argument(
- "-quiet", action="store_true", help="Run clang-tidy in quiet mode"
+ "-quiet", action="store_true", help="Run clang-tidy in quiet mode."
)
parser.add_argument(
"-load",
@@ -400,7 +400,7 @@ def main():
parser.add_argument(
"-warnings-as-errors",
default=None,
- help="Upgrades warnings to errors. Same format as '-checks'",
+ help="Upgrades warnings to errors. Same format as '-checks'.",
)
args = parser.parse_args()
>From 60c9498a58442a4e1e7f4ee04b9fa225c02ee9bf Mon Sep 17 00:00:00 2001
From: Congcong Cai <congcongcai0907 at 163.com>
Date: Thu, 20 Jun 2024 15:11:43 +0000
Subject: [PATCH 2/3] format
---
clang-tools-extra/clang-tidy/tool/run-clang-tidy.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
index 76374933bfd15..a2c8e4f8dc52b 100755
--- a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
+++ b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
@@ -350,7 +350,10 @@ def main():
help="number of tidy instances to be run in parallel.",
)
parser.add_argument(
- "files", nargs="*", default=[".*"], help="files to be processed (regex on path)."
+ "files",
+ nargs="*",
+ default=[".*"],
+ help="files to be processed (regex on path).",
)
parser.add_argument("-fix", action="store_true", help="apply fix-its.")
parser.add_argument(
>From 867a104276e38bd7c4899fd5540f0cacfa5d5e41 Mon Sep 17 00:00:00 2001
From: Congcong Cai <congcong.cai at bmw.com>
Date: Mon, 24 Jun 2024 22:00:44 +0800
Subject: [PATCH 3/3] capitalize the first word
---
.../clang-tidy/tool/run-clang-tidy.py | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
index a2c8e4f8dc52b..6e7cc8a873a22 100755
--- a/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
+++ b/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
@@ -261,20 +261,20 @@ def main():
parser.add_argument(
"-allow-enabling-alpha-checkers",
action="store_true",
- help="allow alpha checkers from clang-analyzer.",
+ help="Allow alpha checkers from clang-analyzer.",
)
parser.add_argument(
- "-clang-tidy-binary", metavar="PATH", help="path to clang-tidy binary."
+ "-clang-tidy-binary", metavar="PATH", help="Path to clang-tidy binary."
)
parser.add_argument(
"-clang-apply-replacements-binary",
metavar="PATH",
- help="path to clang-apply-replacements binary.",
+ help="Path to clang-apply-replacements binary.",
)
parser.add_argument(
"-checks",
default=None,
- help="checks filter, when not specified, use clang-tidy default.",
+ help="Checks filter, when not specified, use clang-tidy default.",
)
config_group = parser.add_mutually_exclusive_group()
config_group.add_argument(
@@ -307,7 +307,7 @@ def main():
parser.add_argument(
"-header-filter",
default=None,
- help="regular expression matching the names of the "
+ help="Regular expression matching the names of the "
"headers to output diagnostics from. Diagnostics from "
"the main file of each translation unit are always "
"displayed.",
@@ -347,13 +347,13 @@ def main():
"-j",
type=int,
default=0,
- help="number of tidy instances to be run in parallel.",
+ help="Number of tidy instances to be run in parallel.",
)
parser.add_argument(
"files",
nargs="*",
default=[".*"],
- help="files to be processed (regex on path).",
+ help="Files to be processed (regex on path).",
)
parser.add_argument("-fix", action="store_true", help="apply fix-its.")
parser.add_argument(
More information about the cfe-commits
mailing list