Commit Graph

10 Commits

Author SHA1 Message Date
c5ef99fcb1 style: fix JSDoc comment indentation 2026-01-04 15:33:15 +02:00
ccb9121b89 fix: resolve documentation inconsistencies and add ExampleGroup variants
Documentation Fixes:
- README.md: Update test count from 59 to 63 (badge, features, test command)
- README.md: Fix lint script references to actual npm scripts
- CONTRIBUTING.md: Correct format script reference to npm run format:check
- package.json: Remove non-existent yamllint script, split lint:markdown into check/fix variants

Grammar Enhancements:
- Add fExampleGroup and xExampleGroup to Context block variants
- Regenerate parser with new grammar (63/63 tests passing, 100% success rate)

Syntax Highlighting:
- Add fExampleGroup and xExampleGroup to focused/skipped block highlights
- Remove non-matching Data modifier tokens (:raw, :expand, #|)
- Add "End" keyword as block terminator

Memory File Corrections:
- Remove incorrect merge_group trigger references
- Remove pr-lint.yml workflow references (deleted in previous optimization)
- Update test counts with timestamps (59→63, added 2025-12-11)
- Update conflict count (13→5, optimized)

Code Style:
- Auto-format renovate.json and tree-sitter.json with prettier
2026-01-04 15:33:00 +02:00
c24ae6b1f8 docs: add comprehensive grammar documentation and precedence explanation
Medium Priority Enhancement:
- Added detailed precedence strategy comments explaining how ShellSpec extends bash
- Documented all 5 conflicts with resolution strategies
- Explained why conflicts are necessary and optimal
- Added context about GLR parsing and precedence hints

Documentation improvements:
- Precedence levels clearly explained (bash: 1, ShellSpec: 2)
- Each conflict documented with resolution strategy
- Notes on intentional design decisions
- Helps future maintainers understand grammar design
2026-01-04 15:33:00 +02:00
18138d7588 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
2026-01-04 15:33:00 +02:00
4344567555 chore: tweaks to megalinter and grammar.js 2026-01-04 15:32:40 +02:00
b88b851a74 perf: optimize grammar for 32x faster parsing performance
- 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.
2026-01-04 15:32:39 +02:00
193f8871b6 fix: apply CodeRabbit nitpick suggestions and improve code quality
- 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.
2026-01-04 15:32:39 +02:00
d65c6e6ec4 refactor: enhance CI/CD workflows and apply CodeRabbit suggestions
- 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.
2026-01-04 15:32:39 +02:00
b180fbeb48 chore: lint and code review fixes 2026-01-04 15:32:39 +02:00
c8ba576b4e feat: implement complete tree-sitter-shellspec grammar with comprehensive testing
- Add full ShellSpec grammar extending tree-sitter-bash
- Support all ShellSpec constructs: Describe, Context, It, hooks, utilities
- Include Data block parsing with statements and argument styles
- Add 61 comprehensive test cases covering real-world patterns
- Implement optimized GitHub workflows with CI/CD automation
- Configure complete development tooling (linting, formatting, pre-commit)
- Add comprehensive documentation and contribution guidelines
- Optimize grammar conflicts to zero warnings
- Support editor integration for Neovim, VS Code, Emacs

Breaking Changes:
- Initial release, no previous API to break

BREAKING CHANGE: Initial implementation of tree-sitter-shellspec grammar

# Conflicts:
#	.github/workflows/codeql.yml
#	.github/workflows/pr-lint.yml
#	.pre-commit-config.yaml

# Conflicts:
#	.github/workflows/pr-lint.yml

# Conflicts:
#	.github/workflows/pr-lint.yml
2026-01-04 15:32:39 +02:00