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

Add spellchecking tools + CI #44

Merged
merged 4 commits into from
Jul 29, 2024
Merged

Add spellchecking tools + CI #44

merged 4 commits into from
Jul 29, 2024

Conversation

dylandreimerink
Copy link
Collaborator

This PR adds a spelling checker. Implemented as a custom layer around aspell to deal with our somewhat unique markdown dialect.

What our custom tool does is render the markdown files to HTML, parse the HTML with custom logic and exceptions, then feed the text into aspell (GNU spell checker) to check for spelling errors, and then do a best effort to find the location of the spelling mistake in the markdown files.

Existing issues found be the spellchecker were resolved in one of the following ways:

  • Fixing the spelling in the docs
  • Adding correct jagron and shorthands to the .aspell.en.pws file
  • Adding markdown code backticks around code references, names and
    commands
  • Adding tags around one-off unrecognized spelling which do
    not need to be added to the .aspell.en.pws file.

All lists of names referencing BPF functions, maps, and programs are now
generated with code blocks. This allows the spell checker to ignore
these names.

Signed-off-by: Dylan Reimerink <[email protected]>
This commit adds a new spellcheck tool. The purpose of which is to be
our first CI tooling to check for spelling errors. Due to the use of
markdown extensions and code generation, it is difficult to use ready
made tools. What our custom tool does is render the markdown files to
HTML, parse the HTML with custom logic and exceptions, then feed the
text into `aspell` (GNU spell checker) to check for spelling errors,
and then do a best effort to find the location of the spelling mistake
in the markdown files.

Aspell allows to the addition of a personal word list, which will be
added in a followup commit. In addition, the tool excludes code blocks,
text between <nospell></nospell> tags, generated output, and html which
is not from the markdown files.

Signed-off-by: Dylan Reimerink <[email protected]>
This commit addresses all spelling errors found by the new spellchecker
in one of the following ways:

* Fixing the spelling in the docs
* Adding correct jagron and shorthands to the .aspell.en.pws file
* Adding markdown code backticks around code references, names and
  commands
* Adding <nospell> tags around one-off unrecognized spelling which do
  not need to be added to the .aspell.en.pws file.

Signed-off-by: Dylan Reimerink <[email protected]>
@dylandreimerink dylandreimerink force-pushed the feature/spell-check branch 2 times, most recently from 42e24cc to 08b050a Compare July 28, 2024 14:57
This commits adds a workflow file which triggers `make spellcheck`
for every opened PR.

Signed-off-by: Dylan Reimerink <[email protected]>
@dylandreimerink dylandreimerink force-pushed the feature/spell-check branch 2 times, most recently from 390a04a to 929c702 Compare July 28, 2024 15:06
@dylandreimerink dylandreimerink merged commit 3b1cb7e into master Jul 29, 2024
1 check passed
@dylandreimerink dylandreimerink deleted the feature/spell-check branch September 8, 2024 10:06
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.

1 participant