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

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.3.8
    • Affects Version/s: 3.1.5
    • Component/s: Build
    • Labels:
    • Fully Compatible
    • ALL
    • Platforms 15 (06/03/16)

      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
      }
      

            Assignee:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Reporter:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: