[PATCH] D108765: [docs] Fix documentation of clang-format BasedOnStyle type
Ludovic Jozeau via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 30 12:21:21 PDT 2021
FederAndInk marked 2 inline comments as done.
FederAndInk added inline comments.
================
Comment at: clang/docs/tools/dump_format_style.py:9
import re
+import inspect
+import subprocess
----------------
HazardyKnusperkeks wrote:
> I think these should be sorted.
ok, it will be done
================
Comment at: clang/docs/tools/dump_format_style.py:18
+PLURAL_FILE = os.path.join(os.path.dirname(__file__), 'plurals.txt')
+subprocess.check_call(['git', 'checkout', '--', PLURAL_FILE])
+plurals = set(open(PLURAL_FILE).read().splitlines())
----------------
HazardyKnusperkeks wrote:
> So you would add a plurals.txt in git and make the change visible through git diff? What about just reordering? I.e. `Strings` is on line 2, but after a change in line 1. Maybe sort the output?
>
> I'm not against this procedure, but also not in favor. :)
This line is used to restore the version of plurals.txt to HEAD, so when calling the script multiple times, it keeps showing new plurals until plurals.txt gets committed.
> So you would add a plurals.txt in git and make the change visible through git diff?
yes, that's it
> What about just reordering?
I don't think we want ordering, it is ordered from first plural generated to last/new one, so git diff will only show new plurals
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108765/new/
https://reviews.llvm.org/D108765
More information about the cfe-commits
mailing list