Static WML analyser using existing engine code
Moderator: Forum Moderators
Forum rules
Before posting a new idea, you must read the following:
Before posting a new idea, you must read the following:
Static WML analyser using existing engine code
Some tools for static WML analysis, such as wmllint and wmlscope exist, but they have to keep up with engine changes, basically implementing some sort of WML parsing from scratch.
Wesnoth engine does already expose some capabilities such as spitting out pre-processed WML and map screenshots.
How hard would it be to make engine load an add-on and report all missing image/sound/unit-id/etc references and undefined macros in same time instead of waiting until image or sound actually appears in a game in progress?
Advantage of this compared to tools in data/tools is that it would use same interpretation of WML and data path as game in progress, so it will generate much less or no false positives and false negatives.
Wesnoth engine does already expose some capabilities such as spitting out pre-processed WML and map screenshots.
How hard would it be to make engine load an add-on and report all missing image/sound/unit-id/etc references and undefined macros in same time instead of waiting until image or sound actually appears in a game in progress?
Advantage of this compared to tools in data/tools is that it would use same interpretation of WML and data path as game in progress, so it will generate much less or no false positives and false negatives.
-
- Inactive Developer
- Posts: 503
- Joined: April 24th, 2016, 4:18 pm
Re: Static WML analyser using existing engine code
The engine should be doing all that, already. You might have to check the console, or enable some options. If it's not, bugreport the omission.
The reason for the external static analyzers is to avoid the slowness and overhead of loading the entire game simply to check that all resources have been properly included.
The reason for the external static analyzers is to avoid the slowness and overhead of loading the entire game simply to check that all resources have been properly included.
I forked real life and now I'm getting merge conflicts.