Coder Social home page Coder Social logo

Linter throwing Panic about exportloopref HOT 7 CLOSED

kyoh86 avatar kyoh86 commented on May 29, 2024
Linter throwing Panic

from exportloopref.

Comments (7)

kyoh86 avatar kyoh86 commented on May 29, 2024 1

@kud202 @HirdrWit
Sorry for late.
It's fixed in v0.1.11

from exportloopref.

kyoh86 avatar kyoh86 commented on May 29, 2024

Give me a code to reproduce it.

from exportloopref.

kud202 avatar kud202 commented on May 29, 2024

@kyoh86 I ran into this, here's a minimal test case I could form:

https://github.com/kud202/testExportRef

from exportloopref.

kud202 avatar kud202 commented on May 29, 2024

It looks like Obj is nil for some reason when the variable is defined outside the file:

https://github.com/kyoh86/exportloopref/blob/main/exportloopref.go#L301

from exportloopref.

kyoh86 avatar kyoh86 commented on May 29, 2024

Sorry for late. I cannot check it out up to 2 weeks ahead.

from exportloopref.

kud202 avatar kud202 commented on May 29, 2024

No problem, take a look when you are free.

Also, after looking at it a bit more, I think it might be safe to do a just a nil check there. I can PR that. Because from what I can tell that value is only nil if the variable if A] there is a syntax error and B] the variable is defined outside the file. In either case, it cannot be a local variable, so it might be safe to return false in the function if that value is nil.

But I hope you get it eventually 👍

from exportloopref.

kud202 avatar kud202 commented on May 29, 2024

Thanks !

from exportloopref.

Related Issues (14)

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.