When after or before fail to match, the current behaviors are both surprising and different from each other:
after injects at the start of the file
before seems to do nothing
Both cases are logged as inject giving the impression that all is well. These behaviors are problematic because in the before-case important code may go missing, and in the after-case the resulting file may be broken.
Both should actually leave the file alone and log as skipped so the developer is immediately informed instead of trying to run this potentially broken state in the assumption that the generator worked as expected.
When
after
orbefore
fail to match, the current behaviors are both surprising and different from each other:after
injects at the start of the filebefore
seems to do nothingBoth cases are logged as
inject
giving the impression that all is well. These behaviors are problematic because in thebefore
-case important code may go missing, and in theafter
-case the resulting file may be broken.Both should actually leave the file alone and log as
skipped
so the developer is immediately informed instead of trying to run this potentially broken state in the assumption that the generator worked as expected.