[PATCH] D108765: [docs] Fix documentation of clang-format BasedOnStyle type

2021-08-26 Thread Ludovic Jozeau via Phabricator via cfe-commits
FederAndInk added a comment. What about: `unsigned`? And enum or struct types such as `BracketAlignmentStyle`, `ArrayInitializerAlignmentStyle`, ...? Should we add something like: `Enum BracketAlignmentStyle` and `Dictionnary BraceWrapping`? The complete list: 53 bool

[PATCH] D108765: [docs] Fix documentation of clang-format BasedOnStyle type

2021-08-27 Thread Ludovic Jozeau via Phabricator via cfe-commits
FederAndInk added a comment. For now, I handle plural manually, but it can be changed, I also kept Unsigned, what are your thoughts? Thanks for being so kind and responsive, it's really great to work on that :) as it is my first contribution to clang. Repository: rG LLVM Github Monorepo

[PATCH] D108765: [docs] Fix documentation of clang-format BasedOnStyle type

2021-08-27 Thread Ludovic Jozeau via Phabricator via cfe-commits
FederAndInk added a comment. Ok, well, the reason I proposed this patch in the first place was that I have been working on a `.clang-format` schema (https://json-schema.org/) :) and I spotted the inconsistency. I checked, and clang-format reports an error if we give a negative value to an

[PATCH] D108765: [docs] Fix documentation of clang-format BasedOnStyle type

2021-08-27 Thread Ludovic Jozeau via Phabricator via cfe-commits
FederAndInk updated this revision to Diff 369081. FederAndInk added a comment. Use yaml type style for clang-format documentation (`String`, `Integer`, `List of Strings`, ...) instead of c++ types. Fix typo in clang/Format/Format.h Regenarate ClangFormatStyleOptions.rst Repository: rG LLVM

[PATCH] D108765: [docs] Fix documentation of clang-format BasedOnStyle type

2021-08-27 Thread Ludovic Jozeau via Phabricator via cfe-commits
FederAndInk added a comment. > look at the html Done, thanks > I assume you don't have commit access, we'll need your name and email address Here it is: Ludovic Jozeau it should also be on my profile > but if you think you might like to work on some other things, it might be > worth get

[PATCH] D108765: [docs] Fix documentation of clang-format BasedOnStyle type

2021-08-27 Thread Ludovic Jozeau via Phabricator via cfe-commits
FederAndInk added inline comments. Comment at: clang/docs/tools/dump_format_style.py:23 + plurals = { +'IncludeCategory': 'IncludeCategories' + } HazardyKnusperkeks wrote: > Could you not just check if there is a y at the end and replace it with ies, >

[PATCH] D108765: [docs] Fix documentation of clang-format BasedOnStyle type

2021-08-31 Thread Ludovic Jozeau via Phabricator via cfe-commits
FederAndInk added a comment. In D108765#2974153 , @MyDeveloperDay wrote: > error: pathspec './plurals.txt' did not match any file(s) known to git > Traceback (most recent call last): > File "./dump_format_style.py", line 18, in >

[PATCH] D108765: [docs] Fix documentation of clang-format BasedOnStyle type

2021-08-26 Thread Ludovic Jozeau via Phabricator via cfe-commits
FederAndInk added a comment. Thank you for your explanations, I understand now. But as I look into `clang/docs/tools/dump_format_style.py` I see that it does not entirely generate `clang/docs/ClangFormatStyleOptions.rst` it replaces the lines between `{START,END}_FORMAT_STYLE_OPTIONS` I

[PATCH] D108765: [docs] Fix documentation of clang-format BasedOnStyle type

2021-08-26 Thread Ludovic Jozeau via Phabricator via cfe-commits
FederAndInk created this revision. FederAndInk requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fix little inconsistency and use `std::string` (which is used everywhere else) instead of `string` Repository: rG LLVM Github Monorepo

[PATCH] D108765: [docs] Fix documentation of clang-format BasedOnStyle type

2021-08-30 Thread Ludovic Jozeau via Phabricator via cfe-commits
FederAndInk updated this revision to Diff 369431. FederAndInk added a comment. generate plurals, for now supporting -y ending (-y to -ies/-ys), track generated plurals and show new ones to be checked Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D108765: [docs] Fix documentation of clang-format BasedOnStyle type

2021-08-30 Thread Ludovic Jozeau via Phabricator via cfe-commits
FederAndInk added a comment. Ok, here is my proposal for plurals, I have some ideas, I think the safest/most complete would be to have a file tracking generated plurals and tell the user of the script to check newly generated plurals then add them to git, this would also allow reviewers to see

[PATCH] D108765: [docs] Fix documentation of clang-format BasedOnStyle type

2021-09-06 Thread Ludovic Jozeau via Phabricator via cfe-commits
FederAndInk updated this revision to Diff 370883. FederAndInk added a comment. rebase main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108765/new/ https://reviews.llvm.org/D108765 Files: clang/docs/ClangFormatStyleOptions.rst

[PATCH] D108765: [docs] Fix documentation of clang-format BasedOnStyle type

2021-09-06 Thread Ludovic Jozeau via Phabricator via cfe-commits
FederAndInk added inline comments. Comment at: clang/docs/tools/dump_format_style.py:17 +PLURALS_FILE = os.path.join(os.path.dirname(__file__), 'plurals.txt') +print(f'generated plurals (for yaml type) are stored in {PLURALS_FILE}') +print('you can use `git checkout --

[PATCH] D108765: [docs] Fix documentation of clang-format BasedOnStyle type

2021-09-06 Thread Ludovic Jozeau via Phabricator via cfe-commits
FederAndInk updated this revision to Diff 370944. FederAndInk added a comment. remove one print l17, tell me if we don't want the second print (now l17) fixed typo in the script coment -> comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D108765: [docs] Fix documentation of clang-format BasedOnStyle type

2021-09-06 Thread Ludovic Jozeau via Phabricator via cfe-commits
FederAndInk updated this revision to Diff 370953. FederAndInk added a comment. only print info on generated plurals if there is a new plural Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108765/new/ https://reviews.llvm.org/D108765 Files:

[PATCH] D108765: [docs] Fix documentation of clang-format BasedOnStyle type

2021-09-04 Thread Ludovic Jozeau via Phabricator via cfe-commits
FederAndInk updated this revision to Diff 370751. FederAndInk added a comment. use correct python assignment from tuple, ask the user if they want to invoke git, use call instead of check_call to allow testing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D108765: [docs] Fix documentation of clang-format BasedOnStyle type

2021-09-04 Thread Ludovic Jozeau via Phabricator via cfe-commits
FederAndInk added inline comments. Comment at: clang/docs/tools/dump_format_style.py:21-25 + # To allow testing with an untracked PLURAL_FILE + open(PLURAL_FILE, 'w').close() # TODO: remove this line when review is accepted + # TODO: use check_call when review is accepted +

[PATCH] D108765: [docs] Fix documentation of clang-format BasedOnStyle type

2021-09-09 Thread Ludovic Jozeau via Phabricator via cfe-commits
FederAndInk added a comment. @MyDeveloperDay is it all good? I'm sorry for all the misunderstanding, Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108765/new/ https://reviews.llvm.org/D108765 ___

[PATCH] D108765: [docs] Fix documentation of clang-format BasedOnStyle type

2021-09-05 Thread Ludovic Jozeau via Phabricator via cfe-commits
FederAndInk updated this revision to Diff 370796. FederAndInk added a comment. remove git invocation and user input, tell the user what the plurals are used for Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108765/new/

[PATCH] D108765: [docs] Fix documentation of clang-format BasedOnStyle type

2021-09-05 Thread Ludovic Jozeau via Phabricator via cfe-commits
FederAndInk marked 8 inline comments as done. FederAndInk added a comment. Ok, so I removed git invocation and I tell the user what are their options, at least warnings are emitted for new plurals, and they will be shown in git status/diff and in revisions. Repository: rG LLVM Github

[PATCH] D108765: [docs] Fix documentation of clang-format BasedOnStyle type

2021-09-24 Thread Ludovic Jozeau via Phabricator via cfe-commits
FederAndInk added a comment. Also, don't we want to change the title and summary of the commit/revision? Because it does not reflect the real changes now in the repo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108765/new/

[PATCH] D108765: [docs] Fix documentation of clang-format BasedOnStyle type

2021-09-24 Thread Ludovic Jozeau via Phabricator via cfe-commits
FederAndInk added a comment. Thanks for the merge, I now understand more how this all works and what we want from these scripts. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108765/new/ https://reviews.llvm.org/D108765

[PATCH] D108765: [docs] Fix documentation of clang-format BasedOnStyle type

2021-08-30 Thread Ludovic Jozeau via Phabricator via cfe-commits
FederAndInk added inline comments. Comment at: clang/docs/tools/dump_format_style.py:26 +def register_plural(singular: str, plural: str): + if plural not in plurals: MyDeveloperDay wrote: > This failed for me with invalid syntax Oh, ok, sorry, I might be

[PATCH] D108765: [docs] Fix documentation of clang-format BasedOnStyle type

2021-08-30 Thread Ludovic Jozeau via Phabricator via cfe-commits
FederAndInk marked an inline comment as done. FederAndInk added inline comments. Comment at: clang/docs/tools/dump_format_style.py:26 +def register_plural(singular: str, plural: str): + if plural not in plurals: HazardyKnusperkeks wrote: > FederAndInk wrote:

[PATCH] D108765: [docs] Fix documentation of clang-format BasedOnStyle type

2021-08-30 Thread Ludovic Jozeau via Phabricator via cfe-commits
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

[PATCH] D108765: [docs] Fix documentation of clang-format BasedOnStyle type

2021-08-30 Thread Ludovic Jozeau via Phabricator via cfe-commits
FederAndInk updated this revision to Diff 369519. FederAndInk marked an inline comment as done. FederAndInk added a comment. add common plural rules, use python3 explicitly, reorder imports Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108765/new/

[PATCH] D112572: [docs][clang-format] warn on code indentation error

2021-10-26 Thread Ludovic Jozeau via Phabricator via cfe-commits
FederAndInk created this revision. FederAndInk added reviewers: MyDeveloperDay, HazardyKnusperkeks. FederAndInk requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. There is an indentation issue in Format.h causing the html to not render

[PATCH] D112572: [docs][clang-format] warn on \code block indentation error

2021-10-26 Thread Ludovic Jozeau via Phabricator via cfe-commits
FederAndInk added a comment. In D112572#3088800 , @MyDeveloperDay wrote: > It seems like you are fixing more than just the bug you highlight, i.e looks > you might be fixing some autopep8 or pylint issues too. Yes, I also fixed some minor issues, my

[PATCH] D112572: [docs][clang-format] warn on \code block indentation error

2021-10-26 Thread Ludovic Jozeau via Phabricator via cfe-commits
FederAndInk added a comment. In D112572#3089318 , @HazardyKnusperkeks wrote: > Thanks for fixing my mistake. :) You're welcome ;) Thanks for your reviews. Should we add other reviewers? Also, I don't have commit rights, can one of you commit it on