mpeterv / luacheck

A tool for linting and static analysis of Lua code.
MIT License
1.91k stars 318 forks source link

[Question] E011: Expected `do` near `B10000000` #226

Closed kylechui closed 2 years ago

kylechui commented 2 years ago

Hi there, I've written a short snippet of Lua and I can't seem to understand why luacheck keeps throwing this error on the first line:

while byte >= 0B10000000 and byte < 0B11000000 do
    pos[2] = pos[2] - 1
    byte = string.byte(M.get_line(pos[1]):sub(pos[2], pos[2]))
end

image

Any help would be appreciated, and thanks for writing such a great piece of software!

alerque commented 2 years ago

Per #198 the canonical upstream repository for this project is now https://github.com/lunarmodules/luacheck. Please close this issue (since nobody else with permissions can do so here) and copy this content to a new issue on the Lunarmodules repo. Also include the output of luacheck --version in your report.

kylechui commented 2 years ago

Ah, sorry about that. I'll do so right now