League-of-Foundry-Developers / foundryvtt-devMode

A module with some tools to help enable Foundry VTT package developers.
MIT License
12 stars 15 forks source link

Inspect template.json #25

Closed mkahvi closed 3 years ago

mkahvi commented 3 years ago

Adds simplistic template.json inspection and reporting by cross-referencing the data with itself for inconsistencies as well as making sure all the defined types are registered with Foundry.

Primarily this ends up detecting typos in template names, unused templates, and template references to non-existent ones.

Screenshot 2021-10-25 223225

Primarily this tries to inform you of bad template configuration, but it has some informative parts also.

mkahvi commented 3 years ago

I must admit I'm not 100% sure what exactly it's checking, can you write up a blurb that I can use in the release to explain it?

It mostly cross-references template.json contents around to make sure everything is used and defined, and also checks for the types to be registered into Foundry so they aren't just sitting in the template. It's possible the not being registered is intentional though. Most of this is non-critical, but it might point to some problems elsewhere.

mkahvi commented 3 years ago

I have made all the requested changes and removed the use of concat helper which doesn't exist in Foundry itself.

I also discovered the registration check was not working as intended, but now it does.

For example, here, my own system's report:
Screenshot 2021-10-28 074739 (2)

I purposefully unregistered equipment for testing, and I know pod is unregistered because it is not meant to be. The rest are actual errors I've not yet fixed.