From 71a6e5a90e9de61bd011b18411fa604231d84544 Mon Sep 17 00:00:00 2001 From: dark0dave Date: Sat, 25 Nov 2023 13:35:34 +0000 Subject: [PATCH] chore(pre-commit): Update pre-commit and fix some minor spelling mistakes Signed-off-by: dark0dave --- .pre-commit-config.yaml | 8 +++++++- README.md | 2 +- src/utils.rs | 4 ++-- src/weidu_parser.rs | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4b5f8a9..5c4098b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,7 +22,6 @@ repos: hooks: - id: forbid-crlf - id: remove-crlf - files: '*rs' - repo: https://github.com/commitizen-tools/commitizen rev: 3.12.0 @@ -46,3 +45,10 @@ repos: language: system types: [rust] pass_filenames: false + +- repo: https://github.com/codespell-project/codespell + rev: v2.2.6 + hooks: + - id: codespell + args: + - '--ignore-words-list=crate' diff --git a/README.md b/README.md index 39e12c0..5c3758f 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Additional information can be shown with: RUST_LOG=INFO mod_installer [OPTIONS] ``` -For line by line debuging: +For line by line debugging: ```sh RUST_LOG=DEBUG mod_installer [OPTIONS] ``` diff --git a/src/utils.rs b/src/utils.rs index da3ddad..d47ca7e 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -24,8 +24,8 @@ pub fn mod_folder_present_in_game_directory(game_directory: &Path, mod_name: &st pub fn copy_mod_folder(game_directory: &Path, mod_folder: &Path) { let mut options = CopyOptions::new(); options.skip_exist = true; - let coppied = copy(mod_folder, game_directory, &options); - if let Err(error) = coppied { + let copied = copy(mod_folder, game_directory, &options); + if let Err(error) = copied { log::error!("Failed to copy with error: {}", error); panic!() } diff --git a/src/weidu_parser.rs b/src/weidu_parser.rs index 5a81d11..d59249a 100644 --- a/src/weidu_parser.rs +++ b/src/weidu_parser.rs @@ -91,7 +91,7 @@ pub fn parse_raw_output(sender: Sender, receiver: Receiver) { current_state = ParserState::WaitingForMoreQuestionContent; } ParserState::WaitingForMoreQuestionContent => { - log::debug!("No new weidu otput, sending question to user"); + log::debug!("No new weidu output, sending question to user"); sender .send(State::RequiresInput { question }) .expect("Failed to send question");