Skip to content

Commit 871e874

Browse files
authored
Merge pull request #20 from artichoke/lopopolo/spellcheck
Add cargo-spellcheck config, fix typos
2 parents 5e2117a + fa45975 commit 871e874

File tree

6 files changed

+88
-6
lines changed

6 files changed

+88
-6
lines changed

.config/artichoke.dic

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
250
2+
<
3+
>
4+
@generated
5+
Lopopolo
6+
POSIX
7+
autogenerated
8+
callouts
9+
tokio

.config/spellcheck.toml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Also take into account developer comments
2+
dev_comments = true
3+
# Skip the README.md file as defined in the cargo manifest
4+
skip_readme = false
5+
6+
[Hunspell]
7+
# lang and name of `.dic` file
8+
lang = "en_US"
9+
# OS specific additives
10+
# Linux: [ /usr/share/myspell ]
11+
# Windows: []
12+
# macOS [ /home/alice/Libraries/hunspell, /Libraries/hunspell ]
13+
14+
# Additional search paths, which take presedence over the default
15+
# os specific search dirs, searched in order, defaults last
16+
search_dirs = ["."]
17+
18+
# Adds additional dictionaries, can be specified as
19+
# absolute paths or relative in the search dirs (in this order).
20+
# Relative paths are resolved relative to the configuration file
21+
# which is used.
22+
# Refer to `man 5 hunspell`
23+
# or https://www.systutorials.com/docs/linux/man/4-hunspell/#lbAE
24+
# on how to define a custom dictionary file.
25+
extra_dictionaries = ["artichoke.dic"]
26+
27+
# If set to `true`, the OS specific default search paths
28+
# are skipped and only explicitly specified ones are used.
29+
skip_os_lookups = false
30+
31+
# Use the builtin dictionaries if none were found in
32+
# in the configured lookup paths.
33+
# Usually combined with `skip_os_lookups=true`
34+
# to enforce the `builtin` usage for consistent
35+
# results across distributions and CI runs.
36+
# Setting this will still use the dictionaries
37+
# specified in `extra_dictionaries = [..]`
38+
# for topic specific lingo.
39+
use_builtin = true
40+
41+
42+
[Hunspell.quirks]
43+
# Transforms words that are provided by the tokenizer
44+
# into word fragments based on the capture groups which are to
45+
# be checked.
46+
# If no capture groups are present, the matched word is whitelisted.
47+
transform_regex = ["^'([^\\s])'$", "^[0-9]+x$"]
48+
# Accepts `alphabeta` variants if the checker provides a replacement suggestion
49+
# of `alpha-beta`.
50+
allow_concatenation = true
51+
# And the counterpart, which accepts words with dashes, when the suggestion has
52+
# recommendations without the dashes. This is less common.
53+
allow_dashed = false
54+
55+
[NlpRules]
56+
# Allows the user to override the default included
57+
# exports of LanguageTool, with other custom
58+
# languages
59+
60+
# override_rules = "/path/to/rules_binencoded.bin"
61+
# override_tokenizer = "/path/to/tokenizer_binencoded.bin"
62+
63+
[Reflow]
64+
# Reflows doc comments to adhere to adhere to a given maximum line width limit.
65+
max_line_length = 80

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,11 @@ tags
9696
[._]*.un~
9797

9898
# End of https://www.toptal.com/developers/gitignore/api/vim,rust,ruby
99+
100+
# Overrides
101+
102+
# Cargo and other Rust tool configuration lives in a top-level `.config/` directory.
103+
!/.config/
104+
# https://github.com/sourcefrog/cargo-mutants/blob/main/.gitignore
105+
mutants.out
106+
mutants.out.old

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "posix-space"
3-
version = "1.0.2" # remember to set `html_root_url` in `src/lib.rs`.
3+
version = "1.0.3" # remember to set `html_root_url` in `src/lib.rs`.
44
authors = ["Ryan Lopopolo <rjl@hyperbo.la>"]
55
license = "MIT"
66
edition = "2018"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ locale per [POSIX.1-2017], chapter 7, [Locale].
2323
> \<carriage-return\>, \<tab\>, and \<vertical-tab\> shall be included.
2424
2525
The function defined in this crate should have equivalent behavior to the C
26-
fucntion [`isspace`] as defined in `ctype.h`.
26+
function [`isspace`] as defined in `ctype.h`.
2727

2828
[`isspace`]: https://linux.die.net/man/3/isspace
2929

@@ -33,7 +33,7 @@ Add this to your `Cargo.toml`:
3333

3434
```toml
3535
[dependencies]
36-
posix-space = "1.0.2"
36+
posix-space = "1.0.3"
3737
```
3838

3939
Then classify bytes like:

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
//! > \<tab\>, and \<vertical-tab\> shall be included.
3333
//!
3434
//! The function defined in this crate should have equivalent behavior to the C
35-
//! fucntion [`isspace`] as defined in `ctype.h`.
35+
//! function [`isspace`] as defined in `ctype.h`.
3636
//!
3737
//! [`isspace`]: https://linux.die.net/man/3/isspace
3838
39-
#![doc(html_root_url = "https://docs.rs/posix-space/1.0.2")]
39+
#![doc(html_root_url = "https://docs.rs/posix-space/1.0.3")]
4040
#![no_std]
4141

4242
/// Determine whether the given byte is in **space** POSIX character class.
@@ -364,7 +364,7 @@ mod tests {
364364
}
365365
}
366366

367-
// Ensure code blocks in README.md compile
367+
// Ensure code blocks in `README.md` compile.
368368
//
369369
// This module and macro declaration should be kept at the end of the file, in
370370
// order to not interfere with code coverage.

0 commit comments

Comments
 (0)