refactor: Renamed DIAGNOSTIC_TODOS.yaml to DIAGNOSTIC_TESTS.yaml.

This commit is contained in:
Spencer Brower
2026-08-10 16:38:15 -04:00
parent cf32ff0218
commit 6c09c73eb3
3 changed files with 10 additions and 10 deletions
+5 -5
View File
@@ -28,11 +28,11 @@ Remember to polish existing features before moving on to new ones.
- [ ] write test for error when n == 0
- [x] warn when using negative numbers
- [x] warn when using default arg on string
- [x] add the above warnings to DIAGNOSTIC_TODOS.md
- [x] add the above warnings to DIAGNOSTIC_TESTS.md
- [ ] Instead of "clearer form", be exact: "last 5"
- [ ] write tests for `first 0` & `last 0`
- [ ] update tests to assert diagnostics when appropriate
- do we want to do this or just use DIAGNOSTIC_TODOS.md as the tests?
- do we want to do this or just use DIAGNOSTIC_TESTS.md as the tests?
- [ ] also update to use file logger so they don't clog up the output
- [ ] narrow highlight in diagnostic to relevent part of line.
@@ -58,11 +58,11 @@ All diagnostics (errors) should show
- [ ] try to make file paths clickable links.
- [ ] make sure the frontmatter parser has good diagnostics.
- [ ] add all known diagnostics to [DIAGNOSTIC TODOS](./DIAGNOSTIC_TODOS.yaml).
- [ ] fix the broken diagnostics in [DIAGNOSTIC TODOS](./DIAGNOSTIC_TODOS.yaml)
- [ ] add all known diagnostics to [DIAGNOSTIC TODOS](./DIAGNOSTIC_TESTS.yaml).
- [ ] fix the broken diagnostics in [DIAGNOSTIC TODOS](./DIAGNOSTIC_TESTS.yaml)
- [ ] show *stack trace* for template partials?
- [ ] show where the typo occurred (config file path for `apply_extension_config`, full `-ext:value` for `parse_extension_list`)
- [ ] **all** diagnostics in [DIAGNOSTIC TODOS](./DIAGNOSTIC_TODOS.yaml) must be tested.
- [ ] **all** diagnostics in [DIAGNOSTIC TODOS](./DIAGNOSTIC_TESTS.yaml) must be tested.
- [ ] only report format errors once.
- [ ] only report missing partial errors once.
- [ ] better diagnostics for syntax errors in treesitter.
+5 -5
View File
@@ -480,10 +480,10 @@ test_parse_error_pipe_parse_in_inverted_keeps_double_braces :: proc(t: ^testing.
}
// ---------------------------------------------------------------------------
// Data-driven diagnostic cases (from DIAGNOSTIC_TODOS.yaml)
// Data-driven diagnostic cases (from DIAGNOSTIC_TESTS.yaml)
//
// write_diagnostic_tests generates diagnostic_test_cases_test.odin from the
// enabled cases in DIAGNOSTIC_TODOS.yaml. On the first run (or when the YAML
// enabled cases in DIAGNOSTIC_TESTS.yaml. On the first run (or when the YAML
// changes), it regenerates the file and fails. On the second run, each case
// runs as an individual test via run_diag_case.
// ---------------------------------------------------------------------------
@@ -541,7 +541,7 @@ diag_slug :: proc(name: string) -> string {
}
run_diag_case :: proc(t: ^testing.T, name: string) {
cases := load_diag_cases("../DIAGNOSTIC_TODOS.yaml")
cases := load_diag_cases("../DIAGNOSTIC_TESTS.yaml")
ctx := diag_ctx()
partials := diag_partials()
@@ -661,12 +661,12 @@ run_diag_case :: proc(t: ^testing.T, name: string) {
return
}
testing.expectf(t, false, "case '%s' not found in DIAGNOSTIC_TODOS.yaml", name)
testing.expectf(t, false, "case '%s' not found in DIAGNOSTIC_TESTS.yaml", name)
}
@(test)
write_diagnostic_tests :: proc(t: ^testing.T) {
cases := load_diag_cases("../DIAGNOSTIC_TODOS.yaml")
cases := load_diag_cases("../DIAGNOSTIC_TESTS.yaml")
testing.expect(t, len(cases) > 0, "should load diagnostic cases")
sb: strings.Builder