Add lint for intended duplicate content, that would be skipped #17
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.
I wanted to add some content to a yaml at different places.
To not have the same content duplicated I used yaml pointers. When adding the yaml pointer references at multiple places this line hits: https://github.com/symfony/flex/blob/8ce1acd9842abe0e9b4c4a0bd3f259859516c018/src/Configurator/AddLinesConfigurator.php#L171-L173
It will prevent the additional references to be added as the content is already in the file. It will not print a hint as it is the intended check for a change, that might not have to be applied.
In my case it is intentional and it should be mentioned as early as possible. Therefore I add the check to the manifest lint instead of symfony/flex itself as this will be checked eventually when the recipe has been published already.
Template yaml:
ci.yml
Expected result:
Current result:
I can solve this by having a comment behind the pointer reference usage and to make it unique. But it is such a hassle to debug this until you find this skip so I'd rather be notified about this early :)