Commit e4dd8cb 1 parent 07e6245 commit e4dd8cb Copy full SHA for e4dd8cb
File tree 2 files changed +21
-0
lines changed
2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 21
21
node-version : 18
22
22
- run : npm install
23
23
- run : npm test
24
+ - run : scripts/test-keywords.sh
24
25
validate_tests :
25
26
runs-on : ["ubuntu-latest"]
26
27
strategy :
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ mkdir -p tmp/tree-sitter-sql/
4
+
5
+ cat src/grammar.json |
6
+ jq ' .rules | to_entries[] | select(.key | contains("keyword")) | .key' |
7
+ tr -d ' "' |
8
+ sort > tmp/tree-sitter-sql/keywords.txt
9
+
10
+ cat queries/highlights.scm |
11
+ grep -o " keyword\w\+" |
12
+ sort > tmp/tree-sitter-sql/highlights.txt
13
+
14
+ keywords=$( comm -3 tmp/tree-sitter-sql/keywords.txt tmp/tree-sitter-sql/highlights.txt)
15
+
16
+ if [[ " $keywords " ]]; then
17
+ echo " ERROR: keywords in grammar.json are not in sync with queries/highlights.scm"
18
+ echo $keywords
19
+ exit 1
20
+ fi
You can’t perform that action at this time.
0 commit comments