# Compiler and lint errors and warnings (and emacs)

**URL:** <https://discourse.julialang.org/t/compiler-and-lint-errors-and-warnings-and-emacs/8904>\
**Category:** New to Julia\
**Created:** [February 7, 2018, 6:25pm UTC](https://discourse.julialang.org/t/compiler-and-lint-errors-and-warnings-and-emacs/8904 "2018-02-07T18:25:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![iwelch](https://avatars.discourse-cdn.com/v4/letter/i/8c91f0/32.png) [@iwelch](https://discourse.julialang.org/u/iwelch)\
**Post date:** [February 7, 2018, 6:25pm UTC](https://discourse.julialang.org/t/compiler-and-lint-errors-and-warnings-and-emacs/8904/1 "2018-02-07T18:25:29Z")

</div>

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?!

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

```

complains that

```julia
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.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [February 7, 2018, 7:59pm UTC](https://discourse.julialang.org/t/compiler-and-lint-errors-and-warnings-and-emacs/8904/2 "2018-02-07T19:59:54Z")

</div>

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

> **[GitHub - tpapp/julia-repl: Run an inferior Julia REPL in a terminal inside Emacs](https://github.com/tpapp/julia-repl)**
>
> Run an inferior Julia REPL in a terminal inside Emacs - GitHub - tpapp/julia-repl: Run an inferior Julia REPL in a terminal inside Emacs

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