Skip to content

Latest commit

 

History

History
70 lines (48 loc) · 2.28 KB

CONTRIBUTING.md

File metadata and controls

70 lines (48 loc) · 2.28 KB

Legal

By submitting a pull request, you represent that you have the right to license your contribution to Apple and the community, and agree by submitting the patch that your contributions are licensed under the Apache 2.0 license (see LICENSE.txt).

How to submit a bug report

Please ensure to specify the following:

  • all relevant commit hashes
  • Contextual information (e.g. what you were trying to achieve and which example you tried to use)
  • Simplest possible steps to reproduce
    • More complex the steps are, lower the priority will be.
    • A pull request with failing test case is preferred, but it's just fine to paste the test case into the issue description.
  • Anything that might be relevant in your opinion, such as:
    • Swift version or the output of swift --version
    • OS version and the output of uname -a
    • Network configuration

Example

- swift-nio commit hash: 22ec043dc9d24bb011b47ece4f9ee97ee5be2757
- swift-nio-examples commit hash: 49d0fd7c1036993dfd538a34cf042d4d24a9792d

Context:
When running NIOSMTP with an illegal email address, the app crashes.

Steps to reproduce:
1. ...
2. ...
3. ...
4. ...

$ swift --version
Swift version 4.2.0 (swift-4.2.0-RELEASE)
Target: x86_64-unknown-linux-gnu

Operating system: Ubuntu Linux 18.04 64-bit

$ uname -a
Linux beefy.machine 4.4.0-101-generic #124-Ubuntu SMP Fri Sep 10 18:29:59 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

My system has IPv6 disabled.

Writing a Patch

A good patch is:

  1. Concise, and contains as few changes as needed to achieve the end result.
  2. Tested, ensuring that any tests provided failed before the patch and pass after it.
  3. Documented, adding API documentation as needed to cover new functions and properties.
  4. Accompanied by a great commit message, using our commit message template.

Commit Message Template

We require that your commit messages match our template. The easiest way to do that is to get git to help you by explicitly using the template. To do that, cd to the root of our repository and run:

git config commit.template dev/git.commit.template

How to contribute your work

Please open a pull request at https://github.com/apple/swift-nio-examples and wait for the code review. If you don't receive any within a few days, please kindly remind the core SwiftNIO team.