[SERVER-19159] Clang-format should put a newline after public: or private: statements in class definitions Created: 26/Jun/15  Updated: 15/Oct/19  Resolved: 15/Oct/19

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Won't Fix Votes: 0
Labels: clang-format
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-19142 clang-format should allow discretion ... Closed
Participants:

 Description   

ERROR: Found diff for /home/spencer/mongo3/src/mongo/s/catalog/replset/catalog_manager_replica_set.h
To fix formatting errors, run /usr/bin/clang-format-3.6 --style=file -i /home/spencer/mongo3/src/mongo/s/catalog/replset/catalog_manager_replica_set.h

+++
@@ -45,7 +45,6 @@
*/
class CatalogManagerReplicaSet final : public CatalogManager {
public:
-
CatalogManagerReplicaSet();
virtual ~CatalogManagerReplicaSet();

ERROR: Code Style does not match coding style



 Comments   
Comment by Mark Benvenuto [ 03/May/16 ]

Since this cannot be done with clang-format 3.8.0, moving it to planned but not scheduled.

Comment by Mark Benvenuto [ 19/Apr/16 ]

There is no way to configure the behavior. It would be an easy change to add which is why I highlighted the code, but we would first need to get upstream to accept such a change.

Comment by Spencer Brody (Inactive) [ 19/Apr/16 ]

That's annoying. There's no way to configure that behavior?

Comment by Mark Benvenuto [ 23/Mar/16 ]

This is currently by design in clang-format - see https://github.com/llvm-mirror/clang/blob/5aee9d8635cd4eb119d64e2263a02bb4cfe05a33/lib/Format/UnwrappedLineFormatter.cpp#L939-L942

Generated at Thu Feb 08 03:50:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.