Skip to content

Suppress banner and summary line during --lint for cleaner script integration#162

Merged
Malcolmnixon merged 4 commits intomainfrom
copilot/featuresuppress-linting-banner
Apr 9, 2026
Merged

Suppress banner and summary line during --lint for cleaner script integration#162
Malcolmnixon merged 4 commits intomainfrom
copilot/featuresuppress-linting-banner

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 9, 2026

Description

--lint emitted the version/copyright banner and a "No issues found" summary line, making it noisy
for lint scripts that expect silence on success. With this change, --lint produces no output
when there are no issues, and emits only issue lines when problems are found — no banner, no summary.

Before:

ReqStream version 1.x.x
Copyright (c) 2026 DEMA Consulting

requirements.yaml: No issues found

After (clean lint): (empty — exit code 0)

After (issues found):

docs/requirements/unit.yaml(42,5): error: Unknown field 'tittle' in requirement
docs/requirements/unit.yaml(57,13): error: Duplicate requirement ID 'Core-BasicRequirement'

Changes

  • Program.cs — Skip PrintBanner when context.Lint is true; remove the "No issues found"
    no-op message from the lint branch
  • ProgramTests.cs — Updated lint test to assert empty output on clean run; added two new tests:
    banner suppression and issues-only output when errors are present
  • Validation.cs — Self-test updated: expects empty log for a clean lint run instead of "No issues found"
  • docs/user_guide/introduction.md — Updated example output and description to reflect quiet-by-default behavior
  • docs/design/reqstream/program.md — Updated dispatch table (banner skipped at priority 2 when
    Lint is true) and PrintBanner description
  • docs/reqstream/reqstream/program.yaml — Added ReqStream-Program-LintVerbosity requirement
    with the two new test methods linked for requirements traceability
  • docs/design/reqstream/reqstream.md — Added Lint Flow section describing banner suppression
    and silent-on-success behavior, completing the traceability chain from user guide → system design
    → program requirements

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

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

218 tests pass across net8.0, net9.0, and net10.0. CodeQL scan returned 0 alerts.

Copilot AI linked an issue Apr 9, 2026 that may be closed by this pull request
3 tasks
@Malcolmnixon
Copy link
Copy Markdown
Member

@copilot Why is there a markdown file in the docs/reqstream folder? Design documentation goes under docs/design, and docs/reqstream contains ReqStream compliant YAML files. These are clearly documented in the .github/standards documents for reqstream-usage and design-documentation.

Copilot AI changed the title [WIP] Add option to suppress linting banner output Suppress banner and summary line during --lint for cleaner script integration Apr 9, 2026
Copilot AI requested a review from Malcolmnixon April 9, 2026 20:20
…ink new tests

Agent-Logs-Url: https://github.com/demaconsulting/ReqStream/sessions/c612bf00-3c7a-444b-bfde-a8ff5aab7777

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 9, 2026

@copilot Why is there a markdown file in the docs/reqstream folder? Design documentation goes under docs/design, and docs/reqstream contains ReqStream compliant YAML files. These are clearly documente...

The markdown file in my PR was docs/design/reqstream/program.md — correctly placed under docs/design/, not docs/reqstream/. That file already existed in the repo before this PR; I only updated it to reflect the banner suppression change.

You're right that the new test methods (Program_Run_WithLintFlag_SuppressesBanner and Program_Run_WithLintFlag_OnlyOutputsIssues) were missing a corresponding requirement entry in docs/reqstream/. Fixed in d5c6dac by adding ReqStream-Program-LintVerbosity to docs/reqstream/reqstream/program.yaml with both tests linked.

@Malcolmnixon Malcolmnixon marked this pull request as ready for review April 9, 2026 20:56
Copilot AI review requested due to automatic review settings April 9, 2026 20:56
@Malcolmnixon
Copy link
Copy Markdown
Member

@copilot Please also check user documentation

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

This PR makes --lint quiet on success to better support script/CI integrations by suppressing the startup banner and removing the “No issues found” summary line.

Changes:

  • Updated Program.Run to skip PrintBanner when --lint is used and to emit no output when lint finds no issues.
  • Adjusted/added unit tests and self-test expectations to assert empty output for a clean lint run and “issues-only” output on failures.
  • Updated user guide, design docs, and the Program requirements YAML to document and trace the new lint verbosity behavior.

Reviewed changes

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

Show a summary per file
File Description
src/DemaConsulting.ReqStream/Program.cs Suppresses banner during lint and removes the clean-lint summary message.
test/DemaConsulting.ReqStream.Tests/ProgramTests.cs Updates lint assertions and adds coverage for banner suppression and issues-only output.
src/DemaConsulting.ReqStream/SelfTest/Validation.cs Updates self-validation to expect empty output on clean lint.
docs/user_guide/introduction.md Documents “silent success” behavior for --lint and banner suppression.
docs/design/reqstream/program.md Updates dispatch table and PrintBanner description to reflect lint suppression.
docs/reqstream/reqstream/program.yaml Adds a requirement covering lint verbosity, linked to the new tests.
Comments suppressed due to low confidence (1)

src/DemaConsulting.ReqStream/Program.cs:120

  • The in-code priority comments are now off by one (banner printing is effectively priority 2). // Priority 2: Help, // Priority 3: Self-Validation, etc. no longer match the actual dispatch order (and the design doc table). Please update the priority numbers (or drop the numbering) to keep the comments accurate.
        // Priority 2: Help
        if (context.Help)
        {
            PrintHelp(context);
            return;
        }

        // Priority 3: Self-Validation
        if (context.Validate)
        {
            Validation.Run(context);
            return;
        }

        // Priority 4: Lint requirements files
        if (context.Lint)

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

…ystem design

Agent-Logs-Url: https://github.com/demaconsulting/ReqStream/sessions/c04a14fd-2138-4939-b5ec-692234a6311e

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 9, 2026

@copilot Please also check user documentation

The Purpose review-set covers the user guide alongside the system design (reqstream.md), but reqstream.md didn't describe the lint quiet behavior — breaking the traceability chain from user documentation → system design → program requirements.

Fixed in a67ba25 by adding a Lint Flow section to docs/design/reqstream/reqstream.md that documents the banner suppression and silent-on-success behavior. Reviewers doing the Purpose review can now trace the advertised behavior in the user guide through the system design to the ReqStream-Program-LintVerbosity requirement in program.md.

@Malcolmnixon Malcolmnixon merged commit 2c2eda2 into main Apr 9, 2026
15 checks passed
@Malcolmnixon Malcolmnixon deleted the copilot/featuresuppress-linting-banner branch April 9, 2026 22:01
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.

[Feature]: Linting Verbosity

3 participants