mirror of
https://github.com/esphome/esphome.git
synced 2026-06-24 11:25:35 +00:00
[clang-tidy] Add --exclude-grep to skip files by content (#16813)
This commit is contained in:
@@ -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