Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-29746

Clang-format weirdly formats js function call with large object first argument

    • Server Development Platform

      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});
      

            Assignee:
            backlog-server-devplatform [DO NOT ASSIGN] Backlog - Server Development Platform Team (SDP) (Inactive)
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: