[SERVER-19670] Clang-format makes a mess of src/mongo/db/auth/role_graph_builtin_roles.cpp Created: 30/Jul/15 Updated: 16/May/16 Resolved: 05/May/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Build, Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 3.3.6 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Mathias Stearn | Assignee: | Mark Benvenuto |
| Resolution: | Done | Votes: | 0 |
| Labels: | clang-format | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Sprint: | Platforms 14 (05/13/16) |
| Participants: |
| Description |
|
Compare New: https://github.com/mongodb/mongo/blob/master/src/mongo/db/auth/role_graph_builtin_roles.cpp#L151-L158 Based on all of the problems it has with << maybe it should just completely avoid breaking or joining lines containing <<. |
| Comments |
| Comment by Githook User [ 05/May/16 ] |
|
Author: {u'username': u'markbenvenuto', u'name': u'Mark Benvenuto', u'email': u'mark.benvenuto@mongodb.com'}Message: |
| Comment by Mathias Stearn [ 03/May/16 ] |
|
At some point we should consider making those use c++11 initializer lists rather than using << to fake it. |
| Comment by Spencer Jackson [ 03/May/16 ] |
|
mark.benvenuto Yeah, I think that's reasonable. Without teaching clang-format about our types, I can't think of how it would know that some, but not all, left shift operators need special formatting. |
| Comment by Mark Benvenuto [ 03/May/16 ] |
|
Even with clang-format 3.8.0, the formatting for these << lines does not improve. The best option for this file is to disable clang-format for these lines. spencer.jackson Do you think we should disable clang-format for these authorization roles? |