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

clang-format configuration uses AlignAfterOpenBracket true instead of false

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Fix
    • Affects Version/s: 3.1.4
    • Fix Version/s: None
    • Component/s: Build
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Platforms 15 (06/03/16)

      Description

      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

        Attachments

          Activity

            People

            • Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: