Closed RobertBerger closed 5 years ago
Do ideally in local.conf I would do something like that:
SCA_ENABLED_MODULES = ""
SCA_ENABLED_MODULES_IMAGE_PYTHON = " bandit pyfindinjection pylint "
SCA_ENABLED_MODULES_RECIPE_PYTHON = " bandit cspell pysymcheck radon rats "
SCA_ENABLED_MODULES_append = "${SCA_ENABLED_MODULES_IMAGE_PYTHON} ${SCA_ENABLED_MODULES_RECIPE_PYTHON}"
but now bandit shows up 2 times in the list - hopefully not causing any issues ;)
SCA_ENABLED_MODULES=" bandit pyfindinjection pylint bandit cspell pysymcheck radon rats "
I see. I will try to implement this.
@priv-kweihmann I am playing with it and it looks good so far.
This seems to work:
# empty the defaults
SCA_ENABLED_MODULES_IMAGE = ""
SCA_ENABLED_MODULES_RECIPE = ""
# PYTHON_STUFF:
# skip bandit for now - takes a long time: bandit
SCA_ENABLED_MODULES_IMAGE_PYTHON = " pyfindinjection pylint "
SCA_ENABLED_MODULES_RECIPE_PYTHON = " bandit cspell pyfindinjection pylint pysymcheck radon rats "
# add to system:
SCA_ENABLED_MODULES_IMAGE_append = " ${SCA_ENABLED_MODULES_IMAGE_PYTHON} "
SCA_ENABLED_MODULES_RECIPE_append = " ${SCA_ENABLED_MODULES_RECIPE_PYTHON} "
There is (at least in my head) some confusion about how to configure the beast.
Let's see my understanding:
SCA_AVAILABLE_MODULES: global list of available modules e.g. flake8 support is not yet in this list, because there are no classes yet for it. Whatever tool is in this list is going to be built.
SCA_ENABLED_MODULES: The analysis modules to be activated - different lists for images and recipes
My understanding is, that by default sca-on-image.bbclass and sca-on-recipe.bbclass are responsible for the default values.
Now my question is:"How can I from a configuration point add/remove items to/from both lists when there is a single variable (SCA_ENABLED_MODULES) available?"
Maybe different variables like SCA_ENABLED_MODULES_RECIPE, SCA_ENABLED_MODULES_IMAGE would help.