Skip to content

Dedup dotter toml with decl macros - #223

Open
viktorashi wants to merge 8 commits into
SuperCuber:masterfrom
viktorashi:dedup-dotter-toml-with-decl-macros
Open

Dedup dotter toml with decl macros#223
viktorashi wants to merge 8 commits into
SuperCuber:masterfrom
viktorashi:dedup-dotter-toml-with-decl-macros

Conversation

@viktorashi

@viktorashi viktorashi commented Aug 9, 2026

Copy link
Copy Markdown

just some stamping in place of

Copilot AI lite review requested due to automatic review settings August 9, 2026 22:53
@viktorashi viktorashi mentioned this pull request Aug 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for loading global and repository-level dotter.toml settings and merging them into CLI-derived options, reducing duplicated configuration while keeping command-line flags authoritative.

Changes:

  • Introduces DotterSettings (TOML-deserializable) plus load_settings_file and merge logic in get_options().
  • Loads a global settings file from the platform config dir and optionally cds into a configured repo before reading a repo-local dotter.toml.
  • Adds the dirs dependency to locate the platform config directory.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/args.rs Adds settings loading/merging (TOML + clap matches) and new helper macro/types.
Cargo.toml Adds dirs dependency needed for platform config-dir lookup.
Cargo.lock Locks transitive dependency changes for adding dirs.

馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/args.rs
Comment on lines +148 to +154
fn load_settings_file(path: &std::path::Path) -> Option<DotterSettings> {
if let Ok(content) = std::fs::read_to_string(path) {
toml::from_str(&content).ok()
} else {
None
}
}
Comment thread src/args.rs
matches,
repo_settings,
global_settings,
[noconfirm, quiet, diff_context_lines, verbosity]
Comment thread src/args.rs
Comment on lines +8 to +9
type QuietType= bool;
type DiffContextLinesType= usize;
@viktorashi
viktorashi force-pushed the dedup-dotter-toml-with-decl-macros branch from 5a684d6 to 0ff72df Compare August 9, 2026 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants