bug with wmlindent
Moderator: Forum Moderators
Forum rules
Before reporting issues in this section, you must read the following topic:
Before reporting issues in this section, you must read the following topic:
bug with wmlindent
Hi,
I tried to report this to http://bugs.wesnoth.org/, but it seems my gna registration email has been lost forever so perhaps that is an entirely separate bug ><
Edit: I registered a different account. Reported bug here.
I ran some of my (working, balanced) code on wmlindent and found a "end of file with nonzero indent" error, but when I cut it in half, both sides indented just fine. I removed as many balanced segments as I could until I got to a line-minimal counter example, then started removing characters. What I have here is not character minimal, but its about as small as is still intelligible.
I obtain the error from both 1.10 and 1.11 wmlindent versions, from wesnoth-1.10-tools, wesnoth-1.11-tools debian packages, the latter on rhonda.
The HEADER symbol originally corresponded to a pango formatting tag I was using.
From here:
In conclusion, I don't know how wmlindent works, but I don't think it should be doing that.
My OS:
~iceiceice~
I tried to report this to http://bugs.wesnoth.org/, but it seems my gna registration email has been lost forever so perhaps that is an entirely separate bug ><
Edit: I registered a different account. Reported bug here.
I ran some of my (working, balanced) code on wmlindent and found a "end of file with nonzero indent" error, but when I cut it in half, both sides indented just fine. I removed as many balanced segments as I could until I got to a line-minimal counter example, then started removing characters. What I have here is not character minimal, but its about as small as is still intelligible.
I obtain the error from both 1.10 and 1.11 wmlindent versions, from wesnoth-1.10-tools, wesnoth-1.11-tools debian packages, the latter on rhonda.
Code: Select all
#define NO_STRING_HEADER
"#"
#enddef
[multiplayer]
[event]
{IF_VAR side_number equals 3 (
)}
[/event]
[/multiplayer]
Spoiler:
- Running either wmlindent on the above code gives:
Code: Select all
wmlindent: "/home/chris/.local/share/wesnoth/1.10/data/add-ons/Rushed_By_Yetis/resources/graveyard/RBY_Interactive.cfg". line 9: end of file with indent nonzero.
- Removing "{IF_VAR ... )}" alleviates the error.
- Removing the # in line 2 alleviates the error.
- Removing both quotes (leaving just #) in line 2 alleviates the error.
- Getting closer to character minimal:
Is still bugged.Code: Select all
"#" [multiplayer] [event] {( )} [/event] [/multiplayer]
- Removing the parenthesis () at this point alleviates the error.
- Removing the carriage-return between the parenthesis alleviates the error.
- Removing [event] and [/event] still leaves an error.
In conclusion, I don't know how wmlindent works, but I don't think it should be doing that.
My OS:
Code: Select all
chris@Basalt /usr/share/games/wesnoth/1.10/data/tools $ cat /etc/*release*
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=14
DISTRIB_CODENAME=nadia
DISTRIB_DESCRIPTION="Linux Mint 14 Nadia"
NAME="Ubuntu"
VERSION="12.10, Quantal Quetzal"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu quantal (12.10)"
VERSION_ID="12.10"
-
- Inactive Developer
- Posts: 165
- Joined: February 4th, 2011, 6:19 am
- Contact:
Re: bug with wmlindent
In fact, this bug has been dealt with in the dev branch, unfortunately a little too late to make it into the last 1.10 and 1.11 point releases. You can get the latest wmlindent straight from Github: https://raw.github.com/wesnoth/wesnoth- ... /wmlindent
If you'd like to read the commit message, the diff is here: https://github.com/wesnoth/wesnoth-old/ ... 2a2ccdb634
If you'd like to read the commit message, the diff is here: https://github.com/wesnoth/wesnoth-old/ ... 2a2ccdb634
Ports:
Prudence (Josh Roby) | By the Sword (monochromatic) | The Eight of Cembulad (Lintana~ & WYRMY)
Resources:
UMC Timeline (Dec) | List of Unported UMC (Dec) | wmllint++ (Feb)
Prudence (Josh Roby) | By the Sword (monochromatic) | The Eight of Cembulad (Lintana~ & WYRMY)
Resources:
UMC Timeline (Dec) | List of Unported UMC (Dec) | wmllint++ (Feb)