Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upGrammar compiler tweaks and improvements #4444
Conversation
lildude
added some commits
Mar 1, 2019
kivikakk
approved these changes
Mar 4, 2019
tools/grammars/compiler/loader.go Outdated
lildude
added some commits
Mar 4, 2019
lildude
merged commit 5ff272d
into
master
Mar 5, 2019
lildude
deleted the
lildude/grammar-compiler-tweaks
branch
Mar 5, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
lildude commentedMar 1, 2019
Description
In a bid to reduce the chances of missing a grammar going MIA during an update as I did with the Solidity grammar mentioned at #3973 (comment), I've made a few changes to reduce unnecessary noise that can be easily rectified from the compiler without any changes to the grammars.
Changes include:
Adding more grammar aliases for known and easily identifiable grammars, thus clearing out a few of these errors:
Adding handling for grammars that don't use standard paths for their grammars. This is mostly for very old grammars in particular hy and conllu, both of which have regularly get missed from updates without anyone noticing😱 because I regularly miss:
Adding handling for known rubbish files that the compiler picks up as grammar files and can't process:
Adding the ability to quickly and easily rebuild and test the grammar-compiler docker container locally with a single command by setting the
REBUILDenv var, eg:Adding
linguist-grammars*to the ignore list so the files created by the above command that I run for each release are ignored.So all in all, the output from
script/grammar-compiler compile -o linguist-grammarshas gone from 48 outstanding issues to 37 outstanding issues.@vmg & @kivikakk the current grammar-compiler image is a little out of date and will need updating once this PR has been merged. I'm happy to do this myself, however I don't have access to push the new image. Would one of you be able to grant me access?
Your👀 would be greatly appreciated on this PR too.
Checklist: