🩹 [Patch]: Local test runs no longer leave a coverage report to commit by accident - #43
Open
Marius Storhaug (MariusStorhaug) wants to merge 1 commit into
Open
🩹 [Patch]: Local test runs no longer leave a coverage report to commit by accident#43Marius Storhaug (MariusStorhaug) wants to merge 1 commit into
Marius Storhaug (MariusStorhaug) wants to merge 1 commit into
Conversation
…ing directory Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
No Significant Changes DetectedThis PR does not contain changes to files that would trigger a new release:
Build, test, and publish stages will be skipped for this PR. If you believe this is incorrect, please verify that your changes are in the correct locations. |
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Marius Storhaug (MariusStorhaug)
marked this pull request as ready for review
August 2, 2026 17:59
Marius Storhaug (MariusStorhaug)
requested a review
from a team
as a code owner
August 2, 2026 17:59
Marius Storhaug (MariusStorhaug)
enabled auto-merge (squash)
August 2, 2026 17:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A local test run no longer leaves an untracked file that gets committed by accident. Running Pester with code coverage writes
coverage.xmlinto the working directory, and nothing ignored it, so the report showed up ingit statusand was easy to stage without noticing.Fixed: the Pester coverage report stays out of commits
.gitignorenow ignorescoverage.xml. Contributors running the test suite locally get a cleangit statusafterwards, and the report cannot be committed by agit add -A.Nothing about how coverage is produced or published changes. CI still generates and uploads the report as a build artifact; this only stops the local copy from being tracked.
Technical details
Found in the wild, not hypothetically. PSModule/CasingStyle#22 adds a 126-line JaCoCo
coverage.xmlat the repository root alongside its intended changes — the signature of a local Pester run followed bygit add -A.It is accidental, not a convention.
gh search code --owner PSModule --filename coverage.xmlreturns nothing across all 96 repositories in the organization, so no repository tracks one deliberately. CasingStyle would have been the first.Why the file lands at the root. Pester writes its coverage report to the working directory by default, which is the repository root for a local run. The existing
outputs/*rule covers the framework's own build output, but the coverage report is not written there.Why this belongs in the template — and what it does not do. The template is the source every new module repository is created from, so fixing it here is what stops the gap being reproduced. All 58 repositories carrying
Type: Modulehave the same gap today, and this pull request does not reach any of them.An earlier revision of this description claimed it would, via the
SubscribeTocustom property. That claim was wrong and is retracted. Checked afterwards, and the correction is worth stating plainly because it changes what this pull request is worth:SubscribeTosetPSModule/GitHub, valueCustom Instructions, License, Prompts)gitignoreSubscribeTo, anywherePSModule/Distributor/scripts/Sync-Files.ps1— its workflow isdisabled_inactivity, last ran 2026-06-05, and succeeded on only 3 of 76 runs everMSXOrg/Custo, the documented successor runtimeLICENSEand a two-lineREADME.mdSo the opt-in is valid and documented, its only engine has been switched off since June, and the documented successor is a stub. (An earlier revision of this table said no implementation existed — that was a search scoped to the wrong organization, corrected on PSModule/docs#109.) This pull request therefore fixes the template only; existing repositories keep the gap until distribution actually runs, which is tracked in PSModule/docs#63 and the prerequisite work linked from it. Fixing only one repository would still leave the trap in the template, which is the argument for landing this regardless.
Scope. One rule and a comment explaining what writes the file. Deliberately not a wider
.gitignorereview, and deliberately not*.xml— module repositories legitimately track XML, and a broad glob would silently ignore files that belong in version control.Kept separate from #42. That pull request corrects documentation links in the community files. This one changes build hygiene. They share no lines and merge in either order.
Standards and framework alignment.
.gitignore.gitignoreas a managed file type, so the template is the correct source. The page describes the distribution runtime in the present tense; that overstatement is reported separately, not resolved hereIssue convergence sweep. Scope: open issues in this repository and in
PSModule/docsconcerning repository hygiene or the managed file set. Nothing is fully satisfied by this diff. PSModule/docs#36, on reviewing.gitattributesfor cross-platform development, is adjacent but concerns a different file and is untouched.Relevant issues (or links)