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

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

    XMLWordPrintable

    Details

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

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: