tonyhffong / Lint.jl

A lint tool for Julia code
Other
169 stars 33 forks source link

Unable to follow non-literal include file #221

Closed musm closed 7 years ago

musm commented 7 years ago

E.g. C:\Users\Mus\.julia\v0.6\JLD\src\JLD.jl:217 I372 joinpath($(Expr(:$, :(dirname(@__FILE__())))), "JLD00.jl"): unable to follow non-literal include file This is from include(joinpath(@__DIR__, "JLD00.jl"))

which is pretty annoying since this is a common idiom

TotalVerb commented 7 years ago

I think the reason for this info is to warn you that Lint might not be able to pick up on variables/functions defined in that file. I plan to implement a better way to selectively ignore certain infos/warnings.

musm commented 7 years ago

Will https://github.com/tonyhffong/Lint.jl/pull/220 resolve the underlying issue?

TotalVerb commented 7 years ago

Unfortunately, #220 won't help if the Linter can't figure out that JLD00.jl needs to be imported. The best we can do here is silence the info, since it's questionable to be linting includes that are embedded in quotes. This won't be able to fix the undefined symbols. We might need pragmas to force Lint to read certain files.

musm commented 7 years ago

good point