Ed Page
d84117da1f
Merge pull request #173 from epage/code
...
fix(cli): Define an error code policy
2020-11-14 21:51:49 -06:00
Ed Page
4ddbdcf5dd
fix(cli): Define an error code policy
...
The main goal is to make spelling errors differentiated from other
errors.
Fixes #170
2020-11-14 21:17:29 -06:00
Ed Page
8a35a12096
Merge pull request #169 from epage/refactor
...
Further polish
2020-11-11 19:39:29 -06:00
Ed Page
ce16d38cfd
perf(dict): Skip checking numbers
2020-11-11 18:52:23 -06:00
Ed Page
d258e62f43
feat(report): Diff output mode
2020-11-11 18:52:23 -06:00
Ed Page
7a1fac7fab
refactor(report): Use native types
2020-11-11 18:44:27 -06:00
Ed Page
482d320407
fix(dict): Ensure we fall through to built-in dict
2020-11-11 12:22:29 -06:00
Ed Page
36709b6f37
Merge pull request #164 from epage/perf
...
perf: Avoid hashing
2020-11-10 21:18:08 -06:00
Ed Page
6bdbd821e3
perf(dict): Avoid hashing unknwon words
...
Bypass hashing when we know (through str::len) that a word won't be in
the dict.
Master:
```
real 0m26.675s
user 0m33.683s
sys 0m4.535s
```
With this change
```
real 0m24.432s
user 0m32.492s
sys 0m4.190s
```
2020-11-10 20:57:04 -06:00
Ed Page
beaa0f4091
perf(dict): Avoid hashing unknwon words
...
Bypass hashing when we know (through str::len) that a word won't be in
the dict.
Master:
```
real 0m26.675s
user 0m33.683s
sys 0m4.535s
```
With this change:
```
real 0m24.060s
user 0m31.559s
sys 0m4.258s
```
2020-11-10 20:57:00 -06:00
Ed Page
18e31fa578
perf: Avoid hashing withut custom dict
...
`HashMap::get` (at least hashbrown) hashes before getting and doesn't
check if dict is empty. For the custom dict, a common use case will
have the dict be empty.
Master:
```
real 0m26.675s
user 0m33.683s
sys 0m4.535s
```
Bypassing `HashMap::get`
```
real 0m16.415s
user 0m14.519s
sys 0m4.118s
```
On a moderately sized repo.
2020-11-10 20:56:54 -06:00
Ed Page
150c5bfdc1
perf: Hash faster for custom dicts
...
If we have to hash for the custom dict, we might as well be fast about
it. We do not need a cryptographically secure algorithm since the
content is fixed for the user.
Master:
```
real 0m26.675s
user 0m33.683s
sys 0m4.535s
```
With ahash:
```
real 0m23.993s
user 0m30.800s
sys 0m4.440s
```
2020-11-10 20:56:49 -06:00
Ed Page
b44ab021b3
Merge pull request #163 from epage/update
...
chore: Update dependencies
2020-11-10 20:03:10 -06:00
Ed Page
e4edbc5f7e
chore: Update dependencies
2020-11-10 19:47:13 -06:00
Ed Page
d2a2fb7355
Merge pull request #162 from epage/update
...
chore: Update dependencies
2020-11-10 07:50:22 -06:00
Ed Page
c361647eca
chore: Update dependencies
2020-11-10 07:02:34 -06:00
Ed Page
deca842341
Merge pull request #158 from epage/refactor
...
Polish internals and json output
2020-11-10 06:57:46 -06:00
Ed Page
b97b6ddd45
docs: Note custom dicts is supported
2020-11-10 06:40:24 -06:00
Ed Page
b7700fa214
refactor: Don't special case --files
2020-11-10 06:30:27 -06:00
Ed Page
628c011f77
fix(report): Ensure json output is clean
2020-11-10 06:30:27 -06:00
Ed Page
e12cd8ed55
refactor: Layer files/filenames on buffer processing
2020-11-10 06:30:27 -06:00
Ed Page
eb20ba9f11
refactor(report): Make Parse consistent with Typos
2020-11-10 06:30:27 -06:00
Ed Page
97f90da9bc
refactor: Move off of lazy_static
2020-11-10 06:30:27 -06:00
Ed Page
3bcd8a130e
refactor(report): Merge the typos types
2020-11-10 06:30:23 -06:00
Ed Page
3429b59e72
Merge pull request #157 from epage/json
...
Polish typos
2020-11-07 20:05:17 -06:00
Ed Page
fe282a0aea
refactor: Pull out common policy
2020-11-07 20:04:58 -06:00
Ed Page
2ef1d02164
Revert "feat(ignore): Typos-specific ignores"
...
This reverts commit 0052617fcd
.
The fix for #134 was backwards. It turns out `overrides` is for
including rather than ignoring. Will need to look at this further.
2020-11-03 19:55:45 -06:00
Ed Page
f0c24b0afa
feat(config): Allow separating config from source
2020-10-30 08:33:43 -05:00
Ed Page
736db10708
fix(format): Clarify message types
2020-10-28 21:01:33 -05:00
Ed Page
2e6cd39781
fix(config): Respect file's defaults
2020-10-28 20:58:48 -05:00
Ed Page
78d76bcbc6
fix: Be friendlier about error messages
2020-10-28 20:47:16 -05:00
Ed Page
b8d35c30e5
Merge pull request #144 from epage/custom
...
feat: Custom dictionary support
2020-10-28 20:22:16 -05:00
Ed Page
527b9837b4
feat: Custom dictionary support
...
Switching `valid-*` to just `*` where you map typo to correction, with
support for always-valid and never-valid.
Fixes #9
2020-10-27 21:15:25 -05:00
Ed Page
79d10d6d24
Merge pull request #139 from crate-ci/dependabot/cargo/derive_more-0.99.11
...
chore(deps): bump derive_more from 0.99.9 to 0.99.11
2020-10-26 21:28:28 -05:00
Ed Page
01c7551168
Merge pull request #142 from crate-ci/dependabot/cargo/serde_json-1.0.58
...
chore(deps): bump serde_json from 1.0.57 to 1.0.58
2020-10-26 21:28:17 -05:00
Ed Page
0c5ce25c1e
Merge pull request #141 from crate-ci/dependabot/cargo/structopt-0.3.18
...
chore(deps): bump structopt from 0.3.17 to 0.3.18
2020-10-26 21:28:04 -05:00
Ed Page
2eda9cc82b
Merge pull request #140 from crate-ci/dependabot/cargo/serde-1.0.116
...
chore(deps): bump serde from 1.0.115 to 1.0.116
2020-10-26 21:27:41 -05:00
dependabot-preview[bot]
56507b6696
chore(deps): bump serde_json from 1.0.57 to 1.0.58
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.57 to 1.0.58.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.57...v1.0.58 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-01 08:12:33 +00:00
dependabot-preview[bot]
05b56957d4
chore(deps): bump structopt from 0.3.17 to 0.3.18
...
Bumps [structopt](https://github.com/TeXitoi/structopt ) from 0.3.17 to 0.3.18.
- [Release notes](https://github.com/TeXitoi/structopt/releases )
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md )
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.17...v0.3.18 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-01 08:12:21 +00:00
dependabot-preview[bot]
beed707cb2
chore(deps): bump serde from 1.0.115 to 1.0.116
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.115 to 1.0.116.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.115...v1.0.116 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-01 08:12:09 +00:00
dependabot-preview[bot]
84e56b22b5
chore(deps): bump derive_more from 0.99.9 to 0.99.11
...
Bumps [derive_more](https://github.com/JelteF/derive_more ) from 0.99.9 to 0.99.11.
- [Release notes](https://github.com/JelteF/derive_more/releases )
- [Changelog](https://github.com/JelteF/derive_more/blob/master/CHANGELOG.md )
- [Commits](https://github.com/JelteF/derive_more/compare/v0.99.9...v0.99.11 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-01 08:11:46 +00:00
Ed Page
5e0e9f6b77
Merge pull request #137 from crate-ci/dependabot/cargo/structopt-0.3.17
...
chore(deps): bump structopt from 0.3.16 to 0.3.17
2020-09-11 18:31:56 -05:00
Ed Page
c3404f1697
Merge pull request #138 from epage/custom
...
feat(dict): Override builtin dictionary
2020-09-11 18:23:09 -05:00
Ed Page
043692afe0
feat(dict): Override builtin dictionary
...
Sometimes you just have to live with a typo or its done intentionally
(like weird company names). With this commit, a user can now identifier
blessed identifiers and words.
This is ostly what is needed for #9 but sometimes people will have
common typos that they'll want to provide corrections for.
2020-09-02 20:24:54 -05:00
dependabot-preview[bot]
cb6cf092d9
chore(deps): bump structopt from 0.3.16 to 0.3.17
...
Bumps [structopt](https://github.com/TeXitoi/structopt ) from 0.3.16 to 0.3.17.
- [Release notes](https://github.com/TeXitoi/structopt/releases )
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md )
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.16...v0.3.17 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-01 08:19:39 +00:00
Ed Page
977606d398
Merge pull request #136 from epage/ignore
...
feat(ignore): Typos-specific ignores
2020-08-26 15:47:43 -05:00
Ed Page
0052617fcd
feat(ignore): Typos-specific ignores
...
THis is to help with cases like a monorepo with vendored dependencies.
A user might want to search (`.ignore`) them but not hold the code to
the same standards as first-party code.
Fixes #134
2020-08-25 21:09:42 -05:00
Ed Page
8d267edf52
Merge pull request #135 from epage/type
...
perf: Faster binary-file detection
2020-08-21 19:03:25 -05:00
Ed Page
a63dfa0f8c
perf: Faster binary-file detection
...
This switches us from a homegrown implementation to `context_inspector`
- Adds some optimizations by looking for the BoM.
- We used the same algorithm for finding Null bytes
- `context_inspector` caps how much of the buffer is searche though
Besides performance, `content_inspector` also has some known-binary
magic numbers to avoid bad detections.
Fixes #34
2020-08-21 16:29:11 -05:00
Ed Page
443aa5c4fe
Merge pull request #128 from epage/varcon
...
feat: Support english dialects
2020-08-21 10:46:34 -05:00