Skip to content

[All] CSpell の導入 #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Apr 19, 2025
Merged

[All] CSpell の導入 #21

merged 10 commits into from
Apr 19, 2025

Conversation

blendthink
Copy link
Collaborator

@blendthink blendthink commented Apr 19, 2025

Issue

Closes #17

概要

スペルチェックツール(CSpell)を導入し、プルリクエスト時に自動チェックを実行するように設定しました。

詳細

導入したツールと設定

  • CSpellの基本設定(cspell.jsonc
    • プロジェクト固有の用語(FlutterKaigi, Supabase, CODEOWNERS, bunx, marocchino)
    • 無視するパス(node_modules, .dart_tool, 設定ファイルなど)
    • 必要な辞書パッケージ(software-terms, dart, flutter, sql)
  • GitHub Actionsワークフロー(.github/workflows/check-spell.yaml
    • プルリクエスト時に自動実行
    • .tool-versions から bun のバージョンを読み込み
    • スペルチェックの実行
  • VS Code設定(.vscode/extensions.json
    • Code Spell Checker 拡張機能を推奨

変更の背景

  • コード、コメント、ドキュメント内のタイプミスを自動検出
  • 日本語・英語の両方に対応
  • エディタに依存せず、全員が同じルールでチェック可能
  • CI/CD パイプラインに組み込むことで、PRレビュー時の負担軽減

その他

  • チェックのタイミング:プルリクエスト作成時
  • エラーが検出された場合、PRのチェックが失敗します

@blendthink blendthink changed the title CSpell の導入 [All] CSpell の導入 Apr 19, 2025
Copy link
Contributor

@tatsutakein tatsutakein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ご対応ありがとうございます!
一点コメント入れました 🙋

Comment on lines +12 to +18
- name: Read .tool-versions
uses: marocchino/tool-versions-action@18a164fa2b0db1cc1edf7305fcb17ace36d1c306 # v1.2.0
id: versions
- name: Setup bun
uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2.0.1
with:
bun-version: ${{ steps.versions.outputs.bun }}
Copy link
Contributor

@tatsutakein tatsutakein Apr 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nits-badge

ここは mise のアクション使うと 1 アクションで実現できます 🙋
https://github.com/jdx/mise-action

Suggested change
- name: Read .tool-versions
uses: marocchino/tool-versions-action@18a164fa2b0db1cc1edf7305fcb17ace36d1c306 # v1.2.0
id: versions
- name: Setup bun
uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2.0.1
with:
bun-version: ${{ steps.versions.outputs.bun }}
- name: mise action
uses: jdx/mise-action@5083fe46898c414b2475087cc79da59e7da859e8 # v2.1.11

Copy link
Collaborator Author

@blendthink blendthink Apr 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tatsutakein
これ考えたのですが、余計なもののインストールが走っちゃう気がしてやめました、、!🙏

何か絞る方法があれば教えていただけると助かります🙏

Copy link
Contributor

@tatsutakein tatsutakein Apr 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

あ、なるほど!そこを懸念されていたのですね 🙇

何を気にしているのか次第なところではありますが…!
インストールの時間を気にされているようであれば jdx/mise-action はキャッシュしてくれるのでわりとスムーズにインストールできるかなと思ってます。
単純に使用しないものまでインストールが走ってしまうことを気にされているようであれば現状のままで良い気がします 🙏

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

悩ましいところですが、ひとまずは今のままでいかせてください🙏

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

おけまるです!
決めの問題だと思うので、問題ないように思います 🙆

Copy link
Contributor

@tatsutakein tatsutakein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ご対応ありがとうございます!
LGTM です 👍

Comment on lines +12 to +18
- name: Read .tool-versions
uses: marocchino/tool-versions-action@18a164fa2b0db1cc1edf7305fcb17ace36d1c306 # v1.2.0
id: versions
- name: Setup bun
uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2.0.1
with:
bun-version: ${{ steps.versions.outputs.bun }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

おけまるです!
決めの問題だと思うので、問題ないように思います 🙆

@blendthink
Copy link
Collaborator Author

レビューありがとうございます!
base に指定しているブランチがマージされたらマージさせていただきます🙏

Base automatically changed from tatsutakein/GH-18 to main April 19, 2025 14:13
@blendthink blendthink merged commit 99a376c into main Apr 19, 2025
1 check passed
@blendthink blendthink deleted the GH-17 branch April 19, 2025 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Staff] CSpell のセットアップと設定
2 participants