mirror of
https://github.com/ivuorinen/tree-sitter-shellspec.git
synced 2026-02-08 04:49:40 +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)
|
### Dependencies (Verified)
|
||||||
|
|
||||||
|
package.json excerpts:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tree-sitter-bash": "^0.25.0"
|
"tree-sitter-bash": "^0.25.0"
|
||||||
},
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```json
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"markdownlint-cli": "^0.42.0",
|
"markdownlint-cli": "^0.42.0",
|
||||||
"nodemon": "^3.0.1",
|
"nodemon": "^3.0.1",
|
||||||
@@ -29,6 +34,8 @@ This memory contains only verified, accurate information about the current proje
|
|||||||
|
|
||||||
### NPM Scripts (Verified - 13 total)
|
### NPM Scripts (Verified - 13 total)
|
||||||
|
|
||||||
|
package.json excerpt:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"generate": "tree-sitter generate",
|
"generate": "tree-sitter generate",
|
||||||
@@ -87,6 +94,17 @@ test/corpus/
|
|||||||
- All essential conflicts properly configured
|
- All essential conflicts properly configured
|
||||||
- Unnecessary conflicts eliminated through optimization
|
- 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)
|
### Supported ShellSpec Constructs (Verified)
|
||||||
|
|
||||||
#### Block Types
|
#### Block Types
|
||||||
|
|||||||
@@ -149,11 +149,11 @@ ShellSpec code here
|
|||||||
npm test
|
npm test
|
||||||
|
|
||||||
# Test specific patterns
|
# Test specific patterns
|
||||||
tree-sitter test --filter "describe_blocks"
|
npx tree-sitter test --filter "describe_blocks"
|
||||||
tree-sitter test --filter "real_world_patterns"
|
npx tree-sitter test --filter "real_world_patterns"
|
||||||
|
|
||||||
# Test with debug output
|
# Test with debug output
|
||||||
tree-sitter test --debug
|
npx tree-sitter test --debug
|
||||||
```
|
```
|
||||||
|
|
||||||
### Test Coverage Requirements
|
### Test Coverage Requirements
|
||||||
@@ -200,7 +200,7 @@ tree-sitter test --debug
|
|||||||
### Before Submitting
|
### Before Submitting
|
||||||
|
|
||||||
1. **Ensure all tests pass:** `npm test`
|
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
|
3. **Update documentation** if needed
|
||||||
4. **Test with real ShellSpec files** when possible
|
4. **Test with real ShellSpec files** when possible
|
||||||
5. **Run the full development cycle:** `npm run rebuild`
|
5. **Run the full development cycle:** `npm run rebuild`
|
||||||
|
|||||||
Reference in New Issue
Block a user