[SERVER-29746] Clang-format weirdly formats js function call with large object first argument Created: 20/Jun/17  Updated: 27/Oct/23  Resolved: 27/Oct/23

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

Type: Improvement Priority: Major - P3
Reporter: Mathias Stearn Assignee: [DO NOT ASSIGN] Backlog - Server Development Platform Team (SDP) (Inactive)
Resolution: Won't Do Votes: 0
Labels: clang-format, platforms-re-triaged
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Server Development Platform
Participants:

 Description   

Example:

var res = db.runCommandWithMetadata({
    insert: "foo",
    documents: [{_id: 1, state: 0}],
    writeConcern: {w: "majority", wtimeout: 60 * 1000}
},
                                    {"$replData": 1});

Using the empty-comment hack makes it reasonable:

var res = db.runCommandWithMetadata(  //
    {
      insert: "foo",
      documents: [{_id: 1, state: 0}],
      writeConcern: {w: "majority", wtimeout: 60 * 1000}
    },
    {"$replData": 1});



 Comments   
Comment by Steve Gross [ 28/Aug/23 ]

Note: We should see if this behavior is still occurring, given recent updates to linters.

Generated at Thu Feb 08 04:21:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.