aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command/require_command.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-29 00:03:00 +0900
committernsfisis <nsfisis@gmail.com>2026-06-29 00:03:00 +0900
commit9be0f98f71fe8071ab839ac1036b4064ac3172b4 (patch)
tree66a2f4feba752f4761c40449e0827ad74fc9b02c /crates/shirabe/src/command/require_command.rs
parenta84d531548efa678d4021cea891826e59f8fb462 (diff)
downloadphp-shirabe-9be0f98f71fe8071ab839ac1036b4064ac3172b4.tar.gz
php-shirabe-9be0f98f71fe8071ab839ac1036b4064ac3172b4.tar.zst
php-shirabe-9be0f98f71fe8071ab839ac1036b4064ac3172b4.zip
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) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/command/require_command.rs')
-rw-r--r--crates/shirabe/src/command/require_command.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/shirabe/src/command/require_command.rs b/crates/shirabe/src/command/require_command.rs
index ebd090a..6a3ff5e 100644
--- a/crates/shirabe/src/command/require_command.rs
+++ b/crates/shirabe/src/command/require_command.rs
@@ -29,7 +29,6 @@ use crate::repository::RepositorySet;
use crate::util::Filesystem;
use crate::util::PackageSorter;
use crate::util::Silencer;
-use anyhow::Result;
use indexmap::IndexMap;
use shirabe_external_packages::composer::pcre::Preg;
use shirabe_external_packages::seld::signal::SignalHandler;
@@ -163,7 +162,7 @@ impl Command for RequireCommand {
&self,
input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
- ) -> Result<i64> {
+ ) -> anyhow::Result<i64> {
*self.file.borrow_mut() = Factory::get_composer_file()?;
if input
@@ -748,7 +747,7 @@ impl RequireCommand {
requirements: &IndexMap<String, String>,
require_key: &str,
_remove_key: &str,
- ) -> Result<i64> {
+ ) -> anyhow::Result<i64> {
// Update packages
self.reset_composer()?;
let composer_handle = self.require_composer(None, None)?;
@@ -1053,7 +1052,7 @@ impl RequireCommand {
sort_packages: bool,
dry_run: bool,
fixed: bool,
- ) -> Result<i64> {
+ ) -> anyhow::Result<i64> {
let composer = self.require_composer(None, None)?;
let composer = crate::composer::composer_full(&composer);
let locker_is_locked = composer.get_locker().borrow_mut().is_locked();