Relevant issue: https://github.com/llvm/llvm-project/issues/52705
When the DisableFormat option of clang-format is set to true and a JSON file is formatted, the ephemeral variable binding that is added to the top-level object is not removed from the formatted file. For example, this JSON:
{ "key": "value" }
Is reformatted to:
x = { "key": "value" }
Which is not valid JSON syntax. This fix avoids the addition of this binding when DisableFormat is set to true, ensuring that it cannot be left behind when formatting is disabled.