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

clang-format should allow discretion in blank lines at the start of blocks

    XMLWordPrintable

    Details

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

      Description

      The current Clang-Format does not allow users to choose how they many blank lines after a new block to leave. It strips all blank lines.

      This is controlled by KeepEmptyLinesAtTheStartOfBlocks.

      Users would like to be able to write something like this

      void foo() {
       
          // do nothing
      }
      

      or

      if (true) {
       
          // do nothing
      }
      

      Today, both look like this

      if (true) {
          // do nothing
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mark.benvenuto Mark Benvenuto
                Reporter:
                mark.benvenuto Mark Benvenuto
                Participants:
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: