alunduil / alunduil/collection-json.hs

Vale gates warning-severity findings on the lines a PR changes

オープン 初心者向け
#212 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
documentation
主要言語
Haskell
スター
3
フォーク
1
平均マージ
5時間 53分
マージ済み PR(30日)
63

説明

## Summary

Add a diff-aware Vale layer through reviewdog so warning-severity prose findings
block on the lines a PR touches, while the tree-wide pre-commit hook stays at
error severity.

## Motivation

The vale pre-commit hook runs `--minAlertLevel=error` across the whole tree
(`.pre-commit-config.yaml:33-38`). That is the right setting for a tree with
existing prose debt, but it means warning-severity findings never block
anything — including ones a PR newly introduces. Prose quality then depends on
review catching what the linter already knows.

vale's exit code ignores non-error severities, so the gate has to be reviewdog:
`vale --output=JSON` becomes rdjsonl, reviewdog filters to added lines and fails
at warning or above. alunduil-chezmoi runs exactly this shape in its `vale.yml`
(alunduil/alunduil-chezmoi#310) alongside the same error-severity pre-commit
hook.

## Scope

- Add `.github/workflows/vale.yml`, `pull_request` only — "added lines" needs a
PR diff, and reviewdog's `github-pr-check` reporter needs PR context.
- Pipe `vale --output=JSON` through reviewdog with `fail_level` at warning;
surface suggestion severity as non-blocking annotations.
- `permissions: contents: read` plus `checks: write`.
- Styles stay vendored under `.vale/styles/`; no `vale sync` step.

## Acceptance criteria

- [ ] A PR introducing a warning-severity finding on a changed line fails.
- [ ] A pre-existing warning-severity finding on an untouched line does not fail.
- [ ] Suggestion-severity findings annotate without failing.
- [ ] Pushes to `main` keep the error-severity gate through `Pre-commit`.

## Additional context

#126 landed the tree-wide error-severity hook; this is the diff-aware layer on
top of it, not a replacement. Surfaced by a CI and checks audit.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start by reading the Vale hook in .pre-commit-config.yaml:33-38 and the issue's reviewdog example shape, then create .github/workflows/vale.yml for pull_request events. Verify with test PRs that warning findings fail only on added lines, suggestion findings annotate without failing, untouched warnings do not fail, and pushes to main retain the Pre-commit error gate.

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

評価

技術スタック
github-actions
領域
ci-cd
issue の種類
機能追加
難易度
2/5
見積もり時間
1〜3時間
活発さ
静か
明瞭さ
明確に書かれている
初心者へのやさしさ
76/100

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

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