kernelci / kernelci-core

Core KernelCI tools
https://kernelci.org
GNU Lesser General Public License v2.1
107 stars 97 forks source link

TOML file validator #1965

Open JenySadadia opened 1 year ago

JenySadadia commented 1 year ago

As we are transiting from old .conf to .toml for user settings, add a job to run it with Github Actions that validate TOML file if it is found in the source tree.

gctucker commented 1 year ago

Probably this should be added to kernelci-core and with a kci command to run the validation? Maybe at some point we should split out the settings logic from kernelci.cli into e.g. kernelci.settings and have a kci settings tool. I think the code is a bit too intertwined right now to do all this in one go though.

JenySadadia commented 1 year ago

Probably this should be added to kernelci-core and with a kci command to run the validation? Maybe at some point we should split out the settings logic from kernelci.cli into e.g. kernelci.settings and have a kci settings tool. I think the code is a bit too intertwined right now to do all this in one go though.

Do we need a separate kci tool for this? I think make command will do.

gctucker commented 1 year ago

I think it's important for users to be able to validate the settings. A make target is just a way to invoke it and it's convenient for GitHub checks, also it's a convention to have make test commands in any software project. But we have code to load the TOML settings so if validation is done with some Python code too then it would make sense to add it there. If there's a standalone tool you want to use to just validate the TOML purely from a syntax point of view then yes, like you say we can just have a make target to invoke it.