Git Product home page Git Product logo

Comments (4)

mpeterv avatar mpeterv commented on August 11, 2024

Good idea, it can be applied to mutually recursive functions, too.

from luacheck.

mpeterv avatar mpeterv commented on August 11, 2024

Implemented on master branch:

Checking test.lua                                 1 warning

    test.lua:1:16: unused recursive function 'foo'

Total: 1 warning / 0 errors in 1 file

Also for mutually recursive functions:

local g

local function f()
   return g()
end

function g()
   return f()
end
Checking test.lua                                 2 warnings

    test.lua:3:16: unused mutually recursive function 'f'
    test.lua:7:10: unused mutually recursive function 'g'

Total: 2 warnings / 0 errors in 1 file

from luacheck.

bjorn avatar bjorn commented on August 11, 2024

That's really nice that you even take into account mutual recursive functions!

I'm starting to be scared of writing Lua code without luacheck. It prevents so many errors from showing up at runtime and it really helps making sure you're cleaning up any "garbage" while refactoring. Thanks a lot for this tool!

from luacheck.

mpeterv avatar mpeterv commented on August 11, 2024

No problem, thanks for ideas! 0.14.0 released.

from luacheck.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.