From 6de324e81e0d7ce059ac85f3aaf5699c4e72498a Mon Sep 17 00:00:00 2001 From: sit-d <281093367+sit-d@users.noreply.github.com> Date: Thu, 2 Jul 2026 20:33:15 -0600 Subject: [PATCH] fix: lint generated grammar by default --- scripts/lint_grammar.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/lint_grammar.py b/scripts/lint_grammar.py index 1b08f22..192cde8 100644 --- a/scripts/lint_grammar.py +++ b/scripts/lint_grammar.py @@ -7,6 +7,9 @@ Usage: python scripts/lint_grammar.py [path/to/fasmg.tmLanguage.json] + +When no path is provided, lint the generated TextMate grammar under `dist/`, +matching `scripts/gen_all.py --lint`. """ from __future__ import annotations @@ -16,7 +19,7 @@ from pathlib import Path HERE = Path(__file__).resolve().parent -DEFAULT_GRAMMAR = HERE.parent / "fasmg.tmLanguage.json" +DEFAULT_GRAMMAR = HERE.parent / "dist" / "fasmg.tmLanguage.json" # Keys in the grammar JSON that contain regex strings. REGEX_KEYS = {"match", "begin", "end"}