High Priority Enhancements:
- Added 2 new Data block test cases for :raw and :expand modifiers
- Enhanced syntax highlighting with "End" keyword (block terminator)
- Added Data block modifiers (:raw, :expand, #|) to highlighting
Test Coverage:
- 63/63 tests passing (100%)
- Test count increased from 61 to 63
- Average parse speed: 623 bytes/ms
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
Created scripts/post-generate.sh that automatically re-applies the critical
buffer overflow fix to parser.h after tree-sitter generate runs. This fix
prevents undefined behavior in set_contains() when accessing an empty array.
The script is automatically executed after tree-sitter generate via the npm
generate script. Added generate:only for cases where post-processing should
be skipped.
- Install prettier ^3.6.2
- Add .prettierrc with project formatting rules
- Add .prettierignore to exclude generated files and dependencies
- Add npm scripts: format and format:check
- Format all files with prettier
- Change Node.js requirement from v16 to v22+ to align with CI matrix
- Update tree-sitter CLI recommendation from global install to npx usage
- Matches actual devDependency configuration in package.json
Addresses PR #1 review comment from CodeRabbit.
- Fix 'yot' → 'yet' typos in test/spec/03.example_spec.sh
- Fix 'Sometime' → 'Sometimes' and cpunum.sh references in test/spec/22.sourcced_spec.sh
- Fix Before → After in after hook section of test/spec/07.before_after_hook_spec.sh
- Improve wording and capitalization throughout hook spec file
All 61 tests still passing after corrections.
Addresses PR #1 review comments from Copilot and CodeRabbit.
- Add --language=shellspec flag to tree-sitter parse for deterministic grammar selection
- Add C++ language to CodeQL analysis to scan src/scanner.c for security issues
Addresses PR #1 review comments from CodeRabbit.
- Add len==0 check in set_contains() to prevent buffer overflow
- Add missing stdlib.h include in scanner.c
- Clear heredoc stack properly in deserialize when length==0
- Ensure NUL termination in delimiter deserialization
- Create alloc.c to define ts_current_* symbols for TREE_SITTER_REUSE_ALLOCATOR
All changes tested with full test suite: 61/61 tests passing.
Addresses PR #1 review comments from CodeRabbit.
- Add comprehensive caching for npm, yarn, and pnpm package managers
- Cache paths now include:
- npm: ~/.npm, node_modules/.cache
- yarn: ~/.yarn, ~/.cache/yarn, ~/.cache/yarn/global
- pnpm: ~/.pnpm-store, ~/.cache/pnpm, ~/.local/share/pnpm/global
- Update cache keys to include all lockfile types (package-lock.json, yarn.lock, pnpm-lock.yaml)
- Rename 'Cache Tree-sitter CLI' to 'Cache npx store' for clarity
- Apply changes consistently across test, lint, and coverage jobs
This improves cache hit rates and build performance regardless of which
Node.js package manager is used in the development environment.
- Add explicit parser build step before sample code testing
- Remove --scope parameter that requires parser to be compiled first
- Fix tree-sitter CLI v0.25.0 compatibility issue in CI environment
The issue was that tree-sitter CLI v0.25.0 requires the parser to be
compiled before it can recognize custom language scopes. This fix
ensures the parser is always built before attempting to parse test files,
resolving the 'Unknown scope' error in GitHub Actions.
- Reduce grammar conflicts to essential bash and ShellSpec rules only
- Restore original precedence values for consistent rule ordering
- Simplify Data block rule while maintaining all functionality
- Add required statements field to match test expectations
Performance improvements:
- Parse speed: ~55 bytes/ms → 1784 bytes/ms (32x faster)
- All 61 tests still pass (100% success rate)
- Significantly reduced parser generation time and runtime complexity
The optimizations focused on minimizing unnecessary conflicts and
simplifying complex choice structures while preserving full ShellSpec
grammar compatibility and correctness.
- Fix grammar.js TypeScript errors by correcting optional field usage
- Update .yamlignore to use more robust glob pattern (**/node_modules/**)
- Remove hard-coded test count from README.md for maintainability
- Fix shellcheck directive format (add space after #) in all test specs
- Fix typos throughout test specifications:
- 'can not' → 'cannot'
- 'expantion' → 'expansion'
- 'singnal' → 'signal'
- 'It mean' → 'It means'
- Update CODE_OF_CONDUCT.md HTTP links to HTTPS
- Update tree-sitter parse command to use --scope instead of --language
- Add comments to .mega-linter.yml explaining disabled linters
All grammar tests still pass (61/61) and the parser functions correctly
with the updated tree-sitter CLI v0.25.0.
- Convert GitHub Actions from local to inline actions for better maintainability
- Add comprehensive caching for npm dependencies, tree-sitter CLI, and build artifacts
- Fix checkout steps missing in test matrix jobs
- Apply defensive programming in test coverage validation
- Use local tree-sitter CLI via npx instead of global installation
- Update tree-sitter-cli to v0.25.0 for compatibility with tree-sitter-bash
- Add proper tree-sitter field to package.json with grammar metadata
- Fix grammar precedence for Data blocks (#| lines now have higher precedence)
- Standardize dates in memory files to September 12, 2025
- Enhance workflow robustness with dynamic workflow ID resolution
- Improve test file pattern matching and error handling
This commit addresses all CodeRabbit review suggestions and optimizes
GitHub Actions workflows for better performance and reliability.