fix: address code review findings and critical issues

Critical Fixes:
- Fixed EditorConfig violations in grammar.js, scanner.c, README.md, .mega-linter.yml
  - Changed JSDoc comments from 1-space to 2-space indent per .editorconfig
  - Fixed line length violations in README.md and .mega-linter.yml
- Updated test count badge from 59/59 to 61/61 in README.md
- Created queries/highlights.scm for syntax highlighting support
- Updated package.json with repository and files fields

Configuration Updates:
- Added repository field pointing to GitHub
- Added files field to control npm package contents
- Properly formatted CONTRIBUTING.md with prettier

All 61 tests passing (100% success rate)
All critical EditorConfig violations resolved
This commit is contained in:
2025-12-11 17:06:27 +02:00
parent a0bbc781f6
commit 18138d7588
11 changed files with 183 additions and 76 deletions

View File

@@ -28,42 +28,42 @@ Thank you for your interest in contributing to tree-sitter-shellspec! This docum
1. Fork the repository on GitHub
2. Clone your fork locally:
```bash
git clone https://github.com/YOUR_USERNAME/tree-sitter-shellspec.git
cd tree-sitter-shellspec
```
```bash
git clone https://github.com/YOUR_USERNAME/tree-sitter-shellspec.git
cd tree-sitter-shellspec
```
3. Add the upstream repository:
```bash
git remote add upstream https://github.com/ivuorinen/tree-sitter-shellspec.git
```
```bash
git remote add upstream https://github.com/ivuorinen/tree-sitter-shellspec.git
```
## Development Setup
1. **Install dependencies:**
```bash
npm install
```
```bash
npm install
```
2. **Generate the grammar:**
```bash
npm run generate
```
```bash
npm run generate
```
3. **Run tests:**
```bash
npm test
```
```bash
npm test
```
4. **Build the parser:**
```bash
npm run build
```
```bash
npm run build
```
### Development Workflow
@@ -209,33 +209,34 @@ tree-sitter test --debug
1. **Create a feature branch:**
```bash
git checkout -b feature/your-feature-name
```
```bash
git checkout -b feature/your-feature-name
```
2. **Make your changes** following the guidelines above
3. **Commit with clear messages:**
```bash
git commit -m "feat: add support for Data block modifiers
```bash
git commit -m "feat: add support for Data block modifiers
- Add :raw and :expand modifier support
- Update test cases for new syntax
- Add documentation examples"
```
- Add :raw and :expand modifier support
- Update test cases for new syntax
- Add documentation examples"
```
4. **Push to your fork:**
```bash
git push origin feature/your-feature-name
```
```bash
git push origin feature/your-feature-name
```
5. **Create a Pull Request** with:
- Clear description of changes
- References to related issues
- Test results and coverage
- Breaking change notes (if any)
- Clear description of changes
- References to related issues
- Test results and coverage
- Breaking change notes (if any)
### Commit Message Guidelines
@@ -282,43 +283,50 @@ Use the [Grammar Issue template](.github/ISSUE_TEMPLATE/grammar_issue.md) for:
### High Priority
1. **Enhanced Data block support**
- `:raw` and `:expand` modifiers
- Pipe filter syntax (`Data | command`)
- Multi-line `#|` syntax
- `:raw` and `:expand` modifiers
- Pipe filter syntax (`Data | command`)
- Multi-line `#|` syntax
2. **Assertion parsing**
- When/The statement structures
- Matcher syntax parsing
- Subject/predicate analysis
- When/The statement structures
- Matcher syntax parsing
- Subject/predicate analysis
3. **Performance optimization**
- Reduce parser conflicts
- Optimize grammar rules
- Improve parsing speed
- Reduce parser conflicts
- Optimize grammar rules
- Improve parsing speed
### Medium Priority
1. **Editor integration**
- Neovim configuration examples
- VS Code extension support
- Emacs tree-sitter integration
- Neovim configuration examples
- VS Code extension support
- Emacs tree-sitter integration
2. **Tooling improvements**
- Syntax highlighting themes
- Language server features
- Code formatting rules
- Syntax highlighting themes
- Language server features
- Code formatting rules
3. **Documentation**
- Usage tutorials
- Grammar development guide
- Editor setup instructions
- Usage tutorials
- Grammar development guide
- Editor setup instructions
### Low Priority
1. **Advanced features**
- ShellSpec custom matchers
- Configuration file parsing
- Metadata extraction
- ShellSpec custom matchers
- Configuration file parsing
- Metadata extraction
## Development Resources