Skip to content

feat: add --result as alias for --results#161

Merged
Malcolmnixon merged 1 commit intomainfrom
copilot/add-result-alias-for-results
Apr 14, 2026
Merged

feat: add --result as alias for --results#161
Malcolmnixon merged 1 commit intomainfrom
copilot/add-result-alias-for-results

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 14, 2026

Pull Request

Description

Adds --result as a legacy/convenience alias for --results. The alias is intentionally undocumented — --results remains the canonical form.

Changes:

  • src/.../Cli/Context.cs — Added case "--result": fall-through to the existing --results branch in the argument parser switch
  • test/.../Cli/CliTests.cs — Added Cli_ResultFlag_SetsProperty covering the alias happy path
  • test/.../Cli/ContextTests.cs — Added tests for alias happy path (Context_Create_ResultArgument_SetsResultsFileProperty) and missing-value error (Context_Create_ResultWithoutValue_ThrowsArgumentException)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code quality improvement

Related Issues

Pre-Submission Checklist

Before submitting this pull request, ensure you have completed the following:

Build and Test

  • Code builds successfully: dotnet build --configuration Release
  • All tests pass: dotnet test --configuration Release
  • Self-validation tests pass:
    dotnet run --project src/DemaConsulting.BuildMark --configuration Release --framework net10.0
    --no-build -- --validate
  • Code produces zero warnings

Code Quality

  • Code formatting is correct: dotnet format --verify-no-changes
  • New code has appropriate XML documentation comments
  • Static analyzer warnings have been addressed

Quality Checks

Please run the following checks before submitting:

  • All linters pass: ./lint.sh (Unix/macOS) or cmd /c lint.bat / ./lint.bat (Windows)

Testing

  • Added unit tests for new functionality
  • Updated existing tests if behavior changed
  • All tests follow the AAA (Arrange, Act, Assert) pattern
  • Test coverage is maintained or improved

Documentation

  • Updated README.md (if applicable) — no update intentional; alias is undocumented by design
  • Updated ARCHITECTURE.md (if applicable)
  • Added code examples for new features (if applicable)
  • Updated requirements.yaml (if applicable)

Additional Notes

The alias produces the expected error message when used without a value: --result requires a results filename argument.

Agent-Logs-Url: https://github.com/demaconsulting/BuildMark/sessions/16b62eed-223c-44b9-84d1-56c0a97396ad

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
@Malcolmnixon Malcolmnixon marked this pull request as ready for review April 14, 2026 01:32
Copilot AI review requested due to automatic review settings April 14, 2026 01:32
Copy link
Copy Markdown
Contributor

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

Adds a legacy/convenience CLI alias --result that behaves identically to the canonical --results flag when specifying the validation results output file.

Changes:

  • Added --result as a fall-through alias to the existing --results parsing branch.
  • Added unit tests validating --result sets ResultsFile correctly.
  • Added unit test validating --result without a value throws the expected ArgumentException message.

Reviewed changes

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

File Description
src/DemaConsulting.BuildMark/Cli/Context.cs Adds case "--result": to reuse the existing --results argument parsing and error behavior.
test/DemaConsulting.BuildMark.Tests/Cli/CliTests.cs Adds a test ensuring --result sets ResultsFile in the CLI context creation path.
test/DemaConsulting.BuildMark.Tests/Cli/ContextTests.cs Adds tests for --result happy path and missing-value error message behavior.

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

@Malcolmnixon Malcolmnixon merged commit 0e9eca3 into main Apr 14, 2026
19 checks passed
@Malcolmnixon Malcolmnixon deleted the copilot/add-result-alias-for-results branch April 14, 2026 01:45
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