dockstation
dockstation copied to clipboard
docker-compose.yml should not be reformated
Including a docker-compose.yml as project, causes some reformating (e.g. indenting), which means a version control system recognizes this as change. This is not so ideal if a IDE reformats file before commiting based on a team wide configuration.
It would be helpful if this can be configureable within settings and disabled by default.
I'm not sure that it's easy way. Because during your some change action - We parse your YML config to an array -> adding your changes to the array -> convert array comeback to YML and write it to file. We got a default YML standards with 2 spaces. If you're using some other style I think that need to find some other way for after styling your config. If we disable the possibility to change YML config you will not able to make changes from the app.
Ok, i see. That might be a big change. Maybe you could make the number of spaces configureable.
Yep. We can add it into project settings. Do you use 4 spaces?
Normally we're also using 2 spaces, but it seems we looked over it in the coding styles for our IDE.
Not just spaces. It also removes blank line. In my docker-compose file I have all services separated by 1 line to make reading easier. After initializing a project in DockStation all blank lines got removed :)
Same issue for me docker-compose file is in git
Ok. We'll think how to do it more correct.
Any news on this? Looks like all strings are reformatted and encapsulated, comments are removed, syntax is then re-optimized, ...
Yes. We're testing this. We implemented AST processing.
Re: any news on this? I am still getting reformatting and removal of comments, which I was using to delineate groups of containers.