refactor: Remove redundant doc comments throughout codebase
Removes module-level doc comments (//! lines) and excessive inline doc comments that were duplicating information already evident from: - Function/struct names (self-documenting code) - Type signatures (the what is clear from types) - Implementation context (the how is clear from code) Affected modules: - cli/* - Removed command descriptions duplicating clap help text - core/* - Removed module headers and obvious function docs - documents/* - Removed extractor/regenerator/truncation docs - embedding/* - Removed pipeline and chunking docs - gitlab/* - Removed client and transformer docs (kept type definitions) - ingestion/* - Removed orchestrator and ingestion docs - search/* - Removed FTS and vector search docs Philosophy: Code should be self-documenting. Comments should explain "why" (business decisions, non-obvious constraints) not "what" (which the code itself shows). This change reduces noise and maintenance burden while keeping the codebase just as understandable. Retains comments for: - Non-obvious business logic - Important safety invariants - Complex algorithm explanations - Public API boundaries where generated docs matter Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,22 +1,16 @@
|
||||
//! Auth test command - verify GitLab authentication.
|
||||
|
||||
use crate::core::config::Config;
|
||||
use crate::core::error::{LoreError, Result};
|
||||
use crate::gitlab::GitLabClient;
|
||||
|
||||
/// Result of successful auth test.
|
||||
pub struct AuthTestResult {
|
||||
pub username: String,
|
||||
pub name: String,
|
||||
pub base_url: String,
|
||||
}
|
||||
|
||||
/// Run the auth-test command.
|
||||
pub async fn run_auth_test(config_path: Option<&str>) -> Result<AuthTestResult> {
|
||||
// 1. Load config
|
||||
let config = Config::load(config_path)?;
|
||||
|
||||
// 2. Get token from environment
|
||||
let token = std::env::var(&config.gitlab.token_env_var)
|
||||
.map(|t| t.trim().to_string())
|
||||
.map_err(|_| LoreError::TokenNotSet {
|
||||
@@ -29,10 +23,8 @@ pub async fn run_auth_test(config_path: Option<&str>) -> Result<AuthTestResult>
|
||||
});
|
||||
}
|
||||
|
||||
// 3. Create client and test auth
|
||||
let client = GitLabClient::new(&config.gitlab.base_url, &token, None);
|
||||
|
||||
// 4. Get current user
|
||||
let user = client.get_current_user().await?;
|
||||
|
||||
Ok(AuthTestResult {
|
||||
|
||||
Reference in New Issue
Block a user