* wmltools3: Make the CrossRef class iterable
Removes generator() method.
* wmltools3: Check for warn level on lack of wmlscope: set export
* wmltools3: Support passing a list of file paths to initialize CrossRef
* wmltools3: Track lineno_end for Reference
* wmltools3: Track default values for macro optional parameters
optional_args is no longer a list, but a dict.
* wmltools3: Track macro bodies as Reference.body
* wmltools3: Register quoted macro arguments verbatim
* wmltools3: Improve parse_macroref
- Support parsing nested macro calls.
- Remove excessive need of parens around macro calls/arguments.
- Support escaping quotes.
- Other compliance improvements.
This uses tabs instead of spaces, because although that's not our coding
standard, it is only a few lines of changes.
The alternative of running wmlindent on these files changes 4700 lines.
Ensures that files either use tabs for indentation or spaces for indentation,
but don't switch between the two within the same file.
This doesn't fix the whitespace, it's a simple check to flag it up
on the assumption that it's better to use an editor or code formatter
to clean up the file.
Elsewhere in the CI we use the luacheck tool - while that can detect
mixing tabs and spaces in a single line's indent, it doesn't check for
inconsistent indentation within a file.
Switch from obsolete Emacs Lisp functions to modern functions in order
to remove two compiler warnings.
Properly quote lambdas with #' to remove two more compiler warnings.
There were two `--exclude` statements both pointing at the data/test
directory before, which was a trivial bug.
Exclude cve_tests because of the binary file that's masquerading as a .cfg;
I think it's correct to exclude the whole directory because any new tests
added there might also use weird edge cases in the parsing.
Exclude lua_tests as a "keep this PR small" thing. We should fix the bugs in
wmlindent, but I don't want to take on that work.
The exclusion of TerrainWML is again because I don't want to take on the work
of working out whether it's problems with terrain masks or bugs in wmlindent.
Most of the files in those directories wouldn't be changed, the ones that would
(or would trigger an error about not being valid UTF-8 ) are:
* data/test/scenarios/cve_tests/test_cve_2018_1999023_2.cfg
* data/test/scenarios/lua_tests/functional/lua_functional.cfg
* data/test/scenarios/lua_tests/wesnoth/map/mapgen_filter.cfg
* data/test/scenarios/wml_tests/TerrainWML/test_terrain_mask.cfg
* Escape < and > even if only one of them exists
In python negative index counts from the end, so without this change or another solution
"example with only < one side" would be converted to
"example with only < one sid>example with only < one side"
* Escape < and > even if found multiple times
* Fix wmllint translation mark errors
* Added wesnoth-help domain
* Try to give better labels for the WC map generator settings which are now marked for translation.
Co-authored-by: Wedge009 <wedge009@wedge009.net>
We're had at least two people look at the "good first issue" list, pick up
the wmllint warnings, open a PR, and then get a response that these .pngs
shouldn't be added by default. That's not a welcoming introduction.
IIRC we didn't get full consensus that these should never be added, but I
think it's time to open a "just drop that code, no options" PR. If someone
wants it back in a subset of circumstances, they can always create a PR to
readd it along with adding an option to enable it.