Style Guide for Contributors¶
For those willing to contribute to Tracee, this repository has code formatting guidelines being enforced.
Contributing to Documentation¶
Our documentation aims to follow the Diátaxis documentation framework.
To contribute to the documentation:
- Clone the Tracee GitHub repository.
- Make changes in the
/docsdirectory in the root folder. - Remember to edit the index in
mkdocs.ymlif you add or move existing files or directories. - Test your changes to the documentation.
Test Documentation Changes¶
You can test your changes to the documentation by building and running a docker container. Prerequisites: Docker installed and running locally. Build the container image:
make -f ./builder/Makefile.mkdocs mkdocs-build
Serve the container image:
make -f ./builder/Makefile.mkdocs mkdocs-serve
Open localhost:8000/tracee
Now you should see the documentation. Check that everything is as you intended.
And finally Submit a PR about the changes.
Contributing to Tracee Code¶
We welcome contributions to Tracee's codebase! Before submitting your changes, please familiarize yourself with these guidelines. To contribute to the code:
Before You Commit¶
Before submitting code changes, ensure you follow these essential steps:
- Generated Files: If you've modified certain types of files, regenerate the corresponding outputs:
- Man pages: Run
make -f builder/Makefile.manif you changed core code or documentation -
Protocol buffers: Run
make -f builder/Makefile.protocif you modified.protofiles -
Code Quality: Run comprehensive code quality checks:
make check-pr
This verifies formatting, runs linting, performs static analysis, and validates your changes meet project standards.
- Development Environment: For consistent results, use a supported development environment when running checks.
For detailed information about these tools, troubleshooting, and advanced options, see our comprehensive Code Quality Guide.
Performance Considerations¶
Performance is a critical aspect of Tracee.
To ensure your contributions maintain optimal performance, follow the guidelines in Performance Considerations page.
Kubernetes Considerations¶
If your contribution impacts Tracee's behavior within a Kubernetes cluster, follow the guidelines in Kubernetes Considerations.