Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ implementation demonstrating best practices for DEMA Consulting .NET CLI tools.
## Key Files

- **`requirements.yaml`** - All requirements with test linkage (enforced via `dotnet reqstream --enforce`)
- **`.editorconfig`** - Code style (file-scoped namespaces, 4-space indent, UTF-8+BOM, LF endings)
- **`.editorconfig`** - Code style (file-scoped namespaces, 4-space indent, UTF-8, LF endings)
- **`.cspell.json`, `.markdownlint-cli2.jsonc`, `.yamllint.yaml`** - Linting configs

## Requirements
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ This project enforces code style through `.editorconfig`. Key requirements:

- **Indentation**: 4 spaces for C#, 2 spaces for YAML/JSON/XML
- **Line Endings**: LF (Unix-style)
- **Encoding**: UTF-8 with BOM
- **Encoding**: UTF-8
- **Namespaces**: Use file-scoped namespace declarations
- **Braces**: Required for all control statements
- **Naming Conventions**:
Expand Down Expand Up @@ -142,7 +142,7 @@ Examples:

- Write tests that are clear and focused
- Use modern MSTest v4 assertions:
- `Assert.HasCount(collection, expectedCount)`
- `Assert.HasCount(expectedCount, collection)`
- `Assert.IsEmpty(collection)`
- `Assert.DoesNotContain(item, collection)`
- Always clean up resources (use `try/finally` for console redirection)
Expand Down
30 changes: 15 additions & 15 deletions requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ sections:
sections:
- title: Command-Line Interface
requirements:
- id: TMPL-CMD-001
- id: Template-Cmd-Context
title: The tool shall implement a Context class for command-line argument handling.
justification: |
Provides a standardized approach to command-line argument parsing and output
Expand All @@ -46,7 +46,7 @@ sections:
- Context_Create_ResultsFlag_SetsResultsFile
- Context_Create_LogFlag_OpensLogFile

- id: TMPL-CMD-002
- id: Template-Cmd-Version
title: The tool shall support -v and --version flags to display version information.
justification: |
Users need to quickly identify the version of the tool they are using for
Expand All @@ -58,7 +58,7 @@ sections:
- Program_Version_ReturnsNonEmptyString
- IntegrationTest_VersionFlag_OutputsVersion

- id: TMPL-CMD-003
- id: Template-Cmd-Help
title: The tool shall support -?, -h, and --help flags to display usage information.
justification: |
Users need access to command-line usage documentation without requiring
Expand All @@ -70,7 +70,7 @@ sections:
- Program_Run_WithHelpFlag_DisplaysUsageInformation
- IntegrationTest_HelpFlag_OutputsUsageInformation

- id: TMPL-CMD-004
- id: Template-Cmd-Silent
title: The tool shall support --silent flag to suppress console output.
justification: |
Enables automated scripts and CI/CD pipelines to run the tool without
Expand All @@ -80,7 +80,7 @@ sections:
- Context_WriteLine_Silent_DoesNotWriteToConsole
- IntegrationTest_SilentFlag_SuppressesOutput

- id: TMPL-CMD-005
- id: Template-Cmd-Validate
title: The tool shall support --validate flag to run self-validation tests.
justification: |
Provides a built-in mechanism to verify the tool is functioning correctly
Expand All @@ -90,7 +90,7 @@ sections:
- Program_Run_WithValidateFlag_RunsValidation
- IntegrationTest_ValidateFlag_RunsValidation

- id: TMPL-CMD-006
- id: Template-Cmd-Results
title: The tool shall support --results flag to write validation results in TRX or JUnit format.
justification: |
Enables integration with CI/CD systems that expect standard test result formats.
Expand All @@ -99,15 +99,15 @@ sections:
- IntegrationTest_ValidateWithResults_GeneratesTrxFile
- IntegrationTest_ValidateWithResults_GeneratesJUnitFile

- id: TMPL-CMD-007
- id: Template-Cmd-Log
title: The tool shall support --log flag to write output to a log file.
justification: |
Provides persistent logging for debugging and audit trails.
tests:
- Context_Create_LogFlag_OpensLogFile
- IntegrationTest_LogFlag_WritesOutputToFile

- id: TMPL-CMD-008
- id: Template-Cmd-ErrorOutput
title: The tool shall write error messages to stderr.
justification: |
Error messages must be written to stderr so they remain visible to the user
Expand All @@ -116,7 +116,7 @@ sections:
- Context_WriteError_NotSilent_WritesToConsole
- IntegrationTest_UnknownArgument_ReturnsError

- id: TMPL-CMD-009
- id: Template-Cmd-InvalidArgs
title: The tool shall reject unknown or malformed command-line arguments with a descriptive error.
justification: |
Providing clear feedback for invalid arguments helps users quickly correct
Expand All @@ -127,7 +127,7 @@ sections:
- Context_Create_ResultsFlag_WithoutValue_ThrowsArgumentException
- IntegrationTest_UnknownArgument_ReturnsError

- id: TMPL-CMD-010
- id: Template-Cmd-ExitCode
title: The tool shall return a non-zero exit code on failure.
justification: |
Callers (scripts, CI/CD pipelines) must be able to detect failure conditions
Expand All @@ -138,7 +138,7 @@ sections:

- title: Platform Support
requirements:
- id: TMPL-PLT-001
- id: Template-Platform-Windows
title: The tool shall build and run on Windows platforms.
justification: |
DEMA Consulting tools must support Windows as a major development platform.
Expand All @@ -147,7 +147,7 @@ sections:
- "windows@TemplateTool_VersionDisplay"
- "windows@TemplateTool_HelpDisplay"

- id: TMPL-PLT-002
- id: Template-Platform-Linux
title: The tool shall build and run on Linux platforms.
justification: |
DEMA Consulting tools must support Linux for CI/CD and containerized environments.
Expand All @@ -156,23 +156,23 @@ sections:
- "ubuntu@TemplateTool_VersionDisplay"
- "ubuntu@TemplateTool_HelpDisplay"

- id: TMPL-PLT-003
- id: Template-Platform-Net8
title: The tool shall support .NET 8 runtime.
justification: |
.NET 8 is an LTS release providing long-term stability for enterprise users.
tests:
- "dotnet8.x@TemplateTool_VersionDisplay"
- "dotnet8.x@TemplateTool_HelpDisplay"

- id: TMPL-PLT-004
- id: Template-Platform-Net9
title: The tool shall support .NET 9 runtime.
justification: |
.NET 9 support enables users to leverage the latest .NET features.
tests:
- "dotnet9.x@TemplateTool_VersionDisplay"
- "dotnet9.x@TemplateTool_HelpDisplay"

- id: TMPL-PLT-005
- id: Template-Platform-Net10
title: The tool shall support .NET 10 runtime.
justification: |
.NET 10 support ensures the tool remains compatible with the latest .NET ecosystem.
Expand Down