Skip to content

Conversation

@kubosho
Copy link
Contributor

@kubosho kubosho commented Nov 26, 2025

概要

「テスト手順の書式を揃える #226」より:

関連する達成基準、達成方法など、箇条書きとカンマ区切りの記法のブレをなくす。

この記法のブレをなくす1つの手段として、MarkdownlintをGitHub Actionsで実行するようにしました。

変更点

  • MarkdownlintをGitHub Actions上で実行するようにした
  • DavidAnson/markdownlint-cli2を依存関係に追加した
  • node_modules 以下のMarkdownファイルがlint対象にならないよう、 .gitignorenode_modules/ を追加した
  • 修正しづらい・どちらでもいいルールを無効化した(MD010 - Hard tabsmMD013 - Line lengthMD024 - Multiple headings with the same contentなど)
  • すぐに修正できるlintエラーを修正した
    • bbbf09a のコミットのみ、文章を追加している形になるため、変更が問題ないかレビューいただけると助かります

備考

Markdownlintを実行するためのCLIとして、igorshubovych/markdownlint-cliを使わなかった理由はmarkdownlin-cli2のほうが総合的に優れていると判断したためです。自分が考えるmarkdownlint-cli2の優位性は下記の通りです。

  • 直接依存するパッケージが少ない
  • 変更点がCHANGELOG.mdで管理されていて、変更された点の一覧性が高い
  • IssuesやPull Requestsが少ない(ちゃんとfixまたはcloseされている)

@kubosho kubosho requested a review from nishimotz November 26, 2025 08:42
@kubosho kubosho self-assigned this Nov 26, 2025
on:
pull_request:
branches:
- main
Copy link
Contributor Author

Choose a reason for hiding this comment

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

現状default branchはmasterですが、今後mainへ移行したときにCIが動かないことを防ぐためにmasterとmain両方設定しています。

Copy link
Contributor

@nishimotz nishimotz left a comment

Choose a reason for hiding this comment

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

よさそうです。ありがとうございます。

@kubosho kubosho merged commit 039b28d into waic:master Dec 3, 2025
1 check passed
@kubosho kubosho deleted the add-markdown-ci branch December 3, 2025 08:02
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.

Markdownlintを実行するためのCI設定

2 participants