Thank you for your interest in contributing to the 42 Header+ VSCode extension! This document provides guidelines for contributing to the project.
By participating in this project, you agree to maintain a respectful and inclusive environment for everyone.
Before creating bug reports, please check the existing issues to avoid duplicates.
When creating a bug report, please include:
- A clear and descriptive title
- Steps to reproduce the issue
- Expected behavior
- Actual behavior
- VSCode version and OS information
- Extension version
- Screenshots if applicable
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, please include:
- A clear and descriptive title
- Detailed description of the proposed feature
- Use cases and examples
- Why this enhancement would be useful
-
Fork the repository and create your branch from
mastergit checkout -b feature/my-new-feature
-
Install dependencies
npm install
-
Make your changes
- Write clean, readable code
- Follow the existing code style
- Add comments for complex logic
- Update documentation if needed
-
Test your changes
npm run build npm test npm run lint -
Commit your changes
- Use clear, descriptive commit messages
- Reference issues in commits (e.g., "Fix header alignment (#42)")
-
Push to your fork
git push origin feature/my-new-feature
-
Open a Pull Request
- Use the PR template
- Link related issues
- Provide a clear description of changes
- Ensure CI checks pass
- Node.js 18.x or 20.x
- VSCode
- Git
-
Clone the repository:
git clone https://github.com/MarioLJFerreira/vscode-42header-plus.git cd vscode-42header-plus -
Install dependencies:
npm install
-
Build the extension:
npm run build
-
Run tests:
npm test -
Debug the extension:
- Press
F5in VSCode - This opens a new Extension Development Host window
- Test your changes in this window
- Press
vscode-42header-plus/
├── src/
│ ├── extension.ts # Extension entry point
│ ├── header.ts # Header generation logic
│ ├── delimiters.ts # Language-specific delimiters
│ └── test/ # Test files
│ ├── runTest.ts # Test runner
│ └── suite/ # Test suites
├── .github/
│ └── workflows/ # CI/CD workflows
├── package.json # Extension manifest
└── tsconfig.json # TypeScript configuration
- Test individual functions in isolation
- Use descriptive test names
- Cover edge cases
- Location:
src/test/suite/*.test.ts
- Test extension functionality end-to-end
- Test VSCode API integration
- Test user workflows
# Run all tests
npm test
# Run tests with coverage
npm run test:coverage
# Run only unit tests
npm run test:unit- Use TypeScript
- Follow existing code formatting
- Use meaningful variable and function names
- Add JSDoc comments for public APIs
- Keep functions small and focused
Use conventional commits format:
feat:New featurefix:Bug fixdocs:Documentation changesstyle:Code style changes (formatting)refactor:Code refactoringtest:Test updateschore:Build process or auxiliary tool changes
Example:
feat: add support for 42 Tokyo campus
- Add 42tokyo.jp to campus list
- Update email generation logic
- Add tests for Tokyo campus
- Version is updated in
package.jsonfollowing0.42.xscheme (ALWAYS maintain 0.42.x format)- Example: 0.42.9 → 0.42.10 → 0.42.11
- Never use 0.43.x or higher - maintain consistency with original project
CHANGELOG.mdis updated with changes- Tests pass on all platforms
- PR is reviewed and approved
- Changes are merged to master
- New version is published
IMPORTANT: This project follows the 0.42.x versioning scheme:
- ✅ Correct: 0.42.8, 0.42.9, 0.42.10, 0.42.11, ...
- ❌ Incorrect: 0.43.0, 1.0.0, 0.50.0
This maintains consistency with the original 42 Header extension and preserves the "42" reference in the version number.
- Check the documentation
- Look at existing issues
- Ask questions in a new issue with the "question" label
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing! 🎉