Skip to content

Commit

Permalink
Add disable line regex, fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aumetra committed Sep 17, 2024
1 parent 794a226 commit 47ddd11
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
[default]
extend-ignore-re = [
"(?Rm)^.*(#|//)\\s*spellchecker:disable-line$",
]

[files]
extend-exclude = [
"contracts/**/schema/**",
Expand Down
2 changes: 1 addition & 1 deletion contracts/ibc-reflect-send/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub const KEY_CONFIG: &[u8] = b"config";
/// accounts is lookup of channel_id to reflect contract
pub const PREFIX_ACCOUNTS: &[u8] = b"accounts";
/// Upper bound for ranging over accounts
const PREFIX_ACCOUNTS_UPPER_BOUND: &[u8] = b"account";
const PREFIX_ACCOUNTS_UPPER_BOUND: &[u8] = b"accountt"; // spellchecker:disable-line

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
pub struct Config {
Expand Down
2 changes: 1 addition & 1 deletion contracts/ibc-reflect/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub const KEY_CONFIG: &[u8] = b"config";
pub const KEY_PENDING_CHANNEL: &[u8] = b"pending";
pub const PREFIX_ACCOUNTS: &[u8] = b"accounts";
/// Upper bound for ranging over accounts
const PREFIX_ACCOUNTS_UPPER_BOUND: &[u8] = b"account";
const PREFIX_ACCOUNTS_UPPER_BOUND: &[u8] = b"accountt"; // spellchecker:disable-line

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
pub struct Config {
Expand Down
8 changes: 4 additions & 4 deletions packages/schema/src/remove.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ mod tests {
#[cfg(any(unix, target_os = "redox"))]
{
use std::os::unix::ffi::OsStrExt;
let non_hidden = OsStr::from_bytes(&[0x66, 0x6f, 0x80, 0x6f]); // fo�o
let non_hidden = OsStr::from_bytes(&[0x66, 0x6f, 0x80, 0x6f]); // fo�o // spellchecker:disable-line
assert!(!is_hidden(Path::new(non_hidden)));
let hidden = OsStr::from_bytes(&[0x2e, 0x66, 0x6f, 0x80, 0x6f]); // .fo�o
let hidden = OsStr::from_bytes(&[0x2e, 0x66, 0x6f, 0x80, 0x6f]); // .fo�o // spellchecker:disable-line
assert!(is_hidden(Path::new(hidden)));
}
}
Expand All @@ -90,9 +90,9 @@ mod tests {
#[cfg(any(unix, target_os = "redox"))]
{
use std::os::unix::ffi::OsStrExt;
let non_hidden = OsStr::from_bytes(&[0x66, 0x6f, 0x80, 0x6f]); // fo�o
let non_hidden = OsStr::from_bytes(&[0x66, 0x6f, 0x80, 0x6f]); // fo�o // spellchecker:disable-line
assert!(!is_json(Path::new(non_hidden)));
let hidden = OsStr::from_bytes(&[0x66, 0x6f, 0x80, 0x6f, 0x2e, 0x6a, 0x73, 0x6f, 0x6e]); // fo�o.json
let hidden = OsStr::from_bytes(&[0x66, 0x6f, 0x80, 0x6f, 0x2e, 0x6a, 0x73, 0x6f, 0x6e]); // fo�o.json // spellchecker:disable-line
assert!(is_json(Path::new(hidden)));
}
}
Expand Down

0 comments on commit 47ddd11

Please sign in to comment.