linguist
linguist copied to clipboard
Improve Game Maker Language file detection for those generated by GM Studio 2.3
Describe the enhancement
The logic currently used for matching Game Maker Language studio .yy
and .yyp
files don't match the newer format used by Game Maker Studio 2.3 and aren't hiding them or marking them as JSON:
Detecting as generated:
https://github.com/github-linguist/linguist/blob/916bd8f3df802fa98b0ea85539e67bd0b88ef158/lib/linguist/generated.rb#L672-L683
Detecting them as JSON:
https://github.com/github-linguist/linguist/blob/916bd8f3df802fa98b0ea85539e67bd0b88ef158/lib/linguist/heuristics.yml#L810-L814
This results in files with this extension being identified as Yacc.
From a naïve perspective (I know nothing about GML), it appears we can fix this by looking out for "resourceType": "GM*
in these two locations too.
Until this is implemented, the effect of the above can be acheived by adding the following override to repositories:
*.yy linguist-language=JSON,linguist-generated
/cc @kt-altyn @RobQuistNL
your assumptions seem to be correct, I've seen that resourceType
pointer around everywhere too.
EDIT: It might be that GMStudio 2.3 changed "modelName" to "resourceType", then it might be an easy fix.