Skip to content

Switch quality-checks job from individual lint actions to lint.sh script#50

Merged
Malcolmnixon merged 3 commits intomainfrom
copilot/update-markdownlint-cli2-action
Mar 30, 2026
Merged

Switch quality-checks job from individual lint actions to lint.sh script#50
Malcolmnixon merged 3 commits intomainfrom
copilot/update-markdownlint-cli2-action

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 30, 2026

Pull Request

Description

The quality-checks job was still using individual GitHub Actions for linting, which is why Dependabot kept surfacing markdownlint-cli2-action update suggestions. The template (TemplateDotNetTool PR #61) consolidated these into a single lint.sh invocation, but the change was never ported to VersionMark.

Changes to .github/workflows/build.yaml:

  • Add Setup Node.js (24.x, actions/setup-node@v6) and Setup Python (3.14, actions/setup-python@v6) steps required by lint.sh, using action versions consistent with the template and the rest of the workflow
  • Replace three individual linting actions with run: bash ./lint.sh:
# Before
- name: Run markdown linter
  uses: DavidAnson/markdownlint-cli2-action@v22
  with:
    globs: '**/*.md'

- name: Run spell checker
  uses: streetsidesoftware/cspell-action@v8
  with:
    files: '**/*.{md,cs}'
    incremental_files_only: false

- name: Run YAML linter
  uses: ibiqlik/action-yamllint@v3
  with:
    config_file: .yamllint.yaml

# After
- name: Run linters
  shell: bash
  run: bash ./lint.sh

Intentional differences from the template — the template's quality job also includes Setup dotnet, Restore Tools, Capture tool versions, Run VersionMark self-validation, and Upload quality artifacts steps. These are excluded here because the quality job builds VersionMark itself, so dotnet versionmark is not available at that stage (as noted in the existing inline comment).

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.VersionMark --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

This change removes the three third-party action dependencies (markdownlint-cli2-action, cspell-action, action-yamllint) from the CI workflow. All linting is now delegated to the existing lint.sh script, which already runs the same tools locally. The setup-node and setup-python action versions (@v6) are aligned with the template and the rest of the build.yaml workflow.

Copilot AI changed the title [WIP] Update markdownlint-cli2-action in build.yaml Switch quality-checks job from individual lint actions to lint.sh script Mar 30, 2026
Copilot AI requested a review from Malcolmnixon March 30, 2026 17:13
@Malcolmnixon
Copy link
Copy Markdown
Member

@copilot Did you actually review the quality job from the https://github.com/demaconsulting/TemplateDotNetTool/blob/main/.github/workflows/build.yaml template and make sure this repo is in sync.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 30, 2026

@copilot Did you actually review the quality job from the https://github.com/demaconsulting/TemplateDotNetTool/blob/main/.github/workflows/build.yaml template and make sure this repo...

I reviewed the template's quality job and found two additional discrepancies: actions/setup-node@v4 and actions/setup-python@v5 should both be @v6 to match the template (and setup-node@v6 is already used elsewhere in VersionMark's own build.yaml). Fixed in 9ebfb7c.

The remaining intentional differences from the template's quality job are:

  • No Setup dotnet / Restore Tools / Capture tool versions / Run VersionMark self-validation / Upload quality artifacts steps — these are all excluded because the quality job builds VersionMark itself, so dotnet versionmark isn't available here (as noted in the existing comment on lines 24–26).

@Malcolmnixon Malcolmnixon marked this pull request as ready for review March 30, 2026 17:20
Copilot AI review requested due to automatic review settings March 30, 2026 17:20
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

Updates the reusable build.yaml workflow to consolidate repository “quality checks” into the existing lint.sh script, aligning the job with the template approach and centralizing lint behavior.

Changes:

  • Added Node.js and Python setup steps to the quality-checks job.
  • Replaced separate markdown/spell/YAML lint GitHub Actions with a single bash ./lint.sh invocation.

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

@Malcolmnixon Malcolmnixon merged commit 2324ffd into main Mar 30, 2026
19 checks passed
@Malcolmnixon Malcolmnixon deleted the copilot/update-markdownlint-cli2-action branch March 30, 2026 17:31
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