slim icon indicating copy to clipboard operation
slim copied to clipboard

refactor(reverse): dockerfilefromhistory default processor

Open ess opened this issue 2 years ago • 0 comments

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.

ess avatar Feb 06 '23 12:02 ess