Contributing to SQLite.swift
Contributions are welcome! Whether you're fixing a bug, adding a feature, or improving documentation, your help is appreciated. This guide provides information on how to get started.
Where to Start
- Need Help? For general questions or assistance, please ask on Stack Overflow and use the
sqlite.swift
tag. - Found a Bug? If you've found a bug, please open an issue. Before submitting, search existing issues to see if it has already been reported.
- Feature Request? If you have an idea for a new feature, please open an issue to discuss it.
- Want to Contribute? Look for issues tagged with
help wanted
or feel free to start a discussion about a new feature. When you're ready, submit a pull request.
Development Setup
To contribute code, you'll need to set up a development environment where you can build the project and run tests.
- Fork and Clone: Fork the repository on GitHub and clone your fork locally.
-
Install Tools: The project uses
swiftlint
for code style andxcbeautify
for prettier build logs. You can install them using the providedMakefile
.This will download and place swiftlint and xcbeautify in a local
bin
directorymake lint build
Running Tests
The project includes a Makefile
with convenient commands for common development tasks.
-
Run all tests for a specific scheme:
For macOS
make test BUILD_SCHEME="SQLite Mac"
For iOS
make test BUILD_SCHEME="SQLite iOS"
Linting
Before submitting a pull request, please ensure your code adheres to the project's style guidelines by running the linter.
-
Check for lint errors:
make lint
-
Automatically fix lint errors:
make lint-fix
Pull Request Guidelines
When submitting a pull request, please ensure the following:
- Tests: If you are adding new functionality, please include new tests. If you are fixing a bug, add a test that demonstrates the bug and is fixed by your change.
- Documentation: Update any relevant documentation comments in the code.
- Style: Maintain the existing coding style. Run
make lint
to check. - Changelog: For significant changes, consider whether an entry in
CHANGELOG.md
is needed. - Have fun!