Skip to content

fix(ci): fail when tracked projects are missing from the solution - #4575

Merged
iancooper merged 4 commits into
BrighterCommand:masterfrom
gabisonia:fix/4273-solution-project-guard
Oct 11, 2026
Merged

iancooper merged 4 commits into
BrighterCommand:masterfrom
gabisonia:fix/4273-solution-project-guard

Conversation

@gabisonia

Copy link
Copy Markdown
Member

Description

A Git-tracked .csproj omitted from Brighter.slnx can silently escape the CI build. Add a guard before the build that compares all tracked projects with actual solution project entries and fails with a diff when they disagree.

The guard parses solution XML, preserves Git path casing, ignores untracked files, and supports documented exact-path exclusions for standalone diagnostics. Stale exclusions also fail. Add fixture tests and contributor instructions for maintaining project registration.

Related Issues

Fixes #4273.

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 change)
  • Documentation update

Checklist

  • I have read the Contributing Guide
  • I have checked the documentation for relevant guidance
  • I have added/updated XML documentation for any public API changes
  • I have added/updated tests as appropriate
  • My changes follow the existing code style and conventions

Additional Notes

Validation on macOS:

  • bash test_check_solution_projects.sh: 23 cases, 39 assertions passed.
  • bash check_solution_projects.sh: passed against the repository.
  • shellcheck check_solution_projects.sh test_check_solution_projects.sh: passed.
  • git diff --check: passed.

Coverage includes missing projects across repository folders, casing mismatches, spaces, exclusions, comments, solution-file entries, XML quoting/formatting/entities, and malformed solutions. No public API changes. The guard requires Python 3's standard library; GitHub's Ubuntu CI run remains the Linux verification.

Please merge with a merge commit, as requested by the contributing guide.

Check Git-tracked projects against Brighter.slnx with explicit exclusions and shell regression coverage. Document the local check and run it in CI.

Refs BrighterCommand#4273
@iancooper iancooper added 3 - Done Maintenance Build, CI, refactoring, testing infrastructure, and other chores and removed 2 - In Progress .NET Pull requests that update .net code labels Oct 11, 2026
@iancooper
iancooper merged commit fed2712 into BrighterCommand:master Oct 11, 2026
34 of 35 checks passed
@iancooper

Copy link
Copy Markdown
Member

Thanks @gabisonia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 - Done Bug Maintenance Build, CI, refactoring, testing infrastructure, and other chores V10.X

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI guard: fail the build when a .csproj is not referenced by Brighter.slnx

2 participants