swift-book icon indicating copy to clipboard operation
swift-book copied to clipboard

Add automatic spell checker as part of CI?

Open Sajjon opened this issue 1 year ago • 5 comments

I recently fixed some typos in https://github.com/apple/swift-book/pull/11 and since this is a repo for a book, spelling and grammar is extra important (compared to code repo).

Has anyone any experience with Github Actions for Spell Checking, e.g. this: https://github.com/marketplace/actions/check-spelling ?

Sajjon avatar Aug 30 '22 18:08 Sajjon

I don't think any Apple repos have GitHub Actions enabled right now, but we can use this issue to discuss the kinds of prose checks that we might want to add to CI.

krilnon avatar Aug 30 '22 20:08 krilnon

@krilnon Alternatively could be tool run part of some git hook, to avoid using GitHub Actions..?

Sajjon avatar Aug 30 '22 20:08 Sajjon

It would be nice to integrate this directly in Swift-DocC tooling as well in some way, since spell-checking could provide generally-useful diagnostics at build-time.

franklinsch avatar Sep 01 '22 13:09 franklinsch

One interesting thing about your fixes in #11 are that they were mostly inside of @Comment blocks, which I'm not sure we'd want to block on in CI. DocC would be better positioned to check only the text that's going to display as documentation, and could selectively include or exclude things like code blocks.

krilnon avatar Sep 01 '22 19:09 krilnon

https://github.com/apple/swift-docc/issues/377 tracks this issue in DocC.

franklinsch avatar Sep 13 '22 14:09 franklinsch