Skip to content

Commit e5da72e

Browse files
committed
Add CLAUDE.md guide and update skipped tests list
- Add CLAUDE.md with instructions for continuing parser development - Update skipped_tests_by_size.txt to reflect 998 remaining skipped tests
1 parent 92e400b commit e5da72e

File tree

2 files changed

+47
-8
lines changed

2 files changed

+47
-8
lines changed

CLAUDE.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Claude Development Guide
2+
3+
## Next Steps
4+
5+
To continue implementing parser support for skipped tests, consult:
6+
7+
```
8+
skipped_tests_by_size.txt
9+
```
10+
11+
This file lists all skipped tests ordered by query file size (smallest first). Smaller tests are generally simpler to implement.
12+
13+
## Workflow
14+
15+
1. Pick tests from `skipped_tests_by_size.txt` starting from the top
16+
2. Check the test's `query.sql` to understand what SQL needs parsing
17+
3. Check the test's `ast.json` to understand the expected output format
18+
4. Implement the necessary AST types in `ast/`
19+
5. Add parser logic in `parser/parser.go`
20+
6. Add JSON marshaling functions in `parser/parser.go`
21+
7. Enable the test by setting `{"skip": false}` in its `metadata.json`
22+
8. Run `go test ./parser/...` to verify
23+
9. **Update `skipped_tests_by_size.txt`** after enabling tests
24+
25+
## Updating skipped_tests_by_size.txt
26+
27+
After enabling tests, regenerate the file:
28+
29+
```bash
30+
cd parser/testdata
31+
for dir in */; do
32+
if [ -f "$dir/metadata.json" ] && grep -q '"skip": true' "$dir/metadata.json" 2>/dev/null; then
33+
if [ -f "$dir/query.sql" ]; then
34+
size=$(wc -c < "$dir/query.sql")
35+
name="${dir%/}"
36+
echo "$size $name"
37+
fi
38+
fi
39+
done | sort -n > ../../skipped_tests_by_size.txt
40+
```
41+
42+
## Test Structure
43+
44+
Each test in `parser/testdata/` contains:
45+
- `metadata.json` - `{"skip": true}` or `{"skip": false}`
46+
- `query.sql` - T-SQL to parse
47+
- `ast.json` - Expected AST output

skipped_tests_by_size.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@
157157
117 Baselines90_CreateMasterKeyStatementTests
158158
118 Baselines100_DeclareVariableWithAssignmentTests
159159
118 Baselines130_AlterTableSwitchStatementTests130
160-
118 BaselinesCommon_RollbackTransactionStatementTests
161160
120 VariableTests
162161
123 Baselines100_AlterIndexStatementTests100
163162
124 AcceleratedDatabaseRecoveryTests150
@@ -178,14 +177,12 @@
178177
135 SimpleJsonObjectReturn160
179178
136 Baselines160_ShiftOperatorTests160
180179
136 Baselines90_WaitForStatementTests90
181-
136 CreateDefaultStatementTests
182180
136 GetConversationGroupStatementTests
183181
137 Baselines90_CreateCredentialStatementTests
184182
138 Baselines90_AlterXmlSchemaCollectionStatementTests
185183
138 Baselines90_CreateContractStatementTests
186184
140 Baselines90_GetConversationGroupStatementTests
187185
141 Baselines100_BackupStatementTests100
188-
141 BaselinesCommon_WaitForStatementTests
189186
143 AlterIndexStatementTests100
190187
143 AlterTriggerStatementTests
191188
145 Baselines130_AlterDatabaseScopedCredentialStatementTests130
@@ -194,7 +191,6 @@
194191
149 DeclareVariableElementTest
195192
150 Baselines150_DeclareTableVariableTests150
196193
150 Baselines90_CreateSynonymStatementTests
197-
154 BaselinesCommon_CommitTransactionStatementTests
198194
154 CreateRuleStatementTests
199195
154 TestJsonArrayReturn160
200196
157 BaselinesCommon_AlterTableTriggerModificationStatementTests
@@ -214,14 +210,12 @@
214210
170 Baselines90_AlterSchemaStatementTests
215211
171 ReadTextStatementTests
216212
172 CreateDatabaseScopedCredentialStatementTests130
217-
172 CreateMasterKeyStatementTests
218213
174 DropStatementsTests110
219214
175 CreateSearchPropertyListStatementTests
220215
178 Baselines110_UseFederationTests110
221216
179 Baselines110_CreateSearchPropertyListStatementTests
222217
180 BackupStatementTests100
223218
181 Baselines90_AlterRemoteServiceBindingStatementTests
224-
181 CommitTransactionStatementTests
225219
181 CreateAlterFederationStatementTestsAzure110
226220
182 Baselines110_DropStatementsTests110
227221
183 Baselines100_QueueStatementTests100
@@ -231,10 +225,8 @@
231225
184 Baselines110_CreateAlterFederationStatementTestsAzure110
232226
184 BaselinesCommon_SaveTransactionStatementTests
233227
185 CreatePartitionFunctionStatementTests
234-
187 WaitForStatementTests
235228
189 CreateCredentialStatementTests100
236229
192 GotoStatementTests
237-
193 RollbackTransactionStatementTests
238230
194 AlterServerConfigurationStatementTests
239231
194 BaselinesCommon_AlterTableConstraintModificationStatementTests
240232
196 Baselines100_AlterServerConfigurationStatementTests

0 commit comments

Comments
 (0)