From 3ed3474a45b2feed28b6d8fa7b1e2a41081209f7 Mon Sep 17 00:00:00 2001 From: Ryan Lopopolo Date: Wed, 5 Oct 2022 23:51:33 -0700 Subject: [PATCH 1/2] Add cargo-spellcheck config, fix typos Fixes #16. --- .config/artichoke.dic | 9 ++++++ .config/spellcheck.toml | 65 +++++++++++++++++++++++++++++++++++++++++ .gitignore | 8 +++++ README.md | 2 +- src/lib.rs | 4 +-- 5 files changed, 85 insertions(+), 3 deletions(-) create mode 100644 .config/artichoke.dic create mode 100644 .config/spellcheck.toml diff --git a/.config/artichoke.dic b/.config/artichoke.dic new file mode 100644 index 0000000..e4c70a1 --- /dev/null +++ b/.config/artichoke.dic @@ -0,0 +1,9 @@ +250 +< +> +@generated +Lopopolo +POSIX +autogenerated +callouts +tokio diff --git a/.config/spellcheck.toml b/.config/spellcheck.toml new file mode 100644 index 0000000..f591b98 --- /dev/null +++ b/.config/spellcheck.toml @@ -0,0 +1,65 @@ +# Also take into account developer comments +dev_comments = true +# Skip the README.md file as defined in the cargo manifest +skip_readme = false + +[Hunspell] +# lang and name of `.dic` file +lang = "en_US" +# OS specific additives +# Linux: [ /usr/share/myspell ] +# Windows: [] +# macOS [ /home/alice/Libraries/hunspell, /Libraries/hunspell ] + +# Additional search paths, which take presedence over the default +# os specific search dirs, searched in order, defaults last +search_dirs = ["."] + +# 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. +extra_dictionaries = ["artichoke.dic"] + +# If set to `true`, the OS specific default search paths +# are skipped and only explicitly specified ones are used. +skip_os_lookups = false + +# Use the builtin dictionaries if none were found in +# in the configured lookup paths. +# Usually combined with `skip_os_lookups=true` +# to enforce the `builtin` usage for consistent +# results across distributions and CI runs. +# Setting this will still use the dictionaries +# specified in `extra_dictionaries = [..]` +# for topic specific lingo. +use_builtin = true + + +[Hunspell.quirks] +# Transforms words that are provided by the tokenizer +# into word fragments based on the capture groups which are to +# be checked. +# If no capture groups are present, the matched word is whitelisted. +transform_regex = ["^'([^\\s])'$", "^[0-9]+x$"] +# Accepts `alphabeta` variants if the checker provides a replacement suggestion +# of `alpha-beta`. +allow_concatenation = true +# And the counterpart, which accepts words with dashes, when the suggestion has +# recommendations without the dashes. This is less common. +allow_dashed = false + +[NlpRules] +# Allows the user to override the default included +# exports of LanguageTool, with other custom +# languages + +# override_rules = "/path/to/rules_binencoded.bin" +# override_tokenizer = "/path/to/tokenizer_binencoded.bin" + +[Reflow] +# Reflows doc comments to adhere to adhere to a given maximum line width limit. +max_line_length = 80 diff --git a/.gitignore b/.gitignore index fc3224b..d590539 100644 --- a/.gitignore +++ b/.gitignore @@ -96,3 +96,11 @@ tags [._]*.un~ # End of https://www.toptal.com/developers/gitignore/api/vim,rust,ruby + +# Overrides + +# Cargo and other Rust tool configuration lives in a top-level `.config/` directory. +!/.config/ +# https://github.com/sourcefrog/cargo-mutants/blob/main/.gitignore +mutants.out +mutants.out.old diff --git a/README.md b/README.md index 05a101c..92e0324 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ locale per [POSIX.1-2017], chapter 7, [Locale]. > \, \, and \ shall be included. The function defined in this crate should have equivalent behavior to the C -fucntion [`isspace`] as defined in `ctype.h`. +function [`isspace`] as defined in `ctype.h`. [`isspace`]: https://linux.die.net/man/3/isspace diff --git a/src/lib.rs b/src/lib.rs index b33285b..99bccb2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -32,7 +32,7 @@ //! > \, and \ shall be included. //! //! The function defined in this crate should have equivalent behavior to the C -//! fucntion [`isspace`] as defined in `ctype.h`. +//! function [`isspace`] as defined in `ctype.h`. //! //! [`isspace`]: https://linux.die.net/man/3/isspace @@ -364,7 +364,7 @@ mod tests { } } -// Ensure code blocks in README.md compile +// Ensure code blocks in `README.md` compile. // // This module and macro declaration should be kept at the end of the file, in // order to not interfere with code coverage. From fa459756d93d82d434e08dcca296546a487907a4 Mon Sep 17 00:00:00 2001 From: Ryan Lopopolo Date: Wed, 5 Oct 2022 23:53:41 -0700 Subject: [PATCH 2/2] Release v1.0.3 --- Cargo.toml | 2 +- README.md | 2 +- src/lib.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e20a6b0..274a5d5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "posix-space" -version = "1.0.2" # remember to set `html_root_url` in `src/lib.rs`. +version = "1.0.3" # remember to set `html_root_url` in `src/lib.rs`. authors = ["Ryan Lopopolo "] license = "MIT" edition = "2018" diff --git a/README.md b/README.md index 92e0324..6dcb6b5 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ Add this to your `Cargo.toml`: ```toml [dependencies] -posix-space = "1.0.2" +posix-space = "1.0.3" ``` Then classify bytes like: diff --git a/src/lib.rs b/src/lib.rs index 99bccb2..46bb78c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -36,7 +36,7 @@ //! //! [`isspace`]: https://linux.die.net/man/3/isspace -#![doc(html_root_url = "https://docs.rs/posix-space/1.0.2")] +#![doc(html_root_url = "https://docs.rs/posix-space/1.0.3")] #![no_std] /// Determine whether the given byte is in **space** POSIX character class.