fortify / fcli

fcli is a command-line utility for interacting with various Fortify products
https://fortify.github.io/fcli/
Other
27 stars 16 forks source link

Refactor `ActionRunner` #544

Open rsenden opened 1 month ago

rsenden commented 1 month ago

The ActionRunner class is now one big class with some inner classes for handling top-level action elements like parameters or steps. This makes the class fairly difficult to navigate and maintain. Ideally, this class should be structured in the same way as the action model classes, with a separate class handling each individual step type for example.

In the current implementation, we use instance fields to store data relevant for all step types, so we'd need to refactor this to easily access this data from the various classes in the action runner class structure. For example, we could have an ActionContext object that allows for accessing localData, parent contexts and utility methods; this object would then be passed around to the various methods (or constructors) for each of these 'step handlers'.