canonical / praecepta

Creative Commons Attribution Share Alike 4.0 International
11 stars 15 forks source link

Adding .yml file with rule #21

Closed a-velasco closed 2 months ago

a-velasco commented 2 months ago

Added Vale rule 20: Cliché words and phrases to avoid

Implementation

Tokens are based on the style guide plus some suggestions:

Some regex was added to catch different declinations.

Testing

Tested locally with the following markdown text:

# Linux is for human beings

In order to terminate a use case, you need to leverage the ability to execute the end users. 

Not only is this a great thing, but also, it is disruptive. By allowing us to harness the form factor, 
we are able to go forward and take this space to the next level: explosively kill the ecosystem.

output:

 1:3    warning  Avoid the phrase 'Linux is for  Canonical.020-Cliche-words-and-phrases 
                 human beings'                                                          
 3:1    warning  Avoid the phrase 'In order to'  Canonical.020-Cliche-words-and-phrases 
 3:13   warning  Avoid the phrase 'terminate'    Canonical.020-Cliche-words-and-phrases 
 3:25   warning  Avoid the phrase 'use case'     Canonical.020-Cliche-words-and-phrases 
 3:47   warning  Avoid the phrase 'leverage'     Canonical.020-Cliche-words-and-phrases 
 3:60   warning  Avoid the phrase 'ability to'   Canonical.020-Cliche-words-and-phrases 
 3:71   warning  Avoid the phrase 'execute'      Canonical.020-Cliche-words-and-phrases 
 3:83   warning  Avoid the phrase 'end users'    Canonical.020-Cliche-words-and-phrases 
 5:1    warning  Avoid the phrase 'Not only      Canonical.020-Cliche-words-and-phrases 
                 is this a great thing to                                               
                 eliminate, but also'                                                   
 5:62   warning  Avoid the phrase 'disruptive'   Canonical.020-Cliche-words-and-phrases 
 5:77   warning  Avoid the phrase 'allowing'     Canonical.020-Cliche-words-and-phrases 
 5:92   warning  Avoid the phrase 'harness'      Canonical.020-Cliche-words-and-phrases 
 5:104  warning  Avoid the phrase 'form factor'  Canonical.020-Cliche-words-and-phrases 
 5:124  warning  Avoid the phrase 'able to'      Canonical.020-Cliche-words-and-phrases 
 5:132  warning  Avoid the phrase 'go forward'   Canonical.020-Cliche-words-and-phrases 
 5:157  warning  Avoid the phrase 'space'        Canonical.020-Cliche-words-and-phrases 
 5:170  warning  Avoid the phrase 'next level'   Canonical.020-Cliche-words-and-phrases 
 5:182  warning  Avoid the phrase 'explosively'  Canonical.020-Cliche-words-and-phrases 
 5:194  warning  Avoid the phrase 'kill'         Canonical.020-Cliche-words-and-phrases 
 5:203  warning  Avoid the phrase 'ecosystem'    Canonical.020-Cliche-words-and-phrases 
s-makin commented 2 months ago

As a general question, will Vale also allow you to make replacement suggestions for words on the naughty list?

a-velasco commented 2 months ago

@s-makin Yes, that's definitely an option. I considered it, but I had a hard time coming up with context-agnostic suggestions. (Is agnostic another cliché? I see them everywhere now.)

I don't like how uninformative the message "Avoid the phrase %s" is, so it might be nice to add suggestions if we can somehow make them all the same format.

My unofficial list was:

- allows : simply list the options/parameters
- ability to : can
- able to : can
- not only, but also : just list the things
- eliminate : remove
- execute : run
- terminate : stop 
- kill : stop? unless referring to PIDs, then killing is fine?
- disrupt : just throw away the whole sentence
- leverage : use
- harness : use
- ecosystem : environment? also overused and poorly defined, but already an improvement
- go forward : advance
- in order to : to
- form factor : hardware
- explosive : bombastic (no clue here)
- use case : dunno, i kinda find this one useful
- end user : user
- linux for human beings : linux
- thing : choose a more specific noun
- next level : "next step", or "improve" if you're *taking* something to the next level
- space : choose a more specific noun
evilnick commented 2 months ago

This is great work, thanks for all the thought you have put in to this. I guess ultimately a lot of this comes down to context and we have to let the author/reviewers be the arbiters of whether they use words or not. I was toying with suggesting alternatives or explaining a bit more, but they can just look up the Style guide if they are unsure!