Skip to content

Commit

Permalink
Escape clang-tidy command in a way that can be copied and pasted into…
Browse files Browse the repository at this point in the history
… a shell
  • Loading branch information
bwrsandman committed Oct 11, 2023
1 parent 6f3fc9a commit 0e7a301
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion post/clang_tidy_review/clang_tidy_review/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import re
import io
import zipfile
import shlex
from github import Github
from github.Requester import Requester
from github.PaginatedList import PaginatedList
Expand Down Expand Up @@ -67,7 +68,7 @@ def build_clang_tidy_warnings(

print(f"Using config: {config}")

command = f"{clang_tidy_binary} -p={build_dir} {config} -line-filter={line_filter} {files} --export-fixes={FIXES_FILE}"
command = shlex.join([f"{clang_tidy_binary}", f"-p={build_dir}", f"{config}", f"-line-filter={line_filter}", f"{files}", f"--export-fixes={FIXES_FILE}"])

start = datetime.datetime.now()
try:
Expand Down

0 comments on commit 0e7a301

Please sign in to comment.