2dc6cb8511
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [anyhow](https://redirect.github.com/dtolnay/anyhow) | dependencies | patch | `1.0.86` -> `1.0.89` | | [clap](https://redirect.github.com/clap-rs/clap) | dependencies | patch | `4.5.13` -> `4.5.18` | | [clap-verbosity-flag](https://redirect.github.com/clap-rs/clap-verbosity-flag) | dependencies | patch | `2.2.1` -> `2.2.2` | | [edit-distance](https://redirect.github.com/febeling/edit-distance) | dev-dependencies | patch | `2.1.2` -> `2.1.3` | | [globset](https://redirect.github.com/BurntSushi/ripgrep/tree/master/crates/globset) ([source](https://redirect.github.com/BurntSushi/ripgrep/tree/HEAD/crates/globset)) | dependencies | patch | `0.4.14` -> `0.4.15` | | [ignore](https://redirect.github.com/BurntSushi/ripgrep/tree/master/crates/ignore) ([source](https://redirect.github.com/BurntSushi/ripgrep/tree/HEAD/crates/ignore)) | dependencies | patch | `0.4.22` -> `0.4.23` | | [indexmap](https://redirect.github.com/indexmap-rs/indexmap) | dev-dependencies | minor | `2.3.0` -> `2.5.0` | | [once_cell](https://redirect.github.com/matklad/once_cell) | dependencies | minor | `1.19.0` -> `1.20.1` | | [regex](https://redirect.github.com/rust-lang/regex) | dependencies | minor | `1.10.5` -> `1.11.0` | | [regex](https://redirect.github.com/rust-lang/regex) | dev-dependencies | minor | `1.10.5` -> `1.11.0` | | [serde](https://serde.rs) ([source](https://redirect.github.com/serde-rs/serde)) | dependencies | patch | `1.0.204` -> `1.0.210` | | [serde_json](https://redirect.github.com/serde-rs/json) | dependencies | patch | `1.0.121` -> `1.0.128` | | [simdutf8](https://redirect.github.com/rusticstuff/simdutf8) | dependencies | patch | `0.1.4` -> `0.1.5` | | [thiserror](https://redirect.github.com/dtolnay/thiserror) | dependencies | patch | `1.0.63` -> `1.0.64` | | [trycmd](https://redirect.github.com/assert-rs/trycmd) ([source](https://redirect.github.com/assert-rs/snapbox)) | dev-dependencies | patch | `0.15.6` -> `0.15.7` | | [unicode-segmentation](https://redirect.github.com/unicode-rs/unicode-segmentation) | dependencies | minor | `1.11.0` -> `1.12.0` | | [unicode-xid](https://redirect.github.com/unicode-rs/unicode-xid) | dependencies | patch | `0.2.4` -> `0.2.6` | | [winnow](https://redirect.github.com/winnow-rs/winnow) | dependencies | patch | `0.6.18` -> `0.6.20` | --- ### Release Notes <details> <summary>dtolnay/anyhow (anyhow)</summary> ### [`v1.0.89`](https://redirect.github.com/dtolnay/anyhow/releases/tag/1.0.89) [Compare Source](https://redirect.github.com/dtolnay/anyhow/compare/1.0.88...1.0.89) - Make anyhow::Error's `UnwindSafe` and `RefUnwindSafe` impl consistently available between versions of Rust newer and older than 1.72 ([#​386](https://redirect.github.com/dtolnay/anyhow/issues/386)) ### [`v1.0.88`](https://redirect.github.com/dtolnay/anyhow/releases/tag/1.0.88) [Compare Source](https://redirect.github.com/dtolnay/anyhow/compare/1.0.87...1.0.88) - Documentation improvements ### [`v1.0.87`](https://redirect.github.com/dtolnay/anyhow/releases/tag/1.0.87) [Compare Source](https://redirect.github.com/dtolnay/anyhow/compare/1.0.86...1.0.87) - Support more APIs, including `Error::new` and `Error::chain`, in no-std mode on Rust 1.81+ ([#​383](https://redirect.github.com/dtolnay/anyhow/issues/383)) </details> <details> <summary>clap-rs/clap (clap)</summary> ### [`v4.5.18`](https://redirect.github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#4518---2024-09-20) [Compare Source](https://redirect.github.com/clap-rs/clap/compare/v4.5.17...v4.5.18) ##### Features - *(builder)* Expose `Arg::get_display_order` and `Command::get_display_order` ### [`v4.5.17`](https://redirect.github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#4517---2024-09-04) [Compare Source](https://redirect.github.com/clap-rs/clap/compare/v4.5.16...v4.5.17) ##### Fixes - *(help)* Style required argument groups - *(derive)* Improve error messages when unsupported fields are used ### [`v4.5.16`](https://redirect.github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#4516---2024-08-15) [Compare Source](https://redirect.github.com/clap-rs/clap/compare/v4.5.15...v4.5.16) ##### Fixes - *(derive)* Improve error messages when `derive` feature is missing ### [`v4.5.15`](https://redirect.github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#4515---2024-08-10) [Compare Source](https://redirect.github.com/clap-rs/clap/compare/v4.5.14...v4.5.15) ##### Compatiblity - *(unstable-ext)* `Arg::remove` changed return types ##### Fixes - *(unstable-ext)* Make `Arg::remove` return the removed item ### [`v4.5.14`](https://redirect.github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#4514---2024-08-08) [Compare Source](https://redirect.github.com/clap-rs/clap/compare/v4.5.13...v4.5.14) ##### Features - *(unstable-ext)* Added `Arg::add` for attaching arbitrary state, like completion hints, to `Arg` without `Arg` knowing about it </details> <details> <summary>clap-rs/clap-verbosity-flag (clap-verbosity-flag)</summary> ### [`v2.2.2`](https://redirect.github.com/clap-rs/clap-verbosity-flag/blob/HEAD/CHANGELOG.md#222---2024-09-26) [Compare Source](https://redirect.github.com/clap-rs/clap-verbosity-flag/compare/v2.2.1...v2.2.2) ##### Fixes - Resolve overflow issues </details> <details> <summary>febeling/edit-distance (edit-distance)</summary> ### [`v2.1.3`](https://redirect.github.com/febeling/edit-distance/compare/2.1.2...2.1.3) [Compare Source](https://redirect.github.com/febeling/edit-distance/compare/2.1.2...2.1.3) </details> <details> <summary>indexmap-rs/indexmap (indexmap)</summary> ### [`v2.5.0`](https://redirect.github.com/indexmap-rs/indexmap/blob/HEAD/RELEASES.md#250) [Compare Source](https://redirect.github.com/indexmap-rs/indexmap/compare/2.4.0...2.5.0) - Added an `insert_before` method to `IndexMap` and `IndexSet`, as an alternative to `shift_insert` with different behavior on existing entries. - Added `first_entry` and `last_entry` methods to `IndexMap`. - Added `From` implementations between `IndexedEntry` and `OccupiedEntry`. ### [`v2.4.0`](https://redirect.github.com/indexmap-rs/indexmap/blob/HEAD/RELEASES.md#240) [Compare Source](https://redirect.github.com/indexmap-rs/indexmap/compare/2.3.0...2.4.0) - Added methods `IndexMap::append` and `IndexSet::append`, moving all items from one map or set into another, and leaving the original capacity for reuse. </details> <details> <summary>matklad/once_cell (once_cell)</summary> ### [`v1.20.1`](https://redirect.github.com/matklad/once_cell/blob/HEAD/CHANGELOG.md#1201) [Compare Source](https://redirect.github.com/matklad/once_cell/compare/v1.20.0...v1.20.1) - Allow using `race` module using just `portable_atomic`, without `critical_section` and provide better error messages on targets without atomic CAS instruction, [#​265](https://redirect.github.com/matklad/once_cell/pull/265). ### [`v1.20.0`](https://redirect.github.com/matklad/once_cell/compare/v1.19.0...v1.20.0) [Compare Source](https://redirect.github.com/matklad/once_cell/compare/v1.19.0...v1.20.0) </details> <details> <summary>rust-lang/regex (regex)</summary> ### [`v1.11.0`](https://redirect.github.com/rust-lang/regex/blob/HEAD/CHANGELOG.md#1110-2024-09-29) [Compare Source](https://redirect.github.com/rust-lang/regex/compare/1.10.6...1.11.0) \=================== This is a new minor release of `regex` that brings in an update to the Unicode Character Database. Specifically, this updates the Unicode data used by `regex` internally to the version 16 release. New features: - [FEATURE #​1228](https://redirect.github.com/rust-lang/regex/pull/1228): Add new `regex::SetMatches::matched_all` method. - [FEATURE #​1229](https://redirect.github.com/rust-lang/regex/pull/1229): Update to Unicode Character Database (UCD) version 16. ### [`v1.10.6`](https://redirect.github.com/rust-lang/regex/blob/HEAD/CHANGELOG.md#1106-2024-08-02) [Compare Source](https://redirect.github.com/rust-lang/regex/compare/1.10.5...1.10.6) \=================== This is a new patch release with a fix for the `unstable` crate feature that enables `std::str::Pattern` trait integration. Bug fixes: - [BUG #​1219](https://redirect.github.com/rust-lang/regex/pull/1219): Fix the `Pattern` trait implementation as a result of nightly API breakage. </details> <details> <summary>serde-rs/serde (serde)</summary> ### [`v1.0.210`](https://redirect.github.com/serde-rs/serde/releases/tag/v1.0.210) [Compare Source](https://redirect.github.com/serde-rs/serde/compare/v1.0.209...v1.0.210) - Support serializing and deserializing `IpAddr` and `SocketAddr` in no-std mode on Rust 1.77+ ([#​2816](https://redirect.github.com/serde-rs/serde/issues/2816), thanks [@​MathiasKoch](https://redirect.github.com/MathiasKoch)) - Make `serde::ser::StdError` and `serde:🇩🇪:StdError` equivalent to `core::error::Error` on Rust 1.81+ ([#​2818](https://redirect.github.com/serde-rs/serde/issues/2818)) ### [`v1.0.209`](https://redirect.github.com/serde-rs/serde/releases/tag/v1.0.209) [Compare Source](https://redirect.github.com/serde-rs/serde/compare/v1.0.208...v1.0.209) - Fix deserialization of empty structs and empty tuples inside of untagged enums ([#​2805](https://redirect.github.com/serde-rs/serde/issues/2805), thanks [@​Mingun](https://redirect.github.com/Mingun)) ### [`v1.0.208`](https://redirect.github.com/serde-rs/serde/releases/tag/v1.0.208) [Compare Source](https://redirect.github.com/serde-rs/serde/compare/v1.0.207...v1.0.208) - Support serializing and deserializing unit structs in a `flatten` field ([#​2802](https://redirect.github.com/serde-rs/serde/issues/2802), thanks [@​jonhoo](https://redirect.github.com/jonhoo)) ### [`v1.0.207`](https://redirect.github.com/serde-rs/serde/releases/tag/v1.0.207) [Compare Source](https://redirect.github.com/serde-rs/serde/compare/v1.0.206...v1.0.207) - Improve interactions between `flatten` attribute and `skip_serializing`/`skip_deserializing` ([#​2795](https://redirect.github.com/serde-rs/serde/issues/2795), thanks [@​Mingun](https://redirect.github.com/Mingun)) ### [`v1.0.206`](https://redirect.github.com/serde-rs/serde/releases/tag/v1.0.206) [Compare Source](https://redirect.github.com/serde-rs/serde/compare/v1.0.205...v1.0.206) - Improve support for `flatten` attribute inside of enums ([#​2567](https://redirect.github.com/serde-rs/serde/issues/2567), thanks [@​Mingun](https://redirect.github.com/Mingun)) ### [`v1.0.205`](https://redirect.github.com/serde-rs/serde/releases/tag/v1.0.205) [Compare Source](https://redirect.github.com/serde-rs/serde/compare/v1.0.204...v1.0.205) - Use serialize_entry instead of serialize_key + serialize_value when serialize flattened newtype enum variants ([#​2785](https://redirect.github.com/serde-rs/serde/issues/2785), thanks [@​Mingun](https://redirect.github.com/Mingun)) - Avoid triggering a collection_is_never_read lint in the deserialization of enums containing flattened fields ([#​2791](https://redirect.github.com/serde-rs/serde/issues/2791)) </details> <details> <summary>serde-rs/json (serde_json)</summary> ### [`v1.0.128`](https://redirect.github.com/serde-rs/json/releases/tag/1.0.128) [Compare Source](https://redirect.github.com/serde-rs/json/compare/1.0.127...1.0.128) - Support serializing maps containing 128-bit integer keys to serde_json::Value ([#​1188](https://redirect.github.com/serde-rs/json/issues/1188), thanks [@​Mrreadiness](https://redirect.github.com/Mrreadiness)) ### [`v1.0.127`](https://redirect.github.com/serde-rs/json/releases/tag/1.0.127) [Compare Source](https://redirect.github.com/serde-rs/json/compare/1.0.126...1.0.127) - Add more removal methods to OccupiedEntry ([#​1179](https://redirect.github.com/serde-rs/json/issues/1179), thanks [@​GREsau](https://redirect.github.com/GREsau)) ### [`v1.0.126`](https://redirect.github.com/serde-rs/json/releases/tag/1.0.126) [Compare Source](https://redirect.github.com/serde-rs/json/compare/1.0.125...1.0.126) - Improve string parsing on targets that use 32-bit pointers but also have fast 64-bit integer arithmetic, such as aarch64-unknown-linux-gnu_ilp32 and x86\_64-unknown-linux-gnux32 ([#​1182](https://redirect.github.com/serde-rs/json/issues/1182), thanks [@​CryZe](https://redirect.github.com/CryZe)) ### [`v1.0.125`](https://redirect.github.com/serde-rs/json/releases/tag/1.0.125) [Compare Source](https://redirect.github.com/serde-rs/json/compare/v1.0.124...1.0.125) - Speed up \uXXXX parsing and improve handling of unpaired surrogates when deserializing to bytes ([#​1172](https://redirect.github.com/serde-rs/json/issues/1172), [#​1175](https://redirect.github.com/serde-rs/json/issues/1175), thanks [@​purplesyringa](https://redirect.github.com/purplesyringa)) ### [`v1.0.124`](https://redirect.github.com/serde-rs/json/releases/tag/v1.0.124) [Compare Source](https://redirect.github.com/serde-rs/json/compare/v1.0.123...v1.0.124) - Fix a bug in processing string escapes in big-endian architectures ([#​1173](https://redirect.github.com/serde-rs/json/issues/1173), thanks [@​purplesyringa](https://redirect.github.com/purplesyringa)) ### [`v1.0.123`](https://redirect.github.com/serde-rs/json/releases/tag/v1.0.123) [Compare Source](https://redirect.github.com/serde-rs/json/compare/v1.0.122...v1.0.123) - Optimize string parsing by applying SIMD-within-a-register: 30.3% improvement on [twitter.json](https://redirect.github.com/miloyip/nativejson-benchmark/blob/v1.0.0/data/twitter.json) from 613 MB/s to 799 MB/s ([#​1161](https://redirect.github.com/serde-rs/json/issues/1161), thanks [@​purplesyringa](https://redirect.github.com/purplesyringa)) ### [`v1.0.122`](https://redirect.github.com/serde-rs/json/releases/tag/v1.0.122) [Compare Source](https://redirect.github.com/serde-rs/json/compare/v1.0.121...v1.0.122) - Support using `json!` in no-std crates ([#​1166](https://redirect.github.com/serde-rs/json/issues/1166)) </details> <details> <summary>rusticstuff/simdutf8 (simdutf8)</summary> ### [`v0.1.5`](https://redirect.github.com/rusticstuff/simdutf8/blob/HEAD/CHANGELOG.md#015---2024-09-22) [Compare Source](https://redirect.github.com/rusticstuff/simdutf8/compare/v0.1.4...v0.1.5) ##### Bug fixes - Fix Undefined Behavior in WebAssembly SIMD128 ([#​86](https://redirect.github.com/rusticstuff/simdutf8/issues/86)) (thanks [@​CryZe](https://redirect.github.com/CryZe)) - Documentation and clippy fixes (thanks [@​rtfeldman](https://redirect.github.com/rtfeldman), [@​jqnatividad](https://redirect.github.com/jqnatividad), [@​rhysd](https://redirect.github.com/rhysd)) ##### Performance - WASM: Don't use u8x16\_bitmask for ASCII Check ([#​79](https://redirect.github.com/rusticstuff/simdutf8/issues/79)) (thanks [@​CryZe](https://redirect.github.com/CryZe)) </details> <details> <summary>dtolnay/thiserror (thiserror)</summary> ### [`v1.0.64`](https://redirect.github.com/dtolnay/thiserror/releases/tag/1.0.64) [Compare Source](https://redirect.github.com/dtolnay/thiserror/compare/1.0.63...1.0.64) - Exclude derived impls from coverage instrumentation ([#​322](https://redirect.github.com/dtolnay/thiserror/issues/322), thanks [@​oxalica](https://redirect.github.com/oxalica)) </details> <details> <summary>assert-rs/snapbox (trycmd)</summary> ### [`v0.15.7`](https://redirect.github.com/assert-rs/snapbox/compare/trycmd-v0.15.6...trycmd-v0.15.7) [Compare Source](https://redirect.github.com/assert-rs/snapbox/compare/trycmd-v0.15.6...trycmd-v0.15.7) </details> <details> <summary>unicode-rs/unicode-segmentation (unicode-segmentation)</summary> ### [`v1.12.0`](https://redirect.github.com/unicode-rs/unicode-segmentation/compare/v1.11.0...v1.12.0) [Compare Source](https://redirect.github.com/unicode-rs/unicode-segmentation/compare/v1.11.0...v1.12.0) </details> <details> <summary>unicode-rs/unicode-xid (unicode-xid)</summary> ### [`v0.2.6`](https://redirect.github.com/unicode-rs/unicode-xid/blob/HEAD/CHANGELOG.md#026) [Compare Source](https://redirect.github.com/unicode-rs/unicode-xid/compare/v0.2.5...v0.2.6) - Update to Unicode 16.0.0. ### [`v0.2.5`](https://redirect.github.com/unicode-rs/unicode-xid/blob/HEAD/CHANGELOG.md#025) [Compare Source](https://redirect.github.com/unicode-rs/unicode-xid/compare/v0.2.4...v0.2.5) - Update to Unicode 15.1.0. </details> <details> <summary>winnow-rs/winnow (winnow)</summary> ### [`v0.6.20`](https://redirect.github.com/winnow-rs/winnow/blob/HEAD/CHANGELOG.md#0620---2024-09-25) [Compare Source](https://redirect.github.com/winnow-rs/winnow/compare/v0.6.19...v0.6.20) ##### Internal - Dependency update ### [`v0.6.19`](https://redirect.github.com/winnow-rs/winnow/blob/HEAD/CHANGELOG.md#0619---2024-09-24) [Compare Source](https://redirect.github.com/winnow-rs/winnow/compare/v0.6.18...v0.6.19) ##### Features - Add `Located::reset_to_start` for parsing encoded graphs with start-relative pointers </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 5am on the first day of the month" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/crate-ci/typos). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC45Ny4wIiwidXBkYXRlZEluVmVyIjoiMzguOTcuMCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> |
||
---|---|---|
.cargo | ||
.github | ||
action | ||
benchsuite | ||
crates | ||
docs | ||
.clippy.toml | ||
.dockerignore | ||
.gitignore | ||
.ignore | ||
.pre-commit-config.yaml | ||
.pre-commit-hooks.yaml | ||
action.yml | ||
Cargo.lock | ||
Cargo.toml | ||
CHANGELOG.md | ||
committed.toml | ||
CONTRIBUTING.md | ||
deny.toml | ||
Dockerfile | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
README.md | ||
release.toml | ||
setup.py |
typos
Source code spell checker
Finds and corrects spelling mistakes among source code:
- Fast enough to run on monorepos
- Low false positives so you can run on PRs
Dual-licensed under MIT or Apache 2.0
Documentation
- Installation
- Getting Started
- Reference
- FAQ
- Comparison with other spell checkers
- Projects using typos
- Benchmarks
- Design
- Contribute
- CHANGELOG
Install
Download a pre-built binary (installable via gh-install).
Or use rust to install:
cargo install typos-cli
Or use Homebrew to install:
brew install typos-cli
Or use Conda to install:
conda install typos
Or use Pacman to install:
sudo pacman -S typos
Getting Started
Most commonly, you'll either want to see what typos are available with
typos
Or have them fixed
typos --write-changes
typos -w
If there is any ambiguity (multiple possible corrections), typos
will just report it to the user and move on.
False-positives
Sometimes, what looks like a typo is intentional, like with people's names, acronyms, or localized content.
To mark a word or an identifier (grouping of words) as valid, add it your _typos.toml
by declaring itself as the valid spelling:
[default]
extend-ignore-identifiers-re = [
# *sigh* this just isn't worth the cost of fixing
"AttributeID.*Supress.*",
]
[default.extend-identifiers]
# *sigh* this just isn't worth the cost of fixing
AttributeIDSupressMenu = "AttributeIDSupressMenu"
[default.extend-words]
# Don't correct the surname "Teh"
teh = "teh"
For cases like localized content, you can disable spell checking of file contents while still checking the file name:
[type.po]
extend-glob = ["*.po"]
check-file = false
(run typos --type-list
to see configured file types)
If you need some more flexibility, you can completely exclude some files from consideration:
[files]
extend-exclude = ["localized/*.po"]
Integrations
- GitHub Actions
- pre-commit
- 🐊Putout Processor
- Visual Studio Code
- typos-lsp (Language Server Protocol server)
Custom
typos
provides several building blocks for custom native integrations
-
reads fromstdin
,--write-changes
will be written tostdout
--diff
to provide a diff--format json
to get jsonlines with exit code 0 on no errors, code 2 on typos, anything else is an error.
Examples:
# Read file from stdin, write corrected version to stdout
typos - --write-changes
# Creates a diff of what would change
typos dir/file --diff
# Fully programmatic control
typos dir/file --format json
Debugging
You can see what the effective config looks like by running
typos --dump-config -
You can then see how typos is processing your project with
typos --files
typos --identifiers
typos --words
If you need to dig in more, you can enable debug logging with -v
FAQ
Why was ... not corrected?
Does the file show up in typos --files
?
If not, check your config with typos --dump-config -
.
The [files]
table controls how we walk files.
If you are using files.extend-exclude
,
are you running into #593?
If you are using files.ignore-vcs = true
,
is the file in your .gitignore
but git tracks it anyways?
Prefer allowing the file explicitly (see #909).
Does the identifier show up in typos --identifiers
or the word show up in typos --words
?
If not, it might be subject to one of typos' heuristics for
detecting non-words (like hashes) or
unambiguous words (like words after a \
escape).
If it is showing up, likely typos
doesn't know about it yet.
typos
maintains a list of known typo corrections to keep the false positive
count low so it can safely run unassisted.
This is in contrast to most spell checking UIs people use where there is a known list of valid words. In this case, the spell checker tries to guess your intent by finding the closest-looking word. It then has a gauge for when a word isn't close enough and assumes you know best. The user has the opportunity to verify these corrections and explicitly allow or reject them.
For more on the trade offs of these approaches, see Design.
- To correct it locally, see also our False Positives documentation.
- To contribute your correction, see Contribute