fix(#999): resolve all clippy warnings across the workspace
All crates now pass `cargo clippy --workspace -- -D warnings` cleanly.
Fixes span six crates (hive-sh4re, hive-ag3nt, hive-c0re, hive-forge,
hive-priv, hive-matrix-mcp was already clean):
- doc_markdown: wrap snake_case, type names, constants in backticks
- collapsible_if / collapsible_match: fold nested ifs into let-chains
- duration_suboptimal_units: Duration::from_secs(N) → from_mins/from_hours
- implicit_hasher: allow on HashMap-param fns where generalization is risky
- items_after_statements: hoist use to function tops
- map(f).unwrap_or(x) → map_or(x, f); map(f).unwrap_or_else(g) → map_or_else
- is_ok_and / is_none_or in place of map().unwrap_or(bool)
- needless_continue: {} instead of continue in loop match arms
- match_same_arms: Ok(None) | Err(_) merged
- format_push_str: write!() instead of push_str(&format!())
- while let replaces loop { let Some(..) = x else { break } }
- struct_excessive_bools / dead_code: allow on purpose-built structs
- too_many_lines / too_many_arguments: allow where refactor not worth it
- unused_async: remove async from poll_once in bash_runner
- needless_borrow: fix &repo deref in hive-forge comments verb
- cast_possible_truncation: allow u64→usize in fetch_tail
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
9efe9ca175
commit
5c5ca38fe8
32 changed files with 121 additions and 127 deletions
|
|
@ -751,7 +751,7 @@ pub struct SchedulePromptPayload {
|
|||
|
||||
/// Named group of MCP tools an agent may be granted. The harness reads
|
||||
/// `HIVE_TOOL_GROUPS` from the environment (a comma-separated list of
|
||||
/// snake_case group names written by the meta renderer from per-agent
|
||||
/// `snake_case` group names written by the meta renderer from per-agent
|
||||
/// config) and expands it to the matching tool names for `--allowedTools`.
|
||||
/// When the env var is absent the harness falls back to the flavor default
|
||||
/// (`AGENT_DEFAULT` or `MANAGER_DEFAULT`). See `docs/conventions.md::Tool groups`.
|
||||
|
|
@ -841,7 +841,7 @@ impl ToolGroup {
|
|||
Self::Execution,
|
||||
];
|
||||
|
||||
/// The snake_case wire name for this group (matches `serde(rename_all =
|
||||
/// The `snake_case` wire name for this group (matches `serde(rename_all =
|
||||
/// "snake_case")` serialisation).
|
||||
#[must_use]
|
||||
pub fn as_str(self) -> &'static str {
|
||||
|
|
@ -897,7 +897,7 @@ impl JournalPriority {
|
|||
/// which MCP tools the harness exposes to claude).
|
||||
///
|
||||
/// Injected into containers as `HIVE_CAPABILITIES` (comma-separated
|
||||
/// snake_case) via `meta::render_flake`. The harness reads this to
|
||||
/// `snake_case`) via `meta::render_flake`. The harness reads this to
|
||||
/// conditionally register capability-gated MCP tools so claude only
|
||||
/// sees tools it can actually invoke. See `docs/conventions.md::Capabilities`.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
|
||||
|
|
@ -925,7 +925,7 @@ pub enum Capability {
|
|||
}
|
||||
|
||||
impl Capability {
|
||||
/// Canonical snake_case name for this capability (matches serde).
|
||||
/// Canonical `snake_case` name for this capability (matches serde).
|
||||
#[must_use]
|
||||
pub fn as_str(self) -> &'static str {
|
||||
match self {
|
||||
|
|
|
|||
Loading…
Reference in a new issue