mirror of
https://github.com/ivuorinen/tree-sitter-shellspec.git
synced 2026-01-26 11:43:59 +00:00
docs: improve documentation and memory files
- Update CONTRIBUTING.md code style check commands with actual available scripts - Use npx tree-sitter in test examples to avoid assuming global installation - Improve project status memory file with proper JSON formatting - Add CI enforcement recommendation for zero-conflict grammar generation - Align prerequisites with CI requirements (Node 22+)
This commit is contained in:
@@ -16,10 +16,15 @@ This memory contains only verified, accurate information about the current proje
|
||||
|
||||
### Dependencies (Verified)
|
||||
|
||||
package.json excerpts:
|
||||
|
||||
```json
|
||||
"dependencies": {
|
||||
"tree-sitter-bash": "^0.25.0"
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
```json
|
||||
"devDependencies": {
|
||||
"markdownlint-cli": "^0.42.0",
|
||||
"nodemon": "^3.0.1",
|
||||
@@ -29,6 +34,8 @@ This memory contains only verified, accurate information about the current proje
|
||||
|
||||
### NPM Scripts (Verified - 13 total)
|
||||
|
||||
package.json excerpt:
|
||||
|
||||
```json
|
||||
"scripts": {
|
||||
"generate": "tree-sitter generate",
|
||||
@@ -87,6 +94,17 @@ test/corpus/
|
||||
- All essential conflicts properly configured
|
||||
- Unnecessary conflicts eliminated through optimization
|
||||
|
||||
**CI Enforcement Recommendation**: Add CI guard to fail on any conflicts/warnings
|
||||
|
||||
```yaml
|
||||
# Add to CI workflow before tests
|
||||
- name: Generate grammar (fail on conflicts)
|
||||
run: |
|
||||
set -euo pipefail
|
||||
npx tree-sitter generate 2>&1 | tee generate.log
|
||||
! rg -nP '(conflict|warn)' generate.log
|
||||
```
|
||||
|
||||
### Supported ShellSpec Constructs (Verified)
|
||||
|
||||
#### Block Types
|
||||
|
||||
@@ -149,11 +149,11 @@ ShellSpec code here
|
||||
npm test
|
||||
|
||||
# Test specific patterns
|
||||
tree-sitter test --filter "describe_blocks"
|
||||
tree-sitter test --filter "real_world_patterns"
|
||||
npx tree-sitter test --filter "describe_blocks"
|
||||
npx tree-sitter test --filter "real_world_patterns"
|
||||
|
||||
# Test with debug output
|
||||
tree-sitter test --debug
|
||||
npx tree-sitter test --debug
|
||||
```
|
||||
|
||||
### Test Coverage Requirements
|
||||
@@ -200,7 +200,7 @@ tree-sitter test --debug
|
||||
### Before Submitting
|
||||
|
||||
1. **Ensure all tests pass:** `npm test`
|
||||
2. **Check code style:** `npm run lint && npm run format:check`
|
||||
2. **Check code style:** `npm run lint && npm run lint:editorconfig && npm run lint:markdown`
|
||||
3. **Update documentation** if needed
|
||||
4. **Test with real ShellSpec files** when possible
|
||||
5. **Run the full development cycle:** `npm run rebuild`
|
||||
|
||||
Reference in New Issue
Block a user