Introduce Go coding standards for LLVM.
authorPeter Collingbourne <peter@pcc.me.uk>
Tue, 14 Oct 2014 00:40:53 +0000 (00:40 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Tue, 14 Oct 2014 00:40:53 +0000 (00:40 +0000)
Rather than define our own standards, we adopt a set of best practices that
are already in use by the Go community.

Differential Revision: http://reviews.llvm.org/D5761

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219646 91177308-0d34-0410-b5e6-96231b3b80d8

docs/CodingStandards.rst

index 7aa28f346c5292928408df7cd9ef203eb0a8954a..0552c7117e2a89ef4c3104e7525f7268006de292 100644 (file)
@@ -176,6 +176,25 @@ traits header to emulate it.
 .. _the libstdc++ manual:
   http://gcc.gnu.org/onlinedocs/gcc-4.7.3/libstdc++/manual/manual/status.html#status.iso.2011
 
+Other Languages
+---------------
+
+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.
+
+Go code should strive to be idiomatic. Two good sets of guidelines for what
+this means are `Effective Go`_ and `Go Code Review Comments`_.
+
+.. _gofmt:
+  https://golang.org/cmd/gofmt/
+
+.. _Effective Go:
+  https://golang.org/doc/effective_go.html
+
+.. _Go Code Review Comments:
+  https://code.google.com/p/go-wiki/wiki/CodeReviewComments
+
 Mechanical Source Issues
 ========================