|
| 1 | +# Contributing to SigScan |
| 2 | + |
| 3 | +First off, thank you for considering contributing to SigScan! 🎉 |
| 4 | + |
| 5 | +## Code of Conduct |
| 6 | + |
| 7 | +By participating in this project, you agree to abide by our Code of Conduct. Please be respectful and constructive in all interactions. |
| 8 | + |
| 9 | +## How Can I Contribute? |
| 10 | + |
| 11 | +### Reporting Bugs |
| 12 | + |
| 13 | +Before creating bug reports, please check existing issues. When creating a bug report, include: |
| 14 | + |
| 15 | +- **Clear title and description** |
| 16 | +- **Steps to reproduce** |
| 17 | +- **Expected vs actual behavior** |
| 18 | +- **Screenshots** (if applicable) |
| 19 | +- **Environment details** (VS Code version, OS, Node version) |
| 20 | + |
| 21 | +### Suggesting Enhancements |
| 22 | + |
| 23 | +Enhancement suggestions are welcome! Please include: |
| 24 | + |
| 25 | +- **Clear use case** |
| 26 | +- **Expected behavior** |
| 27 | +- **Why this would be useful** |
| 28 | +- **Examples** from other tools (if applicable) |
| 29 | + |
| 30 | +### Pull Requests |
| 31 | + |
| 32 | +1. Fork the repo and create your branch from `main` |
| 33 | +2. Follow the setup instructions in [BUILDING.md](BUILDING.md) |
| 34 | +3. Make your changes and add tests |
| 35 | +4. Ensure the test suite passes: `npm test` |
| 36 | +5. Run linting: `npm run lint:fix` |
| 37 | +6. Format code: `npm run format` |
| 38 | +7. Commit with conventional commits: `feat:`, `fix:`, `docs:`, etc. |
| 39 | +8. Push to your fork and submit a pull request |
| 40 | + |
| 41 | +## Development Setup |
| 42 | + |
| 43 | +```bash |
| 44 | +# Clone your fork |
| 45 | +git clone https://github.com/YOUR_USERNAME/sigScan.git |
| 46 | +cd sigScan |
| 47 | + |
| 48 | +# Install dependencies |
| 49 | +npm install |
| 50 | + |
| 51 | +# Run tests |
| 52 | +npm test |
| 53 | + |
| 54 | +# Build extension |
| 55 | +npm run compile |
| 56 | + |
| 57 | +# Package extension |
| 58 | +npm run package |
| 59 | +``` |
| 60 | + |
| 61 | +## Commit Message Guidelines |
| 62 | + |
| 63 | +We follow [Conventional Commits](https://www.conventionalcommits.org/): |
| 64 | + |
| 65 | +``` |
| 66 | +<type>(<scope>): <subject> |
| 67 | +
|
| 68 | +<body> |
| 69 | +
|
| 70 | +<footer> |
| 71 | +``` |
| 72 | + |
| 73 | +### Types |
| 74 | + |
| 75 | +- `feat`: New feature |
| 76 | +- `fix`: Bug fix |
| 77 | +- `docs`: Documentation only |
| 78 | +- `style`: Code style (formatting, etc.) |
| 79 | +- `refactor`: Code refactoring |
| 80 | +- `perf`: Performance improvement |
| 81 | +- `test`: Adding tests |
| 82 | +- `build`: Build system changes |
| 83 | +- `ci`: CI configuration |
| 84 | +- `chore`: Maintenance tasks |
| 85 | + |
| 86 | +### Examples |
| 87 | + |
| 88 | +``` |
| 89 | +feat(scanner): add support for Solidity 0.8.20 |
| 90 | +
|
| 91 | +fix(exporter): resolve duplicate signature issue |
| 92 | +
|
| 93 | +docs(readme): update installation instructions |
| 94 | +``` |
| 95 | + |
| 96 | +## Testing |
| 97 | + |
| 98 | +- Write tests for new features |
| 99 | +- Ensure existing tests pass |
| 100 | +- Aim for good code coverage |
| 101 | +- Test on multiple platforms if possible |
| 102 | + |
| 103 | +## Style Guide |
| 104 | + |
| 105 | +- Use TypeScript |
| 106 | +- Follow ESLint rules |
| 107 | +- Use Prettier for formatting |
| 108 | +- Write clear, descriptive variable names |
| 109 | +- Add JSDoc comments for public APIs |
| 110 | + |
| 111 | +## License |
| 112 | + |
| 113 | +By contributing, you agree that your contributions will be licensed under the MIT License. |
0 commit comments