Find globals with LuaJIT (Linux, probably Mac too)

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
raidho36
Party member
Posts: 1804
Joined: Mon Jun 17, 2013 12:00 pm

Re: Find globals with LuaJIT (Linux, probably Mac too)

Post by raidho36 » Tue Jun 11, 2019 9:21 pm

Karai17 wrote:
Tue Jun 11, 2019 4:07 pm
the underscore method is idiomatic Lua
It is, but it's not optional which makes it not fine.

User avatar
Karai17
Party member
Posts: 879
Joined: Sun Sep 02, 2012 10:46 pm

Re: Find globals with LuaJIT (Linux, probably Mac too)

Post by Karai17 » Wed Jun 12, 2019 2:16 am

It is absolutely optional, you can ignore the linter. The linter's job is to help you write idiomatic code. If you don't want to, then don't use a linter or just ignore the rules you don't care to follow. At no point does luacheck change your code, it only informs you of issues it finds.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+

Dev Blog | GitHub | excessive ❤ moé

User avatar
raidho36
Party member
Posts: 1804
Joined: Mon Jun 17, 2013 12:00 pm

Re: Find globals with LuaJIT (Linux, probably Mac too)

Post by raidho36 » Wed Jun 12, 2019 11:14 am

Karai17 wrote:
Wed Jun 12, 2019 2:16 am
It is absolutely optional, you can ignore the linter. The linter's job is to help you write idiomatic code. If you don't want to, then don't use a linter or just ignore the rules you don't care to follow. At no point does luacheck change your code, it only informs you of issues it finds.
Not handling unused variables in an exact and very specific, arbitrarily decided way the linter prescribes it, is not a thing to be reported as an issue. It's as if a C++ linter enforced that each bracket must be on a newline and threw warnings otherwise. It is idiomatic but it's in no way a "correct and only fashion" to write code. It's just bad design, and the reasons why it's made like that are less of a reasons and more of an excuses; one should be fixing problems instead of finding justifications for their existence - my 2 cents.

Post Reply

Who is online

Users browsing this forum: 4vZEROv and 5 guests