Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: check writing with Vale #368

Merged
merged 2 commits into from
Oct 18, 2023

Conversation

koozz
Copy link
Member

@koozz koozz commented Sep 19, 2023

  • Using vale to check style and grammar.
  • Check in configuration in .vale.ini.
  • Ran vale sync to download rules.
  • Adjusted rules and added (yet incomplete) vocabulary file in .vale/Vocab/TODO/accept.txt.
  • Added output template to report errors in the GitHub pull requests as inline annotations.

Still some false positives and names to add to the vocabulary.

There's even a possibility to create an OSPO or TODO style based on one of the other styles (Redhat, Microsoft or Google), which would result in the whole book being written in a single style.

Signed-off-by: Jan van den Berg <[email protected]>
@netlify
Copy link

netlify bot commented Sep 19, 2023

Deploy Preview for ospobook ready!

Name Link
🔨 Latest commit 5ccc965
🔍 Latest deploy log https://app.netlify.com/sites/ospobook/deploys/650a145198dd970008005335
😎 Deploy Preview https://deploy-preview-368--ospobook.netlify.app/01-chapter
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Sep 19, 2023

Deploy Preview for ospomindmap canceled.

Name Link
🔨 Latest commit 5ccc965
🔍 Latest deploy log https://app.netlify.com/sites/ospomindmap/deploys/650a1451ad61a30008fc70e0

@koozz
Copy link
Member Author

koozz commented Sep 19, 2023

After downloading vale, you can run: vale ospo-book/content and you should see something similar to:

 ospo-book/content/en/taxonomy.md
 10:326  error  Did you really mean             Vale.Spelling
                'deliverables'?
 79:50   error  Did you really mean 'leades'?   Vale.Spelling

ospo-book/content/en/glossary.md
 20:35   error  Did you really mean 'libre'?    Vale.Spelling
 20:50   error  Did you really mean 'libre'?    Vale.Spelling
 39:63   error  Did you really mean             Vale.Spelling
                'innerSource'?
 57:117  error  Did you really mean 'Hoving'?   Vale.Spelling
 72:44   error  Did you really mean             Vale.Spelling
                'interoperate'?
 80:46   error  Did you really mean 'Chai'?     Vale.Spelling


 ospo-book/content/en/_index.md
 14:25  error  Did you really mean             Vale.Spelling
               'antipatterns'?


 ospo-book/content/en/toc.md
 14:19  error  Did you really mean             Vale.Spelling
               'antipatterns'?
 24:19  error  Did you really mean             Vale.Spelling
               'antipatterns'?
 35:19  error  Did you really mean             Vale.Spelling
               'antipatterns'?
 44:19  error  Did you really mean             Vale.Spelling
               'antipatterns'?
 53:84  error  Did you really mean 'teh'?      Vale.Spelling
 54:18  error  Did you really mean             Vale.Spelling
               'antipatterns'?


 ospo-book/content/en/02-chapter.md
 11:4     error  Did you really mean                     Vale.Spelling
                 'Antipatterns'?
 32:3     error  Did you really mean                     Vale.Spelling
                 'ospowork'?
 69:6     error  Did you really mean 'Apendix'?          Vale.Spelling
 94:133   error  Did you really mean 'Ibrahim'?          Vale.Spelling
 96:3     error  Did you really mean                     Vale.Spelling
                 'opensourceinvolvementmodel'?
 104:23   error  Did you really mean                     Vale.Spelling
                 'activityparticipationcategorization'?
 106:4    error  Did you really mean                     Vale.Spelling
                 'Antipatterns'?
 115:178  error  Did you really mean                     Vale.Spelling
                 'Sonatype'?
 115:461  error  Remove 'very'.                          proselint.Very


 ospo-book/content/en/01-chapter.md
 9:4      error  Did you really mean             Vale.Spelling
                 'Antipatterns'?
 51:193   error  Did you really mean 'OSPO's'?   Vale.Spelling
 53:145   error  Consider using 'flight          proselint.GenderBias
                 attendant' instead of
                 'steward'.
 114:121  error  Did you really mean 'OSPO's'?   Vale.Spelling
 118:130  error  Did you really mean 'dev'?      Vale.Spelling
 128:4    error  Did you really mean             Vale.Spelling
                 'Antipatterns'?

✖ 96 errors, 2 warnings and 0 suggestions in 23 files.
  • Anti-patterns written with a hyphen does not raise an error.
  • OSPO's is possessive, could be that this is correct, could also be that OSPOs (plural) is meant. Is it actually the strategy of the OSPO (The OSPO's strategy) or could it be generalized to The OSPO strategy?
  • dev would be better written as the full word developer.

It might still need some tweaking, but it already catches some typos.

@koozz
Copy link
Member Author

koozz commented Sep 19, 2023

The workflow will run on changed markdown files in the ospo-book/content folder, this will annotate a maximum of 10 errors, 10 warnings and 10 suggestions (limitation from GitHub) on the pull request 'Files'-tab.

Signed-off-by: Jan van den Berg <[email protected]>
(?:bunch|group|pack|herd) of rhinoceros: crash of rhinoceros
(?:bunch|group|pack|herd) of wild boar: sounder of wild boar
(?:bunch|group|pack|herd) of wild pigs: drift of wild pigs
(?:bunch|group|pack|herd) of zebras: zeal of wild pigs

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like "zeal of wild pigs" should say "zeal of zebras". :)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i was just poking around this linter and love all the rules you've made! well done.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot take credit for Proselint, if this is indeed an error, we can fix it upstream. Otherwise we can adjust or add rules to this.

@anajsana
Copy link
Member

this is cool @koozz ! didn't know about vale before! Thanks for working on it and great work

@anajsana anajsana merged commit 0c2635d into todogroup:main Oct 18, 2023
5 checks passed
@koozz koozz deleted the checks-writing-with-vale branch October 18, 2023 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants