Contributing
Help improve NetScan! We welcome contributions of all kinds.
Ways to Contribute
- ๐ Report bugs โ Open an issue with details
- ๐ก Suggest features โ Share your ideas
- ๐ Improve docs โ Fix typos, add examples
- ๐ง Submit code โ Bug fixes, new features
- ๐งช Test โ Test on different platforms
Development Setup
# Clone repo
git clone https://github.com/G1A1B1E/NetScan.git
cd NetScan
# Create branch
git checkout -b feature/my-feature
# Install dev dependencies
pip3 install -r requirements-dev.txt
# Run tests
python3 -m pytest tests/
Code Style
- Python: PEP 8, type hints encouraged
- Bash: ShellCheck clean
- Rust:
cargo fmtandcargo clippy
# Format Python
black helpers/
isort helpers/
# Check Bash
shellcheck lib/*.sh
# Format Rust
cd rust_helpers && cargo fmt
Pull Request Process
- Fork the repository
- Create feature branch (
git checkout -b feature/xyz) - Make your changes
- Run tests (
python3 -m pytest) - Commit (
git commit -m 'Add xyz feature') - Push (
git push origin feature/xyz) - Open Pull Request
Project Structure
NetScan/
โโโ netscan # Main entry point
โโโ lib/ # Bash libraries
โ โโโ scanner.sh
โ โโโ mac_lookup.sh
โ โโโ utils.sh
โโโ helpers/ # Python modules
โ โโโ mac_lookup.py
โ โโโ scanner.py
โ โโโ oui_parser.py
โ โโโ fast_core.py
โโโ rust_helpers/ # Optional Rust module
โ โโโ Cargo.toml
โ โโโ src/
โโโ docs/ # Documentation
โโโ tests/ # Test suite
Testing
# Run all tests
python3 -m pytest
# Run specific test
python3 -m pytest tests/test_mac_lookup.py
# With coverage
python3 -m pytest --cov=helpers
Reporting Issues
Include:
- Operating system and version
- Python version (
python3 --version) - NetScan version (
netscan --version) - Full error message
- Steps to reproduce
License
By contributing, you agree that your contributions will be licensed under the MIT License.
Code of Conduct
Be respectful, inclusive, and constructive. See CODE_OF_CONDUCT.md