Skip to content

Add --result as alias for --results; remove erroneous src/.config#166

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

Add --result as alias for --results; remove erroneous src/.config#166
Malcolmnixon merged 1 commit intomainfrom
copilot/add-result-alias-for-results

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 13, 2026

Pull Request

Description

Adds --result as an undocumented legacy alias for --results in CLI argument parsing. Also removes an empty dotnet-tools.json that was mistakenly placed under src/DemaConsulting.ReqStream/.config/ instead of the repository root.

CLI alias (Context.cs)

case "--result":   // legacy alias, not advertised
case "--results":
    resultsFile = args[i++];
    break;

The error message reflects whichever form was passed, e.g. --result requires a filename argument.

Tests (ContextTests.cs)

  • Context_Create_ResultFlag_SetsResultsFileProperty--result <file> sets ResultsFile
  • Context_Create_MissingResultFilename_ThrowsException--result with no filename throws with the correct message

Cleanup

  • Deleted src/DemaConsulting.ReqStream/.config/dotnet-tools.json (empty tools file, erroneous location)

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 unit tests pass: dotnet test --configuration Release
  • Self-validation tests pass:
    dotnet run --project src/DemaConsulting.ReqStream --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:

  • Spell checker passes: cspell "**/*.{md,cs}"
  • Markdown linter passes: markdownlint "**/*.md"
  • YAML linter passes: yamllint .

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)
  • Updated ARCHITECTURE.md (if applicable)
  • Added code examples for new features (if applicable)
  • Updated requirements.yaml (if applicable)

Additional Notes

--result is intentionally not documented in README or user guide — users should use --results. It exists solely for backward compatibility.

@Malcolmnixon Malcolmnixon marked this pull request as ready for review April 13, 2026 22:57
Copilot AI review requested due to automatic review settings April 13, 2026 22:57
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 backward-compatible CLI flag alias (--result) for the existing --results option, and removes an erroneously committed empty .NET tool manifest from an incorrect location.

Changes:

  • Add --result as a legacy alias for --results in CLI parsing, preserving flag-specific error messages.
  • Add unit tests covering --result <file> and --result without a filename.
  • Delete the mistakenly located empty dotnet-tools.json under src/.../.config/.

Reviewed changes

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

File Description
src/DemaConsulting.ReqStream/Cli/Context.cs Adds --result as an alias to the existing --results parsing branch, reusing the existing validation/error-message pattern.
test/DemaConsulting.ReqStream.Tests/Cli/ContextTests.cs Adds coverage ensuring the alias sets ResultsFile and that missing filename errors mention --result.
src/DemaConsulting.ReqStream/.config/dotnet-tools.json Removes an empty tool manifest that was committed under an incorrect path.

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

@Malcolmnixon Malcolmnixon merged commit 6d41cb2 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