|
| 1 | +# Contributing to Tree Navigator |
| 2 | + |
| 3 | +Thank you for your interest in contributing to Tree Navigator! This document provides guidelines and instructions for contributing. |
| 4 | + |
| 5 | +## Development Setup |
| 6 | + |
| 7 | +### Prerequisites |
| 8 | + |
| 9 | +- GNAT Ada compiler (GCC 12.0 or later with Ada 2022 support) |
| 10 | +- GPRbuild |
| 11 | +- Git |
| 12 | + |
| 13 | +### Building from Source |
| 14 | +```bash |
| 15 | +git clone https://github.com/yourusername/tree-navigator.git |
| 16 | +cd tree-navigator |
| 17 | +gprbuild -P tree_navigator.gpr |
| 18 | +./bin/main |
| 19 | +``` |
| 20 | + |
| 21 | +## Code Style |
| 22 | + |
| 23 | +This project follows Ada 2022 standards with these conventions: |
| 24 | + |
| 25 | +- **Indentation**: 3 spaces (Ada standard) |
| 26 | +- **Line length**: Keep under 100 characters where practical |
| 27 | +- **Naming**: Use `Snake_Case` for identifiers |
| 28 | +- **Comments**: Use `--` for single-line comments |
| 29 | +- **Pragmas**: Place `pragma Ada_2022;` at the top of each file |
| 30 | + |
| 31 | +## Project Structure |
| 32 | +``` |
| 33 | +tree-navigator/ |
| 34 | +├── src/ # Ada source files (.ads/.adb) |
| 35 | +├── obj/ # Compiled objects (gitignored) |
| 36 | +├── bin/ # Compiled executable (gitignored) |
| 37 | +├── tree_navigator.gpr # GNAT project file |
| 38 | +└── README.md |
| 39 | +``` |
| 40 | + |
| 41 | +## Testing |
| 42 | + |
| 43 | +Before submitting a pull request: |
| 44 | + |
| 45 | +1. Ensure your code compiles without errors: |
| 46 | +```bash |
| 47 | + gprbuild -P tree_navigator.gpr |
| 48 | +``` |
| 49 | + |
| 50 | +2. Test basic functionality: |
| 51 | +```bash |
| 52 | + ./bin/main --help |
| 53 | + ./bin/main |
| 54 | +``` |
| 55 | + |
| 56 | +3. Verify no new warnings are introduced |
| 57 | + |
| 58 | +## Submitting Changes |
| 59 | + |
| 60 | +1. Fork the repository |
| 61 | +2. Create a feature branch (`git checkout -b feature/amazing-feature`) |
| 62 | +3. Commit your changes (`git commit -m 'Add amazing feature'`) |
| 63 | +4. Push to the branch (`git push origin feature/amazing-feature`) |
| 64 | +5. Open a Pull Request |
| 65 | + |
| 66 | +## Pull Request Guidelines |
| 67 | + |
| 68 | +- Provide a clear description of the changes |
| 69 | +- Reference any related issues |
| 70 | +- Ensure code compiles cleanly |
| 71 | +- Update documentation if needed |
| 72 | +- Add yourself to CONTRIBUTORS.md |
| 73 | + |
| 74 | +## Code of Conduct |
| 75 | + |
| 76 | +Be respectful, constructive, and professional in all interactions. |
| 77 | + |
| 78 | +## Questions? |
| 79 | + |
| 80 | +Open an issue for questions, bug reports, or feature requests. |
0 commit comments