I don't know how feasible it is, but a (perhaps optional) inclusion of the functionality in https://github.com/astrieanna/TypeCheck.jl would be great!
Am 09.06.2014 um 00:46 schrieb Tony Fong <[email protected]>: > Thanks. PR created. > > I have added a few more low hanging fruits to the Lint module: > * correct line location > * detect duplicate keys in constructing Dict > * detect recycling out-of-scope local variable name inside a block. > * an heuristic attempt to detect very similarly structured consecutive > expressions and alert if the last one looks a bit more different from the > rest. > * add interface for module-specific lint > > On Saturday, June 7, 2014 11:09:32 PM UTC+7, John Myles White wrote: > Yeah, there’s some GitHub specific machinery you’ll have to learn: > https://help.github.com/articles/creating-a-pull-request > > — John > > On Jun 7, 2014, at 6:14 AM, Tony Fong <[email protected]> wrote: > >> Sorry, I just tried to go through the docs, now I'm stuck at "creating a >> pull request". I have no idea what I'm doing... >> >> On Saturday, June 7, 2014 5:48:19 PM UTC+7, Tim Holy wrote: >> Actually, I was right the first time. Needs to be registered before >> `Pkg.add("Lint")` will work. >> >> --Tim >> >> On Saturday, June 07, 2014 05:34:13 AM Tim Holy wrote: >>> Ah, it is a package already. Oops. >>> >>> --Tim >>> >>> On Friday, June 06, 2014 02:22:22 PM Tony Fong wrote: >>>> Hello, >>>> >>>> First of all, let me say it's been a real pleasure working in the Julia >>>> environment. >>>> >>>> I have been coming from a very different platform, and I noticed myself >>>> making mistakes of a certain pattern. So as a little side project, I wrote >>>> this little tool called Lint.jl that can check for some of them. >>>> >>>> It is at https://github.com/tonyhffong/Lint.jl.git >>>> >>>> I'm very new to Julia/git environment so it's a bit unpolished. But it is >>>> handy pointing out certain mechanical issues quickly. >>>> >>>> What it can find out now: >>>> - simple deadcode detection (e.g if constant-true/constant-false) >>>> - simple premature-return deadcode detection >>>> - &, | being used in a Bool context. Suggest && and || >>>> - Declared but unused variable >>>> - Using a undefined variable (not working well in macros) >>>> - Exporting non-existing symbols (not fully done yet, again due to >>>> macros) >>>> - Exporting the same symbol more than once. >>>> - Name overlap between a variable and a lambda argument >>>> - Assignment in an if-predicate, as a potential confusion with “==” >>>> - Using globals in function without declaring them (This one isn't an >>>> error, but I personally prefer explicit declaration of globals >>>> dependency >>>> >>>> inside functions for readability.) >>>> >>>> - length() being used as Bool. It'd suggest using isempty() >>>> >>>> I'd love to hear comments and feedback. Thank you for your consideration. >>>> >>>> Tony >>>> >>>> p.s. I have pointed this to base/sysimg.j. The result is illuminating (for >>>> me at least). The obviously substantial macro-related noise is a great way >>>> for me to learn what wizardry it been used for. >
