Git Product home page Git Product logo

Comments (5)

mpeterv avatar mpeterv commented on September 15, 2024

Yes, right now inline options can be used only to remove some warnings, but not to re-add warnings removed by default. I'm not sure what's expected behaviour when std is used both inline and as an argument/in config. Probably sets of globals should be joined in that case.

from luacheck.

mwild1 avatar mwild1 commented on September 15, 2024

My expectation is that std has a set of values (none, min, max, etc.), and I expected std to be 'none' for this file, and override what was specified on the command line (or the default). Other files in the same run would be handled using the default std value.

If it helps, the root problem we are trying to solve is that luacheck does not detect:

_ENV = nil
print("hello world")

I expected that this would fix that:

--luacheck: std none
_ENV = nil
print("hello world")

from luacheck.

Zash avatar Zash commented on September 15, 2024

The goal here is to point to a line and say "Any use of a global variable below this line is an error", such as with the common pattern of putting everything you are going to use into locals at the top of the file.

from luacheck.

mpeterv avatar mpeterv commented on September 15, 2024

This should be fixed on master branch, sorry to have kept you waiting. Can you test it?

from luacheck.

Zash avatar Zash commented on September 15, 2024

Late, but yes, it seems to work. Thanks!

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.