We have a json configuration file.
We are using "jq --indent 4 '.packages |= sort_by(.name)' project-manifest.json" so that the entries are maintined sorted by name and other formatting is normalized.
Hence if I add a new entry, I'd like to see this cleanly appear in the diff as its own section cleanly delineated by its own opening and closing braces such as:
{
"name": "NewName",
"version": "versionreference"
}
instead the alignment (I've tried various settings) seems to always misalign the opening and closing braces with the adjacent entries so the block actually looks like:
"name": "NewName",
"version": "versionreference"
}
{
The file itself is not that big, currently at 221 lines.
I would think that there should be some alignment algorithm that would be able to do this.
Are there any settings that would help achieve this goal?
We are using "jq --indent 4 '.packages |= sort_by(.name)' project-manifest.json" so that the entries are maintined sorted by name and other formatting is normalized.
Hence if I add a new entry, I'd like to see this cleanly appear in the diff as its own section cleanly delineated by its own opening and closing braces such as:
{
"name": "NewName",
"version": "versionreference"
}
instead the alignment (I've tried various settings) seems to always misalign the opening and closing braces with the adjacent entries so the block actually looks like:
"name": "NewName",
"version": "versionreference"
}
{
The file itself is not that big, currently at 221 lines.
I would think that there should be some alignment algorithm that would be able to do this.
Are there any settings that would help achieve this goal?
Comment