You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Syntax highlighting and grammar files currently have no automated checking of any kind.
Proposed solution
Find or build an automated test system for language grammars and syntax highlighting.
Actually testing the output of the syntax highlighting sounds ridiculously difficult and/or tedious, but effort on #415 and #416 has revealed a process we can use that's at least better than nothing.
The Linguist tool has a process for compiling VSCode grammars that validates them syntactically. This process is outlined here.
I think the full process is probably not appropriate for our CI, because I had to run their bootstrap script, which downloads several hundred grammars from the internet, and then manually replace the grammar files it downloads from (presumably) our master branch with the grammar files that I'm trying to test.
I'll investigate stripping down their setup scripts to make a smaller testing tool, or making a new tool using the same process but just targeting one folder of grammar files.
The text was updated successfully, but these errors were encountered:
I found a tool for testing TextMate grammars here. This looks relatively janky/tedious, but if it works it's worth looking in to.
Additionally, Linguist contains links to many other projects that maintain grammars. It seems likely that one or more of those projects have dealt with this issue and have a solution we can steal use.
Godot version
n/a
VS Code version
n/a
Godot Tools VS Code extension version
n/a
System information
n/a
Problem statement
Syntax highlighting and grammar files currently have no automated checking of any kind.
Proposed solution
Find or build an automated test system for language grammars and syntax highlighting.
Actually testing the output of the syntax highlighting sounds ridiculously difficult and/or tedious, but effort on #415 and #416 has revealed a process we can use that's at least better than nothing.
The Linguist tool has a process for compiling VSCode grammars that validates them syntactically. This process is outlined here.
I think the full process is probably not appropriate for our CI, because I had to run their bootstrap script, which downloads several hundred grammars from the internet, and then manually replace the grammar files it downloads from (presumably) our master branch with the grammar files that I'm trying to test.
I'll investigate stripping down their setup scripts to make a smaller testing tool, or making a new tool using the same process but just targeting one folder of grammar files.
The text was updated successfully, but these errors were encountered: