Add a --lint (lint-only) flag: run the Maithili linter on a .dmai file and report warnings without executing the program.
Why: editors/CI can check files safely; learners get feedback without side effects; it is also the natural building block for a future pre-commit hook for .dmai projects.
Sketch: in main(), on --lint <file>: read the file, run lint_maithili_code, print the existing warning format, exit EXIT_OK if clean or EXIT_LINT_ERROR if not. No transpile, no exec.
Tests: clean file → 0 with no output beyond a success line; examples/error.dmai → exit 4 and warnings printed; file missing → exit 3.
Good first issue.
Add a
--lint(lint-only) flag: run the Maithili linter on a.dmaifile and report warnings without executing the program.Why: editors/CI can check files safely; learners get feedback without side effects; it is also the natural building block for a future pre-commit hook for
.dmaiprojects.Sketch: in
main(), on--lint <file>: read the file, runlint_maithili_code, print the existing warning format, exitEXIT_OKif clean orEXIT_LINT_ERRORif not. No transpile, no exec.Tests: clean file → 0 with no output beyond a success line;
examples/error.dmai→ exit 4 and warnings printed; file missing → exit 3.Good first issue.