MaibornWolff / metric-gardener

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support mapping node types to different categories for different languages

ResistantBear opened this issue · comments

We cannot specify a mapping from one syntax node type to one category for some languages and to another category for other languages as discussed in #145 (comment). We currently do not have the issue that we have to consider a syntax node type for different things in different languages. But if this should be the case in the future, we have to implement this feature.

To support this, we would have to change the field "category" to a list of objects that contain a pair of the category name itself and a (optional) "activated_for_languages" field for this single category. We also would have to take care that we do not add multiple queries for one node type which has multiple categories when building a query that should cover the node types of more than one category, e.g. for the "complexity" metric. As that is not trivial and would negatively impact the performance, we probably should not implement such a feature now only for the case that this issue could occur in the future.

Exactly as you stated. As long as we don't have this problem we will close this. YAGNI :)