Skip to content

CLI: switch to Spectre.Console.Cli and add inline options instead of project file#114

Merged
drebrez merged 9 commits into
masterfrom
feature/cli-inline-options
May 12, 2026
Merged

CLI: switch to Spectre.Console.Cli and add inline options instead of project file#114
drebrez merged 9 commits into
masterfrom
feature/cli-inline-options

Conversation

@drebrez
Copy link
Copy Markdown
Member

@drebrez drebrez commented May 10, 2026

No description provided.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 10, 2026

Unit Test Results

110 tests  ±0   110 ✅ ±0   0s ⏱️ ±0s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 990d3b0. ± Comparison against base commit cf5cc8e.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 10, 2026

MariaDB Test Results

155 tests  ±0   155 ✅ ±0   1m 57s ⏱️ +2s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 990d3b0. ± Comparison against base commit cf5cc8e.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 10, 2026

MySQL Test Results

93 tests  ±0   93 ✅ ±0   1m 39s ⏱️ -6s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 990d3b0. ± Comparison against base commit cf5cc8e.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 10, 2026

PostgreSQL Test Results

216 tests  ±0   216 ✅ ±0   6m 7s ⏱️ -48s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 990d3b0. ± Comparison against base commit cf5cc8e.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 10, 2026

MicrosoftSQL Test Results

212 tests  ±0   212 ✅ ±0   16m 12s ⏱️ + 6m 5s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 990d3b0. ± Comparison against base commit cf5cc8e.

♻️ This comment has been updated with latest results.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates the CLI from System.CommandLine to Spectre.Console.Cli, and adds support for “inline” compare options (type/source/target) as an alternative to supplying a project file, while also customizing the help output.

Changes:

  • Switched CLI command parsing/execution to Spectre.Console.Cli with DI-based command activation.
  • Added inline compare options + validation logic (mutually exclusive with project-file mode) and a ShowHelpException flow to display help when no meaningful args are supplied.
  • Implemented a custom Spectre help provider and option grouping for improved help output.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
SQLSchemaCompare.CLI/Utils/ShowHelpException.cs Adds a custom exception used to trigger help display.
SQLSchemaCompare.CLI/Utils/OptionGroupAttribute.cs Adds an attribute to group related options in help output.
SQLSchemaCompare.CLI/Utils/CustomHelpProvider.cs Implements custom header + grouped options rendering for --help.
SQLSchemaCompare.CLI/SQLSchemaCompare.CLI.csproj Replaces System.CommandLine dependency with Spectre.Console.Cli and adds global usings.
SQLSchemaCompare.CLI/Program.cs Rebuilds CLI bootstrap around CommandApp, DI registrar, and new error/help handling.
SQLSchemaCompare.CLI/CustomHelpAction.cs Removes the prior System.CommandLine-based custom help action.
SQLSchemaCompare.CLI/Commands/CompareCommand.cs Converts compare command to Spectre command + adds inline options and validation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread SQLSchemaCompare.CLI/Commands/CompareCommand.cs Outdated
Comment thread SQLSchemaCompare.CLI/Commands/CompareCommand.cs
Comment thread SQLSchemaCompare.CLI/Commands/CompareCommand.cs
Comment thread SQLSchemaCompare.CLI/Program.cs Outdated
Copilot AI and others added 4 commits May 12, 2026 08:32
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@drebrez drebrez merged commit 35ea6bd into master May 12, 2026
16 checks passed
@drebrez drebrez deleted the feature/cli-inline-options branch May 12, 2026 10:31
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.

3 participants