Commit graph

514 commits

Author SHA1 Message Date
Ed Page
0863e64406 chore: Release 2023-08-14 09:55:06 -05:00
Ed Page
25383eb358
Merge pull request #803 from epage/lock
fix: Dont check pnpm lockfiles
2023-08-14 09:52:56 -05:00
Ed Page
ef8bf24e7e fix: Dont check pnpm lockfiles
Fixes #802
2023-08-14 09:36:53 -05:00
Viktor Szépe
0d101f3055
chore: move deprecated package.metadata.maturin (#801) 2023-08-12 19:09:26 -05:00
Ed Page
cad89d4596 chore: Release 2023-08-11 20:31:59 -05:00
Ed Page
ef5fcf92df chore: Release 2023-08-09 08:36:21 -05:00
Ed Page
e12fe9b20b
Merge pull request #799 from epage/code
fix(cli): Report bad exit code on disallowed
2023-08-09 08:34:17 -05:00
Ed Page
3bae999225 fix(cli): Report bad exit code on disallowed 2023-08-09 08:21:53 -05:00
Ed Page
3f41a6791c test(cli): Verify disallowed functionality 2023-08-09 08:15:05 -05:00
Martin Fischer
d3e48b202b fix(cli): Allow ot and stap in sh 2023-08-08 18:24:44 +02:00
Martin Fischer
e5e8f25c8e fix(cli): Allow nd in css 2023-08-08 18:24:44 +02:00
Martin Fischer
5181c42c57 fix(cli): Allow Nd in man pages 2023-08-08 18:24:44 +02:00
Ed Page
6f0c32c802
Merge pull request #793 from not-my-profile/refactor-file-type-specifics
refactor(cli): Introduce file_type_specifics module
2023-08-08 11:22:10 -05:00
Martin Fischer
d9a1085018 refactor(cli): Abstract away regex ignores
This isn't perfect as this only helps when doing checks and not in the
parsing impls.

This supersedes #797
2023-08-08 10:40:22 -05:00
Martin Fischer
5dbe0948d3 docs(cli): Add comments to file-type specific ignores 2023-08-08 06:22:34 +02:00
Martin Fischer
fa39bca152 refactor(cli): Introduce file_type_specifics module
This makes the definition of file-type specifics less repetitive.

Resolves #759.
2023-08-08 06:22:34 +02:00
Ed Page
d4258b1aa0 fix(cli): Remove stray character on disallowed words 2023-08-07 16:24:51 -05:00
Ed Page
a3bf84ade6 chore(dict): Don't clear disallowed words 2023-08-07 16:24:51 -05:00
Ed Page
8a7996b4bc chore: Release 2023-08-01 10:43:28 -05:00
Ed Page
6e72bdc74c feat(dict): July updates
Fixes #777
2023-08-01 10:28:23 -05:00
Ed Page
143cc59fab chore: Release 2023-07-14 14:05:04 -05:00
Ed Page
e981fc41fb chore: Release 2023-07-14 14:04:02 -05:00
Ed Page
e14c4725cd chore: Release 2023-07-14 14:03:38 -05:00
Ed Page
2861ad8299 chore: Release 2023-07-14 14:03:01 -05:00
Ed Page
5a63cb3be6 chore: Release 2023-07-14 14:02:39 -05:00
Ed Page
ea0db833b5 chore: Release 2023-07-14 14:01:55 -05:00
Ed Page
37e2b40f24 chore: Release 2023-07-14 14:01:12 -05:00
Ed Page
a2c9d2076a Merge remote-tracking branch 'upstream/master' 2023-07-14 14:00:31 -05:00
Ed Page
9fa116eaf6 chore: Release 2023-07-14 13:59:11 -05:00
Ed Page
b6c78eb8ac refactor(typos): Upgrade to winnow 0.5 2023-07-14 13:29:24 -05:00
Ed Page
6f40717c8f refactor(typos): Switch to BStr for better debugging 2023-07-14 13:28:36 -05:00
Ed Page
4fd4537856 fix(varcon)!: Make API independent of winnow 2023-07-14 12:48:41 -05:00
Ed Page
6cc3e3f9e0 refactor(varcon)!: Upgrade to winnow 0.5 2023-07-14 12:44:39 -05:00
Ed Page
9426924f8f fix: Hide optional dependencies 2023-07-14 12:33:02 -05:00
Ed Page
0bde06af9a chore(varcon): Add parse tracing 2023-07-14 12:32:16 -05:00
Ed Page
e98fc52b0d chore(typos): Add parse tracing 2023-07-14 12:32:07 -05:00
Ed Page
a1ad167632 refactor(varcon): Resolve winnow deprecations 2023-07-14 12:23:13 -05:00
Ed Page
ca9612c045 chore: Release 2023-07-10 10:01:29 -05:00
Ed Page
f69eec1ce3
Merge pull request #729 from scop/feat/trim-in-extension
feat(cli): Strip `.in` suffix(es) before attempting filename match
2023-07-10 09:59:19 -05:00
Ville Skyttä
d6ac36f057 fix(cli): Make .in stripping work with non-UTF-8 filenames 2023-07-09 12:01:53 +03:00
Ed Page
ccdede0f8c chore: Release 2023-07-03 09:34:49 -05:00
Ed Page
25a5437d1f feat(dict): June updates
Fixes #733
2023-07-03 09:18:24 -05:00
Ed Page
2158ddd42c chore: Release 2023-06-30 09:43:35 -05:00
Ed Page
8913c8af5f fix(dict): Don't correct contiguities 2023-06-30 09:31:04 -05:00
Ed Page
2f61fa1697 chore: Release 2023-06-29 11:13:01 -05:00
Martin Fischer
b4cc2ed919 fix(dict): Don't correct unuseful 2023-06-26 23:15:46 +02:00
Martin Fischer
043179a22e fix(dict): Don't correct intension, intensional & intensionally 2023-06-26 23:15:13 +02:00
Martin Fischer
983b6a5827 fix(dict): Don't correct pervious & perviously 2023-06-26 23:14:39 +02:00
Martin Fischer
989136e755 fix(dict): Don't correct simulative 2023-06-26 23:13:37 +02:00
Ed Page
888116ae2f chore: Release 2023-06-26 15:43:01 -05:00
Martin Fischer
5553044346 fix(dict): Restore correction orders
This commit restores the correction orders lost in
09f096a096.

The commit was generated by running the commands:

    git show 09f096a0968e61e22c963a024c8c3d74453d812a~:./assets/words.csv HEAD:./assets/words.csv > assets/words.csv
    SNAPSHOTS=overwrite cargo test verify
    SNAPSHOTS=overwrite cargo test codegen
2023-06-26 22:14:06 +02:00
Martin Fischer
8d026ac23e feat(dict): Preserve correction order
We want to be able to recommend more likely corrections first,
e.g. for "poped" we want to recommend "popped" before "pooped".
2023-06-26 22:13:47 +02:00
Martin Fischer
89d5a97a8a test: Add some tests for dict processing logic 2023-06-26 19:23:27 +02:00
Martin Fischer
49a0eaab7b refactor: Make dict processing logic testable
Previously all the dictionary cleanup logic was in the function:

    fn generate<W: std::io::Write>(file: &mut W, dict: &[u8])

which parsed the provided buffer as CSV and also took care of writing
the processed dictionary back as CSV.  This commit factors out the CSV
handling, leaving a `process` function behind so that it can be easily
tested in the following commit.
2023-06-26 19:22:04 +02:00
Ed Page
2fffb1bb2b chore: Release 2023-06-26 09:05:53 -05:00
Ed Page
37d4d626b6 fix(dict): Dont correct currency code
Fixes #767
2023-06-26 08:48:57 -05:00
Ed Page
d9e1ae0a39 chore: Release 2023-06-22 12:33:50 -05:00
Ed Page
5f1d3c23bc fix(config): Force-skip config files
This doesn't use `extend-exclude` which means that `typos typos.toml`
will stil be skipped

This doesn't just skip the currently loaded config but any file name
that looks like a config, which might be a big aggressive but allows us
to do layered config in the future....  We've been saying that for a
while.

Fixes #711
2023-06-22 12:20:07 -05:00
Ed Page
4ccd3cba61
Merge pull request #757 from figsoda/deprecated
chore: remove usages of deprecated functions
2023-06-22 10:39:16 -05:00
figsoda
ef1907fb1e chore: Remove usages of deprecated functions 2023-06-22 11:22:46 -04:00
Ed Page
8074cc6029 chore: Release 2023-06-22 10:13:38 -05:00
Ed Page
9e293916d2 fix(config): Always apply type defaults
Fixes #760
2023-06-22 09:57:15 -05:00
Ed Page
72c773aade test(config): Verify bad merge 2023-06-22 09:16:23 -05:00
Ed Page
84c8b30e06 chore: Release 2023-06-21 14:51:20 -05:00
Ed Page
fce92e4e5f fix(config): User file types override default file types
This also ensures `typos --type-list` will report the glob in only one
place.

Fixes #754
2023-06-21 14:31:04 -05:00
Ed Page
77f0389a9e test(config): Reproduce types bug 2023-06-21 14:17:19 -05:00
Ed Page
1a4e9428d6 chore: Release 2023-06-20 09:25:04 -05:00
Ed Page
427d127e8a fix: Ensure stdout is locked
In 3a29410c1b, we switched to anstream
which doesn't seem to be locking properly (rust-lang/cargo#12289).  For
now, we are working around it.

Fixes #749
2023-06-20 09:04:31 -05:00
Ed Page
59888680cc chore: Release 2023-06-19 10:28:02 -05:00
Tobias Klauser
28fbdec824
fix(dict): Don't correct "accreting"
"accreting" is the present participle of "accrete", see
https://en.wiktionary.org/wiki/accreting. Don't correct it to
"accrediting".
2023-06-19 16:58:17 +02:00
Viktor Szépe
16b84f46fd
Remove trailing space from Wikipedia dictionary 2023-06-08 17:57:56 +02:00
Ed Page
f37d3f8e3c chore: Release 2023-06-08 10:29:00 -05:00
Ed Page
172ff0bb5a chore: Release 2023-06-08 10:27:43 -05:00
Ed Page
7523a865f7 feat(dict): Pull in codespell items 2023-06-08 09:26:12 -05:00
Ed Page
a9d9fc03a2 test(dict): Report more cases to user 2023-06-08 09:23:10 -05:00
Ed Page
09f096a096 chore(dict): Automate more cleanup 2023-06-08 08:54:36 -05:00
Ed Page
ccc72d7b42 fix: Update 3rd party dicts 2023-06-08 07:56:08 -05:00
Ed Page
20b36ca07f chore: Release 2023-06-01 19:49:16 -05:00
Ed Page
27c9fe7c79 chore: Release 2023-06-01 06:22:12 -05:00
Ed Page
5277bf390e fix(dict): Allow plural deque -> deques 2023-06-01 06:07:12 -05:00
Ed Page
0ded1c8a4e fix(dict): Include May updates 2023-06-01 06:02:02 -05:00
Ed Page
a78f83bab3
Merge pull request #731 from crate-ci/renovate/criterion-0.x
chore(deps): update rust crate criterion to 0.5
2023-06-01 09:45:34 -05:00
renovate[bot]
e06f63c31d chore(deps): update compatible 2023-06-01 02:54:09 +00:00
renovate[bot]
9aa8d04d94
chore(deps): update rust crate criterion to 0.5 2023-06-01 00:53:02 +00:00
Ville Skyttä
9c74d015f3 feat(cli): Strip .in suffix(es) only on non-match
Makes user assigned `.in` work.
2023-05-25 15:24:04 +03:00
Ville Skyttä
90d4676dd7 feat(cli): Strip .in suffix(es)
`.in` is typically used for build system template input files,
containing some placeholders to replace. In some cases, multiple rounds
of replacements are used, each with their own `.in`, so remove all
trailing instances of it before attempting a filename match.

Closes https://github.com/crate-ci/typos/issues/727
2023-05-24 22:54:45 +03:00
Ed Page
38a1b19481 chore: Release 2023-05-22 13:44:05 -05:00
Ed Page
5c98b91f18 chore: Release 2023-05-19 08:51:04 -05:00
Ed Page
adfd866ed9 test(cli): Check more former false positives 2023-05-19 08:18:25 -05:00
Ed Page
641e734fe7 fix(dict): Dont correct add-ons
Fixes #721
2023-05-19 08:13:01 -05:00
Ed Page
9e01ccbd3e test(cli): Prevent false-positive regressions 2023-05-19 08:11:14 -05:00
Ed Page
78a3c66d00 chore: Release 2023-05-03 08:57:26 -05:00
Ed Page
b5b09d7129 chore: Release 2023-05-03 08:56:01 -05:00
Ed Page
83b6d30708
Merge pull request #719 from epage/april
fix: Add April, 2023's typos
2023-05-03 08:52:35 -05:00
Ed Page
f7c2691b63 fix: Add April, 2023's typos
Fixes #705
2023-05-03 08:28:35 -05:00
renovate[bot]
5131fb8167
chore(deps): update compatible 2023-05-01 15:30:51 +00:00
Ed Page
808e862bfb chore: Resolve deprecations 2023-04-27 23:26:55 -05:00
Ed Page
d17ca898d9 chore: Upgrade to 0.4.3 2023-04-27 23:24:25 -05:00
Ed Page
9433f016bb style: Fix formatting 2023-04-24 00:11:34 -05:00
Ed Page
64e40cffee chore: Release 2023-04-19 09:47:11 -05:00
Ed Page
78058ce3e3 chore: Release 2023-04-19 08:35:04 -05:00
Ed Page
7f65ff4f24 chore: Release 2023-04-12 22:24:06 -05:00
Ed Page
5145767575 chore: Update anstyle 2023-04-12 21:52:15 -05:00
Ed Page
217e403326 docs(cli): Show SSL cipher suites
See #438
2023-04-11 01:17:33 -05:00
Ed Page
66d82e5e51 chore: Release 2023-03-30 07:50:08 -05:00
Ed Page
8db59330b7 test(cli): Add UTF16 test 2023-03-30 07:45:24 -05:00
Ed Page
ae7f313230 fix(cli): Actually decode UTF-16
Two problems
- I thought we had a UTF-16 test but apparently we didn't
- I didn't read enough fine print in the `encoding_rs` API

These combined meant the last release completely broke UTF-16 support.
2023-03-30 07:27:55 -05:00
Ed Page
144ee4d018 chore: Release 2023-03-29 21:55:35 -05:00
Ed Page
15cdad2a3f chore: Release 2023-03-29 21:54:57 -05:00
Ed Page
039edba3de fix(dict): Add March's typos
Fixes #677
2023-03-29 21:40:36 -05:00
Ed Page
98be58dbc9 refactor: Switch out the UTF-16 encoding impl
Fixes #702
2023-03-29 20:42:48 -05:00
renovate[bot]
e1a138b637 chore(deps): update compatible 2023-04-01 07:05:05 +00:00
Ed Page
6cf303d421 chore: Release 2023-03-18 04:20:06 -05:00
Ed Page
53e2855fa0 chore: Release 2023-03-18 04:19:19 -05:00
Ed Page
8a6fc1895d chore: Release 2023-03-18 04:18:47 -05:00
Ed Page
243b4efc9e chore: Update winnow 2023-03-18 04:11:55 -05:00
Ed Page
08f154e45b test: Try to fix CI 2023-03-18 02:15:16 -05:00
Ed Page
e15de8b72e chore: Release 2023-03-18 02:09:49 -05:00
Ed Page
ac46a6ba54 feat(config): Custom ignores
Typos primarily works off of identifiers and words.  We have built-in
support to detect constructs that span identifiers that should not be
spell checked, like UUIDs, emails, domains, etc.  This opens it up for
for user-defined identifier-spanning constructs using regexes via
`extend-ignore-re`.

This works differently than any of the previous ways of ignoring thing
because the regexes require extra parse passes.  Under the assumption
that (1) actual typos are rare and (2) number of files relying on
`extend-ignore-re` are rare, we only do these extra parse passes when a
typo is found, causing almost no performance hit in the expected case.

While this could be used for more generic types of ignores, it isn't the
most maintainable because it is separate from the source files in
question.  Ideally, we'd implement document settings / directives for
these cases (#316).
2023-03-18 01:25:39 -05:00
Ed Page
9d376417a0 test: Baseline for generic ignore 2023-03-18 01:20:01 -05:00
Ed Page
a1a601195e chore: Release 2023-03-17 23:59:36 -05:00
Ed Page
e4d2d0e54d fix: Actuall ignore ignored identifiers 2023-03-17 23:47:25 -05:00
Ed Page
2ee6ef4654 test(cli): Show extend-ignore-identifiers-re bug 2023-03-17 23:45:54 -05:00
Ed Page
0eae00fee2 test(cli): Consolidate files 2023-03-17 23:30:24 -05:00
Ed Page
797574c10a chore: Release 2023-03-17 23:09:02 -05:00
Ed Page
af90817e50 feat(dict): extend-ignore-identifiers-re support
This opens the door for users to provide patterns for identifiers that
are always valid.  The key limitation is "identifiers".  Run `typos
--identifiers` to verify what you are trying to write the regex for.

Fixes #651
2023-03-17 22:40:55 -05:00
Ed Page
03286f0f82 chore: Release 2023-03-16 05:22:42 -05:00
Ed Page
52e1743c58 chore: Update to anstream 2023-03-16 05:07:38 -05:00
Ed Page
57502b53cc chore: Release 2023-03-16 03:47:08 -05:00
Ed Page
720bd7b28c fix(dict): Allow commitish
Fixes #690
2023-03-16 03:20:57 -05:00
Ed Page
9504315f7e chore: Update Styled pattern 2023-03-14 08:22:10 -05:00
Ed Page
dc0eafc7e5 chore: Release 2023-03-14 02:14:39 -05:00
Ed Page
3a29410c1b fix: Improve color env variable support
- `CLICOLOR=1` now works correctly
- `NO_COLOR=` now works correctly
- Auto-enable colors in CI


For running `typos` on the Linux kernel (176,210 typos to be printed), we went from 20.082s to
<20.450s.  Where in that range is unclear due to jitter in my system.
```console
$ hyperfine -L typos ./typos-main,./typos-anstream "{typos} ../../../linux" -i
Benchmark 1: ./typos-main ../../../linux
  Time (mean ± σ):     20.082 s ±  0.111 s    [User: 39.668 s, System: 0.474 s]
  Range (min … max):   19.961 s … 20.331 s    10 runs

  Warning: Ignoring non-zero exit code.

Benchmark 2: ./typos-anstream ../../../linux
  Time (mean ± σ):     20.426 s ±  0.104 s    [User: 40.301 s, System: 0.523 s]
  Range (min … max):   20.316 s … 20.661 s    10 runs

  Warning: Ignoring non-zero exit code.

Summary
  './typos-main ../../../linux' ran
    1.02 ± 0.01 times faster than './typos-anstream ../../../linux'

$ CLICOLOR_FORCE=1 hyperfine -L typos ./typos-anstream "{typos} ../../../linux" -i
Benchmark 1: ./typos-anstream ../../../linux
  Time (mean ± σ):     20.262 s ±  0.075 s    [User: 39.961 s, System: 0.542 s]
  Range (min … max):   20.154 s … 20.420 s    10 runs

  Warning: Ignoring non-zero exit code.

$ CLICOLOR=0 hyperfine -L typos ./typos-anstream "{typos} ../../../linux" -i
Benchmark 1: ./typos-anstream ../../../linux
  Time (mean ± σ):     20.296 s ±  0.065 s    [User: 40.003 s, System: 0.565 s]
  Range (min … max):   20.169 s … 20.383 s    10 runs

  Warning: Ignoring non-zero exit code.
```
2023-03-13 23:01:45 -05:00
Ed Page
28e7f17a65 chore: Release 2023-03-13 20:45:44 -05:00
WaterLemons2k
6855a78893 feat(ci): Use composite to run action
Using composite instead of docker to avoid building image,
it can make the action faster.

If the `typos` command doesn't exist, download and extract it.
2023-03-14 23:04:09 +08:00
Ed Page
34289639e6 chore: Release 2023-03-13 12:33:33 -05:00
Ed Page
4de8a7c366
Merge pull request #679 from phip1611/erronerous
feat(dict): Add: erronerous -> erroneous
2023-03-13 12:32:01 -05:00
Ed Page
6003b48885
Merge pull request #680 from phip1611/existend
change(dict): existend => existed,existent
2023-03-13 12:31:45 -05:00
Ed Page
3d0de83fb6 chore: Release 2023-03-13 11:57:15 -05:00
Eric Fu
4eeb460bb7 fix: ignore go.mod by default 2023-03-13 23:53:05 +08:00
Philipp Schuster
cc26a8f693 change: existend => existed,existent 2023-03-12 14:42:09 +01:00
Philipp Schuster
500b9e3445 add: erronerous -> erroneous 2023-03-12 13:29:49 +01:00
Ed Page
5f7454815c
Merge pull request #685 from epage/shuffle
fix(pre-commit): Separate cli from pre-commit package
2023-03-13 09:32:39 -05:00
Ed Page
13dbffcf7c fix(pre-commit): Separate cli from pre-commit package
Fixes #682
2023-03-08 10:19:20 -06:00
Jonas Platte
f8ec64571f
feat(dict): Add empheral -> ephemeral 2023-03-08 14:01:24 +01:00
Ed Page
08a9831825 chore: Release 2023-03-05 20:43:46 -06:00
George Dietrich
3feda3ca91
feat: Add additional corrections 2023-03-06 09:41:47 -05:00
Ed Page
f4293b58c5 chore: Release 2023-02-28 06:30:27 -06:00
Ed Page
ce20d2f220 chore: Update dependencies 2023-02-28 05:46:19 -06:00
Ed Page
d752626069 chore: Update dependencies 2023-02-27 23:34:02 -06:00