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

clang-format configuration uses AlignAfterOpenBracket true instead of false

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.1.4
    • Component/s: Build
    • Fully Compatible
    • ALL
    • Platforms 15 (06/03/16)

      This violates our style guide. Here is example output from clang-format asking me to replace my 8 space continuation indent with a 4 space one:

      mongo % python buildscripts/clang_format.py lint
      Running across 24 cpus
      ERROR: Found diff for /home/dannenberg/work/server6071/mongo/src/mongo/db/dbcommands.cpp
      To fix formatting errors, run /usr/bin/clang-format --style=file -i /home/dannenberg/work/server6071/mongo/src/mongo/db/dbcommands.cpp
      ---
      +++
      @@ -1309,7 +1309,7 @@
      
           const auto& metadata = request.getMetadata();
           if (replCoord->getReplicationMode() == repl::ReplicationCoordinator::Mode::modeReplSet &&
      -            metadata.hasField(rpc::kReplicationMetadataFieldName)) {
      +        metadata.hasField(rpc::kReplicationMetadataFieldName)) {
               BSONObjBuilder replInfoBob(metadataBob.subobjStart(rpc::kReplicationMetadataFieldName));
               replCoord->prepareReplResponseMetadata(&replInfoBob);
           }
      ERROR: Code Style does not match coding style

            Assignee:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Reporter:
            matt.dannenberg Matt Dannenberg
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: