From f1e02c7e3cb306b6d0bdd2bd427d47e5dacd1a9d Mon Sep 17 00:00:00 2001 From: Julien Vehent Date: Sun, 23 Aug 2015 12:12:55 -0400 Subject: [PATCH 1/2] [doc] contributing guidelines --- AUTHORS | 10 ++++++-- CONTRIBUTING.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/AUTHORS b/AUTHORS index 2d09f182..43699adf 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,5 +1,11 @@ -Author: +Authors: Julien Vehent +Aaron Meihm Contributors: -Guillaume Destuynder +Dustin J. Mitchell +Guillaume Destuynder +Anthony Verez +David Hill +Novemburr +Sushant Dinesh diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..50141183 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,61 @@ +# Welcome to the Mozilla InvestiGator project! + +MIG is an open source Mozilla project. We welcome all contributions and will +help you get started and submit your first patch. The best place to get your +questions answered is in the `#mig` channel on +[irc.mozilla.org](https://wiki.mozilla.org/IRC). + +If you're new to Mozilla, you may find the [Contributing to the Mozilla +codebase](https://developer.mozilla.org/en-US/docs/Introduction) page on MDN +full of interesting information. + +## Coding guidelines + +* Commits must be prefixed with one of the following tag: + - `[doc]` for commits that update documentation + - `[minor]`, `[medium]`, `[major]` for regular commits, pick the level that + represents the importance of your commit the best. + - `[(level)/bug]` for commits that fix a bug + +* If your commit is linked to a bug number of an issue, please add a reference + to it in the commit message. + ex: `[minor] fix bad counter on agent stats, bug 987123` + +* Pull requests must represent the final state of your commit. If you spent two + weeks working on code, please only submit the commits that represent the + latest version of your code at the moment of the submission. While keeping a + history of your personal progress may be interesting to you, it makes reviews + longer and more difficult. `git rebase` is your friend here. + +* Inform your reviewer that you have corrected something in a subsequent commit, + to help the reviewer follow up. For example: + - reviewer: `please check len(string) prior to calling string[10:15]` + - committer: `fixed in 452ced1c` + +* All Go code must be formatted using `gofmt`. + +* External dependencies must be vendored, the source of the repository must be + added into the Makefile under `go_vendor_dependencies`. Your patch must + include the vendored packages in a separate commit. + +* When writing modules, follow the documentation at [Modules + writing](http://mig.mozilla.org/doc/modules.rst.html) and check that: + - tests have been added that cover the core functionalities of the module + - documentation has been written into modules//doc.rst + Please don't pick a cute or clever name for your module. Pick a name that is + as explicit as possible. For example, a module that inspects files on the file + system would be called `file`. A module that lists packages is called `pkg`. + +* Do not set [GOMAXPROCS](http://golang.org/pkg/runtime/#GOMAXPROCS) ever. It is + already set to an appropriate value elsewhere. + +* While we do not enforce line size or function length, please be mindful of the + readability of your code. A single function that is longer than 100 lines, or + larger than 120 columns should probably be rewritten into smaller and cleaner + functions. + +## Licensing + +All contributions to MIG must be placed under the Mozilla Public License Version +2.0. We don't ask you to sign anything, but we expect everyone to follow these +guidelines: [Commit Access Requirements](https://www.mozilla.org/en-US/about/governance/policies/commit/requirements/) From 40b95287093d28a9797c32e0e2e71ee9eb090ffc Mon Sep 17 00:00:00 2001 From: Julien Vehent Date: Sun, 23 Aug 2015 13:34:05 -0400 Subject: [PATCH 2/2] [doc] update GOMAXPROCS comment in contributing doc --- CONTRIBUTING.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 50141183..45a479df 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -46,8 +46,9 @@ full of interesting information. as explicit as possible. For example, a module that inspects files on the file system would be called `file`. A module that lists packages is called `pkg`. -* Do not set [GOMAXPROCS](http://golang.org/pkg/runtime/#GOMAXPROCS) ever. It is - already set to an appropriate value elsewhere. +* In modules, you can set GOMAXPROCS to 1, or you can leave it unset and it will + be defined somewhere else. Never set GOMAXPROCS to something greater than 1, + we care about the impact the agent has on the cpu usage of its host. * While we do not enforce line size or function length, please be mindful of the readability of your code. A single function that is longer than 100 lines, or