github.com/u-root/u-root@v7.0.1-0.20200915234505-ad7babab0a8e+incompatible/CONTRIBUTING.md (about)

     1  # Contributing to u-root
     2  
     3  We need help with this project. Contributions are very welcome. See the [roadmap](roadmap.md), open [issues](https://github.com/u-root/u-root/issues), and join us in [Slack](CONTRIBUTING.md#communication) to talk about your cool ideas for the project.
     4  
     5  ## Developer Sign-Off
     6  
     7  For purposes of tracking code-origination, we follow a simple sign-off
     8  process.  If you can attest to the [Developer Certificate of
     9  Origin](https://developercertificate.org/) then you append in each git
    10  commit text a line such as:
    11  ```
    12  Signed-off-by: Your Name <username@youremail.com>
    13  ```
    14  ## Code of Conduct
    15  
    16  Conduct collaboration around u-root in accordance to the [Code of
    17  Conduct](https://github.com/u-root/u-root/wiki/Code-of-Conduct).
    18  
    19  ## Communication
    20  
    21  - [Open Source Firmware Slack team](https://osfw.slack.com),
    22    channel `#u-root`, sign up [here](https://slack.osfw.dev/)
    23  - [Join the mailing list](https://groups.google.com/forum/#!forum/u-root)
    24  
    25  ## Bugs
    26  
    27  - Please submit issues to https://github.com/u-root/u-root/issues
    28  
    29  ## Coding Style
    30  
    31  The ``u-root`` project aims to follow the standard formatting recommendations
    32  and language idioms set out in the [Effective Go](https://golang.org/doc/effective_go.html)
    33  guide, for example [formatting](https://golang.org/doc/effective_go.html#formatting)
    34  and [names](https://golang.org/doc/effective_go.html#names).
    35  
    36  `gofmt` and `golint` are law, although this is not automatically enforced
    37  yet and some housecleaning needs done to achieve that.
    38  
    39  We have a few rules not covered by these tools:
    40  
    41  - Standard imports are separated from other imports. Example:
    42      ```
    43      import (
    44        "regexp"
    45        "time"
    46  
    47        dhcp "github.com/krolaw/dhcp4"
    48      )
    49      ```
    50  
    51  ## Patch Format
    52  
    53  Well formatted patches aide code review pre-merge and code archaeology in
    54  the future.  The abstract form should be:
    55  ```
    56  <component>: Change summary
    57  
    58  More detailed explanation of your changes: Why and how.
    59  Wrap it to 72 characters.
    60  See [here] (http://chris.beams.io/posts/git-commit/)
    61  for some more good advices.
    62  
    63  Signed-off-by: <contributor@foo.com>
    64  ```
    65  
    66  An example from this repo:
    67  ```
    68  tcz: quiet it down
    69  
    70  It had a spurious print that was both annoying and making
    71  boot just a tad slower.
    72  
    73  Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
    74  ```
    75  
    76  ## General Guidelines
    77  
    78  We want to implement some of the common commands that exist in upstream projects and elsewhere, but we don't need to copy broken behavior. CLI compatibility with existing implementations isn't required. We can add missing functionality and remove broken behavior from commands as needed.
    79  
    80  U-root needs to fit onto small flash storage, (eg. 8 or 16MB SPI). Be cognizant of of how your work is increasing u-root's footprint. The current goal is to keep the BB mode `lzma -9` compressed initramfs image under 3MB.
    81  
    82  ## Pull Requests
    83  
    84  We accept GitHub pull requests.
    85  
    86  Fork the project on GitHub, work in your fork and in branches, push
    87  these to your GitHub fork, and when ready, do a GitHub pull requests
    88  against https://github.com/u-root/u-root.
    89  
    90  `u-root` uses [dep](https://github.com/golang/dep)
    91  for its dependency management. Please run `dep ensure`, `dep prune`, and commit Gopkg.toml, Gopkg.lock and vendor/ changes before opening a pull request.
    92  
    93  Every commit in your pull request needs to be able to build and pass the CI tests.
    94  
    95  If the pull request closes an issue please note it as: `"Fixes #NNN"`.
    96  
    97  ## Code Reviews
    98  
    99  Look at the area of code you're modifying, its history, and consider
   100  tagging some of the [maintainers](https://u-root.tk/#contributors) when doing a
   101  pull request in order to instigate some code review.
   102  
   103  ## Quality Controls
   104  
   105  [CircleCI](https://circleci.com/gh/u-root/u-root) is used to test and build commits in a pull request.
   106  
   107  See [.circleci/config.yml](.circleci/config.yml) for the CI commands run.
   108  You can use [CircleCI's CLI tool](https://circleci.com/docs/2.0/local-cli/#run-a-job-in-a-container-on-your-machine) to run individual jobs from `.circlecl/config.yml` via Docker, eg. `circleci build --job test`.