github.com/nginxinc/kubernetes-ingress@v1.12.5/CONTRIBUTING.md (about)

     1  # Contributing Guidelines
     2  
     3  The following is a set of guidelines for contributing to the NGINX Ingress Controller. We really appreciate that you are considering contributing!
     4  
     5  #### Table Of Contents
     6  
     7  [Ask a Question](#ask-a-question)
     8  
     9  [Getting Started](#getting-started)
    10  
    11  [Contributing](#contributing)
    12  
    13  [Style Guides](#style-guides)
    14    * [Git Style Guide](#git-style-guide)
    15    * [Go Style Guide](#go-style-guide)
    16  
    17  [Code of Conduct](https://github.com/nginxinc/kubernetes-ingress/blob/master/CODE_OF_CONDUCT.md)
    18  
    19  ## Ask a Question
    20  
    21  We will have a public forum soon where you can come and ask questions and have a discussion. For now please open an Issue on GitHub with the label `question`.
    22  
    23  
    24  ## Getting Started
    25  
    26  Follow our [Installation Guide](https://github.com/nginxinc/kubernetes-ingress/blob/master/docs/installation.md) to get the NGINX Ingress Controller up and running.
    27  
    28  Read the [documentation](https://github.com/nginxinc/kubernetes-ingress/tree/master/docs) and [configuration](https://github.com/nginxinc/kubernetes-ingress/tree/master/examples) examples
    29  
    30  ### Project Structure
    31  
    32  * This Ingress Controller is written in Go and supports both the open source NGINX software and NGINX Plus.
    33  * The project follows a standard Go project layout
    34      * The main code is found at `cmd/nginx-ingress/`
    35      * The internal code is found at `internal/`
    36      * Build files for Docker and CI are found under `build/`
    37      * Deployment yaml files, and Helm files are found at `deployments/`
    38      * The project dependencies are found at `vendor/`. We use [Go Modules](https://github.com/golang/go/wiki/Modules) for managing dependencies.
    39  
    40  ## Contributing
    41  
    42  ### Report a Bug
    43  
    44  To report a bug, open an issue on GitHub with the label `bug` using the available bug report issue template. Please ensure the issue has not already been reported.
    45  
    46  ### Suggest an Enhancement
    47  
    48  To suggest an enhancement, please create an issue on GitHub with the label `enhancement` using the available feature issue template.
    49  
    50  ### Open a Pull Request
    51  
    52  * Fork the repo, create a branch, submit a PR when your changes are tested and ready for review
    53  * Fill in [our pull request template](https://github.com/nginxinc/kubernetes-ingress/blob/master/.github/PULL_REQUEST_TEMPLATE.md)
    54  
    55  Note: if you’d like to implement a new feature, please consider creating a feature request issue first to start a discussion about the feature.
    56  
    57  ## Style Guides
    58  
    59  ### Git Style Guide
    60  
    61  * Keep a clean, concise and meaningful git commit history on your branch, rebasing locally and squashing before submitting a PR
    62  * Follow the guidelines of writing a good commit message as described here https://chris.beams.io/posts/git-commit/ and summarised in the next few points
    63      * In the subject line, use the present tense ("Add feature" not "Added feature")
    64      * In the subject line, use the imperative mood ("Move cursor to..." not "Moves cursor to...")
    65      * Limit the subject line to 72 characters or less
    66      * Reference issues and pull requests liberally after the subject line
    67      * Add more detailed description in the body of the git message (`git commit -a` to give you more space and time in your text editor to write a good message instead of `git commit -am`)
    68  
    69  ### Go Style Guide
    70  
    71  * Run `gofmt` over your code to automatically resolve a lot of style issues. Most editors support this running automatically when saving a code file.
    72  * Run `go lint` and `go vet` on your code too to catch any other issues.
    73  * Follow this guide on some good practice and idioms for Go -  https://github.com/golang/go/wiki/CodeReviewComments
    74  * To check for extra issues, install [golangci-lint](https://github.com/golangci/golangci-lint) and run `make lint` or `golangci-lint run`