Commit graph

2674 commits

Author SHA1 Message Date
Slayer95
2413e2f366
Improvements to wmltools3 (#7561)
* 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.
2023-05-01 17:08:30 +02:00
Pentarctagon
a45ca3f771 1.17.16+dev 2023-04-22 22:35:35 -05:00
Pentarctagon
9909f5910d 1.17.16 2023-04-22 22:34:20 -05:00
Pentarctagon
d67ab41a39 1.17.15+dev 2023-04-15 20:04:03 -05:00
Pentarctagon
f27b4f1bfc 1.17.15 2023-04-15 20:03:24 -05:00
Elvish_Hunter
242a9874c8 wesnoth_addon_manager: removed unused --color switch 2023-04-07 22:03:56 +02:00
Elvish_Hunter
f0413a1172 wesnoth_addon_manager: exit gracefully when removing a non-existing add-on 2023-03-21 23:21:09 +01:00
Pentarctagon
baf5d105a6 1.17.14+dev 2023-03-18 21:49:52 -05:00
Pentarctagon
f4ac9e03de 1.17.14 2023-03-18 21:48:59 -05:00
Elvish_Hunter
b41bb0249f wesnoth_addon_manager: added --version flag 2023-03-17 11:00:02 +01:00
Elvish_Hunter
390f21c872 wesnoth_addon_manager: added new --terms flag (prints the server upload terms) 2023-03-17 10:52:20 +01:00
Elvish_Hunter
becf628198 wesnoth_addon_manager: added IPv6 support 2023-03-12 10:16:01 +01:00
Elvish_Hunter
7e67bc5d08 wesnoth_addon_manager: added SSL/TLS support 2023-03-11 19:55:58 +01:00
Gunter Labes
13f87fdebb
Ignore lines with a " before the first = as well 2023-03-10 15:10:29 +01:00
Gunter Labes
5e45184480
Remove bogus single quote handling 2023-03-10 15:08:35 +01:00
Elvish_Hunter
c78cc7a2b0 wmlindent: don't begin string concatenation if the line is commented out
Fixes a bug reported by Toranks.
2023-03-10 10:51:29 +01:00
Elvish_Hunter
5f0b4178a7 wesnoth_addon_manager: warn and exit if a deactivated server is used 2023-03-10 00:08:54 +01:00
Elvish_Hunter
88fb94289c wesnoth_addon_manager: don't upload old-style add-ons
Fixes #7431.
2023-03-09 23:12:49 +01:00
Elvish_Hunter
841b42d26c wesnoth_addon_manager: update another deprecated method 2023-03-09 22:37:59 +01:00
Elvish_Hunter
1aac405869 wesnoth_addon_manager: update a deprecated method 2023-03-09 20:48:32 +01:00
Steve Cotton
f1ba89ec6d Fix mixed indents in the schema, and verify new additions
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.
2023-03-02 15:34:41 +01:00
Pentarctagon
c9eae7c35b 1.17.13+dev 2023-02-19 22:08:57 -06:00
Pentarctagon
113056c9e1 1.17.13 2023-02-19 22:08:56 -06:00
Elvish_Hunter
59b6049f9f wmlxgettext: always use Unix file paths in .pot files
Fixes #7380.
2023-02-16 23:28:05 +01:00
Tahsin Jahin Khalid
4d092347db unit_tree: comment out [advancefrom] 2023-02-12 10:11:45 -06:00
Tahsin Jahin Khalid
2cd0e5db03 unit_tree: add missing defines 2023-02-12 10:11:45 -06:00
Steve Cotton
49ebbb9709 Make fix_whitespace complain about mixing tabs and spaces
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.
2023-02-05 02:22:53 +01:00
Jason Stephenson
bce0493f03
Fix #7337: Byte Compiler Warnings for wesnoth-mode (#7338)
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.
2023-01-29 12:14:59 -05:00
Steve Cotton
1640076dc4 Make the CI check the indent on most of the unit tests
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
2023-01-20 02:28:54 +01:00
Pentarctagon
20c38a08e9 1.17.12+dev 2023-01-14 18:31:58 -06:00
Pentarctagon
b08582209b 1.17.12 2023-01-14 18:27:55 -06:00
Elvish_Hunter
d4c8d08064 wmllint: improve [campaign] rank= validation message 2022-12-30 23:33:59 +01:00
Elvish_Hunter
c1a074ea41 wmllint: validate values of [campaign] rank= 2022-12-30 22:49:36 +01:00
Toom
07dc953875
Escape < and > even if only one of them exists or if found multiple times (#7154)
* 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&gt;example with only < one side"

* Escape < and > even if found multiple times
2022-12-20 20:07:17 +01:00
Gunter Labes
2b47e63e8b
wmlunits: ignore a dependency on the addon itself 2022-12-19 16:16:35 +01:00
Pentarctagon
ec05dcd06d Wesnoth 1.17.11+dev. 2022-12-17 19:15:04 -06:00
Pentarctagon
ba8227e994 Wesnoth 1.17.11. 2022-12-17 19:14:04 -06:00
Pentarctagon
6c7dd0a25b 1.17.10+dev. 2022-11-19 23:38:26 -06:00
Pentarctagon
79b2385140 1.17.10. 2022-11-19 23:38:25 -06:00
Wedge009
26adbf4416 wmllint: As requested, adding recognition of WebP image labels.
Extension of #7079.
2022-11-03 11:26:30 +11:00
Wedge009
2010ffdbba
wmllint: Ignore labels for translation if a PNG extension is found (#7079)
* wmllint: Ignore labels for translation if a PNG extension is found.

Resolves #6995.
2022-11-03 11:16:37 +11:00
Dou1622
a667740fe5
Fix wmllint translation mark errors (#6966)
* 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>
2022-11-01 13:40:49 +11:00
Pentarctagon
5700e96a59 1.17.9+dev. 2022-10-15 21:09:26 -05:00
Pentarctagon
6682ef8ab8 1.17.9. 2022-10-15 21:09:25 -05:00
Tahsin Jahin Khalid
fde3c8df29 wmllint: add terrain code updaters
Allows updating maps by wmllint. Accommodates #7042
2022-10-10 21:47:42 +08:00
Pentarctagon
490434bc3c 1.17.8+dev 2022-09-18 23:20:45 -05:00
Pentarctagon
3b2cf63779 1.17.8 2022-09-18 23:19:48 -05:00
Steve Cotton
a2747cc651 wmllint: stop adding wesnoth-icon.png to messages
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.
2022-08-31 21:27:15 +02:00
Pentarctagon
5549900c96 1.17.7+dev 2022-08-20 19:55:18 -05:00
Pentarctagon
8a4ff22985 1.17.7 2022-08-20 19:55:18 -05:00