tonyhffong / Lint.jl

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

lintfile errors on base/expr.jl #240

Closed ikirill closed 7 years ago

ikirill commented 7 years ago

With Pkg.checkout("Lint"), I get the following error on base/expr.jl in Julia's source:

julia> Lint.lintfile("/Users/kirill/Sandboxes/github/julia/base/expr.jl")
Lint doesn't understand @nospecialize x as an argument
Lint doesn't understand @nospecialize x as an argument
Lint doesn't understand @nospecialize x as an argument
Lint doesn't understand @nospecialize vals... as an argument
Lint doesn't understand @nospecialize itrt as an argument
Lint doesn't understand @nospecialize itr as an argument
Lint doesn't understand @nospecialize item as an argument
Lint doesn't understand @nospecialize v as an argument
Lint doesn't understand @nospecialize k as an argument
Lint doesn't understand @nospecialize key as an argument
Lint doesn't understand @nospecialize default as an argument
Lint doesn't understand @nospecialize key as an argument
Lint doesn't understand @nospecialize default as an argument
Lint doesn't understand @nospecialize key as an argument
Lint doesn't understand @nospecialize key as an argument
Lint doesn't understand @nospecialize args... as an argument
Lint doesn't understand @nospecialize a as an argument
Lint doesn't understand @nospecialize a as an argument
Lint doesn't understand @nospecialize val as an argument
Lint doesn't understand @nospecialize val as an argument
Lint doesn't understand @nospecialize msg as an argument
Lint doesn't understand @nospecialize T as an argument
Lint doesn't understand @nospecialize val as an argument
Lint doesn't understand @nospecialize f as an argument
Lint doesn't understand @nospecialize args as an argument
Lint doesn't understand @nospecialize f as an argument
Lint doesn't understand @nospecialize args as an argument
Lint doesn't understand @nospecialize e as an argument
Lint doesn't understand @nospecialize e as an argument
Lint doesn't understand @nospecialize f as an argument
Lint doesn't understand @nospecialize t as an argument
Lint doesn't understand @nospecialize x as an argument
Lint doesn't understand @nospecialize v as an argument
Lint doesn't understand @nospecialize ub as an argument
Lint doesn't understand @nospecialize lb as an argument
Lint doesn't understand @nospecialize ub as an argument
Lint doesn't understand @nospecialize t as an argument
Lint doesn't understand @nospecialize f as an argument
Lint doesn't understand @nospecialize t as an argument
Lint doesn't understand @nospecialize f as an argument
Lint doesn't understand @nospecialize x as an argument
Lint doesn't understand @nospecialize x as an argument
Lint doesn't understand @nospecialize x as an argument
Lint doesn't understand @nospecialize x as an argument
Lint doesn't understand @nospecialize a... as an argument
Lint doesn't understand @nospecialize x... as an argument
Lint doesn't understand @nospecialize a as an argument
Lint doesn't understand @nospecialize a... as an argument
Lint doesn't understand @nospecialize a... as an argument
Lint doesn't understand @nospecialize ast as an argument
Lint doesn't understand @nospecialize x as an argument
Lint doesn't understand @nospecialize x as an argument
Lint doesn't understand @nospecialize x as an argument
Lint doesn't understand @nospecialize a as an argument
Lint doesn't understand @nospecialize t as an argument
Lint doesn't understand @nospecialize u as an argument
Lint doesn't understand @nospecialize u as an argument
Lint doesn't understand @nospecialize t as an argument
Lint doesn't understand @nospecialize t as an argument
Lint doesn't understand @nospecialize x as an argument
Lint doesn't understand @nospecialize f as an argument
Lint doesn't understand @nospecialize e as an argument
Lint doesn't understand @nospecialize xs... as an argument
Lint doesn't understand @nospecialize arg = nothing as an argument
Lint doesn't understand @nospecialize x = nothing as an argument
Lint doesn't understand @nospecialize x = nothing as an argument
Lint doesn't understand @nospecialize exc as an argument
Lint doesn't understand @nospecialize x as an argument
Lint doesn't understand @nospecialize x as an argument
Lint doesn't understand @nospecialize x as an argument
Lint doesn't understand @nospecialize o as an argument
Lint doesn't understand @nospecialize f as an argument
Lint doesn't understand @nospecialize o as an argument
ERROR: MethodError: no method matching getindex(::Void, ::Int64)
Stacktrace:
 [1] funcMatchesDeprecateInfo(::Array{Any,1}, ::Lint.DeprecateInfo) at /Users/kirill/.julia/v0.6/Lint/src/knowndeprec.jl:251
 [2] functionIsDeprecated(::Expr) at /Users/kirill/.julia/v0.6/Lint/src/knowndeprec.jl:206
 [3] #lintfunction#54(::Symbol, ::Bool, ::Function, ::Expr, ::Lint.LintContext) at /Users/kirill/.julia/v0.6/Lint/src/functions.jl:70
 [4] lintexpr(::Expr, ::Lint.LintContext) at /Users/kirill/.julia/v0.6/Lint/src/ast.jl:45
 [5] lintmacrocall(::Expr, ::Lint.LintContext) at /Users/kirill/.julia/v0.6/Lint/src/macros.jl:64
 [6] lintexpr(::Expr, ::Lint.LintContext) at /Users/kirill/.julia/v0.6/Lint/src/ast.jl:99
 [7] _lintstr(::String, ::Lint.LintContext, ::Int64) at /Users/kirill/.julia/v0.6/Lint/src/cli.jl:103
 [8] _lintstr(::String, ::Lint.LintContext) at /Users/kirill/.julia/v0.6/Lint/src/cli.jl:78
 [9] lintinclude(::Lint.LintContext, ::String) at /Users/kirill/.julia/v0.6/Lint/src/include.jl:19
 [10] lintdir(::String, ::Lint.LintContext) at /Users/kirill/.julia/v0.6/Lint/src/cli.jl:129
 [11] lintpkgforfile(::String, ::Lint.LintContext) at /Users/kirill/.julia/v0.6/Lint/src/cli.jl:38
 [12] lintfile(::String, ::String) at /Users/kirill/.julia/v0.6/Lint/src/cli.jl:66
 [13] lintfile(::String) at /Users/kirill/.julia/v0.6/Lint/src/cli.jl:52
julia> versioninfo()
Julia Version 0.6.0
Commit 903644385b (2017-06-19 13:05 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin13.4.0)
  CPU: Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, haswell)
TotalVerb commented 7 years ago

The deprecation stuff should probably be removed. It's causing a lot of trouble for little benefit.

ikirill commented 7 years ago

In this case, it's only because the function that parses the argument type returns nothing, it only prints a warning.