Add dist script support for CMake formatting

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • StorEng - Defined Pipeline
    • 8

      Context

      No different to how we enforce styling over our C sources, we should additionally be ensuring our CMake sources meet an expected format. As we continue modifying and updating our CMake list files we should enforce a format over the build sources such that they adhere to a specific style. This ultimately ensuring our CMake sources stay maintainable & readable.

      This ticket will introduce a new dist script (that can be run under dist/s_all), to parse our CMake list files and format them nicely. This in turn ensures future changes to our CMake files will be appropriately styled and checked on PR's.

      Definition of Done:

      • Determine a tool we can use to format CMake sources.
        • There are a couple of open-source tools we can use. A popular/suggested one is: cmake-format (Unfortunately there is nothing official from KitWare yet).
      • Define a style configuration. Depending on the chosen tool, it will be typically be a configuration file encoding our CMake style preferences
        • Important to collaborate on these definitions (could be with those listed in the "Collaborators" section of this ticket.
      • Implement a 'dist' script that invokes the CMake format tool. This script in turn will be invoked by the 'dist/s_all' script (to ensure its run on future PR's and changes)
      • Perform an initial format of the CMake sources such that it meets our newly defined styling configuration.

            Assignee:
            [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            Alison Felizzi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: