Compiler and lint errors and warnings (and emacs)


Dear juliaxperts—

I am (an ancient) emacs user. the good news is that emacs24 has a julia mode. the bad news is that emacs does not seem to understand the error message locations that the julia compiler emits. is there a way to change the format of the compiler errors or to help emacs understand the existing ones?

is there a way to invoke the compiler and/or julialint from the command line (which then allows me to do this from within emacs)? I could write a script that would allow something like .julia mylinter.jl myprogram.jl where mylinter reads the command line argument and then runs lintfile() on it.

julialint seems to have some issues in 0.6.2. it emits a good number of deprecated error messages, which is a little ironic for a tool that exists to clean code. (I am not complaining. julia is not even at 1.0 yet. It is just an observation.)

I am guessing the following are false positive, because I think this is how it is supposed to be done?!

@everywhere function longerfun(x::Int64)::Float64 log(1.0+x); end#function
x= longerfun(2) . ## globals cannot have types

complains that

timings3.jl:5 E131 longerfun(x::Int64): Lint does not understand argument #1
timings3.jl:6 E321 x: use of undeclared symbol
timings3.jl:7 E321 longerfun: use of undeclared symbol

are there other julia code analysis or warning tools? I am particularly interested in tools that tell me when I use globals inside functions, when I have (sometimes mis-spelled) variables without declarations and initializations [I prefer every variable to be type-declared and initialized upon creation whenever reasonable), and/or when I messed up and created a type-variable function.


I have a minor mode for interacting with the REPL in Emacs that, among other things, makes locations “clickable”:

But emacs24 is really ancient, you should upgrade to at least 25.2.