Skip to content

Latest commit

 

History

History
108 lines (73 loc) · 3.94 KB

CONTRIBUTING.md

File metadata and controls

108 lines (73 loc) · 3.94 KB

Contributing to u-root

We need help with this project. Contributions are very welcome. See the roadmap, open issues, and join us in Slack to talk about your cool ideas for the project.

Developer Sign-Off

For purposes of tracking code-origination, we follow a simple sign-off process. If you can attest to the Developer Certificate of Origin then you append in each git commit text a line such as:

Signed-off-by: Your Name <username@youremail.com>

Code of Conduct

Conduct collaboration around u-root in accordance to the Code of Conduct.

Communication

Bugs

Coding Style

The u-root project aims to follow the standard formatting recommendations and language idioms set out in the Effective Go guide, for example formatting and names.

gofmt and golint are law, although this is not automatically enforced yet and some housecleaning needs done to achieve that.

We have a few rules not covered by these tools:

  • Standard imports are separated from other imports. Example:
    import (
      "regexp"
      "time"
    
      dhcp "github.com/krolaw/dhcp4"
    )
    

Patch Format

Well formatted patches aide code review pre-merge and code archaeology in the future. The abstract form should be:

<component>: Change summary

More detailed explanation of your changes: Why and how.
Wrap it to 72 characters.
See [here] (http://chris.beams.io/posts/git-commit/)
for some more good advices.

Signed-off-by: <contributor@foo.com>

An example from this repo:

tcz: quiet it down

It had a spurious print that was both annoying and making
boot just a tad slower.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>

General Guidelines

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.

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.

Pull Requests

We accept GitHub pull requests.

Fork the project on GitHub, work in your fork and in branches, push these to your GitHub fork, and when ready, do a GitHub pull requests against https://github.com/u-root/u-root.

u-root uses dep for its dependency management. Please run dep ensure, dep prune, and commit Gopkg.toml, Gopkg.lock and vendor/ changes before opening a pull request.

Every commit in your pull request needs to be able to build and pass the CI tests.

If the pull request closes an issue please note it as: "Fixes #NNN".

Code Reviews

Look at the area of code you're modifying, its history, and consider tagging some of the maintainers when doing a pull request in order to instigate some code review.

Quality Controls

CircleCI is used to test and build commits in a pull request.

See .circleci/config.yml for the CI commands run. You can use CircleCI's CLI tool to run individual jobs from .circlecl/config.yml via Docker, eg. circleci build --job test.