mirror of
https://github.com/esphome/esphome.git
synced 2026-12-01 01:06:15 +00:00
[clang-tidy] Add --exclude-grep to skip files by content (#16813)
This commit is contained in:
1 parent
e2459a3923
commit
5288767abf
1 file changed
+10
@@ -247,6 +247,12 @@ def main():
|
||||
action="append",
|
||||
help="only run on files containing value",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-x",
|
||||
"--exclude-grep",
|
||||
action="append",
|
||||
help="skip files containing value",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--split-num", type=int, help="split the files into X jobs.", default=None
|
||||
)
|
||||
@@ -281,6 +287,10 @@ def main():
|
||||
if args.grep:
|
||||
files = filter_grep(files, args.grep)
|
||||
|
||||
if args.exclude_grep:
|
||||
excluded = set(filter_grep(files, args.exclude_grep))
|
||||
files = [f for f in files if f not in excluded]
|
||||
|
||||
files.sort()
|
||||
|
||||
if args.split_num:
|
||||
|
||||
Reference in new issue
Block a user