SpyglassMC / Spyglass

Development tools for vanilla Minecraft: Java Edition data pack developers.
https://spyglassmc.com
MIT License
316 stars 32 forks source link

Show error instead of warning when an incorrect tag entry is present #1600

Open Ellivers opened 1 month ago

Ellivers commented 1 month ago

Currently, Spyglass shows a warning for nonexistent entries in tags, despite Minecraft showing an error for it and failing to load the tag.

image image

This applies to all tags, not just function tags.

misode commented 1 month ago

I don't think we're going to change this. The undeclaredSymbol linting rule is a warning by default, mostly because it is not a syntax error and because there are some occations where this is not a problem (using a #c:something tag, referencing symbols from a dependency, other pack, or mod)

Ellivers commented 1 month ago

In this case, it's pretty much a syntax error. Would it be possible to handle tags differently compared to other places where undeclaredSymbol is used?

misode commented 1 month ago

@Ellivers I don't immediately see why tags should be handled differently. It is possible to manually configure this linting check to emit an error, see https://spyglassmc.com/user/lint/undeclaredSymbol