[PATCH] Introduce Go coding standards for LLVM.

Chandler Carruth chandlerc at gmail.com
Mon Oct 13 17:20:31 PDT 2014


================
Comment at: docs/CodingStandards.rst:182-184
@@ +181,5 @@
+
+Any code written in the Go programming language is not subject to the
+formatting rules below. Instead, we adopt the formatting rules enforced by
+the `gofmt`_ tool.
+
----------------
ruiu wrote:
> chandlerc wrote:
> > rnk wrote:
> > > We should probably just say that none of these conventions apply to non-C-family languages. Our Python bindings and lit are basically PEP8 style, for example.
> > I'm fine with clarifying that in a further patch if you want, but I also think its totally fine for us to actually state that Go code, if it exists in LLVM, should follow the gofmt and idiomatic patterns documented by the Go folks.
> But if we don't say anything about the coding standard, it would be continually raised what new code should look like. Because we are going to check in considerable amount of Go code as a Go frontend written in Go, I'd like to have a clear rule here.
I mean, I agree that we should say something and something specific for Go. We can *also* say that any languages not covered explicitly here should <something_i_haven't_thought_about>, but it seems fine to add explicit guidance for Go now.

http://reviews.llvm.org/D5761






More information about the llvm-commits mailing list