Open qwert2603 opened 1 year ago
Thanks! I don't mind "combining" the tasks, but would want to keep their logic very separated in the codebase as they are similar, but very different.
I like the saying: "Write code so it can be deleted". As long as it is super easy to delete or refactor out the List or Tree task with a couple lines, I'm happy to only have 2 tasks total - dependencyGuard
and dependencyGuardBaseline
.
Good idea!
Yes, agree.
The first point is to create single tree
task for all configurations.
And after that there may be some combining of list
and tree
tasks, if it will make the code easier to read and support.
Now the separated
DependencyTreeDiffTask
instance is created for each guarded configuration.But that is not necessary, because the dependencies
tree
rendering is done byDependencyGraphsRenderer
inAsciiDependencyReportRenderer2
, that can be used with different configurations, depending on passedResolvedComponentResult
.So rendering, comparing and baselining dependencies tree for all can be performed in one single task, like for the
list
configuration inDependencyGuardListTask
.Also, depending on the code complexity, handling
list
andtask
configurations may be done in the single task, since they have a lot of similar configs and logic.