Contributing
We welcome contributions to the BBj Language Server project! This guide will help you get started.
Ways to Contribute
- Bug Reports: Found a bug? Open an issue with details
- Feature Requests: Have an idea? Share it in the issues
- Code Contributions: Submit pull requests for fixes or features
- Documentation: Improve or add documentation
- Testing: Add test cases for uncovered functionality
Getting Started
1. Fork the Repository
Fork BBx-Kitchen/bbj-language-server on GitHub.
2. Clone Your Fork
git clone https://github.com/YOUR_USERNAME/bbj-language-server.git
cd bbj-language-server
3. Set Up Development Environment
Follow the Building Guide to set up your environment.
4. Create a Branch
git checkout -b feature/your-feature-name
Use descriptive branch names:
feature/add-hover-for-labelsfix/completion-not-showingdocs/update-installation-guide
Development Workflow
1. Make Changes
- Follow existing code style
- Add tests for new functionality
- Update documentation if needed
2. Run Tests
cd bbj-vscode
npm run test
npm run lint
3. Test in VS Code
- Press
F5to launch extension - Manually test your changes
- Check Output panel for errors
4. Commit Changes
Write clear commit messages:
git commit -m "feat: add hover support for BBj labels
- Implement hover provider for labels
- Show label definition location
- Include referenced line preview"
Follow Conventional Commits:
feat:- New featurefix:- Bug fixdocs:- Documentationtest:- Testsrefactor:- Code refactoring
5. Push and Create PR
git push origin feature/your-feature-name
Open a pull request on GitHub with:
- Clear description of changes
- Reference to related issues
- Screenshots if UI changes
Code Style
TypeScript
- Use TypeScript strict mode
- Follow ESLint rules
- Use meaningful variable names
- Add JSDoc comments for public APIs
/**
* Provides hover information for BBj elements.
* @param node - The AST node to get hover info for
* @returns Hover content or undefined
*/
export function getHoverContent(node: AstNode): Hover | undefined {
// Implementation
}
Java
- Follow standard Java conventions
- Use meaningful names
- Add JavaDoc for public methods
/**
* Retrieves class information via reflection.
* @param className Fully qualified class name
* @return ClassInfo object or null if not found
*/
public ClassInfo getClassInfo(String className) {
// Implementation
}
Project Areas
Grammar Changes
Modifying bbj.langium:
- Make grammar changes
- Run
npm run langium:generate - Update affected services
- Add parser tests
- Update VERBs.md if adding new verbs
Adding Language Features
- Identify the appropriate service
- Implement the feature
- Add tests
- Update documentation
Java Interop Changes
- Modify Java code
- Update TypeScript interface if needed
- Test integration
- Document new RPC methods
Testing Requirements
All contributions should include tests:
- Parser changes: Add test cases in
parser.test.ts - Validation: Add cases in
validation.test.ts - Completion: Add cases in
completion-test.test.ts - New features: Create appropriate test file
See Testing Guide for details.
Documentation
Update documentation for:
- New features
- Changed behavior
- Configuration options
- API changes
Documentation lives in documentation/docs/.
Issue Guidelines
Bug Reports
Include:
- VS Code version
- Extension version
- BBj version
- Steps to reproduce
- Expected vs actual behavior
- Sample code if applicable
Feature Requests
Include:
- Use case description
- Proposed solution
- Alternative approaches considered
Pull Request Process
- Ensure tests pass
- Update documentation
- Request review from maintainers
- Address review feedback
- Squash commits if requested
Questions?
- Open a GitHub Discussion
- Check existing issues for similar questions
- Review documentation
License
By contributing, you agree that your contributions will be licensed under the project's license.
Thank you for contributing to the BBj Language Server!