Lint.jl
Lint.jl copied to clipboard
A lint tool for Julia code
Lint insists on looking for modules on the path where the downloaded packages are. Is there any way to tell it where my modules are?
It would be helpful to catch the use of `cats` inside the body of this loop: ```julia for cat in cats feed(cats) # most likely, feed(cat) was intended cats =...
I make this mistake a lot: ``` julia Base.show(io::IO, x::MyType) = print(x.data) ``` Note that should have been `print(io, x.data)`. We could warn when an IO function called within a...
#71 and #149 show that the current static-dynamic hybrid nature of Lint is troublesome. In fact, `Lint` does not work on `Currencies` at all presently, because it tries to import...
I would like to be able to ignore an error on a particular line without having to include `Lint.jl` or add more code to my src code. I propose we...
This confused a colleague of mine: `a = b,` creates a 1-element tuple in `a`. It's an easy typo to make if you're used to putting semicolons at the end...
``` julia> lintstr(""" eval(Env, :(using .\$(module_name(touse)))) """) ERROR: MethodError: Cannot `convert` an object of type Expr to an object of type Symbol This may have arisen from a call to...
```julia julia> lintstr(""" if Base.ARGS[2]=="--debug=no" const global ls_debug_mode = false elseif Base.ARGS[2]=="--debug=yes" const global ls_debug_mode = true end if !ls_debug_mode push!(LOAD_PATH, Base.ARGS[1]) end """) 2-element Array{Lint.LintMessage,1}: none:7 E321 ls_debug_mode: use...
#179 currently causes a spurious self-lint error. ``` /home/fengyang/.julia/v0.5/Lint/src/dict.jl:16 E321 lexicalfirst: use of undeclared symbol /home/fengyang/.julia/v0.5/Lint/src/dict.jl:16 E321 lexicallast: use of undeclared symbol ``` I have decided that it's best to...
The 6th line of this code code is marked with E321: area use of undeclared symbol ``` using JuMP using Ipopt m = Model(solver = IpoptSolver(max_iter=40000, print_level=1)) @variable(m, 0.15