Skip to content

Commit

Permalink
Correct more typos with typos tool.
Browse files Browse the repository at this point in the history
The initial configuration still has a few problems:

after basic configuration via `_typos.toml` that excludes changelogs
and fixtures it's down to just a couple of typos, many of which are
false positives due to language, hashes or signatures which contain
two-letter sequences that it wants to correct. Especially with hashes
I find it hard to teach it what to do as I want the whole file to be
checked without allowing bogus words in an extended dictionary.
  • Loading branch information
Byron committed Mar 22, 2023
1 parent bbb4cb0 commit 2321eb9
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 7 deletions.
6 changes: 6 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[files]
extend-exclude = ["**/CHANGELOG.md", "**/tests/fixtures/**"]

[default.extend-words]
rela = "rela"
unter = "unter"
2 changes: 1 addition & 1 deletion gix-config/src/file/access/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ impl<'event> File<'event> {
/// ain order of occurrence.
///
/// The ordering means that the last of the returned values is the one that would be the
/// value used in the single-value case.nd key.
/// value used in the single-value case.and key.
///
/// # Examples
///
Expand Down
2 changes: 1 addition & 1 deletion gix-revision/tests/spec/parse/anchor/refnames.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use gix_revision::spec;
use crate::spec::parse::{parse, try_parse};

#[test]
fn at_by_iteself_is_shortcut_for_head() {
fn at_by_itself_is_shortcut_for_head() {
let rec = parse("@");
assert!(rec.kind.is_none());
assert_eq!(rec.get_ref(0), "HEAD");
Expand Down
2 changes: 1 addition & 1 deletion gix-tempfile/tests/tempfile/fs/create_dir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ mod iter {
}

#[test]
fn multiple_intermediate_directories_are_created_automaticaly() -> crate::Result {
fn multiple_intermediate_directories_are_created_automatically() -> crate::Result {
let dir = tempfile::tempdir()?;
let new_dir = dir.path().join("s1").join("s2").join("new");
let mut it = create_dir::Iter::new(&new_dir);
Expand Down
2 changes: 1 addition & 1 deletion gix-transport/src/client/blocking_io/http/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ pub mod options {
#[derive(Default, Clone)]
pub struct Options {
/// Headers to be added to every request.
/// They are applied unconditionally and are expected to be valid as they occour in an HTTP request, like `header: value`, without newlines.
/// They are applied unconditionally and are expected to be valid as they occur in an HTTP request, like `header: value`, without newlines.
///
/// Refers to `http.extraHeader` multi-var.
pub extra_headers: Vec<String>,
Expand Down
2 changes: 1 addition & 1 deletion gix-transport/src/client/blocking_io/http/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ impl<A, B, C> From<PostResponse<A, B, C>> for GetResponse<A, B> {
}

/// A trait to abstract the HTTP operations needed to power all git interactions: read via GET and write via POST.
/// Note that 401 must be turned into `std::io::Error(PermissionDenied)`, and other non-success http stati must be transformed
/// Note that 401 must be turned into `std::io::Error(PermissionDenied)`, and other non-success http statuses must be transformed
/// into `std::io::Error(Other)`
#[allow(clippy::type_complexity)]
pub trait Http {
Expand Down
2 changes: 1 addition & 1 deletion gix-validate/tests/validate/reference.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ mod name_partial {
mktest!(all_uppercase_with_underscore, b"NEW_HEAD");
mktest!(partial_name_lowercase, b"main");
mktest!(chinese_utf8, "heads/你好吗".as_bytes());
mktest!(parantheses_special_case_upload_pack, b"(null)");
mktest!(parentheses_special_case_upload_pack, b"(null)");
}

mod invalid {
Expand Down
2 changes: 1 addition & 1 deletion gix-worktree/tests/worktree/fs/cache/create_directory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use gix_worktree::fs;
use tempfile::{tempdir, TempDir};

fn panic_on_find<'buf>(_oid: &gix_hash::oid, _buf: &'buf mut Vec<u8>) -> std::io::Result<gix_object::BlobRef<'buf>> {
unreachable!("find should nto be called")
unreachable!("find should not be called")
}

#[test]
Expand Down

0 comments on commit 2321eb9

Please sign in to comment.