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 automated spell checking to Tokio documentation #6263

Closed
Darksonn opened this issue Jan 2, 2024 · 1 comment
Closed

Add automated spell checking to Tokio documentation #6263

Darksonn opened this issue Jan 2, 2024 · 1 comment
Labels
A-ci Area: The continuous integration setup E-help-wanted Call for participation: Help is requested to fix this issue.

Comments

@Darksonn
Copy link
Contributor

Darksonn commented Jan 2, 2024

We would like to have automated spell checking for Tokio documentation.

However, setting up a dictionary file that accepts everything in the current documentation would be a lot of effort.

Click to open partial progress
commit fc3d4a4d51b07463307c30cd69753087b40c0e44
Author: Alice Ryhl <[email protected]>
Date:   Tue Jan 2 13:02:59 2024 +0100

    Add spellchecker

diff --git a/.spellcheck.dic b/.spellcheck.dic
new file mode 100644
index 00000000..2977cc8f
--- /dev/null
+++ b/.spellcheck.dic
@@ -0,0 +1,41 @@
+1
+waker po:noun
+AcqRel
+SeqCst
+utf8
+UTF8
+fixup
+Tokio/A po:noun
+tokio/A po:noun
+Tokio's/A pos:possessive po:noun
+tokio's/A pos:possessive po:noun
+MSRV
+const
+eval
+combinator po:noun
+runtime/A po:noun
+noalias
+struct/A po:noun
+unhandled
+TODO
+WASM
+WASI
+usize
+mio po:noun
+FreeBSD
+libc
+macOS
+iOS
+EOF
+async
+wakeup/A po:noun
+vice versa
+symlink/A po:noun
+filesystem/A po:noun
+mock/A po:noun
+mock's/A pos:possessive po:noun
+config/A po:noun
+stealer/A po:noun
+deregister/A
+fn/A po:noun
+backtrace/A po:noun
diff --git a/.spellcheck.toml b/.spellcheck.toml
new file mode 100644
index 00000000..0f1b0801
--- /dev/null
+++ b/.spellcheck.toml
@@ -0,0 +1,20 @@
+dev_comments = false
+skip_readme = false
+
+[Hunspell]
+lang = "en_US"
+
+# Adds additional dictionaries, can be specified as
+# absolute paths or relative in the search dirs (in this order).
+# Relative paths are resolved relative to the configuration file
+# which is used.
+# Refer to `man 5 hunspell`
+# or https://www.systutorials.com/docs/linux/man/4-hunspell/#lbAE
+# on how to define a custom dictionary file.
+search_dirs = ["."]
+extra_dictionaries = ["./.spellcheck.dic"]
+skip_os_lookups = true
+use_builtin = true
+
+[Hunspell.quirks]
+allow_concatenation = true
diff --git a/Cargo.toml b/Cargo.toml
index f3e19312..8f9b5cc8 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -14,3 +14,6 @@ members = [
   "tests-build",
   "tests-integration",
 ]
+
+[workspace.metadata.spellcheck]
+config = ".spellcheck.toml"

To close this issue, open a PR that adds spellchecking with a personal dictionary that accepts everything already in Tokio. You may use my partial progress above as a starting point.

@Darksonn Darksonn added E-help-wanted Call for participation: Help is requested to fix this issue. A-ci Area: The continuous integration setup labels Jan 2, 2024
arvaer added a commit to arvaer/tokio that referenced this issue Jan 24, 2024
Noticed I had some changes to non-relevant files
that I accidentally commited. These changes
essentially remove those changes, which were
just wrapped a type in backticks in two diff
erent files.
Fixes: tokio-rs#6263
arvaer added a commit to arvaer/tokio that referenced this issue Jan 24, 2024
this commit removes an extra file I once again
included in my carelessness. It is a
personal library of syscalls that are referenced
in the documentation. I included this in
the base personal library
Fixes: tokio-rs#6263
@arvaer
Copy link

arvaer commented Jan 25, 2024

@Owen-CH-Leung
Hello.
I'm so sorry, in my carelessness I picked up this issue and duplicated a lot of the work you did on my own.
I think where we differ is the personal dictionary I created is a bit more specific, whereas your work is integrated with the CI.
Is there a way we could combine these two? @maminrayej

@Darksonn Darksonn closed this as completed Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ci Area: The continuous integration setup E-help-wanted Call for participation: Help is requested to fix this issue.
Projects
None yet
Development

No branches or pull requests

2 participants