zowe / zowe-cli

Zowe CLI
Eclipse Public License 2.0
108 stars 85 forks source link

Writing to config results in reformatting #1242

Open MikeBauerCA opened 2 years ago

MikeBauerCA commented 2 years ago

This applies to Zowe CLI and Zowe Explorer. When the technology itself writes to the config, it reformats the config file. This is a bit annoying for users in the case that they prefer their own formatting style. At a minimum, it is unexpected. Our formatting results in many new lines and some may prefer a more dense format.

Possible format:

"profiles": {
                "lpar1": {"type": "zosmf","properties": {"host": "myhost.com"}}
            },

Our reformatting results in:

"profiles": {
                "lpar1": {
                    "type": "zosmf",
                    "properties": {
                        "host": "myhost.com"
                    }
                }
            }

If there were many lpars as was a recent case with a customer, you can see how the original format may be easier to maintain.

Can we write to the file without modifying the format?

zFernand0 commented 2 years ago

It might be possible 😋 Are we reformatting in order to preserve comments (e.g. if the user switched defaults by un-/commenting profiles) ? 🤔

github-actions[bot] commented 1 year ago

Thank you for raising this issue. The community has 90 days to upvote 👍 the issue. If it receives 5 upvotes, we will move it to our backlog. If not, we will close it.

github-actions[bot] commented 1 year ago

Thank you for raising this enhancement request. The community has 90 days to vote on it. If the enhancement receives at least 5 upvotes, it is added to our development backlog. If it receives fewer votes, the issue is closed.