Conversation
cargo run -- は git clone しか導入手段が無かったころの書き方。バイナリ配布が あるので yuki-tool を基本にし、ソースから使う場合の補足に落とす。init が 最初の 1 回だけである理由 (yukicoder.toml を作るのはこのときだけ) も添える。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
init の仕事は「yukicoder.toml が無ければ作る」と .env の gitignore 警告だけで、 残りは new の下位互換だった。new がリポジトリを見つけられなければカレント ディレクトリに作って続行するようにし、init を削除する。最初の 1 問も 2 問目以降も同じコマンドで済む。 壊れた yukicoder.toml は「無い」と同一視しない (既存リポジトリの中に別の 設定を作ってしまうため、読み込みエラーとして止める)。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
変更内容
initの仕事は「yukicoder.tomlが無ければ作る」と .env の gitignore 警告だけで、残り (問題の取得) はnewの下位互換でした (newにはさらに testcases/ solutions/ の骨組み・--dir・二重登録チェックがある)。newがリポジトリを見つけられなければカレントディレクトリにyukicoder.tomlを作って続行するようにし、initを削除しました。最初の 1 問も 2 問目以降もyuki-tool new <問題ID>の 1 コマンドになります。yukicoder.tomlは「無い」と同一視せず、読み込みエラーとして止めます (既存リポジトリの中に別の設定を作らないため)initへの言及もnewに置き換えinitが消える) が、v0.2.0 直後の今が変え時という判断ですこのブランチは PR #8 (docs のコマンド表記) の上に積んであります。#8 を先にマージするか、これだけマージすれば #8 の分も入ります。
実測
空のディレクトリで
yuki-tool new 13954:yukicoder.toml を書きました (ここをリポジトリのルートとして扱います)+ .env 警告 → 問題取得 → 骨組み作成まで一気に完了単体テスト 53 件、clippy
-D warnings/ fmt 通過。🤖 Generated with Claude Code
https://claude.ai/code/session_01GDSDbQcqbZqhXQ1dVo9BeE