@b4n commented on this pull request.
LGTM, apart possibly the inline comments.
Sad we have to do that in several functions, but makes sense.
> + kindDefinition *def;
+
+ if (lang == TM_PARSER_NONE)
+ return "unknown";
+
+ def = getLanguageKindForLetter(lang, kind);
Maybe something like this to avoid repeating the fallback value?
```suggestion
kindDefinition *def = NULL;
if (lang != TM_PARSER_NONE)
def = getLanguageKindForLetter(lang, kind);
```
> + kindDefinition *def;
+
+ if (lang == TM_PARSER_NONE)
+ return '-';
+
+ def = getLanguageKindForName(lang, name);
Ditto here, maybe:
```suggestion
kindDefinition *def = NULL;
if (lang != TM_PARSER_NONE)
def = getLanguageKindForName(lang, name);
```
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3865#pullrequestreview-2068531076
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/pull/3865/review/[email protected]>