Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let CLI tools describe their validators themselves #105

Open
ussserrr opened this issue Oct 6, 2021 · 0 comments
Open

Let CLI tools describe their validators themselves #105

ussserrr opened this issue Oct 6, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@ussserrr
Copy link
Owner

ussserrr commented Oct 6, 2021

Currently, validation process of some tool is described completely separately of its class (PlatformIO and CubeMX, Java can be treated as a part of CubeMX actually):

return ToolsValidationResults(
    Tool(name=param,
         command=config.get('app', param),
         runner=runner,
         required=required,
         logger=logger).validate()
    for param, runner, required in [
        ('platformio_cmd', platformio_runner, True),
        ('cubemx_cmd', cubemx_runner, True),
        ('java_cmd', java_runner, False)
    ])

We can define some IVerifiable interface that a tool should implement by having a tool.validator attribute which in turn absorbs all related logic. In such configuration, adding a new tool will automatically register it in the virtual "pool" of verifiable instruments.

@ussserrr ussserrr added the enhancement New feature or request label Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant