mirror of
https://github.com/crate-ci/typos.git
synced 2024-11-22 00:51:11 -05:00
fix(cli): Dont correct O_WRONLY
Realized we could just hard code this for now rather creating a general identifier dictionary. Fixes #744
This commit is contained in:
parent
9f1d7017e2
commit
5fd0df2881
2 changed files with 6 additions and 11 deletions
|
@ -51,8 +51,11 @@ impl BuiltIn {
|
||||||
|
|
||||||
#[cfg(feature = "dict")]
|
#[cfg(feature = "dict")]
|
||||||
impl BuiltIn {
|
impl BuiltIn {
|
||||||
fn correct_ident_with_dict<'s>(&self, _ident: &str) -> Option<Status<'s>> {
|
fn correct_ident_with_dict<'s>(&self, ident: &str) -> Option<Status<'s>> {
|
||||||
None
|
match ident {
|
||||||
|
"O_WRONLY" => Some(Status::Valid),
|
||||||
|
_ => None,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Not using `Status` to avoid the allocations
|
// Not using `Status` to avoid the allocations
|
||||||
|
|
|
@ -1,12 +1,4 @@
|
||||||
bin.name = "typos"
|
bin.name = "typos"
|
||||||
stdin = ""
|
stdin = ""
|
||||||
stdout = """
|
stdout = ""
|
||||||
error: `WRONLY` should be `WRONGLY`
|
|
||||||
--> ./sample.py:5:12
|
|
||||||
|
|
|
||||||
5 | print(os.O_WRONLY) # should work
|
|
||||||
| ^^^^^^
|
|
||||||
|
|
|
||||||
"""
|
|
||||||
stderr = ""
|
stderr = ""
|
||||||
status.code = 2
|
|
||||||
|
|
Loading…
Reference in a new issue