[CXX-1007] Add additional directives to clang-format style file Created: 29/Aug/16 Updated: 23/Dec/16 Resolved: 23/Dec/16 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | Build |
| Affects Version/s: | None |
| Fix Version/s: | 3.2.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | J Rassi | Assignee: | David Golden |
| Resolution: | Done | Votes: | 0 |
| Labels: | clang-format | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
The repository's clang-format style file currently contains a minimal set of rules. Simply copy-pasting the style file from current master of mongodb/mongo (after removing the directives specific to clang format 3.8) and applying a bulk format will increase the repository's code consistency, with minimal effort. |
| Comments |
| Comment by Githook User [ 23/Dec/16 ] |
|
Author: {u'username': u'xdg', u'name': u'David Golden', u'email': u'xdg@xdg.me'}Message: This makes some additions/changes based on the MongoDB server's To have tighter code for empty subs:
To keep control code structure visually distinct:
To make long parameter/argument list easier to read:
To have pointer and reference symbols consistent everywhere:
|
| Comment by Githook User [ 23/Dec/16 ] |
|
Author: {u'username': u'xdg', u'name': u'David Golden', u'email': u'xdg@xdg.me'}Message: |
| Comment by J Rassi [ 31/Aug/16 ] |
|
I filed this ticket when I realized that no value of PointerAlignment is being set in the current style file. Lines in the repo vary in how they align * and & (e.g. "char *target" from b64_ntop.h, versus "char* str" from itoa.hpp), including lines in recent patches that I've been reviewing. |