Looks like the original code was copied from clang-format-diff.py.
Update help message to make it clang-tidy specific.
Details
Diff Detail
Event Timeline
clang-tidy/tool/clang-tidy-diff.py | ||
---|---|---|
42 | Shouldn't -p be used to specify compile database as in run-clang-tidy.py? |
clang-tidy/tool/clang-tidy-diff.py | ||
---|---|---|
42 | From the test plan it looks like this script doesn't support compilation database input: git diff -U0 HEAD^ | clang-tidy-diff.py -checks=-*,misc-use-override -p1 -- -std=gnu++14 It is similar to patch-like tools that process unified diff input -- uses -p to adjust file path. I can fix it in a separate diff, just need a better name for the current function of -p. |
Looks good. Thank you for fixing the copy-paste failures!
Do you need me to commit the patch for you?
clang-tidy/tool/clang-tidy-diff.py | ||
---|---|---|
42 | The -p flag (compilation database path) to clang-tidy can be specified after the --: git diff -U0 HEAD^ | clang-tidy-diff.py -checks=-*,misc-use-override -p1 -- -p path/to/compile_commands.json It might be slightly confusing to have two -p flags, but both make sense. |
Shouldn't -p be used to specify compile database as in run-clang-tidy.py?