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

オープン 初心者向け
#35 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
python
領域
cli

調査の方向性

main() から始めて、CLI が引数を振り分けている箇所を確認し、既存の lint_maithili_code の警告と、EXIT_OK、EXIT_LINT_ERROR、ファイル未検出の終了コードがどこで既に生成されているかを調べてください。ファイルを読み込み、トランスパイルも実行もせずにリントする --lint <file> の分岐を追加します。エラーのないファイルは終了コード 0 と成功行を出力して終了し、examples/error.dmai は警告を表示して終了コード 4 で終了し、存在しないファイルは終了コード 3 で終了すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

area:cli enhancement good first issue P3

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.

主要言語
Python
スター
1
フォーク
4
平均マージ
12日 21時間
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

alphacrack/python-maithili-dsl のほかの issue

alphacrack/python-maithili-dsl の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。