Repository navigation
fix: protect analyzed sources from JSON export - #5
Merged
Merged
Conversation
|
Welcome! 👋 Thanks for your first pull request in this repository. A maintainer will review it soon. Please make sure:
Thanks for contributing! |
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.
Bei
--file source.py --json-output source.pyüberschreibt der JSON-Export bisher die analysierte Quelle; dasselbe gilt für Projektdateien, Hard Links und symbolische Links.Die CLI prüft das Ausgabeziel vor dem Schreiben gegen analysierte Dateien mit aufgelösten Pfaden und Dateidentität. Projektdateien mit Syntaxfehlern werden ebenfalls geschützt. Ein Konflikt liefert Exit-Code 1; Quelle und Alias bleiben unverändert. Normale JSON-Exporte und Snippet-Ausgaben bleiben möglich.
Validierung: fünf neue Regressionen vor Fix fehlgeschlagen. Nach Fix lokal 215 bestanden, zwei Symlink-Fälle mangels Windows-Rechten übersprungen, vier erwartete Latin-1-Warnungen. Ruff, git diff --check und 20 Metadatenprüfungen bestanden. Symlink-Prüfungen sind für Linux/macOS in der CI enthalten.
Grenze: Pfadprüfung bietet keine Sperre gegen gleichzeitige externe Pfadänderungen. Der generische JSON-Schreibpfad wird hier nicht atomar umgestellt. Keine Versionsänderung oder Release-/Store-Aktion.
CI-Abnahme: finaler Head 660be8e; alle acht Windows/Linux/macOS-Testjobs und CodeQL erfolgreich. Testlauf 36773453773. Linux Python 3.13: 217 bestanden, inklusive beider Symlink-Regressionen (Job 110085689939).