Julia: `format(".")` + `git diff` + `exit(1)` is a formatting gate; biome via biome_jll in a julia -e one-liner

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

メンテナーはふだん 1 日以内に返信

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
62/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
julia, python
領域
ci-cd, tooling

調査の方向性

偽陰性は project_validator/ecosystems/julia.py(169行目付近)の正規表現 _FAILS が原因です。この正規表現は || exit(1) と @assert format のみを受け付けます。まず corpus/ .github/workflows/format_check.yml の18〜31行目にある JuMP.jl のワークフローを確認し、julia プロファイルのコード整形チェックがそれをどう読み取っているかを調べてください。このワークフローが code-formatting で PASS と判定され、既存の julia コーパスの期待値が引き続き成立し、テストスイートが通れば完了です。Documenter.jl の biome 項目は確信度が低いため、今回の修正からは外して構いません。

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

説明

JuMP.jl's format-check job runs format(".") and exits 1 when git diff is non-empty — exactly the "fails on a changed file" criterion the Julia profile documents — but the recogniser accepts only the literal || exit(1) or @assert format: FAIL "CI runs JuliaFormatter but only to rewrite files". Documenter.jl's make check-js runs biome check through the biome_jll wrapper inside a julia -e one-liner → code-formatting/static-analysis WARN.

Evidence from the corpus audit

jump-dev/JuMP.jl / code-formatting
  • kind: FALSE_NEGATIVE
  • actual: FAIL: CI runs JuliaFormatter but only to rewrite files; nothing fails when they are not formatted
  • expected: PASS: the format-check job runs format(".") and then exits 1 when git diff is non-empty, which is exactly the "fails on a file it changed" criterion the Julia profile documents; the recogniser only accepts the literal || exit(1) or @assert format.
  • evidence: .github/workflows/format_check.yml:18-31: shell: julia --color=yes {0} / run: | / ... / format("."; verbose = true) / out = String(read(Cmd(\git diff`)))/ if isempty(out)/ exit(0)/ end/ @error "Some files have not been formatted !!!"/ write(stdout, out)/ exit(1); project_validator/ecosystems/julia.py:169: _FAILS = re.compile(r"||\sexit\s(\s1\s)|@assert\s+format")`
  • repro: the 12-line julia step above in a workflow with shell: julia --color=yes {0}
  • confidence: high
JuliaDocs/Documenter.jl / code-formatting, static-analysis (Biome via biome_jll)
  • kind: UNSUPPORTED
  • actual: code-formatting WARN .prettierrc, biome.jsonc is defined but CI does not run prettier, deno fmt, oxfmt, dprint or biome; static-analysis WARN biome is configured (biome.jsonc) but does not run
  • expected: CI's "Biome (JS code formatting)" job runs make check-js, whose recipe runs biome check through the Julia biome_jll wrapper and exits with biome's status. The Makefile target is followed (no unread reason) but the biome invocation inside a julia one-liner is not recognised.
  • evidence: .github/workflows/CI.yml:315-324: biome: / name: Biome (JS code formatting) ... - run: make install-biome / - run: make check-js; Makefile:37-38: check-js: / julia --project=$(BIOME) -e 'using biome_jll; exit(run(ignorestatus(\$$(biome_jll.biome()) check`)).exitcode)'`
  • repro: Makefile target with the recipe above + run: make check-js
  • confidence: low (exotic; listed for completeness)

Found by the regression-corpus audit (235 real repositories, one or more per ecosystem profile; corpus and expected results in corpus/). Evidence is quoted from the audited checkouts at the commits pinned in corpus/projects.toml; <checkouts>/<owner>__<repo> is such a checkout.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ByTXNqDWdM7HzezrFtEvQt

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

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

cpp-best-practices/project_validator のほかの issue

cpp-best-practices/project_validator の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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