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

Lint tool to warn on using undefined variables #3817

Open
jostephd opened this issue Dec 29, 2018 · 5 comments
Open

Lint tool to warn on using undefined variables #3817

jostephd opened this issue Dec 29, 2018 · 5 comments
Labels
Enhancement Issues that are requests for new features or changes to existing ones. Low Priority Issues that will cause no meaningful problems if left unaddressed. WML Tools Issues involving WML maintenance tools.

Comments

@jostephd
Copy link
Member

Write a lint tool to catch use of undefined variables in scenarios/campaigns. This should be able to catch errors such as 15cdbe1.

Variables are sometimes defined in one scenario and used in a subsequent one.

@jostephd jostephd added Enhancement Issues that are requests for new features or changes to existing ones. WML Tools Issues involving WML maintenance tools. Low Priority Issues that will cause no meaningful problems if left unaddressed. labels Dec 29, 2018
@ProditorMagnus
Copy link
Contributor

Variable names can also be constructed dynamically.

@jyrkive
Copy link
Member

jyrkive commented Dec 30, 2018

LuaInspect may be able to do it.

@CelticMinstrel
Copy link
Member

I think the intention was regarding WML variables though...

@cooljeanius
Copy link
Contributor

Would this be a separate tool, or just an additional check added to the existing wmllint tool?

@ProditorMagnus
Copy link
Contributor

I think it will not be possible to have as static check, however it might be useful to log cases when unknown variable is read.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Issues that are requests for new features or changes to existing ones. Low Priority Issues that will cause no meaningful problems if left unaddressed. WML Tools Issues involving WML maintenance tools.
Projects
None yet
Development

No branches or pull requests

5 participants