Skip to content

Latest commit

 

History

History
84 lines (56 loc) · 4.6 KB

CONTRIBUTING.md

File metadata and controls

84 lines (56 loc) · 4.6 KB

Contributing in general

Our project welcomes external contributions. A good way to familiarize yourself with the codebase and the contribution process is to look for and address issues in the issue tracker.

To contribute code or documentation, please submit a pull request; and please quickly get in touch with us before embarking on a more ambitious contribution.

Note: We appreciate your effort, and want to avoid a situation where a contribution requires extensive rework (by you or by us), sits in backlog for a long time, or cannot be accepted at all!

Proposing new features

If you would like to implement a new feature, please raise an issue before sending a pull request so that the proposed feature can be discussed first. This is to avoid putting an effort on a feature that the project developers would not be able to accept into the code base.

Fixing bugs

If you would like to fix a bug, please raise an issue before sending a pull request so that the bug fix can be tracked properly.

Merge approval

The project maintainers use LGTM (Looks Good To Me) in comments on the code review to indicate acceptance. A change requires LGTMs from two of the maintainers of each component affected.

For a list of the maintainers, please see the maintainers page.

Legal

Each source file must include a license header for the Apache Software License 2.0. Using the SPDX format is the simplest approach. For example,

/*
Copyright <holder> All Rights Reserved.

SPDX-License-Identifier: Apache-2.0
*/

We have tried to make it as easy as possible to make contributions. This applies to how we handle the legal aspects of contribution. We use the same approach - the Developer's Certificate of Origin 1.1 (DCO) - that the Linux® Kernel community uses to manage code contributions.

We simply ask that when submitting a patch for review, the developer must include a sign-off statement in the commit message.

Here is an example Signed-off-by line, which indicates that the submitter accepts the DCO:

Signed-off-by: John Doe <[email protected]>

You can include this automatically when you commit a change to your local git repository using the following command:

git commit -s

Communication

Please feel free to connect with us on our Slack channel or via email. Note that the projects in this repository are not formal products. As a result, the communication channels are to the maintainers and not to a support staff.

Setup

The documentation is a work in progress but should provide a good overview on how to get started with the project. The Dockerfile also provides a treasure trove of information on how to build the application, dependencies, and how to test the collector.

Testing

This project is in its infancy and with limited resources we have not built a large testing framework around the collector. We do have a set of unit and regression tests that examine the coverage of most of the events of interest in sf-collector/tests. These tests can be run using the bats testing framework, and directions on how to install bats are in the accompanied link.

To perform the tests, run bats -t tests.bat from the tests directory. Before conducting a pull request, these unit tests should be run. Note that the multi-stage build defines a testing target for the docker image that contains bats and the unit tests, which can be useful for testing. It is also desirable to conduct a load test and run the application under valgrind before submitting pull requests.

Coding style guidelines

We follow the LLVM coding standards in this project. There is a .clang-format file in the master repo clang-format that can be used in conjunction with ClangFormat Tool to automatically format code. For linting, we use Clang Tidy Linter. This is referenced in the Makefile.