doc-fr icon indicating copy to clipboard operation
doc-fr copied to clipboard

Add a spellchecker

Open villfa opened this issue 4 years ago • 7 comments

Hi,

What do you think about adding a spellchecker to the CI?

I don't have any experience with these tools in this particular context yet, but TypoCI/spellcheck-action was pretty easy to set up.

I also got inspiration from the php/doc-ru spellcheck workflow.

villfa avatar Nov 29 '21 08:11 villfa

This looks like a good idea to me, I'll try to have a look at what the failures are.

Might prevent me from introducing loads of grammar mistakes, Which is always a positive.

Girgias avatar Nov 29 '21 11:11 Girgias

Seems that we need to add --trace to possibly see which files are affected?

Girgias avatar Nov 30 '21 17:11 Girgias

I don't think it's feasible just by changing the yaml configuration.

The error message gives this link: https://docs.github.com/en/rest/reference/checks#create-a-check-run This part could explain the problem:

Creates a new check run for a specific commit in a repository. Your GitHub App must have the checks:write permission to create check runs.

I may be wrong but I think it is a permission issue. That could also explain why I don't have this error with my fork : https://github.com/villfa/doc-fr/pull/3

villfa avatar Nov 30 '21 17:11 villfa

TypoCI is being shut down, as explained by its author here: https://mikerogers.io/2021/05/23/saying-goodbye-to-typo-ci

Also, there are other alternatives that don't require installing a Github App (thus will be easier to add confidently).

TPXP avatar Dec 31 '21 09:12 TPXP

TypoCI is being shut down, as explained by its author here: https://mikerogers.io/2021/05/23/saying-goodbye-to-typo-ci

Also, there are other alternatives that don't require installing a Github App (thus will be easier to add confidently).

Oh, do you know of any and maybe could propose a PR?

Girgias avatar Dec 31 '21 11:12 Girgias

There are a few alternatives on Github Actions marketplace, like this one https://github.com/marketplace/actions/github-spellcheck-action

Regarding CLI tools, hunspell or aspell could do the trick. In particular, it's easy to get a French dictonnary for those.

In both cases, I'm not sure if the action will add annotations to the source code file. Manual handling might be required for those, see https://github.com/Attest/annotations-action for an example.

TPXP avatar Jan 01 '22 11:01 TPXP

Update: I may have spoken a bit too fast on this, it seems only the Github App was discontinued. https://github.com/TypoCI/spellcheck-action/issues/129

TPXP avatar Jan 01 '22 22:01 TPXP