# ANN: linter-julia plugin for Atom / Juno

**URL:** https://discourse.julialang.org/t/ann-linter-julia-plugin-for-atom-juno/2118
**Category:** Community
**Tags:** package, announcement, lint
**Created:** [February 15, 2017, 12:48pm UTC](https://discourse.julialang.org/t/ann-linter-julia-plugin-for-atom-juno/2118 "2017-02-15T12:48:32Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Tero\_Frondelius](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tero_frondelius/32/7629_2.png) [@Tero\_Frondelius](https://discourse.julialang.org/u/Tero_Frondelius)
#### Post date: [February 15, 2017, 12:48pm UTC](https://discourse.julialang.org/t/ann-linter-julia-plugin-for-atom-juno/2118/1 "2017-02-15T12:48:32Z")

</div>

# linter-julia

=========================

This linter plugin for [Linter](https://github.com/AtomLinter/Linter) provides an interface to [Lint.jl](https://github.com/tonyhffong/Lint.jl). It will be used with files that have the “Julia” syntax.

 ![](https://global.discourse-cdn.com/julialang/original/3X/4/0/4096b30ffae4facf7df7391d4306f2d1eaed1cf8.gif)

## Installation

Install package through Atom or use CLI:

```bash
$ apm install linter-julia

```

In order to use this package, you will need to install Julia and Lint.jl  
(version 0.2.6 or higher).  
To get Julia see: [Installing Julia](http://julialang.org/downloads/) and to get Lint.jl  
see: [GitHub - tonyhffong/Lint.jl: A lint tool for Julia code](https://github.com/tonyhffong/Lint.jl#installation)

Before [Lint.jl version 0.2.6 is released](https://github.com/tonyhffong/Lint.jl/releases),  
you will need to do `Pkg.checkout("Lint")` after `Pkg.add("Lint")` command.  
This will use the latest development version of the Lint.jl package.  
After the version 0.2.6 is realeased, you can do `Pkg.free("Lint")`.

## Features v"0.2.1"

- By default linter-julia uses Juno’s julia
- User can give path to the julia, which they want to use for Linting

Issues and pull request are welcome.

> **[GitHub - AtomLinter/linter-julia: This linter plugin provides an interface to...](https://github.com/AtomLinter/linter-julia)**
>
> This linter plugin provides an interface to Lint.jl.

Edit: won’t work on Windows environment. Follow it [here](https://github.com/TeroFrondelius/linter-julia/issues/16) and [here](https://github.com/tonyhffong/Lint.jl/issues/170).

---

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [February 15, 2017, 2:58pm UTC](https://discourse.julialang.org/t/ann-linter-julia-plugin-for-atom-juno/2118/2 "2017-02-15T14:58:58Z")

</div>

Hey, this is great!

Would you mind making a PR to the JunoDocs for how to install the linter, and maybe how to use/tweak it?

[https://github.com/JunoLab/JunoDocs.jl](https://github.com/JunoLab/JunoDocs.jl)

You can probably start a new page on extensions: I hope this is just the first of many.

---

<div class="post-metadata">

### Author: ![Tero\_Frondelius](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tero_frondelius/32/7629_2.png) [@Tero\_Frondelius](https://discourse.julialang.org/u/Tero_Frondelius)
#### Post date: [February 15, 2017, 3:19pm UTC](https://discourse.julialang.org/t/ann-linter-julia-plugin-for-atom-juno/2118/3 "2017-02-15T15:19:03Z")

</div>

> [@ChrisRackauckas](#):
>
> Would you mind making a PR to the JunoDocs for how to install the linter, and maybe how to use/tweak it?

Yes, I will. I made an issue of it [PR to the JunoDocs for how to install the linter, and maybe how to use/tweak it · Issue #17 · AtomLinter/linter-julia · GitHub](https://github.com/TeroFrondelius/linter-julia/issues/17)  
First I will try to get it working on Windows.

---

<div class="post-metadata">

### Author: ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)
#### Post date: [February 16, 2017, 5:56pm UTC](https://discourse.julialang.org/t/ann-linter-julia-plugin-for-atom-juno/2118/4 "2017-02-16T17:56:52Z")

</div>

I have installed the package through Atom on a Mac and done `Pkg.checkout("Lint")`, but I don’t see any linting information. Is there something else that needs doing?

```julia
julia> versioninfo()
Julia Version 0.5.0
Commit 3c9d753 (2016-09-19 18:14 UTC)
Platform Info:
  System: Darwin (x86_64-apple-darwin13.4.0)
  CPU: Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.7.1 (ORCJIT, haswell)

```

---

<div class="post-metadata">

### Author: ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)
#### Post date: [February 16, 2017, 6:03pm UTC](https://discourse.julialang.org/t/ann-linter-julia-plugin-for-atom-juno/2118/5 "2017-02-16T18:03:22Z")

</div>

Ah, it seems to be giving this message: `'julia' could not be spawned. Is it installed and on your path? If so please open an issue on the package spawning the process.`

I even tried making a soft link instead of a bash alias, but I still get the same result.  
Could `linter-julia` just use the address in `julia-client` to get the information about the location of the Julia binary?

---

<div class="post-metadata">

### Author: ![Tero\_Frondelius](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tero_frondelius/32/7629_2.png) [@Tero\_Frondelius](https://discourse.julialang.org/u/Tero_Frondelius)
#### Post date: [February 16, 2017, 6:46pm UTC](https://discourse.julialang.org/t/ann-linter-julia-plugin-for-atom-juno/2118/6 "2017-02-16T18:46:39Z")

</div>

> [@dpsanders](#):
>
> Could linter-julia just use the address in julia-client to get the information about the location of the Julia binary?

Hi,  
I’m working on this. Mean while I add a configuration to settings, please update to 0.1.3:

 ![](https://global.discourse-cdn.com/julialang/original/3X/6/5/65d83a9e831906f82b0a03bd0b9bdba47d0ffd9b.png)

Update on Windows bug: [The linter is hanging · Issue #170 · tonyhffong/Lint.jl · GitHub](https://github.com/tonyhffong/Lint.jl/issues/170), if someone else could reproduce it also on Windows that would be appreciated. That example works on my linux machine fine.

---

<div class="post-metadata">

### Author: ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)
#### Post date: [February 16, 2017, 6:56pm UTC](https://discourse.julialang.org/t/ann-linter-julia-plugin-for-atom-juno/2118/7 "2017-02-16T18:56:20Z")

</div>

Thanks, I updated to 0.1.3 but still no linter info.

---

<div class="post-metadata">

### Author: ![greg\_plowman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/greg_plowman/32/8100_2.png) [@greg\_plowman](https://discourse.julialang.org/u/greg_plowman)
#### Post date: [February 17, 2017, 12:18am UTC](https://discourse.julialang.org/t/ann-linter-julia-plugin-for-atom-juno/2118/8 "2017-02-17T00:18:46Z")

</div>

> [@Tero\_Frondelius](#):
>
> if someone else could reproduce it also on Windows that would be appreciated.

I can reproduce on Windows 7, Julia v0.5.0, Lint v0.2.5.  
The Julia console hangs.

```julia
using Lint
str2 = """
          test = "a"
          kj
          """
msgs2 = lintfile("file", str2)

```

After pressing `Ctrl-c`:

```julia
ERROR: InterruptException:
 in string(::String, ::Char, ::Vararg{Char,N}) at .\strings\string.jl:179
 in splitdir(::String) at .\path.jl:53
 in lintpkgforfile(::String, ::Lint.LintContext) at C:\Users\plowman\.julia\v0.5\Lint\src\Lint.jl:68
 in lintfile(::String, ::String) at C:\Users\plowman\.julia\v0.5\Lint\src\Lint.jl:112

```

---

<div class="post-metadata">

### Author: ![fengyang.wang](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fengyang.wang/32/104_2.png) [@fengyang.wang](https://discourse.julialang.org/u/fengyang.wang)
#### Post date: [February 17, 2017, 1:24am UTC](https://discourse.julialang.org/t/ann-linter-julia-plugin-for-atom-juno/2118/9 "2017-02-17T01:24:08Z")

</div>

It is interesting that the InterruptException indicates a potential hang in `string`, and that this problem seems to only occur on Windows. Any help on tracking this problem down is appreciated.

---

<div class="post-metadata">

### Author: ![Tero\_Frondelius](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tero_frondelius/32/7629_2.png) [@Tero\_Frondelius](https://discourse.julialang.org/u/Tero_Frondelius)
#### Post date: [February 17, 2017, 3:40pm UTC](https://discourse.julialang.org/t/ann-linter-julia-plugin-for-atom-juno/2118/10 "2017-02-17T15:40:05Z")

</div>

Can you switch on console and see the output. Ctrl + Shift + I and then select Console log. It should look something like this:

 ![](https://global.discourse-cdn.com/julialang/original/3X/a/9/a997c8803f7ac976658268e54ffd2a3cb26a2113.png)

There are still some connections errors, but the lintserver / client will recover those at some point and provide the Lint.jl messages.

---

<div class="post-metadata">

### Author: ![Tero\_Frondelius](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tero_frondelius/32/7629_2.png) [@Tero\_Frondelius](https://discourse.julialang.org/u/Tero_Frondelius)
#### Post date: [February 17, 2017, 7:14pm UTC](https://discourse.julialang.org/t/ann-linter-julia-plugin-for-atom-juno/2118/11 "2017-02-17T19:14:33Z")

</div>

> [@greg\_plowman](#):
>
> I can reproduce on Windows 7, Julia v0.5.0, Lint v0.2.5.The Julia console hangs.

I fixed the Windows bug: [lintpkgforfile() while loop replaced with for loop to fix #170 by TeroFrondelius · Pull Request #188 · tonyhffong/Lint.jl · GitHub](https://github.com/tonyhffong/Lint.jl/pull/188)

---

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [February 17, 2017, 7:17pm UTC](https://discourse.julialang.org/t/ann-linter-julia-plugin-for-atom-juno/2118/12 "2017-02-17T19:17:07Z")

</div>

The linter is very angry at me. It always wants me to use the function arguments, but in many traits setups I don’t want to. Is there any way turn off specific checks?

---

<div class="post-metadata">

### Author: ![Tero\_Frondelius](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tero_frondelius/32/7629_2.png) [@Tero\_Frondelius](https://discourse.julialang.org/u/Tero_Frondelius)
#### Post date: [February 18, 2017, 11:58am UTC](https://discourse.julialang.org/t/ann-linter-julia-plugin-for-atom-juno/2118/13 "2017-02-18T11:58:14Z")

</div>

> [@ChrisRackauckas](#):
>
> Is there any way turn off specific checks?

Yes and no. Not in linter-julia at the moment. This is a good feature request, because this seems to be a standard feature of other linter packages. Here is how to do it in Lint.jl: [Features - Lint.jl](https://lintjl.readthedocs.io/en/stable/features/#lintpragma-steering-lint-time-behavior), but if I understood it correctly, it’s not supporting your request. Please add an issue, I have an idea how to implement this.

---

<div class="post-metadata">

### Author: ![Tero\_Frondelius](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tero_frondelius/32/7629_2.png) [@Tero\_Frondelius](https://discourse.julialang.org/u/Tero_Frondelius)
#### Post date: [February 18, 2017, 12:46pm UTC](https://discourse.julialang.org/t/ann-linter-julia-plugin-for-atom-juno/2118/14 "2017-02-18T12:46:04Z")

</div>

No need to file an issue of ignoring messages. It was a smaller effort and it’s already [implemented](https://github.com/TeroFrondelius/linter-julia/commit/e15596adb5e8ae535c4db6a64b0050d84c20bcf7) version 0.3.0.

---

<div class="post-metadata">

### Author: ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)
#### Post date: [February 19, 2017, 2:37pm UTC](https://discourse.julialang.org/t/ann-linter-julia-plugin-for-atom-juno/2118/15 "2017-02-19T14:37:11Z")

</div>

I still can’t get the linter to work.  
I have opened the console and see no error messages, just

```julia
Server running on port /var/folders/h0/68t1xc991mq20mrkn6yy6n5h0000gn/T/lintserver41968fcs2Fd6meb6Zsock ...

```

from `linter-julia.coffee [sm]:96`.

---

<div class="post-metadata">

### Author: ![Tero\_Frondelius](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tero_frondelius/32/7629_2.png) [@Tero\_Frondelius](https://discourse.julialang.org/u/Tero_Frondelius)
#### Post date: [February 19, 2017, 3:28pm UTC](https://discourse.julialang.org/t/ann-linter-julia-plugin-for-atom-juno/2118/16 "2017-02-19T15:28:53Z")

</div>

Keep the log open and press Command + s (save the file), it will trigger the linting to start. You can press the Command + s few times and look the console output. You can see an example output here: [https://github.com/TeroFrondelius/linter-julia/issues/20](https://github.com/TeroFrondelius/linter-julia/issues/20)

And of course make some mistake, if there is no problem then nothing is shown.

If the issue persists, please update to latest version v0.3.0 and open an issue: [https://github.com/TeroFrondelius/linter-julia/issues](https://github.com/TeroFrondelius/linter-julia/issues)

Edit, one additional thing to check: make sure the package “linter” is installed. It seems that I haven’t declared it as a dependency.

---

<div class="post-metadata">

### Author: ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)
#### Post date: [February 19, 2017, 4:12pm UTC](https://discourse.julialang.org/t/ann-linter-julia-plugin-for-atom-juno/2118/17 "2017-02-19T16:12:47Z")

</div>

> Edit, one additional thing to check: make sure the package “linter” is installed. It seems that I haven’t declared it as a dependency.

That was it! 😉

I had to do `apm install linter`, since I couldn’t find it by searching in the package list inside Atom.

Many thanks!

---

<div class="post-metadata">

### Author: ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)
#### Post date: [February 19, 2017, 4:14pm UTC](https://discourse.julialang.org/t/ann-linter-julia-plugin-for-atom-juno/2118/18 "2017-02-19T16:14:57Z")

</div>

When there is an undeclared symbol, could it say which symbol is undeclared?  
(I guess this is a `Lint.jl` issue).

In `linter-julia`, I’m not sure how useful it is to give the error number (e.g. `E321`).

---

<div class="post-metadata">

### Author: ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)
#### Post date: [February 19, 2017, 4:15pm UTC](https://discourse.julialang.org/t/ann-linter-julia-plugin-for-atom-juno/2118/19 "2017-02-19T16:15:13Z")

</div>

But overall, it’s very cool – nice work!

---

<div class="post-metadata">

### Author: ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)
#### Post date: [February 19, 2017, 4:22pm UTC](https://discourse.julialang.org/t/ann-linter-julia-plugin-for-atom-juno/2118/20 "2017-02-19T16:22:01Z")

</div>

It would be nice to be able to click on the error message at the bottom of the window and have it jump to the corresponding line.

[Next page](https://discourse.julialang.org/t/ann-linter-julia-plugin-for-atom-juno/2118.md?page=2)
