Repository navigation
ci: add GitHub annotations for Japanese textlint findings - #14778
Conversation
|
Preview deployment ✅ Deployment complete!
|
ArmandPhilippot
left a comment
There was a problem hiding this comment.
Thanks, the changes make sense to me! However, we have some conflicts (probably because of #14782), and we have another ongoing PR updating deps (#14784) so we might end up with new conflicts. 😅
I'm pinging @morinokami to ensure this is what Japanese translators want, as textlint is a bit unusual in our translation process. And also to let him know he can merge this if the conflicts are resolved and I'm not around at that time! No need to wait! ✔️
@ArmandPhilippot |
morinokami
left a comment
There was a problem hiding this comment.
@ArmandPhilippot Thanks for the ping! I like this change, as it makes it much easier to spot problematic lines at a glance instead of digging through CI logs. (Maybe we could do the same for broken links detected by CI?)
@Yusaku01 Thanks for your contribution! LGTM!!
|
Thanks, Shinya!
Isn't that already the case? I can see the same kind of annotations in https://github.com/withastro/docs/pull/14452/changes#diff-64bc37c347d5fd63b00742ef646432bfe2bada3efd75618bfe7f7a384bc9b41f The issue, I suppose, is when errors occur in an unchanged file? I'm not sure how we could improve that but, yeah, a more friendly way to discover them would be helpful. I'll try to explore ideas! |
Haha, you're absolutely right! I've been looking at the logs this whole time and somehow missed that 😅 Thanks for pointing that out, and for looking into possible improvements! |
|
Thank you both for reviewing and merging! |
Description (required)
Purpose
The Japanese lint workflow currently reports findings in job logs and emits a generic failure annotation. Show each finding at the relevant line in the pull request so contributors can locate it without searching the logs.
With the GitHub formatter, printing the saved log again would emit each annotation command twice. Removing that reporting step avoids this repetition.
Why textlint 15.8.0?
The GitHub formatter was introduced in v15.5.0. v15.8.0 also adds per-file log groups, so this version provides both inline annotations and grouped CI logs.
Verification
Screenshot from earlier fork verification; the demonstration PR above keeps a live example available.
One CLI behavior change is relevant: when the target pattern matches zero files, local checks returned 0 with 14.7.2 and 2 with 15.8.0. Failing in this case exposes missing lint coverage; the current documentation glob succeeds.
CI timing
Two earlier fork runs per version used the same input, including one intentional violation, and had no pnpm cache hits. GitHub's whole-second timings exclude queue time.
No substantial increase appeared in this small sample. These measurements precede restoration of the local-command hint.
Sources: baseline attempts, updated PR run, updated manual run.
References