mpeterv / luacheck

A tool for linting and static analysis of Lua code.
MIT License
1.92k stars 322 forks source link

Cache makes line number mismatch #37

Closed CheyiLin closed 9 years ago

CheyiLin commented 9 years ago

Hi,

I got mismatched line number (e.g., all shows shadowing upvalue XXXX on line 7) when enabling cache. Modifying Lua files or Recreating the cache will solve this issue temporarily.

Is it a caching bug?

mpeterv commented 9 years ago

Strange, can't reproduce this myself. So if you remove .luacheckcache and then run luacheck with --cache twice, do you get two different outputs?

CheyiLin commented 9 years ago

if you remove .luacheckcache and then run luacheck with --cache twice, do you get two different outputs?

I got same output.

Maybe it was caused by luacheck upgrade? (from 0.11.0 to 56141edf0dd3eb7ad5cadd43374593c677ff71a9)

mpeterv commented 9 years ago

@CheyiLin probably, there was a fix related to caching. I'll add version number to cache to prevent this in the future.

CheyiLin commented 9 years ago

Got it, Thanks.