Conversation
|
Can you add a couple of problematic files which would benefit? Just so I can see a difference. Also, are these tools good enough for complicated templated code? |
No, sorry, I can't. I didn't have time to provide you guys with comprehensive picture that you can just have a look at. I just aim to provided anyone interested in trying out
You will have to run it yourself on a whole file or selection/parts of file only that you are interested to see the So, this PR should be labelled not for lazy ones ;)
What is good enough, what do you consider good enough, what is a complicated templated code. I mean, you are asking difficult questions ;) In my personal opinion, clang-format has limitations as any code formatting tool, but clang-format is a tool that has the best capacity of all open source tools currently available in the wild. Finally, please keep in mind this PR is tagged with WIP and Brainstorm for reason. I'm not even convinced myself that |
ed244b9 to
3214179
Compare
0105ce8 to
9293966
Compare
9293966 to
a7a0467
Compare
0df6eb7 to
8dd4c6b
Compare
8dd4c6b to
cb61565
Compare
cb61565 to
fde4f3e
Compare
fde4f3e to
cf957f6
Compare
cf957f6 to
c024050
Compare
|
I have just asked the StackOverflow for advise on desire formatting using Can clang-format split template parameters list in multiple lines? |
38b5cbf to
b0fec19
Compare
|
I answered a StackOverflow question on spacing and breaking trailing return type with clang-format which is also related to desired formatting discussed here. |
b0fec19 to
b21eadf
Compare
Following column limit agreement, consider this as proposal to brainstorm, try and refine `.clang-format` for Boost.GIL. Goals: - Provide `.clang-format` with reasonable defaults for Boost.GIL as a basic formatting guideline and helper. - Support edit - select (class, function) - format workflow with consistent settings across editors. - Help for manual formatting: run `clang-format` first, then adjust formatting in those (few) places where necessary. - Use `clang-format` from its latest release. No goals: - No automatic reformat on file save or pre-commit is proposed. - No bulk reformat of the whole codebase is proposed. - No CI build running clang-format verifying code style, however, this may be added in future to ensure maintenance of consistent style. [ci skip]
b21eadf to
ba49b7f
Compare
|
23702f9 adds good-enough This is an example which offers good enough configuration and |
IMPORTANT: This is NOT ready to merge, this may NEVER be merged. It aims to serve as subject for discussion if and how
clang-formatmay become useful for us.Description
Following
90100 character column limit, I decided to tryclang-formatand start development of annotated.clang-formatconfiguration file that may be useful for Boost.GILPlease, consider this as a proposal to brainstorm, try and refine
.clang-formatfor Boost.GIL.Goals:
.clang-formatwith reasonable defaults for Boost.GIL as a basic formatting guideline and helper.clang-formatfirst, then adjust formatting in those (few) palces where necessary.clang-formatfrom its latest release.No goals:
Environment