Static WML analyser using existing engine code

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderators: Forum Moderators, Developers

Forum rules
Before posting a new idea, you must read the following:
Post Reply
Posts: 81
Joined: February 11th, 2012, 3:42 pm

Static WML analyser using existing engine code

Post by Wayirr »

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.

Posts: 503
Joined: April 24th, 2016, 4:18 pm

Re: Static WML analyser using existing engine code

Post by Tad_Carlucci »

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.
I forked real life and now I'm getting merge conflicts.

Post Reply