Repository navigation
chore(cspell): checkin をプロジェクトの辞書に登録する - #93
Merged
Merged
Conversation
スペルチェッカーは `checkin` を知らない。cspell 10.3.3 に `The checkin page is ready.` を読ませると `Unknown word (checkin)` が出る (2026-09-20 に、設定を何も置いていない使い捨てのディレクトリをそのまま作業 ディレクトリにして `npx cspell@10.3.3 --no-progress --no-summary doc.txt` を 実行して確認。同じ文書に入れた `project` は報告されず、でたらめな綴りは 報告されたので、何でも報告しているわけではない)。`checkin` はこのリポジトリ の名前で、追跡されているファイルの中に多数現れる。数え方は `git ls-files | grep -v pnpm-lock.yaml | xargs grep -oIE '[Cc]heckin' | wc -l` である。 置き場所はリポジトリ直下の `cspell.json` にした。Code Spell Checker 拡張機能 4.9.3 の README が、プロジェクト単位の辞書はここに置くものだと書いている。 > To add a dictionary at the project level should be defined in a > `cspell.json` file so it can be used with the `cspell` command line tool. > This file can be either at the project root or in the .vscode directory. 同じ README は、設定の優先順位の 1 番目に作業フォルダの `cspell.json` を挙げ、 `cspell.json` の設定が VS Code の `settings.json` の同等の設定を上書きすると 書いている。 > Order of precedence: > 1. Workspace Folder `cspell.json` > 1. Workspace Folder `.vscode/cspell.json` > 1. Config Folder `.config/cspell.json` > 1. VS Code Preferences `cSpell` section. > Words added to the dictionary are placed in the `cspell.json` file in the > _workspace_ folder. Note, the settings in `cspell.json` will override the > equivalent cSpell settings in VS Code's `settings.json`. ## 退けた候補: .vscode/settings.json に cSpell.words を置く `cspell` コマンドがこれを読まないので退けた。同じ文書に対して、置く設定だけを 変えて測った(2026-09-20、cspell 10.3.3。ケースごとに専用のディレクトリを作り、 そのディレクトリを作業ディレクトリにして、相対パスで `npx cspell@10.3.3 --no-progress --no-summary doc.txt` を実行した)。 - 設定を置かない: `checkin` とでたらめな綴りの両方が報告される - `.vscode/settings.json` に `cSpell.words`: 設定を置かない場合と同じ結果 - リポジトリ直下の `cspell.json` に `words`: `checkin` は報告されず、でたらめ な綴りだけが報告される - `.vscode/cspell.json` に `words`: 直下に置いた場合と同じ結果 どの場合にもでたらめな綴りを文書に残したのは、`checkin` が報告されないことと、 cspell が何も検査していないこととを区別するためである。 ## version について `cspell` コマンドは `version` が無くても上と同じ結果になる(同じ手順で測った)。 README の例が `Version of the setting file. Always 0.2` という注釈付きで `"version": "0.2"` を置いているので、その形に合わせた。 ## 確かめていないこと 拡張機能そのものがこの `cspell.json` を読むことは確かめていない。この環境で VS Code を動かせないためである。根拠は上に引いた README の優先順位の一覧と、 `cspell` コマンドでの実測だけである。 ## 解かないこと - cspell をこのリポジトリの検査に足さない。`package.json` のスクリプトにも CI にも加えない。足すかどうかをまだ決めていないためである。`cspell.json` に 置けば `cspell` コマンドから読めることは上で測ってあるので、後から足すとき に辞書を移し替える作業は要らない。 - `checkin` 以外の語は登録しない。 - `language`・`flagWords`・`ignorePaths` などの他の設定は置かない。 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
コミットの構成
1 本。
chore(cspell): checkin をプロジェクトの辞書に登録する。置き場所を
cspell.jsonにした根拠、.vscode/settings.jsonにcSpell.wordsを置く案を退けた実測、
versionを置いた理由は、コミットメッセージにある。ここには書かない。レビューで何を見れば足りるか
新規 1 ファイル、4 行。既存のファイルは 1 つも変えていない。機械生成の部分はない。全文が次である。
差分は次で出る。
レビューする人にお願いしたい確認
VS Code の Code Spell Checker 拡張機能そのものが、この
cspell.jsonを読むことは確かめていない。この作業環境で VS Code を動かせないためである。根拠は拡張機能の README が述べる設定の優先順位の一覧と、
cspellコマンドでの実測だけで、どちらもコミットメッセージに引いてある。つまりこの PR は、
cspellコマンドについては実測で裏づけられているが、拡張機能については README の記述だけを根拠にしている。
VS Code でこのリポジトリを開ける人に、次の 2 つの確認をお願いしたい。
checkinを含む語に綴りの警告が出ないことmainを開いた状態では、同じ語に警告が出ること2 つ目を並べているのは、警告が出ないことと、拡張機能が何も検査していないこととを区別するためである。
mainでも出ないなら、拡張機能が入っていないか、別の設定で既に抑えられている。その場合、この PR の拡張機能側の根拠は README の記述だけのままになるので、その旨をコメントでお知らせいただきたい。
マージした後に残ること
cspell はこのリポジトリの検査に入らない
package.jsonのスクリプトにも.github/workflows/ci.ymlにもcspellを足していない。マージしても CI の挙動は変わらない。綴りが検査されるのは、拡張機能を入れた人のエディタの中と、
cspellコマンドを手で叩いたときだけである。検査に足すかどうかはまだ決めていない。辞書を
cspell.jsonに置いてあるので、後から足すときに移し替える作業は要らない。登録したのは
checkinの 1 語だけlanguage・flagWords・ignorePathsなどの他の設定は置いていない。次に未知語が出たときは、同じファイルの
wordsに足すことになる。このファイルが増えていくことを、以後この語を足す人が引き受ける。
🤖 Generated with Claude Code