slim
slim copied to clipboard
refactor(reverse): dockerfilefromhistory default processor
Per the desire expressed in the TODO
in the default raw instruction processing case in DockerfileFromHistory
, this adds tests for that processor and refactors it.
The end result increases cumulative cyclomatic complexity a few points, but generally drops the complexity of the individual pieces through conditional flattening and code deduplication, provides a clear path towards extension, and generally makes the default processor a good deal easier to reason about.