diff --git a/gitgalaxy/standards/language_standards.py b/gitgalaxy/standards/language_standards.py index c92a2205e..91da7254e 100644 --- a/gitgalaxy/standards/language_standards.py +++ b/gitgalaxy/standards/language_standards.py @@ -38,7 +38,7 @@ | C | 100.0% | 99.5% | 100.0% | 100.0% | | Cpp | 100.0% | 100.0% | 100.0% | 100.0% | | Csharp | 100.0% | 100.0% | 100.0% | 100.0% | -| Css | 83.3% | 80.0% | N/A | N/A | +| Css | 100.0% | 100.0% | N/A | N/A | | Dart | 100.0% | 100.0% | 100.0% | 100.0% | | Fortran | 100.0% | 100.0% | 100.0% | 100.0% | | Go | 100.0% | 100.0% | 100.0% | 100.0% | diff --git a/tests/tools/tree_sitter_accuracy_audit.py b/tests/tools/tree_sitter_accuracy_audit.py index 5f45eb01e..05172a51c 100755 --- a/tests/tools/tree_sitter_accuracy_audit.py +++ b/tests/tools/tree_sitter_accuracy_audit.py @@ -294,6 +294,22 @@ languages' Func Precision badge from ctags to GitGalaxy). Baseline regenerated and reviewed rather than treated as a real regression, same "ground truth can be wrong" precedent as every other entry in this section. + + css's at-rule "functions" (`@media`/`@supports`/`@container`/`@layer`/`@keyframes`) show a + permanent `args_comparable` discrepancy: GitGalaxy assigns them a param count read from the + at-rule prelude tokens (`@media all and (max-width: 600px)` -> got=3; + `@layer wp-ui-components {` -> got=1), while `_get_param_count` here always returns 0 for them + -- an at-rule statement node has no "parameters" field and isn't a `function_definition`, so + none of that function's branches apply. This is not a GitGalaxy defect: a CSS at-rule genuinely + has no formal parameter list, and counting these at-rules as functions at all is a deliberate, + ledger-validated design choice (`tri_comparison_ledger.json`'s + `css/function/existence/agree[gitgalaxy,tree_sitter]_vs[ctags]`, status validated: at-rule + keywords are "the closest function-shaped construct CSS has"). Same "no formal signature to + read at the declaration site" shape as the shell/perl note above (#1518/#1519), minus a + body-scan heuristic to bridge it -- the informational `args_comparable` count simply carries + these as non-exact, and the gated `args_exact_match` is unaffected (an at-rule with a + genuinely 0-token prelude, `@media {`, still matches 0 == 0). Noted here so the css + `args_comparable` gap isn't mistaken for a real args-regex bug on a future baseline review. """ import argparse diff --git a/tests/tree_sitter_accuracy_baseline_css.json b/tests/tree_sitter_accuracy_baseline_css.json index 2bee465ca..95751c0f9 100644 --- a/tests/tree_sitter_accuracy_baseline_css.json +++ b/tests/tree_sitter_accuracy_baseline_css.json @@ -1,12 +1,12 @@ { - "args_comparable": 20, - "args_exact_match": 14, + "args_comparable": 25, + "args_exact_match": 19, "corpus_path": "language-crucible/data/css", "extra_classes": 0, - "extra_functions": 5, + "extra_functions": 0, "files_scanned": 21, "found_classes": 227, - "found_functions": 20, + "found_functions": 25, "real_classes": 227, - "real_functions": 24 + "real_functions": 25 }