Skip to content

feat: add --result as undocumented alias for --results#28

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

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

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 13, 2026

Adds --result as a legacy/alias form of --results for users who may omit the trailing s. The alias is intentionally undocumented (no README or user-guide changes).

Description

  • Context.cs — Added case "--result": fall-through before case "--results": in the ArgumentParser switch, so both spellings resolve to the same ResultsFile assignment.
  • ContextTests.cs — Added Context_Create_ResultAliasFlag_SetsResultsFile to verify --result <file> correctly sets ResultsFile.

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

Pre-Submission Checklist

Build and Test

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

Code Quality

  • New code has appropriate XML documentation comments
  • Static analyzer warnings have been addressed

Quality Checks

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

Testing

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

Documentation

  • Updated README.md (if applicable) — no changes intentional; alias is undocumented

Additional Notes

The alias is a silent convenience; it is deliberately excluded from the README and user guide to avoid advertising it as a supported flag.

@Malcolmnixon Malcolmnixon marked this pull request as ready for review April 13, 2026 22:55
Copilot AI review requested due to automatic review settings April 13, 2026 22:55
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 an undocumented CLI alias --result for the existing --results option to preserve compatibility with users who omit the trailing s.

Changes:

  • Added --result as a fall-through alias to the --results argument parsing branch.
  • Added a unit test asserting --result <file> sets ResultsFile.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/DemaConsulting.FileAssert/Cli/Context.cs Adds --result case to route to the existing --results handling and ResultsFile assignment.
test/DemaConsulting.FileAssert.Tests/Cli/ContextTests.cs Adds a new unit test validating --result sets ResultsFile.

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

Comment thread test/DemaConsulting.FileAssert.Tests/Cli/ContextTests.cs
@Malcolmnixon Malcolmnixon merged commit 7d30761 into main Apr 14, 2026
19 checks passed
@Malcolmnixon Malcolmnixon deleted the copilot/add-result-alias-for-results branch April 14, 2026 01:32
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