gitlab.com/infor-cloud/martian-cloud/tharsis/go-limiter@v0.0.0-20230411193226-3247984d5abc/CONTRIBUTING.md (about)

     1  # Contributing to Martian Cloud projects.
     2  
     3  There are many ways you can contribute to Martian Cloud projects.  This document describes some of those ways.  It also describes a few things we request you do as part of making any code or documentation contributions.
     4  
     5  ## Prerequisites
     6  
     7  * **Go >= 1.20** ( [https://golang.org/dl/](https://golang.org/dl/) or [https://golang.org/doc/install](https://golang.org/doc/install) )
     8  
     9  ## Ways to Contribute
    10  
    11  - Report bugs.
    12  - Raise security issues.
    13  - Suggest features or enhancements.
    14  - Make and submit changes to fix bugs or add/enhance functionality.
    15  - Write documentation.
    16  - Answer questions other users ask or might have.
    17  - Write tests.
    18  
    19  ## Reporting Bugs
    20  
    21  - Search the existing GitLab issues to see if someone else already reported it.
    22  - Make sure you're using the latest version of the appropriate project(s) in case it might have already been fixed in a later version.
    23  - If no existing issue matches, file a new GitLab issue.
    24  - Please use [this GitLab-supplied template.](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/issue_templates/Bug.md)
    25  - Make sure the following items are clearly described in your bug report:
    26      - the versions of Martian Cloud projects you're using
    27      - steps to reproduce the problem
    28      - how actual results differ from expected results
    29  - If you can include a patch as a proposed fix, please do so.
    30  
    31  ## Security Issues
    32  
    33  If you have discovered something that appears to be a security issue, please report it to the email address listed in the README.md file.
    34  
    35  ## Suggesting Features or Enhancements
    36  
    37  Suggestions for features and enhancements are not required to include a code contribution.  To avoid wasting your time, if you plan to contribute code to implement the feature or enhancement you are suggesting, please file an issue before doing substantial work on the code contribution.  If you are submitting only a suggestion, please make your suggestion as complete and precise as reasonably possible.
    38  
    39  ## Making Changes (bug fixes or enhancements)
    40  
    41  If the project in question has existing unit and/or integration tests, before submitting a code contribution (whether it is a bug fix or an enhancement) make sure to run all available tests:
    42  
    43      make test
    44  
    45      make integration
    46  
    47  If the existing tests don't pass with your code contribution, your contribution cannot be accepted until that problem has been resolved.
    48  
    49  ### Formatting and Style
    50  
    51  Please respect the formatting of the project codebase:
    52  
    53  - tabs rather than spaces for indentation (we set our IDE to display two spaces for a tab)
    54  - standard Go formatting and error scanning:
    55  
    56      make fmt
    57  
    58      make vet
    59  
    60  - we generally try to follow the guidelines in this guide: [Uber's Go styling](https://github.com/uber-go/guide/blob/master/style.md)
    61  
    62  ## Writing Documentation
    63  
    64  If your talents lean more toward writing documentation than code, your contributions of documentation are welcome.  Please make sure your contribution of documentation is accurate.  Also, please try to make it consistent in style with the existing documentation.  There may be other guidelines for documentation style published elsewhere in the project.
    65  
    66  ## Submitting Changes
    67  
    68  - do your development in a feature or bug-fix branch based on "main"
    69  - please submit your contribution of code or documentation as a Git pull request
    70  - please respond as promptly as you can to feedback regarding your contribution (in order to save your time and ours)
    71  
    72  ## Answering Questions
    73  
    74  If your talents include answering questions asked by other users, we encourage you to do so in considerate and helpful ways.  In time, we may establish a discussion forum or other official place to discuss use of Martian Cloud projects.
    75  
    76  ## Testing
    77  
    78  If you are adding significant new features or functionality, please include unit tests in your contribution.  For larger contributions, you are welcome to include integration tests.
    79  
    80  When writing unit tests, please use mocks where appropriate.
    81  
    82  ## Contributor License Agreement (CLA)
    83  
    84  If we have published a Contributor License Agreement prior to the time you submit a contribution, make sure to sign and submit the agreement before or along with your contribution.
    85  
    86  ## Licensing of Your Contributions
    87  
    88  Your contributions will become licensed under the [Mozilla Public License v2.0](https://www.mozilla.org/en-US/MPL/2.0/)