This option is pretty similar in effect to -v -v. Particularly now that
some new switches have been added recently, the clutter makes it no
longer worth keeping around.
A comment notes the option's disappearance, in case anyone wonders what
happened to it or how to get the same functionality.
Going back through wmllint's history, it turns out that there apparently
haven't been any "experimental conversions" since 1.4. Especially since
some new switches have been added recently, the clutter makes it no longer
worth keeping around.
A comment notes the option's disappearance, in case anyone is interested
in recreating experimental conversions again.
Per discussion with Elvish Hunter on the forum. Having dryrun check for a
minimum verbosity level during the options for loop meant that -vd would
set the verbosity level to 1, while -dv would set it to 2.
Those who are updating from old UMC may otherwise be caught unawares by the
change from defaulting to side 1 when the side key is missing, to all
sides. Later we will have an option to turn off this warning.
Since the insertion of an attribute line is now commented out, it may be
questioned whether this still belongs in hack_syntax. However, at some
point the plan is to give users an option to insert the side= key.
Those who are updating from old UMC may otherwise be caught unawares by the
change from defaulting to side 1 when the side key is missing, to all
sides. Later we will have an option to turn off this warning.
There seems no particular reason to require that this magic comment be at
the very beginning of the line, so why not switch from re.match to
re.search.
Also, update comments to reflect the fact that UtBS no longer uses this
magic comment.
A suggestion has been made to get rid of this magic comment now that UtBS
is no longer using it, but it may still be in use in some UMC somewhere.
Adds a text transform step for the aliasof attribute under
[terrain_type] accounting for several changes to base terrain aliasing
in Wesnoth 1.11.8 and 1.11.9, including:
* 10854d4802 and related commits
* c25849b7ea (Vit -> Vt in 1.11.9)
Just like usual terrain string conversions, this step can be disabled
for a specific line using # wmllint: noconvert.
Keys from the dictionary of stored units are removed as the unit is
unstored or its variable cleared. However, I found that one character in
Legend of Wesmere, Urudin, is stored but apparently never unstored/cleared.
I figure it's best to report such cases.
This message does not include helpful information like the filename,
because that data was never stored in the dictionary. The dictionary was
designed on the presumption that all entries would have a matching unstore/
clear event, and I didn't think of this warning until I saw there was an
anomalous case. Those who get this error will just have to use grep!
This required care to:
* not add ids inside [not] tags
* remove items from dictionary not just when unstored, but when
clear_variable is used
* handle comma-separated values
I actually thought this was already checked by the "unknown 'xx' referred to
by id" warning. Probably because many more [message]s used to use id= and
role= rather than speaker=.
As a side effect, this new error will force designers to use my 'who' and
'whofield' magic comments!
The tags are now tested directly, rather than as a parent of a key. The old
test was probably not missing tags like the test for illegal child of [if]
did, because [part] could be anywhere in ancestors. Anyway, [part] rarely
contains other tags.
Previously, only lines that parse_attribute could process got passed to
local_sanity_check. So tags survived as ancestors of attribute lines, but
the lines with the tags themselves got discarded. Hence, the "illegal child
of [if]" error was actually triggered by attributes, and the line number
referred to that line rather than the child tag.
While working on [aspect] and [facet] (which originally preceded this commit),
I changed the TypeError exception to pass all lines to local_sanity_check. This
allows for a direct test of the child tags. It turns out many child tags were
not tested because all the attributes were nested deeper inside other tags,
so that the child tag was not the parent of any attribute.
Two core macros failed the new test with the tags [filter_second] and
[filter_second_attack]. This pointed up the fact that these were not in the
list of valid child tags.
It also turns out that tags inside #ifdefs didn't fit the original test,
because "#ifdef" was considered an ancestor, interrupting the link between
"[if]" and the child tag.
Previously, the string only needed to match part of the macro. However, this
left too much room for unintended matches. This change is also quicker for
wmllint to process.
This moves the after the fall schedule into core to grant that the
debian package wesnoth-editor does not depend on wesnoth-utbs.
Also, the images now life in their own subdirectories.
Wmllint has been updated to take care about the changed paths.
Although we can now auto-recognize characters in the core NAMED_*UNIT macros,
campaigns may have their own recruit/recall macros. This comment will tell
wmllint which field contains the macro's id.
The basic format is 'wmllint: whofield <macro> <num>'. This commit sets up the
dictionary, the next commit will actually parse the macros. It will explain
more details about how to use this magic comment in wmllint's introduction.
Although this is not a core macro (yet - I've been meaning to ask why Wesnoth doesn't have core recall macros), it is used in many UMC projects in a consistent format, making it a de-facto standard. Test that the macro has only one field, to make sure it isn't deviating from the format.
If we have a regex match for the macro, we parse it and see if it meets key tests:
* There are at least 7 arguments parsed (NAMED_UNIT can have extra WML).
* The original regex could also match UMC macros, like "Attack of the Western Cavalry"'s NAMED_SHIP_UNIT. To make sure that such macros are following the format of the core macros, we check that the side, x, and y fields are numbers, or variables/macros consistent with those fields.
* Also make sure that the id field isn't blank. Not only would adding an empty id to the list of present characters be pointless, that list is added to spellings, and zero-length entries crash the spell-check.
If all those tests are passed, we append the id argument to the list of the present.
I also tweak the wording in the intro about the "wmllint: recognize" magic comment to reflect that wmllint is now recognizing ids in some macros.