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

Add support for custom operators (like those in the Playdate SDK)? #53

Open
bedinotti opened this issue Mar 16, 2022 · 1 comment
Open
Labels
help wanted Extra attention is needed

Comments

@bedinotti
Copy link

Hey there. The Playdate SDK uses Lua and adds a handful of additional assignment operators, like += and -= that aren't present in the normal Lua language.

I'd love to be able to run luacheck on my Playdate lua code. When I do that now with one of these custom operators (In the example below, +=), luacheck (rightly) gives me an error:

CleanShot 2022-03-15 at 19 56 10@2x

Can you please add a way to specify that these operators are not actually errors, maybe in the .luacheckrc file? Or maybe even just a way to specify that this error should be ignored when encountering these operators?

Thanks!

@alerque
Copy link
Member

alerque commented Mar 25, 2022

Ignoring this syntax error would probably open up a whole kettle of fish where random other mistakes would get through. But exposing the list of valid operators is such a way that it would be possible to add an operator via the RC file might be feasible. I only skimmed the relevant code but it doesn't look impossible to me.

I don't have the time to hack on it right now but I'd be willing to review and facilitate a PR if anybody else wants to contribute this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Development

No branches or pull requests

2 participants