Format all files with prettier
VSCode plugin and add yamllint
in CI
#413
Reference in New Issue
Block a user
No description provided.
Delete Branch "refs/pull/413/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@justusbunsi to end my formatting mess... ;)
I am not fully sure myself about the linebreaks in
values.yaml
but I don't think there's an easy way to change that behavior.@pat-s can we add a lint step to CI to ensure it stay like this?
Good idea! https://github.com/cytopia/docker-yamllint looks promising to me. Let's see if I can get it configured quickly.
@6543 Not sure if it covers all cases but I don't have resources now to check for each edge case :)
I'd argue: "better than before" ?
LGTM
@ -13,3 +2,1 @@
version: 19.6.4
digest: sha256:462d513ac8ef7abfe26030fd2ea93eb79df167a861ebe09d6c58c7dcd5601e85
generated: "2024-11-30T00:41:29.178889496Z"
- name: memcached
If possible, we should probably disable formatting autogenerated files like Chart.lock. A
helm dependency update
with actually updated dependency version will remove the indentation again.@ -13,3 +2,1 @@
version: 19.6.4
digest: sha256:462d513ac8ef7abfe26030fd2ea93eb79df167a861ebe09d6c58c7dcd5601e85
generated: "2024-11-30T00:41:29.178889496Z"
- name: memcached
I think it's fine: the formatting is only targeting the indentation (which is off imo and according to the formatter).
The indentation is not changed when running
helm dependency update
.So I think once we get the PR in, there shouldn't be any conflicts in this regard.
@justusbunsi I'm gonna merge this so I don't have to rebase another dozen times :) If something is troubling us afterwards, we can still account/adapt.
Alright. 👍
Regarding the
helm dependency update
: it won't change indentation when nothing has changed in chart.yaml. If this file has a change on the dependency version, the update command will rewrite the lock file and resets the manually changed indentation. I've tested those two cases prior to mentioning it. But thinking about it: since changing the dep version requires rewriting the lock file anyway, it's nothing to be concerned about.Ah thanks, you're right, that's unfortunate (just tried it).
See #424 for a possible solution.