sh/shell.sh: shfmt listing exceeds Windows's command-line limit

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

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

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
bash, rust, shell

調査の方向性

sh/shell.shから始めて、shfmt -f=0に渡す追跡対象ファイルのリストがどのように作られるかをたどり、その後、フィルタリング済みのリストを使うshfmt --diffとshellcheckの呼び出しを確認します。WindowsネイティブのGit Bashでjust checkを実行して再現します。シェルモジュールが、Windowsのコマンドライン長の上限を超えずに、リポジトリ内の追跡対象ファイル全体を処理できれば完了です。

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

説明

just check fails its shell module on native Windows (Git Bash) for any change:

sh/shell.sh: line 21: .../WinGet/Links/shfmt: Argument list too long

sh/shell.sh passes every tracked file to one shfmt -f=0 -- "${tracked[@]}" call to find the shell scripts. On Windows, the whole command line is capped at 32,767 characters, which this repository's tracked file list exceeds. The later shfmt --diff and shellcheck calls on the filtered list may hit the same cap as the script count grows.

Fix: feed the listing through xargs -0 (which splits to fit the limit), or pre-filter by extension and shebang before calling shfmt.

Found while checking moq-dev/moq#10643 on Windows at a398a2c2a1.

(Written by Claude Opus 5.5)

主要言語
Rust
スター
1.6k
フォーク
251
平均マージ
9時間 50分
マージ済み PR(30日)
804

環境構築

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

はじめの一歩

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

moq-dev/moq のほかの issue

moq-dev/moq の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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