Add builtin rule set for SILE globals #79
Merged
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.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The SILE Typesetter is a typesetting engine written in Lua — and more relevant to this PR extended in Lua. Having these globals setup in the
.luacheckrc
for the upstream project worked fine for project development, but it isn't so convenient for package developers. That only included a handful of projects until we released v0.14.0 which started supporting 3rd party addons installed via LuaRocks. Now SILE packages are starting to proliferate.I'm starting to work through what it looks like to test a 3rd party package properly, but low hanging fruit is to start by linting. Since the allowed global scope is pretty restricted this is a pretty small builtin set. Someday if upstream commits to public vs. private properties and documentation improves it could be expanded to cover more details about read/write etc., but for now just checking for global access would be nice.