From 9be0f98f71fe8071ab839ac1036b4064ac3172b4 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 29 Jun 2026 00:03:00 +0900 Subject: chore(lint): ban bare `use anyhow::Result` and fully qualify it Add a no_banned_use linter that forbids importing anyhow::Result, and update all call sites to reference it via its fully-qualified path so it is never confused with std::result::Result. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/src/util/auth_helper.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'crates/shirabe/src/util/auth_helper.rs') diff --git a/crates/shirabe/src/util/auth_helper.rs b/crates/shirabe/src/util/auth_helper.rs index 8a89842..13199e9 100644 --- a/crates/shirabe/src/util/auth_helper.rs +++ b/crates/shirabe/src/util/auth_helper.rs @@ -8,7 +8,6 @@ use crate::io::io_interface; use crate::util::Bitbucket; use crate::util::GitHub; use crate::util::GitLab; -use anyhow::Result; use indexmap::IndexMap; use shirabe_external_packages::composer::pcre::Preg; use shirabe_php_shim::{ @@ -54,7 +53,7 @@ impl AuthHelper { } /// @param 'prompt'|bool $storeAuth - pub fn store_auth(&self, origin: &str, store_auth: StoreAuth) -> Result<()> { + pub fn store_auth(&self, origin: &str, store_auth: StoreAuth) -> anyhow::Result<()> { let mut store: Option<()> = None; let mut config = self.config.borrow_mut(); let config_source = config.get_auth_config_source_mut(); @@ -123,7 +122,7 @@ impl AuthHelper { headers: Vec, retry_count: i64, response_body: Option<&str>, - ) -> Result { + ) -> anyhow::Result { let mut store_auth: StoreAuth = StoreAuth::Bool(false); let github_domains = self.config.borrow_mut().get("github-domains"); @@ -450,7 +449,7 @@ impl AuthHelper { mut options: IndexMap, origin: &str, url: &str, - ) -> Result> { + ) -> anyhow::Result> { if !options.contains_key("http") { options.insert("http".to_string(), PhpMixed::Array(IndexMap::new())); } -- cgit v1.3.1