Open tsenart opened 9 years ago
What are the ones that k8s upstream uses? it seems they have a number of rules, compare the review comments of the docker-compose branch.
We could look at what they're doing, but I'd like us to apply this style guide to every shell script we write, not just the ones related to Kubernetes. I'm not sure where such meta-issues would fit.
Yes, but in the k8s repo we are bound to their style. Which other shell scripts do we have (other than some small Makefile snippets)?
We got the DCOS image scripts, or did we completely get rid of those? On Fri 7 Aug 2015 at 17:11 Dr. Stefan Schimanski notifications@github.com wrote:
Yes, but in the k8s repo we are bound to their style. Which other shell scripts do we have (other than some small Makefile snippets)?
— Reply to this email directly or view it on GitHub https://github.com/mesosphere/kubernetes-mesos/issues/429#issuecomment-128726526 .
No, not completely, but reduced a lot. Maybe we should spend more time in porting those to Go than to make them nice and tidy.
+1 for Go.
bahamas10's style guide conflicts not only with the k8s conventions but with google's guide and my own sense of style.
Personally, I think if it's not automated then it's a waste of time enforcing it strictly. That said, it's worth being consistent. It should be required to be consistent within a file and encouraged to be consistent with existing files. Style can always be improved later. So it shouldn't hold up a review too long, unless it's unreadable or inconsistent.
@karlkfi: I suggested the style guides for inspiration only. We should pick the things that make sense to us and write up our own style guide. Enforcement can be done at review time and will be less time consuming once everyone is used to it. In another issue, I also suggested we use http://shellcheck.net/about.html
In order to have consistent, predictable and correct shell scripts, we should all follow the same guidelines. At the moment we have none, so let's take inspiration in the following guidelines and agree on something that makes sense to us.
https://google-styleguide.googlecode.com/svn/trunk/shell.xml https://github.com/bahamas10/bash-style-guide
/cc @jdef @karlkfi @sttts