canonical / praecepta

Creative Commons Attribution Share Alike 4.0 International
12 stars 20 forks source link

False positive Vale.Spelling results #59

Closed izmalk closed 4 months ago

izmalk commented 4 months ago

Testing Kafka-k8s charm docs provides a vast amount of false positive errors, mostly due to terminology.

For example:

 /home/izmalk/test/docs/izmalk/kafka-k8s-operator/docs/tutorial/t-cleanup-environment.md
 4:94   error  Did you really mean             Vale.Spelling 
               'Multipass'?                                  
 6:119  error  Did you really mean             Vale.Spelling 
               'Multipass'?                                  
 16:25  error  Did you really mean 'VMs'?      Vale.Spelling 

We have Multipass spelling error, but the Multipass is included in the default Accept.txt file for vocabulary. As far as I understand, that should be enough.

Another example, it keeps triggering for Grafana, even if I add it to the Accept.txt file:

 /home/izmalk/test/docs/izmalk/kafka-k8s-operator/docs/how-to/h-integrate-alerts-dashboards.md
 38:133  error  Did you really mean 'Grafana'?  Vale.Spelling 
 67:56   error  Did you really mean 'Grafana'?  Vale.Spelling 

In case I'm wrong about my assumption or just as an alternative, we can try the following method to ignore some words: Ignoring non-dictionary words.

SecondSkoll commented 4 months ago

If you are using the Starter Pack, the Make entrypoint uses this file to get the Vale configuration. It doesn't currently get the vocabulary folder/files, which is likely the issue.

I'll also note that ignores only work for the Spelling extension point in Vale, so if you add MAAS to an ignore file, you'd still get a capitalisation error.

a-velasco commented 4 months ago

Some of these issues might get solved when PR#63 gets merged.

Full explanation in this comment.

evilnick commented 4 months ago

@SecondSkoll I added to your script in the starter pack to fetch the vocab files too so it should work for 'make vale' now. I think the other fixes are in #63

izmalk commented 4 months ago

I tested it on kafka-k8s docs and it seems like #63 fixed the issue. Thanks!