Details
-
Bug
-
Resolution: Unresolved
-
Minor
-
master
-
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
Gerrit Reviews
For Gerrit Dashboard: MB-60571 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
208248,3 | MB-60571: Make clang-format ignore JSON files | master | tlm | Status: MERGED | +2 | +1 |
208355,2 | Revert "MB-60571: Make clang-format ignore JSON files" | master | tlm | Status: MERGED | +2 | +1 |
208581,2 | MB-60571: Make clang-format ignore JSON files | master | tlm | Status: MERGED | +2 | +1 |