docs(comments): rewrite comments across all crates to the guidelines
Sweep every first-party crate source (1956 .rs files) to the project comment guidelines: delete redundant restatements, decorative banners, change narration, and end-of-line comments; keep and tighten the crucial ones (invariants, bug rationale, SAFETY blocks, ported-source attribution). No functional code changed. Every edit is proven comment-only against the prior tree by a comment-stripping lexer (string/char/raw-string aware) plus a separate doctest-fence check. Where removing a comment made rustfmt or clippy want to re-lay-out adjacent code, the minimal triggering comment is restored so code tokens stay byte-identical. Gates green: cargo fmt --all --check (0 diffs), cargo check and cargo clippy --workspace --all-targets (0 warnings). Adds scripts/check_codegen_comment_guidelines.py — the enforcement gate for these guidelines (flags banners, end-of-line comments, change narration, and commented-out code).
This commit is contained in:
@@ -84,7 +84,6 @@ pub fn load_from_disk() -> std::io::Result<toml::Value> {
|
||||
load_user_config_layer(user_kigi_home().as_deref(), "config.toml")
|
||||
}
|
||||
|
||||
/// Managed config filename, shared by the loaders in this module.
|
||||
pub const MANAGED_CONFIG_FILENAME: &str = "managed_config.toml";
|
||||
|
||||
pub fn load_managed_config() -> std::io::Result<toml::Value> {
|
||||
@@ -111,7 +110,6 @@ pub fn load_system_managed_config() -> std::io::Result<toml::Value> {
|
||||
Ok(v)
|
||||
}
|
||||
|
||||
/// One managed-config layer: the parsed TOML and the file it came from.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct ManagedConfigLayer {
|
||||
pub value: toml::Value,
|
||||
@@ -377,7 +375,6 @@ pub struct CampaignsState {
|
||||
pub dismissed_ids: Vec<String>,
|
||||
}
|
||||
|
||||
/// Path to `$KIGI_SHARE_DIR/campaigns_state.json` under `home`.
|
||||
pub fn campaigns_state_path(home: &std::path::Path) -> std::path::PathBuf {
|
||||
home.join(CAMPAIGNS_STATE_FILE)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user