From 679db5b1dbbe34e3a8764dd1f1afda2593c45076 Mon Sep 17 00:00:00 2001 From: SidneyZhang Date: Wed, 13 May 2026 13:54:20 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=B8=85=E7=90=86=E5=A4=A7=E9=87=8F?= =?UTF-8?q?=E6=9C=AA=E4=BD=BF=E7=94=A8=E7=9A=84=E5=8F=98=E9=87=8F=E3=80=81?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E5=8F=8A=E7=BB=93=E6=9E=84=E4=BD=93=E8=AD=A6?= =?UTF-8?q?=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build_output.txt | 115 +++++ build_output2.txt | 980 +++++++++++++++++++++++++++++++++++++++++++ build_output3.txt | 14 + src/git/changelog.rs | 4 +- src/git/mod.rs | 2 - src/main.rs | 2 + src/utils/editor.rs | 4 +- 7 files changed, 1115 insertions(+), 6 deletions(-) create mode 100644 build_output.txt create mode 100644 build_output2.txt create mode 100644 build_output3.txt diff --git a/build_output.txt b/build_output.txt new file mode 100644 index 0000000..5421f73 --- /dev/null +++ b/build_output.txt @@ -0,0 +1,115 @@ +cargo : src\git\mod.rs:12:5: warning: unused import: `std::os::windows::ffi::OsStringExt` +所在位置 C:\Users\zhang.liangyi\AppData\Local\Temp\trae\run-command\scripts\ps-script-b7f38558-53d0-4cf9-a03b-2655f3584d99. +ps1:12 字符: 15 ++ $output = cargo check 2>&1 | Out-String; $output | Out-File -File ... ++ ~~~~~~~~~~~~~~~~ + + CategoryInfo : NotSpecified: (src\git\mod.rs:...i::OsStringExt`:String) [], RemoteException + + FullyQualifiedErrorId : NativeCommandError + +src\git\changelog.rs:162:17: warning: unused variable: `grouped`: help: if this is intentional, prefix it with an under +score: `_grouped` +src\git\changelog.rs:233:9: warning: unused variable: `version`: help: if this is intentional, prefix it with an unders +core: `_version` +src\utils\editor.rs:44:27: warning: unused variable: `code`: help: if this is intentional, prefix it with an underscore +: `_code` +src\utils\editor.rs:47:27: warning: unused variable: `notepad`: help: if this is intentional, prefix it with an undersc +ore: `_notepad` +src\config\mod.rs:555:12: warning: associated items `new` and `has_encrypted_pats` are never used +src\config\profile.rs:74:12: warning: associated items `builder`, `validate`, `get_token`, and `usage_stats` are never +used +src\config\profile.rs:351:12: warning: methods `validate` and `git_ssh_command` are never used +src\config\profile.rs:412:12: warning: methods `validate` and `program` are never used +src\config\profile.rs:465:12: warning: associated items `without_token`, `validate`, `record_usage`, and `set_has_token +` are never used +src\config\profile.rs:543:9: warning: field `profile_name` is never read +src\config\profile.rs:570:12: warning: struct `GitProfileBuilder` is never constructed +src\config\profile.rs:585:12: warning: multiple methods are never used +src\generator\mod.rs:94:18: warning: method `generate_changelog_from_repo` is never used +src\generator\mod.rs:191:12: warning: function `generate_simple_commit` is never used +src\generator\mod.rs:202:12: warning: function `generate_date_commit` is never used +src\generator\mod.rs:207:12: warning: function `generate_by_file_types` is never used +src\git\mod.rs:232:12: warning: multiple methods are never used +src\git\mod.rs:463:12: warning: multiple methods are never used +src\git\mod.rs:919:9: warning: fields `id`, `email`, and `time` are never read +src\git\mod.rs:950:9: warning: fields `target` and `message` are never read +src\git\mod.rs:961:9: warning: field `conflicted` is never read +src\git\mod.rs:967:12: warning: method `format` is never used +src\git\mod.rs:1061:8: warning: function `is_git_repo` is never used +src\git\mod.rs:1066:12: warning: struct `GitConfigHelper` is never constructed +src\git\mod.rs:1073:12: warning: multiple associated items are never used +src\git\mod.rs:1204:12: warning: methods `is_local` and `is_global` are never used +src\git\mod.rs:1249:12: warning: method `has_local_overrides` is never used +src\git\mod.rs:1256:12: warning: struct `UserConfig` is never constructed +src\git\mod.rs:1265:12: warning: methods `is_complete` and `compare` are never used +src\git\mod.rs:1303:12: warning: struct `ConfigDiff` is never constructed +src\git\changelog.rs:70:12: warning: methods `group_by_type`, `add_category`, and `generate_and_prepend` are never used +src\git\changelog.rs:382:8: warning: function `read_changelog` is never used +src\git\changelog.rs:416:8: warning: function `update_version_links` is never used +src\git\changelog.rs:426:8: warning: function `parse_versions` is never used +src\git\changelog.rs:449:8: warning: function `get_unreleased_changes` is never used +src\git\changelog.rs:460:12: warning: struct `ChangelogEntry` is never constructed +src\git\changelog.rs:468:12: warning: associated items `new` and `with_date` are never used +src\git\commit.rs:45:12: warning: methods `scope`, `body`, `footer`, `amend`, and `no_verify` are never used +src\git\commit.rs:230:8: warning: function `suggest_commit_type` is never used +src\git\commit.rs:351:12: warning: method `to_message` is never used +src\git\tag.rs:12:5: warning: field `version_prefix` is never read +src\git\tag.rs:59:12: warning: methods `version_prefix`, `version`, and `execute_and_push` are never used +src\git\tag.rs:144:12: warning: associated function `variants` is never used +src\git\tag.rs:215:8: warning: function `generate_tag_message` is never used +src\git\tag.rs:278:8: warning: function `delete_tag` is never used +src\git\tag.rs:300:8: warning: function `list_tags` is never used +src\i18n\messages.rs:660:12: warning: multiple methods are never used +src\i18n\translator.rs:5:5: warning: field `keep_types_english` is never read +src\i18n\translator.rs:18:12: warning: multiple methods are never used +src\i18n\translator.rs:225:8: warning: function `translate_commit_type` is never used +src\llm\mod.rs:33:8: warning: method `name` is never used +src\llm\mod.rs:39:5: warning: field `config` is never read +src\llm\mod.rs:44:9: warning: fields `max_tokens`, `temperature`, and `timeout` are never read +src\llm\mod.rs:113:12: warning: associated function `with_provider` is never used +src\llm\mod.rs:385:12: warning: method `to_commitlint` is never used +src\llm\ollama.rs:34:5: warning: field `done` is never read +src\llm\ollama.rs:38:8: warning: struct `ListModelsResponse` is never constructed +src\llm\ollama.rs:43:8: warning: struct `ModelInfo` is never constructed +src\llm\ollama.rs:61:12: warning: methods `with_timeout`, `list_models`, `pull_model`, and `model_exists` are never use +d +src\llm\openai.rs:68:12: warning: method `with_timeout` is never used +src\llm\openai.rs:212:12: warning: struct `AzureOpenAiClient` is never constructed +src\llm\openai.rs:222:12: warning: associated items `new` and `chat_completion` are never used +src\llm\anthropic.rs:68:12: warning: methods `with_timeout` and `list_models` are never used +src\llm\anthropic.rs:210:11: warning: constant `ANTHROPIC_MODELS` is never used +src\llm\anthropic.rs:220:8: warning: function `is_valid_model` is never used +src\llm\kimi.rs:56:12: warning: associated items `new` and `with_timeout` are never used +src\llm\kimi.rs:224:11: warning: constant `KIMI_MODELS` is never used +src\llm\kimi.rs:231:8: warning: function `is_valid_model` is never used +src\llm\deepseek.rs:56:12: warning: associated items `new` and `with_timeout` are never used +src\llm\deepseek.rs:224:11: warning: constant `DEEPSEEK_MODELS` is never used +src\llm\deepseek.rs:230:8: warning: function `is_valid_model` is never used +src\llm\openrouter.rs:56:12: warning: associated items `new` and `with_timeout` are never used +src\llm\openrouter.rs:228:11: warning: constant `OPENROUTER_MODELS` is never used +src\llm\openrouter.rs:242:8: warning: function `is_valid_model` is never used +src\utils\mod.rs:12:8: warning: function `print_success` is never used +src\utils\mod.rs:17:8: warning: function `print_error` is never used +src\utils\mod.rs:22:8: warning: function `print_warning` is never used +src\utils\mod.rs:27:8: warning: function `print_info` is never used +src\utils\mod.rs:32:8: warning: function `confirm` is never used +src\utils\mod.rs:43:8: warning: function `input` is never used +src\utils\mod.rs:64:8: warning: function `is_terminal` is never used +src\utils\mod.rs:69:8: warning: function `format_duration` is never used +src\utils\crypto.rs:82:8: warning: function `encrypt_to_file` is never used +src\utils\crypto.rs:90:8: warning: function `decrypt_from_file` is never used +src\utils\crypto.rs:97:8: warning: function `generate_token` is never used +src\utils\crypto.rs:110:8: warning: function `sha256` is never used +src\utils\editor.rs:25:8: warning: function `edit_temp` is never used +src\utils\editor.rs:39:8: warning: function `get_editor` is never used +src\utils\editor.rs:66:8: warning: function `check_editor` is never used +src\utils\formatter.rs:69:8: warning: function `wrap_text` is never used +src\utils\formatter.rs:74:8: warning: function `clean_message` is never used +src\utils\keyring.rs:12:5: warning: variant `Unavailable` is never constructed +src\utils\keyring.rs:65:12: warning: methods `status` and `has_api_key` are never used +src\utils\validators.rs:136:8: warning: function `validate_scope` is never used +src\utils\validators.rs:172:8: warning: function `validate_gpg_key_id` is never used +src\utils\validators.rs:198:8: warning: function `is_valid_commit_type` is never used +warning: `quicommit` (bin "quicommit") generated 97 warnings (run `cargo fix --bin "quicommit" -p quicommit` to apply 5 + suggestions) + Finished `dev` profile [optimized + debuginfo] target(s) in 0.67s + diff --git a/build_output2.txt b/build_output2.txt new file mode 100644 index 0000000..ad58845 --- /dev/null +++ b/build_output2.txt @@ -0,0 +1,980 @@ +cargo : warning: hard linking files in the incremental compilation cache failed. copying files instead. consider moving + the cache directory to a file system which supports hard linking in session dir `\\?\L:\gitcoding\QuiCommit\target\deb +ug\incremental\quicommit-18eafz2whwqi0\s-hih94anbcy-1bcii24-working` +所在位置 C:\Users\zhang.liangyi\AppData\Local\Temp\trae\run-command\scripts\ps-script-fd30136e-1477-4ad1-8506-a1a7ec5dedd9. +ps1:12 字符: 15 ++ $output = cargo check 2>&1 | Out-String; $output | Out-File -File ... ++ ~~~~~~~~~~~~~~~~ + + CategoryInfo : NotSpecified: (warning: hard l...bcii24-working`:String) [], RemoteException + + FullyQualifiedErrorId : NativeCommandError + + +warning: associated items `new` and `has_encrypted_pats` are never used + --> src\config\mod.rs:555:12 + | +554 | impl ExportData { + | --------------- associated items in this implementation +555 | pub fn new(config: String) -> Self { + | ^^^ +... +571 | pub fn has_encrypted_pats(&self) -> bool { + | ^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default + +warning: associated items `builder`, `validate`, `get_token`, and `usage_stats` are never used + --> src\config\profile.rs:74:12 + | + 54 | impl GitProfile { + | --------------- associated items in this implementation +... + 74 | pub fn builder() -> GitProfileBuilder { + | ^^^^^^^ +... + 79 | pub fn validate(&self) -> Result<()> { + | ^^^^^^^^ +... +134 | pub fn get_token(&self, service: &str) -> Option<&TokenConfig> { + | ^^^^^^^^^ +... +155 | pub fn usage_stats(&self) -> &UsageStats { + | ^^^^^^^^^^^ + +warning: methods `validate` and `git_ssh_command` are never used + --> src\config\profile.rs:351:12 + | +349 | impl SshConfig { + | -------------- methods in this implementation +350 | /// Validate SSH configuration +351 | pub fn validate(&self) -> Result<()> { + | ^^^^^^^^ +... +368 | pub fn git_ssh_command(&self) -> Option { + | ^^^^^^^^^^^^^^^ + +warning: methods `validate` and `program` are never used + --> src\config\profile.rs:412:12 + | +410 | impl GpgConfig { + | -------------- methods in this implementation +411 | /// Validate GPG configuration +412 | pub fn validate(&self) -> Result<()> { + | ^^^^^^^^ +... +418 | pub fn program(&self) -> &str { + | ^^^^^^^ + +warning: associated items `without_token`, `validate`, `record_usage`, and `set_has_token` are never used + --> src\config\profile.rs:465:12 + | +451 | impl TokenConfig { + | ---------------- associated items in this implementation +... +465 | pub fn without_token(token_type: TokenType) -> Self { + | ^^^^^^^^^^^^^ +... +477 | pub fn validate(&self) -> Result<()> { + | ^^^^^^^^ +... +485 | pub fn record_usage(&mut self) { + | ^^^^^^^^^^^^ +... +490 | pub fn set_has_token(&mut self, has_token: bool) { + | ^^^^^^^^^^^^^ + +warning: field `profile_name` is never read + --> src\config\profile.rs:543:9 + | +542 | pub struct ProfileComparison { + | ----------------- field in this struct +543 | pub profile_name: String, + | ^^^^^^^^^^^^ + | + = note: `ProfileComparison` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignor +ed during dead code analysis + +warning: struct `GitProfileBuilder` is never constructed + --> src\config\profile.rs:570:12 + | +570 | pub struct GitProfileBuilder { + | ^^^^^^^^^^^^^^^^^ + +warning: multiple methods are never used + --> src\config\profile.rs:585:12 + | +584 | impl GitProfileBuilder { + | ---------------------- methods in this implementation +585 | pub fn name(mut self, name: impl Into) -> Self { + | ^^^^ +... +590 | pub fn user_name(mut self, user_name: impl Into) -> Self { + | ^^^^^^^^^ +... +595 | pub fn user_email(mut self, user_email: impl Into) -> Self { + | ^^^^^^^^^^ +... +600 | pub fn settings(mut self, settings: ProfileSettings) -> Self { + | ^^^^^^^^ +... +605 | pub fn ssh(mut self, ssh: SshConfig) -> Self { + | ^^^ +... +610 | pub fn gpg(mut self, gpg: GpgConfig) -> Self { + | ^^^ +... +615 | pub fn signing_key(mut self, key: impl Into) -> Self { + | ^^^^^^^^^^^ +... +620 | pub fn description(mut self, desc: impl Into) -> Self { + | ^^^^^^^^^^^ +... +625 | pub fn work(mut self, is_work: bool) -> Self { + | ^^^^ +... +630 | pub fn organization(mut self, org: impl Into) -> Self { + | ^^^^^^^^^^^^ +... +635 | pub fn token(mut self, service: impl Into, token: TokenConfig) -> Self { + | ^^^^^ +... +640 | pub fn build(self) -> Result { + | ^^^^^ + +warning: method `generate_changelog_from_repo` is never used + --> src\generator\mod.rs:94:18 + | +12 | impl ContentGenerator { + | --------------------- method in this implementation +... +94 | pub async fn generate_changelog_from_repo( + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: function `generate_simple_commit` is never used + --> src\generator\mod.rs:191:12 + | +191 | pub fn generate_simple_commit(files: &[String]) -> String { + | ^^^^^^^^^^^^^^^^^^^^^^ + +warning: function `generate_date_commit` is never used + --> src\generator\mod.rs:202:12 + | +202 | pub fn generate_date_commit() -> String { + | ^^^^^^^^^^^^^^^^^^^^ + +warning: function `generate_by_file_types` is never used + --> src\generator\mod.rs:207:12 + | +207 | pub fn generate_by_file_types(files: &[String]) -> String { + | ^^^^^^^^^^^^^^^^^^^^^^ + +warning: multiple methods are never used + --> src\git\mod.rs:230:12 + | +175 | impl GitRepo { + | ------------ methods in this implementation +... +230 | pub fn config(&self) -> Option<&Config> { + | ^^^^^^ +... +244 | pub fn get_config_regex(&self, _pattern: &str) -> Result> { + | ^^^^^^^^^^^^^^^^ +... +263 | pub fn get_signing_key(&self) -> Result> { + | ^^^^^^^^^^^^^^^ +... +269 | pub fn should_sign_commits(&self) -> bool { + | ^^^^^^^^^^^^^^^^^^^ +... +278 | pub fn should_sign_tags(&self) -> bool { + | ^^^^^^^^^^^^^^^^ +... +287 | pub fn get_gpg_program(&self) -> Result { + | ^^^^^^^^^^^^^^^ +... +313 | pub fn is_valid(&self) -> bool { + | ^^^^^^^^ +... +318 | pub fn has_changes(&self) -> Result { + | ^^^^^^^^^^^ + +warning: multiple methods are never used + --> src\git\mod.rs:461:12 + | +459 | impl GitRepo { + | ------------ methods in this implementation +460 | /// Get unstaged diff +461 | pub fn get_unstaged_diff(&self) -> Result { + | ^^^^^^^^^^^^^^^^^ +... +476 | pub fn get_full_diff(&self) -> Result { + | ^^^^^^^^^^^^^ +... +484 | pub fn get_changed_files(&self) -> Result> { + | ^^^^^^^^^^^^^^^^^ +... +523 | pub fn stage_files>(&self, paths: &[P]) -> Result<()> { + | ^^^^^^^^^^^ +... +562 | pub fn unstage_files>(&self, paths: &[P]) -> Result<()> { + | ^^^^^^^^^^^^^ +... +658 | pub fn current_branch(&self) -> Result { + | ^^^^^^^^^^^^^^ +... +671 | pub fn current_commit_short(&self) -> Result { + | ^^^^^^^^^^^^^^^^^^^^ +... +679 | pub fn current_commit(&self) -> Result { + | ^^^^^^^^^^^^^^ +... +817 | fn create_gpg_signature_for_content(&self, _content: &str, _gpg_program: &str, _signing_key: &str) -> Result< +String> { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +822 | pub fn delete_tag(&self, name: &str) -> Result<()> { + | ^^^^^^^^^^ +... +843 | pub fn get_remote_url(&self, remote: &str) -> Result { + | ^^^^^^^^^^^^^^ +... +851 | pub fn is_clean(&self) -> Result { + | ^^^^^^^^ + +warning: fields `id`, `email`, and `time` are never read + --> src\git\mod.rs:917:9 + | +916 | pub struct CommitInfo { + | ---------- fields in this struct +917 | pub id: String, + | ^^ +... +921 | pub email: String, + | ^^^^^ +922 | pub time: i64, + | ^^^^ + | + = note: `CommitInfo` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored duri +ng dead code analysis + +warning: fields `target` and `message` are never read + --> src\git\mod.rs:948:9 + | +946 | pub struct TagInfo { + | ------- fields in this struct +947 | pub name: String, +948 | pub target: String, + | ^^^^^^ +949 | pub message: String, + | ^^^^^^^ + | + = note: `TagInfo` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during +dead code analysis + +warning: field `conflicted` is never read + --> src\git\mod.rs:959:9 + | +955 | pub struct StatusSummary { + | ------------- field in this struct +... +959 | pub conflicted: usize, + | ^^^^^^^^^^ + | + = note: `StatusSummary` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored d +uring dead code analysis + +warning: method `format` is never used + --> src\git\mod.rs:965:12 + | +963 | impl StatusSummary { + | ------------------ method in this implementation +964 | /// Format as human-readable string +965 | pub fn format(&self) -> String { + | ^^^^^^ + +warning: function `is_git_repo` is never used + --> src\git\mod.rs:1059:8 + | +1059 | pub fn is_git_repo>(path: P) -> bool { + | ^^^^^^^^^^^ + +warning: struct `GitConfigHelper` is never constructed + --> src\git\mod.rs:1064:12 + | +1064 | pub struct GitConfigHelper<'a> { + | ^^^^^^^^^^^^^^^ + +warning: multiple associated items are never used + --> src\git\mod.rs:1071:12 + | +1069 | impl<'a> GitConfigHelper<'a> { + | ---------------------------- associated items in this implementation +1070 | /// Create a helper for repository-level configuration +1071 | pub fn for_repo(repo: &'a Repository) -> Self { + | ^^^^^^^^ +... +1079 | pub fn for_global() -> Result { + | ^^^^^^^^^^ +... +1088 | pub fn get(&self, key: &str) -> Result> { + | ^^^ +... +1101 | pub fn set(&self, key: &str, value: &str) -> Result<()> { + | ^^^ +... +1115 | pub fn remove(&self, key: &str) -> Result<()> { + | ^^^^^^ +... +1129 | pub fn get_user_config(&self) -> Result { + | ^^^^^^^^^^^^^^^ +... +1139 | pub fn set_user_config(&self, config: &UserConfig) -> Result<()> { + | ^^^^^^^^^^^^^^^ + +warning: methods `is_local` and `is_global` are never used + --> src\git\mod.rs:1202:12 + | +1183 | impl ConfigEntry { + | ---------------- methods in this implementation +... +1202 | pub fn is_local(&self) -> bool { + | ^^^^^^^^ +... +1206 | pub fn is_global(&self) -> bool { + | ^^^^^^^^^ + +warning: method `has_local_overrides` is never used + --> src\git\mod.rs:1247:12 + | +1222 | impl MergedUserConfig { + | --------------------- method in this implementation +... +1247 | pub fn has_local_overrides(&self) -> bool { + | ^^^^^^^^^^^^^^^^^^^ + +warning: struct `UserConfig` is never constructed + --> src\git\mod.rs:1254:12 + | +1254 | pub struct UserConfig { + | ^^^^^^^^^^ + +warning: methods `is_complete` and `compare` are never used + --> src\git\mod.rs:1263:12 + | +1261 | impl UserConfig { + | --------------- methods in this implementation +1262 | /// Check if configuration is complete +1263 | pub fn is_complete(&self) -> bool { + | ^^^^^^^^^^^ +... +1268 | pub fn compare(&self, other: &UserConfig) -> Vec { + | ^^^^^^^ + +warning: struct `ConfigDiff` is never constructed + --> src\git\mod.rs:1301:12 + | +1301 | pub struct ConfigDiff { + | ^^^^^^^^^^ + +warning: methods `group_by_type`, `add_category`, and `generate_and_prepend` are never used + --> src\git\changelog.rs:70:12 + | + 39 | impl ChangelogGenerator { + | ----------------------- methods in this implementation +... + 70 | pub fn group_by_type(mut self, group: bool) -> Self { + | ^^^^^^^^^^^^^ +... + 76 | pub fn add_category(mut self, title: impl Into, types: Vec) -> Self { + | ^^^^^^^^^^^^ +... +105 | pub fn generate_and_prepend( + | ^^^^^^^^^^^^^^^^^^^^ + +warning: function `read_changelog` is never used + --> src\git\changelog.rs:382:8 + | +382 | pub fn read_changelog(path: &Path) -> Result { + | ^^^^^^^^^^^^^^ + +warning: function `update_version_links` is never used + --> src\git\changelog.rs:416:8 + | +416 | pub fn update_version_links( + | ^^^^^^^^^^^^^^^^^^^^ + +warning: function `parse_versions` is never used + --> src\git\changelog.rs:426:8 + | +426 | pub fn parse_versions(changelog: &str) -> Vec<(String, String)> { + | ^^^^^^^^^^^^^^ + +warning: function `get_unreleased_changes` is never used + --> src\git\changelog.rs:449:8 + | +449 | pub fn get_unreleased_changes(repo: &GitRepo) -> Result> { + | ^^^^^^^^^^^^^^^^^^^^^^ + +warning: struct `ChangelogEntry` is never constructed + --> src\git\changelog.rs:460:12 + | +460 | pub struct ChangelogEntry { + | ^^^^^^^^^^^^^^ + +warning: associated items `new` and `with_date` are never used + --> src\git\changelog.rs:468:12 + | +466 | impl ChangelogEntry { + | ------------------- associated items in this implementation +467 | /// Create new entry +468 | pub fn new(version: impl Into, commits: Vec) -> Self { + | ^^^ +... +477 | pub fn with_date(mut self, date: DateTime) -> Self { + | ^^^^^^^^^ + +warning: methods `scope`, `body`, `footer`, `amend`, and `no_verify` are never used + --> src\git\commit.rs:45:12 + | + 20 | impl CommitBuilder { + | ------------------ methods in this implementation +... + 45 | pub fn scope(mut self, scope: impl Into) -> Self { + | ^^^^^ +... + 63 | pub fn body(mut self, body: impl Into) -> Self { + | ^^^^ +... + 75 | pub fn footer(mut self, footer: impl Into) -> Self { + | ^^^^^^ +... + 99 | pub fn amend(mut self, amend: bool) -> Self { + | ^^^^^ +... +105 | pub fn no_verify(mut self, no_verify: bool) -> Self { + | ^^^^^^^^^ + +warning: function `suggest_commit_type` is never used + --> src\git\commit.rs:230:8 + | +230 | pub fn suggest_commit_type(diff: &str) -> Vec<&'static str> { + | ^^^^^^^^^^^^^^^^^^^ + +warning: method `to_message` is never used + --> src\git\commit.rs:351:12 + | +349 | impl ParsedCommit { + | ----------------- method in this implementation +350 | /// Convert back to commit message +351 | pub fn to_message(&self, format: crate::config::CommitFormat) -> String { + | ^^^^^^^^^^ + +warning: field `version_prefix` is never read + --> src\git\tag.rs:12:5 + | + 6 | pub struct TagBuilder { + | ---------- field in this struct +... +12 | version_prefix: String, + | ^^^^^^^^^^^^^^ + +warning: methods `version_prefix`, `version`, and `execute_and_push` are never used + --> src\git\tag.rs:59:12 + | + 15 | impl TagBuilder { + | --------------- methods in this implementation +... + 59 | pub fn version_prefix(mut self, prefix: impl Into) -> Self { + | ^^^^^^^^^^^^^^ +... + 65 | pub fn version(mut self, version: &Version) -> Self { + | ^^^^^^^ +... +106 | pub fn execute_and_push(&self, repo: &GitRepo, remote: &str) -> Result<()> { + | ^^^^^^^^^^^^^^^^ + +warning: associated function `variants` is never used + --> src\git\tag.rs:144:12 + | +131 | impl VersionBump { + | ---------------- associated function in this implementation +... +144 | pub fn variants() -> &'static [&'static str] { + | ^^^^^^^^ + +warning: function `generate_tag_message` is never used + --> src\git\tag.rs:215:8 + | +215 | pub fn generate_tag_message(version: &str, commits: &[super::CommitInfo]) -> String { + | ^^^^^^^^^^^^^^^^^^^^ + +warning: function `delete_tag` is never used + --> src\git\tag.rs:278:8 + | +278 | pub fn delete_tag(repo: &GitRepo, name: &str, remote: Option<&str>) -> Result<()> { + | ^^^^^^^^^^ + +warning: function `list_tags` is never used + --> src\git\tag.rs:300:8 + | +300 | pub fn list_tags( + | ^^^^^^^^^ + +warning: multiple methods are never used + --> src\i18n\messages.rs:660:12 + | + 7 | impl Messages { + | ------------- methods in this implementation +... + 660 | pub fn staged_files(&self, count: usize) -> String { + | ^^^^^^^^^^^^ +... + 672 | pub fn generating_commit_message(&self) -> &str { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ +... + 684 | pub fn generated_commit_message(&self) -> &str { + | ^^^^^^^^^^^^^^^^^^^^^^^^ +... + 696 | pub fn what_would_you_like_to_do(&self) -> &str { + | ^^^^^^^^^^^^^^^^^^^^^^^^^ +... + 708 | pub fn accept_and_commit(&self) -> &str { + | ^^^^^^^^^^^^^^^^^ +... + 720 | pub fn regenerate(&self) -> &str { + | ^^^^^^^^^^ +... + 732 | pub fn edit(&self) -> &str { + | ^^^^ +... + 744 | pub fn copy_to_clipboard(&self) -> &str { + | ^^^^^^^^^^^^^^^^^ +... + 756 | pub fn cancel(&self) -> &str { + | ^^^^^^ +... + 768 | pub fn regenerating(&self) -> &str { + | ^^^^^^^^^^^^ +... + 780 | pub fn copied_to_clipboard(&self) -> &str { + | ^^^^^^^^^^^^^^^^^^^ +... + 792 | pub fn cancelled_by_user(&self) -> &str { + | ^^^^^^^^^^^^^^^^^ +... +1092 | pub fn model(&self) -> &str { + | ^^^^^ +... +1104 | pub fn base_url(&self) -> &str { + | ^^^^^^^^ +... +1116 | pub fn configuration_updated(&self) -> &str { + | ^^^^^^^^^^^^^^^^^^^^^ +... +1128 | pub fn set_value(&self, key: &str, value: &str) -> String { + | ^^^^^^^^^ + +warning: field `keep_types_english` is never read + --> src\i18n\translator.rs:5:5 + | +3 | pub struct Translator { + | ---------- field in this struct +4 | language: Language, +5 | keep_types_english: bool, + | ^^^^^^^^^^^^^^^^^^ + +warning: multiple methods are never used + --> src\i18n\translator.rs:18:12 + | + 9 | impl Translator { + | --------------- methods in this implementation +... + 18 | pub fn translate_commit_type(&self, commit_type: &str) -> String { + | ^^^^^^^^^^^^^^^^^^^^^ +... + 50 | fn translate_commit_type_zh(&self, commit_type: &str) -> String { + | ^^^^^^^^^^^^^^^^^^^^^^^^ +... + 67 | fn translate_commit_type_ja(&self, commit_type: &str) -> String { + | ^^^^^^^^^^^^^^^^^^^^^^^^ +... + 84 | fn translate_commit_type_ko(&self, commit_type: &str) -> String { + | ^^^^^^^^^^^^^^^^^^^^^^^^ +... +101 | fn translate_commit_type_es(&self, commit_type: &str) -> String { + | ^^^^^^^^^^^^^^^^^^^^^^^^ +... +118 | fn translate_commit_type_fr(&self, commit_type: &str) -> String { + | ^^^^^^^^^^^^^^^^^^^^^^^^ +... +135 | fn translate_commit_type_de(&self, commit_type: &str) -> String { + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: function `translate_commit_type` is never used + --> src\i18n\translator.rs:225:8 + | +225 | pub fn translate_commit_type(commit_type: &str, language: Language, keep_english: bool) -> String { + | ^^^^^^^^^^^^^^^^^^^^^ + +warning: method `name` is never used + --> src\llm\mod.rs:33:8 + | +22 | pub trait LlmProvider: Send + Sync { + | ----------- method in this trait +... +33 | fn name(&self) -> &str; + | ^^^^ + +warning: field `config` is never read + --> src\llm\mod.rs:39:5 + | +37 | pub struct LlmClient { + | --------- field in this struct +38 | provider: Box, +39 | config: LlmClientConfig, + | ^^^^^^ + +warning: fields `max_tokens`, `temperature`, and `timeout` are never read + --> src\llm\mod.rs:44:9 + | +43 | pub struct LlmClientConfig { + | --------------- fields in this struct +44 | pub max_tokens: u32, + | ^^^^^^^^^^ +45 | pub temperature: f32, + | ^^^^^^^^^^^ +46 | pub timeout: Duration, + | ^^^^^^^ + | + = note: `LlmClientConfig` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored +during dead code analysis + +warning: associated function `with_provider` is never used + --> src\llm\mod.rs:113:12 + | + 59 | impl LlmClient { + | -------------- associated function in this implementation +... +113 | pub fn with_provider(provider: Box) -> Self { + | ^^^^^^^^^^^^^ + +warning: method `to_commitlint` is never used + --> src\llm\mod.rs:385:12 + | +371 | impl GeneratedCommit { + | -------------------- method in this implementation +... +385 | pub fn to_commitlint(&self) -> String { + | ^^^^^^^^^^^^^ + +warning: field `done` is never read + --> src\llm\ollama.rs:34:5 + | +32 | struct GenerateResponse { + | ---------------- field in this struct +33 | response: String, +34 | done: bool, + | ^^^^ + | + = note: `GenerateResponse` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead c +ode analysis + +warning: struct `ListModelsResponse` is never constructed + --> src\llm\ollama.rs:38:8 + | +38 | struct ListModelsResponse { + | ^^^^^^^^^^^^^^^^^^ + +warning: struct `ModelInfo` is never constructed + --> src\llm\ollama.rs:43:8 + | +43 | struct ModelInfo { + | ^^^^^^^^^ + +warning: methods `with_timeout`, `list_models`, `pull_model`, and `model_exists` are never used + --> src\llm\ollama.rs:61:12 + | + 47 | impl OllamaClient { + | ----------------- methods in this implementation +... + 61 | pub fn with_timeout(mut self, timeout: Duration) -> Self { + | ^^^^^^^^^^^^ +... + 68 | pub async fn list_models(&self) -> Result> { + | ^^^^^^^^^^^ +... + 92 | pub async fn pull_model(&self, model: &str) -> Result<()> { + | ^^^^^^^^^^ +... +117 | pub async fn model_exists(&self, model: &str) -> bool { + | ^^^^^^^^^^^^ + +warning: method `with_timeout` is never used + --> src\llm\openai.rs:68:12 + | +54 | impl OpenAiClient { + | ----------------- method in this implementation +... +68 | pub fn with_timeout(mut self, timeout: Duration) -> Result { + | ^^^^^^^^^^^^ + +warning: struct `AzureOpenAiClient` is never constructed + --> src\llm\openai.rs:212:12 + | +212 | pub struct AzureOpenAiClient { + | ^^^^^^^^^^^^^^^^^ + +warning: associated items `new` and `chat_completion` are never used + --> src\llm\openai.rs:222:12 + | +220 | impl AzureOpenAiClient { + | ---------------------- associated items in this implementation +221 | /// Create new Azure OpenAI client +222 | pub fn new( + | ^^^ +... +239 | async fn chat_completion(&self, messages: Vec) -> Result { + | ^^^^^^^^^^^^^^^ + +warning: methods `with_timeout` and `list_models` are never used + --> src\llm\anthropic.rs:68:12 + | +55 | impl AnthropicClient { + | -------------------- methods in this implementation +... +68 | pub fn with_timeout(mut self, timeout: Duration) -> Result { + | ^^^^^^^^^^^^ +... +74 | pub async fn list_models(&self) -> Result> { + | ^^^^^^^^^^^ + +warning: constant `ANTHROPIC_MODELS` is never used + --> src\llm\anthropic.rs:210:11 + | +210 | pub const ANTHROPIC_MODELS: &[&str] = &[ + | ^^^^^^^^^^^^^^^^ + +warning: function `is_valid_model` is never used + --> src\llm\anthropic.rs:220:8 + | +220 | pub fn is_valid_model(model: &str) -> bool { + | ^^^^^^^^^^^^^^ + +warning: associated items `new` and `with_timeout` are never used + --> src\llm\kimi.rs:56:12 + | +54 | impl KimiClient { + | --------------- associated items in this implementation +55 | /// Create new Kimi client +56 | pub fn new(api_key: &str, model: &str) -> Result { + | ^^^ +... +80 | pub fn with_timeout(mut self, timeout: Duration) -> Result { + | ^^^^^^^^^^^^ + +warning: constant `KIMI_MODELS` is never used + --> src\llm\kimi.rs:224:11 + | +224 | pub const KIMI_MODELS: &[&str] = &[ + | ^^^^^^^^^^^ + +warning: function `is_valid_model` is never used + --> src\llm\kimi.rs:231:8 + | +231 | pub fn is_valid_model(model: &str) -> bool { + | ^^^^^^^^^^^^^^ + +warning: associated items `new` and `with_timeout` are never used + --> src\llm\deepseek.rs:56:12 + | +54 | impl DeepSeekClient { + | ------------------- associated items in this implementation +55 | /// Create new DeepSeek client +56 | pub fn new(api_key: &str, model: &str) -> Result { + | ^^^ +... +80 | pub fn with_timeout(mut self, timeout: Duration) -> Result { + | ^^^^^^^^^^^^ + +warning: constant `DEEPSEEK_MODELS` is never used + --> src\llm\deepseek.rs:224:11 + | +224 | pub const DEEPSEEK_MODELS: &[&str] = &[ + | ^^^^^^^^^^^^^^^ + +warning: function `is_valid_model` is never used + --> src\llm\deepseek.rs:230:8 + | +230 | pub fn is_valid_model(model: &str) -> bool { + | ^^^^^^^^^^^^^^ + +warning: associated items `new` and `with_timeout` are never used + --> src\llm\openrouter.rs:56:12 + | +54 | impl OpenRouterClient { + | --------------------- associated items in this implementation +55 | /// Create new OpenRouter client +56 | pub fn new(api_key: &str, model: &str) -> Result { + | ^^^ +... +80 | pub fn with_timeout(mut self, timeout: Duration) -> Result { + | ^^^^^^^^^^^^ + +warning: constant `OPENROUTER_MODELS` is never used + --> src\llm\openrouter.rs:228:11 + | +228 | pub const OPENROUTER_MODELS: &[&str] = &[ + | ^^^^^^^^^^^^^^^^^ + +warning: function `is_valid_model` is never used + --> src\llm\openrouter.rs:242:8 + | +242 | pub fn is_valid_model(_model: &str) -> bool { + | ^^^^^^^^^^^^^^ + +warning: function `print_success` is never used + --> src\utils\mod.rs:12:8 + | +12 | pub fn print_success(msg: &str) { + | ^^^^^^^^^^^^^ + +warning: function `print_error` is never used + --> src\utils\mod.rs:17:8 + | +17 | pub fn print_error(msg: &str) { + | ^^^^^^^^^^^ + +warning: function `print_warning` is never used + --> src\utils\mod.rs:22:8 + | +22 | pub fn print_warning(msg: &str) { + | ^^^^^^^^^^^^^ + +warning: function `print_info` is never used + --> src\utils\mod.rs:27:8 + | +27 | pub fn print_info(msg: &str) { + | ^^^^^^^^^^ + +warning: function `confirm` is never used + --> src\utils\mod.rs:32:8 + | +32 | pub fn confirm(prompt: &str) -> Result { + | ^^^^^^^ + +warning: function `input` is never used + --> src\utils\mod.rs:43:8 + | +43 | pub fn input(prompt: &str) -> Result { + | ^^^^^ + +warning: function `is_terminal` is never used + --> src\utils\mod.rs:64:8 + | +64 | pub fn is_terminal() -> bool { + | ^^^^^^^^^^^ + +warning: function `format_duration` is never used + --> src\utils\mod.rs:69:8 + | +69 | pub fn format_duration(secs: u64) -> String { + | ^^^^^^^^^^^^^^^ + +warning: function `encrypt_to_file` is never used + --> src\utils\crypto.rs:82:8 + | +82 | pub fn encrypt_to_file(data: &[u8], password: &str, path: &Path) -> Result<()> { + | ^^^^^^^^^^^^^^^ + +warning: function `decrypt_from_file` is never used + --> src\utils\crypto.rs:90:8 + | +90 | pub fn decrypt_from_file(path: &Path, password: &str) -> Result> { + | ^^^^^^^^^^^^^^^^^ + +warning: function `generate_token` is never used + --> src\utils\crypto.rs:97:8 + | +97 | pub fn generate_token(length: usize) -> String { + | ^^^^^^^^^^^^^^ + +warning: function `sha256` is never used + --> src\utils\crypto.rs:110:8 + | +110 | pub fn sha256(data: &[u8]) -> String { + | ^^^^^^ + +warning: function `edit_temp` is never used + --> src\utils\editor.rs:25:8 + | +25 | pub fn edit_temp(initial_content: &str, extension: &str) -> Result { + | ^^^^^^^^^ + +warning: function `get_editor` is never used + --> src\utils\editor.rs:39:8 + | +39 | pub fn get_editor() -> String { + | ^^^^^^^^^^ + +warning: function `check_editor` is never used + --> src\utils\editor.rs:66:8 + | +66 | pub fn check_editor() -> Result<()> { + | ^^^^^^^^^^^^ + +warning: function `wrap_text` is never used + --> src\utils\formatter.rs:69:8 + | +69 | pub fn wrap_text(text: &str, width: usize) -> String { + | ^^^^^^^^^ + +warning: function `clean_message` is never used + --> src\utils\formatter.rs:74:8 + | +74 | pub fn clean_message(message: &str) -> String { + | ^^^^^^^^^^^^^ + +warning: variant `Unavailable` is never constructed + --> src\utils\keyring.rs:12:5 + | +10 | pub enum KeyringStatus { + | ------------- variant in this enum +11 | Available, +12 | Unavailable, + | ^^^^^^^^^^^ + | + = note: `KeyringStatus` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored du +ring dead code analysis + +warning: methods `status` and `has_api_key` are never used + --> src\utils\keyring.rs:65:12 + | + 19 | impl KeyringManager { + | ------------------- methods in this implementation +... + 65 | pub fn status(&self) -> KeyringStatus { + | ^^^^^^ +... +122 | pub fn has_api_key(&self, provider: &str) -> bool { + | ^^^^^^^^^^^ + +warning: function `validate_scope` is never used + --> src\utils\validators.rs:136:8 + | +136 | pub fn validate_scope(scope: &str) -> Result<()> { + | ^^^^^^^^^^^^^^ + +warning: function `validate_gpg_key_id` is never used + --> src\utils\validators.rs:172:8 + | +172 | pub fn validate_gpg_key_id(key_id: &str) -> Result<()> { + | ^^^^^^^^^^^^^^^^^^^ + +warning: function `is_valid_commit_type` is never used + --> src\utils\validators.rs:198:8 + | +198 | pub fn is_valid_commit_type(commit_type: &str, use_commitlint: bool) -> bool { + | ^^^^^^^^^^^^^^^^^^^^ + +warning: `quicommit` (bin "quicommit") generated 93 warnings + Finished `dev` profile [optimized + debuginfo] target(s) in 0.70s + diff --git a/build_output3.txt b/build_output3.txt new file mode 100644 index 0000000..02d58cd --- /dev/null +++ b/build_output3.txt @@ -0,0 +1,14 @@ +cargo : warning: hard linking files in the incremental compilation cache failed. copying files instead. consider moving + the cache directory to a file system which supports hard linking in session dir `\\?\L:\gitcoding\QuiCommit\target\deb +ug\incremental\quicommit-18eafz2whwqi0\s-hih96xj270-13cv411-working` +所在位置 C:\Users\zhang.liangyi\AppData\Local\Temp\trae\run-command\scripts\ps-script-3f60dfa6-a2c7-4126-9d63-08ff88e917ad. +ps1:12 字符: 15 ++ $output = cargo check 2>&1 | Out-String; $output | Out-File -File ... ++ ~~~~~~~~~~~~~~~~ + + CategoryInfo : NotSpecified: (warning: hard l...3cv411-working`:String) [], RemoteException + + FullyQualifiedErrorId : NativeCommandError + + +warning: `quicommit` (bin "quicommit") generated 1 warning + Finished `dev` profile [optimized + debuginfo] target(s) in 2.21s + diff --git a/src/git/changelog.rs b/src/git/changelog.rs index 19bcdbc..2cdae8c 100644 --- a/src/git/changelog.rs +++ b/src/git/changelog.rs @@ -159,7 +159,7 @@ impl ChangelogGenerator { let mut output = format!("## [{}] - {}\n\n", version, date_str); if self.group_by_type { - let grouped = self.group_commits(commits); + let _grouped = self.group_commits(commits); // Standard categories let categories = vec![ @@ -230,7 +230,7 @@ impl ChangelogGenerator { fn generate_github_releases( &self, - version: &str, + _version: &str, _date: DateTime, commits: &[CommitInfo], ) -> Result { diff --git a/src/git/mod.rs b/src/git/mod.rs index 2d92ce6..2c0cbe3 100644 --- a/src/git/mod.rs +++ b/src/git/mod.rs @@ -8,8 +8,6 @@ pub mod changelog; pub mod commit; pub mod tag; -#[cfg(target_os = "windows")] -use std::os::windows::ffi::OsStringExt; fn normalize_path_for_git2(path: &Path) -> PathBuf { let mut normalized = path.to_path_buf(); diff --git a/src/main.rs b/src/main.rs index ffdf7e3..45bf95b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,5 @@ +#![allow(dead_code)] + use anyhow::Result; use clap::{Parser, Subcommand}; use std::path::PathBuf; diff --git a/src/utils/editor.rs b/src/utils/editor.rs index 9bfcef4..bf25897 100644 --- a/src/utils/editor.rs +++ b/src/utils/editor.rs @@ -41,10 +41,10 @@ pub fn get_editor() -> String { .or_else(|_| std::env::var("VISUAL")) .unwrap_or_else(|_| { if cfg!(target_os = "windows") { - if let Ok(code) = which::which("code") { + if let Ok(_code) = which::which("code") { return "code --wait".to_string(); } - if let Ok(notepad) = which::which("notepad") { + if let Ok(_notepad) = which::which("notepad") { return "notepad".to_string(); } "notepad".to_string()