Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-60571

Evaluate if kv_engine clang-format precommit hook should filter out JSON files.

    XMLWordPrintable

Details

    • Untriaged
    • 0
    • Unknown

    Description

      https://src.couchbase.org/source/xref/morpheus/tlm/clang-format-pre-commit-hook?r=ff14be99 currently formats JSON files too. But I notice with the default settings, it formats the entire JSON file vs limiting the formatting to only the lines that have changed in a commit, which is a bit annoying. For example on a commit with a single line change to stat_definitions.json, git clang-format reformats the entire file.

      clang-format supports formatting JSON files and maybe we should allow it to format those files, but it should be limited to only the lines that are being changed in the current commit. If that doesn't work out, we could probably ignore JSON files (either via .clang-format-ignore or some other way)

      Attachments

        For Gerrit Dashboard: MB-60571
        # Subject Branch Project Status CR V

        Activity

          People

            vesko.karaganev Vesko Karaganev
            hareen.kancharla Hareen Kancharla
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty