-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Escape filter list in a way that can be copied and pasted into a shell with NOMATCH
#97
Conversation
Please could you give an example of before and after? I'm not quite sure what the issue is! |
Currently it will print this clang-tidy-15 -p=cmake-build-presets/ninja-multi-vcpkg --config-file=".clang-tidy" -line-filter=["{'name': 'src/Game.cpp', 'lines': [[677, 677], [712, 712]]}"] "src/Game.cpp" --export-fixes=clang_tidy_review.yaml/mnt This causes issues with interpreters with
Escaping line filter properly gives a slightly uglier command but you can the use it in your script.
The uglyness is because of the way it escapes quotes:
Is just the concatenation of |
753b3c9
to
0e7a301
Compare
Still need to test this version of the fix |
d90e239
to
adb19f2
Compare
I've refined the fix. Not only is that an invalid json list of json objects (being instead a json list of strings), but it leaves the Using
|
adb19f2
to
d55a14d
Compare
d55a14d
to
9796692
Compare
Join file names using shell aware `shlex.join` Remove string conversion for each file entry in line filter. Escape quotes in line filter using `shlex.quote`.
9796692
to
fec5c54
Compare
NOMATCH
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @bwrsandman, this looks great!
No description provided.