Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve CI to check for grammar/highlighting issues #417

Closed
DaelonSuzuka opened this issue Sep 5, 2022 · 1 comment
Closed

Improve CI to check for grammar/highlighting issues #417

DaelonSuzuka opened this issue Sep 5, 2022 · 1 comment
Assignees

Comments

@DaelonSuzuka
Copy link
Collaborator

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.

@DaelonSuzuka
Copy link
Collaborator Author

DaelonSuzuka commented Sep 5, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant