Commit graph

90 commits

Author SHA1 Message Date
Eric Gallager
4915f3be86 wmlscope: fix format of magic comment in documentation
It's not just `prune`, but rather `wmlscope: prune`
2024-08-18 10:56:50 +02:00
Gunter Labes
6d6bb8dc0c
Update generator calls since the method was removed in 2413e2f 2024-06-16 21:51:16 +02:00
Toom
8da8b96b07 Set filelist parameter in CrossRefLister constructor call, fixes #7841 2024-01-19 14:20:08 +01:00
Elvish_Hunter
21bd75c12f wmlscope: allow reporting deprecated macro calls 2022-03-01 10:12:15 +01:00
Elvish_Hunter
b0d3097a62 Added --version flag to wmllint, wmlscope and wmlindent
Also made GUI.pyw report the version in the about dialog. Fixes #6346
2021-12-26 22:10:44 +01:00
max-torch
e35690c8f9 Edit wmlscope KeyboardInterrupt Displayed Message 2021-11-17 23:08:37 +01:00
Elvish_Hunter
b397ca6262 wmlscope: document external docstring directive 2021-07-04 20:51:17 +02:00
Elvish_Hunter
00a5beb5ae wmlscope: do not report 'INTERNAL:' macros in the macro reference 2021-07-04 20:51:17 +02:00
Elvish_Hunter
4be3eb580a wmlscope: never consider macro definitions as part of the file docstring 2020-11-22 10:59:02 +01:00
Elvish_Hunter
b39ca0e548 wmlscope: report optional macro arguments in HTML output 2020-11-19 11:46:55 +01:00
Elvish_Hunter
8c3ca97287 wmlscope: also report macros without documentation in HTML output 2020-11-19 11:44:52 +01:00
Elvish_Hunter
d51d389801 wmlscope: report about deprecated macros in HTML reference 2020-11-19 11:35:04 +01:00
Elvish_Hunter
ec41359368 wmlscope: detect and analyze optional macro arguments 2019-12-02 21:23:58 +01:00
Ignacio R. Morelle
57f9c3eccd wmlscope: Fix file list column layout glitches on Edge and Chrome 2017-07-23 20:21:27 -04:00
Ignacio R. Morelle
1a03a5af57 wmlscope: Update macro reference templates and emitted markup for Wesmere 2017-07-23 19:59:19 -04:00
Elvish_Hunter
d3516a1d35 wmlscope: do not read whole files at once while calculating MD5 hashes 2016-10-26 20:20:05 +02:00
aquileia
809e61db88 Python scripts: Unify encoding magic comments 2016-05-03 22:12:19 +02:00
Elvish_Hunter
9d12141ab3 changelog and documentation entries about wmlmove removal 2016-01-22 20:46:39 +01:00
Ignacio R. Morelle
851eddfd5e Restore executable bit on WML tools 2015-10-30 02:43:02 -03:00
Elvish_Hunter
2d4ef7a42d wmlscope: upgrade from optparse to argparse 2015-10-20 15:02:32 +02:00
Elvish_Hunter
1f5d713ee1 Converted wmlscope to Python 3 2015-09-24 11:40:13 +02:00
Elvish_Hunter
b3a42b4c9b wmlscope: removed dependency from Pillow library
This was possible because the documentation of the PNG format is quite clear, and the code doesn't need to check JPG images.
2015-08-25 21:12:52 +02:00
Elvish_Hunter
7fa2943683 All main WML tools: replaced tabs with spaces 2015-08-11 19:41:36 +02:00
Elvish_Hunter
b892f764a6 wmlscope: try to make the image size checks more useful 2015-08-08 20:36:53 +02:00
Elvish_Hunter
2559f97063 wmlscope: slightly improved percentage output when checking for untyped formals 2015-08-07 00:06:54 +02:00
Elvish_Hunter
63863d9f2f wmlscope: enabled image size checks
The undersized() function is supposed to warn if an image has a size below 60 x 60 pixels. I didn't manage to find any documentation about why it was commented out.
I also replaced the error message printed if the PIL library is missing with one more verbose and updated.
2015-08-07 00:04:34 +02:00
Elvish_Hunter
4d675c377f All main wml tools: used Python 3 floating point division
wmltools required integer division, so here the corresponding operator (//) is used
2015-08-06 23:49:40 +02:00
Elvish_Hunter
be62976d80 wmltools and wmlscope: fixed .keys() usages for Python 3
Most usages of the .keys() method were already safe, because they were either iterated only once, or they were wrapped in a call to sorted(), which casts them as lists
2015-08-06 23:40:48 +02:00
Elvish_Hunter
032609e782 wmlscope: clearer message when checking for duplicated files
For now, I'm keeping the MD5 hashes in the message.
2015-08-06 23:21:20 +02:00
Elvish_Hunter
6c4ceacb00 wmlscope: fixed a copy-pasting error 2015-08-05 22:13:10 +02:00
Elvish_Hunter
8c098c3264 wmlscope: refactored collision detection
This fixes the breakage caused by the Python 3 zip() function, which like all generators may be iterated only once; also, it finally returns a meaningful output, instead of the obscure list of filenames which was formerly returned
2015-08-05 20:38:49 +02:00
Elvish_Hunter
c1a783b038 all main wml tools: use filter(), map() and zip() from Python 3
The main difference is that these functions return generators instead of lists. This actually breaks wmlscope's collision detection, which will be fixed in my next commit.
2015-08-05 20:38:48 +02:00
Elvish_Hunter
6d67feff9f wmlscope and wmltools: removed calls to cmp() function
Just like the __cmp__ method, the cmp() function isn't available on Python 3
2015-08-05 20:38:48 +02:00
Elvish_Hunter
778e9296d8 wmlscope: fixed files being incorrectly opened as UTF8 instead of binary 2015-08-05 20:38:48 +02:00
Elvish_Hunter
cebfbba68e wmllint and wmlscope: fixed encoding declarations 2015-08-04 10:07:59 +02:00
Elvish_Hunter
ab88b9091f wmlscope: open files as UTF-8 and use Unicode literals 2015-08-04 10:07:58 +02:00
Elvish_Hunter
d8e69a4c40 wmlscope: used print function
This replaces usages of print >> sys.stderr adn sys.stderr.write
2015-07-30 10:51:49 +02:00
Elvish_Hunter
2dee033335 wmlscope: fixed sorted() and type() being used as variable names 2015-07-30 10:48:28 +02:00
Javier Novoa
8be183bdd9 Use with statements to open/close files on wml{indent,lint,scope}. 2015-07-27 22:15:24 -05:00
Groggy Dice
3d11b84611 wmlscope: import glob for Windows shell
The Windows cmd shell will not expand a globbed argument by default, in
fact it will make the argument invalid. Importing and utilizing the glob
module is needed for x-platform.

Globbing is especially important for breaking up the subtree, so wmlscope
doesn't give off "more than one resource/definition is visible here"
errors.
2014-08-01 06:14:00 -04:00
Groggy Dice
8e7581f593 wmlscope: fix mistakes in help and options pointed out by Elvish Hunter
See EH's forum post:

http://forums.wesnoth.org/viewtopic.php?f=10&t=40397#p570438
2014-06-10 06:09:58 -04:00
Alexander van Gessel
38b224c1ff Revert "Revert "Merge branch 'master' of github.com:wesnoth/wesnoth-old""
This reverts commit 23b72d6956.
2013-08-09 00:13:46 +02:00
Thibault Févry
23b72d6956 Revert "Merge branch 'master' of github.com:wesnoth/wesnoth-old"
This reverts commit 5fa5c03411, reversing
changes made to 06374c64ba.
2013-08-08 18:50:46 +02:00
Alexander van Gessel
d394f27afb Some python syntax updates for the WML tools 2013-07-26 15:38:05 +02:00
Elvish_Hunter
8200214e9b wmllint, wmlscope and wmlindent: fixed bug caused by Windows' command prompt appending double quotes to arguments 2013-02-23 13:04:12 +00:00
Timotei Dolean
79f2309489 add the 'Unresolved reference' in each reported line...
...instead of adding one comment
2010-08-19 20:45:11 +00:00
Eric S. Raymond
b1fe81d099 Progress option for wmlscope. 2010-07-19 15:04:06 +00:00
Eric S. Raymond
e66a6eacf6 Flag specific macro arguments that have no typechecking with suffix ? 2010-02-08 18:26:07 +00:00
Eric S. Raymond
767c75358a Typo fix. 2010-01-13 23:34:10 +00:00
Gunter Labes
5b3a5412d4 fixed listing logic 2010-01-13 09:26:00 +00:00