Thank you for your interest in contributing to AssertC! This document provides guidelines and information for contributors.
- GCC or Clang compiler
- Make
- Git
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/your-username/assertc.git cd assertc -
Build the project:
make
-
Run the tests to ensure everything is working:
make tests
We use a consistent code style throughout the project. Please follow these guidelines:
- Indentation: Use spaces (4 spaces wide)
- Naming: Use snake_case for functions and variables
- Comments: Use
//for single-line comments,/* */for multi-line - Header guards: Use
#ifndefstyle guards in header files - Line length: Keep lines under 80 characters when possible
The project includes an .editorconfig file that will automatically configure your editor for the correct style.
- Check existing issues to see if your idea is already being discussed
- For new features, consider opening an issue first to discuss the approach
- Make sure all existing tests pass before making changes
-
Create a new branch for your feature/bugfix:
git checkout -b feature/your-feature-name
-
Make your changes
-
Add tests for any new functionality
-
Ensure all tests pass:
make test -
Commit your changes with a clear message:
git commit -m "feat: description of what you added" -
Push to your changes and create a pull request
- All new functionality should include tests
- Tests should be placed in the
tests/directory - Use the
TEST()macro for test functions - Follow the existing test naming convention:
test_<functionality> - Test both success and failure cases where applicable
Example test structure:
#include <assertc.h>
TEST(test_new_feature) {
// Test your new feature
assert_eq(expected_result, actual_result);
}- Keep pull requests focused on a single feature or bugfix
- Include a clear description of what your changes do
- Reference any related issues
- Ensure all tests pass
- Update documentation if needed
- Follow the existing code style
When reporting bugs, please include:
- A clear description of the problem
- Steps to reproduce the issue
- Expected vs actual behavior
- Your operating system and compiler version
- Any relevant error messages
We welcome feature requests! Please:
- Check if the feature has already been requested
- Provide a clear description of the proposed feature
- Explain the use case and why it would be beneficial
- Consider whether it fits with the project's goals of being lightweight and simple
If you have questions about contributing, feel free to:
- Open an issue for discussion
- Check existing issues and pull requests for similar topics
By contributing to AssertC, you agree that your contributions will be licensed under the same license as the project.
Thank you for contributing to AssertC! 🎉