summaryrefslogtreecommitdiffstats
path: root/CONTRIBUTING.md
diff options
context:
space:
mode:
authorKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2017-02-13 03:35:57 +0100
committerLunny Xiao <xiaolunwen@gmail.com>2017-02-13 10:35:57 +0800
commit091f0637060f62b5a94e9594b062f56919c2192c (patch)
tree4d61df9f74fbef419f785deb0fb806c11ad3b94f /CONTRIBUTING.md
parent05157808deddef8ff6f7cf959cd213ccb694b6fe (diff)
downloadgitea-091f0637060f62b5a94e9594b062f56919c2192c.tar.gz
gitea-091f0637060f62b5a94e9594b062f56919c2192c.zip
Add import-styleguide to Contributing.md (#912)
* Add import-styleguide to Contributing.md Question: should we group all `code.gitea.io`-packages together as local imports? (including `code.gitea.io/sdk` and `code.gitea.io/git` etc) * reorg * be specific FFS
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r--CONTRIBUTING.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index bc12ca3dae..f98facb2c8 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -44,6 +44,25 @@ Please try to make your pull request easy to review for us. Please read the "[Ho
* Don't make changes unrelated to your PR. Maybe there are typos on some comments, maybe refactoring would be welcome on a function... but if that is not related to your PR, please make *another* PR for that.
* Split big pull requests into multiple small ones. An incremental change will be faster to review than a huge PR.
+## Styleguide
+
+For imports you should use the following format (_without_ the comments)
+```go
+import (
+ // stdlib
+ "encoding/json"
+ "fmt"
+
+ // local packages
+ "code.gitea.io/gitea/models"
+ "code.gitea.io/sdk/gitea"
+
+ // external packages
+ "github.com/foo/bar"
+ "gopkg.io/baz.v1"
+)
+```
+
## Sign your work
The sign-off is a simple line at the end of the explanation for the patch. Your signature certifies that you wrote the patch or otherwise have the right to pass it on as an open-source patch. The rules are pretty simple: If you can certify [DCO](DCO), then you just add a line to every git commit message: