Skip to content

[FEATURE] Add --lint flag: lint a .dmai file without executing it #35

Description

@alphacrack

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low priority: nice to havearea:climaithili_dsl/cli.py and sandboxenhancementNew feature or requestgood first issueGood for newcomers

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions