Repository navigation
fix(workspace): preserve .pymarkdown / .yamllint lint configs on upgrade - #1102
Merged
Merged
Conversation
Promote both lint configs to PRESERVE_FILES so consumer rule exceptions survive install.sh --force, mirroring the .typos.toml (#913) promotion: capture *_PREEXISTED and print the template diff on upgrade. The banner transform derives the variant from PRESERVE_FILES, so both templates now render the preserved banner. Refs: #1099
.pymarkdown is the strict-JSON config pymarkdown actually reads (md0xx rule settings) — the file a consumer really customizes. Promote it to PRESERVE_FILES with a *_PREEXISTED capture and template-diff guard, like .yamllint. Being comment-less JSON it stays banner-skipped, exactly like renovate.json. Refs: #1099
This was referenced Jul 15, 2026
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.
Closes #1099. Part of #1096.
Problem
.pymarkdown(the JSON config pymarkdown reads),.yamllint, and the.pymarkdown.config.mddoc were fully-managed and overwritten on everyinstall.sh --force, silently destroying repo-specificignore:globs and rule disables — the exact defect fixed for.pre-commit-config.yaml(#878) and.typos.toml(#913) by promoting them toPRESERVE_FILES. That reasoning was never applied here.Change
.pymarkdown,.yamllint, and.pymarkdown.config.mdtoPRESERVE_FILES, mirroring the.typos.toml(fix(workspace): scaffold upgrade clobbers a customized .typos.toml (dual-config corruption) #913) change set:*_PREEXISTEDcaptures +print_preserved_template_diffso template evolution stays visible..yamllint/.pymarkdown.config.md(comment-capable) render the preserved banner;.pymarkdownis strict JSON and stays un-bannered in_BANNER_SKIP, exactly like the already-preservedrenovate.json.Tests / verification
6 new bats cases (preserve + customized-survives + diff-hint for
.pymarkdownand.yamllint) +test_transforms.pyPRESERVE_FILESmembership and preserved-banner coverage.init-workspace.bats186 ok / 0 fail;test_transforms.py37 passed; fullprek run --all-filesgreen locally.Merge note
Re-merged onto
dev(changelog union resolved). Siblings #1092 and #1093 also touchCHANGELOG.md— a later merge may need "Update branch".