bmwcarit / Emma

Emma Memory and Mapfile Analyser. (Repo marked private after security audit. Contact Marian Kneer for details)
GNU General Public License v3.0
4 stars 0 forks source link

Change categorisation (keywords) strategy #26

Closed holzkohlengrill closed 3 years ago

holzkohlengrill commented 4 years ago

Description

This is relatively dangerous (file `Emma/emma_libs/categorisation.py`): ```python3 def __evalCategoryOfAnElement(nameString, categories, categoriesKeywords, keywordCategorisedElements): """ Function to find the category of an element. First the categorisation will be tried with the categories file, and if that fails with the categoriesKeywords file. If this still fails a default value will be set for the category. If the element was categorised by a keyword then the element will be added to the keywordCategorisedElements list. ... """ ``` Also, the `*Keywords.json` files should only be loaded/used when the command line flag is set. ## Expected behaviour

Don't use the keywords fallback for a normal analysis an instead print a info or weak warning to std out that a category ist not in the configuration. If the categorisation file is empty skip the print to std out and display a general weak warning that categorisation is not configured.