Contributing
Presets
Community contributions of new presets or improvements are welcome!
Submitting a preset
- Fork the repository.
- Add your preset file in src/snib/presets/ (e.g., rust.toml, go.toml, terraform.toml).
- Make sure your preset:
- Uses a descriptive filename (e.g.,
rust.toml
, notpreset1.toml
). - Contains a clear
[config]
section. - Has meaningful include / exclude rules.
- Has been tested locally.
- Uses a descriptive filename (e.g.,
- Open a Pull Request against the
staging
branch with a short explanation of:- The project type the preset is for.
- Any specifics about the filters.
Why contribute presets?
Presets are the easiest way to contribute - even if you don’t know Python!
Bugs
We appreciate help identifying and fixing bugs! You can contribute by reporting issues or submitting bugfixes.
Reporting a bug
- Check the Issues Tracker to see if the bug has already been reported.
- Open a new issue with a clear description, including:
- Steps to reproduce the bug
- Expected vs actual behavior
- Any relevant logs or error messages
- Label the issue appropriately (e.g., bug).
Fixing a bug
- Fork the repository
- Create a branch for your bugfix:
git checkout -b fix/short-description
- Implement and commit your changes:
git commit -m "fix(component): brief description of fix"
- Push your branch to your fork:
git push origin fix/short-description
- Open a Pull Request against the
staging
branch.
Features
To contribute a new feature, please follow these steps:
Adding a feature
- Fork this repository
- Create a dedicated branch:
git checkout -b feature/your-feature
- Implement and commit your changes:
git commit -m "feat(your-feature): add new feature ..."
- Push your branch to your fork:
git push origin feature/your-feature
- Open a Pull Request against the
staging
branch
Why use the stagin branch?
Pull Requests are tested on the staging
branch first. Once everything works, changes will be merged into main
.
Commit Message Convention
We follow the Conventional Commits format:
<type>(<scope>): <short description>
[optional longer body]
Types
Type | Purpose | Example |
---|---|---|
feat | A new feature | feat(cli): add command |
fix | A bug fix | fix(_match_patterns): globs |
docs | Documentation only | docs(readme): update links |
style | Code style (formatting, whitespace, etc.), no logic changes | style(balck): apply black |
refactor | Code change that neither fixes a bug nor adds a feature | refactor(pipeline): simplify |
test | Adding or updating tests | test(scanner): add tests |
chore | Maintenance, CI/CD, build, dependencies | chore(ci): add new workflow |
Guidelines
Make your commits easier to understand
- Write commit messages in the imperative mood (e.g., “add feature” instead of “added” or “adds”).
- Keep the first line under 72 characters.
- The scope
is optional but recommended. - Use the body to explain why the change was made, not just what was done.
- Aim for clarity and consistency.