These are chat archives for coala/coala-bears

6th
Jan 2017
Robin Saleh-Jan
@robinsjdotcom
Jan 06 2017 17:36

So I'm writing a bear around an already existing linter for elixir. The only thing that is of interest is the linter errors, right?

Below the errors caught by the linter, there's also information such as:

Please report incorrect results: https://github.com/rrrene/credo/issues

Analysis took 0.2 seconds (0.02s to load, 0.2s running checks)
23 mods/funs, found 3 code readability issues.

Showing priority issues: ↑ ↗ →  (use `--strict` to show all issues, `--help` for options).

On one hand I do think this is informative, but in an CI scenario the extra messages is unnecessary.

Any opinions people? :)

John Vandenberg
@jayvdb
Jan 06 2017 17:50
bears should report which line each error is occurring on, even in CI
does elixir have an option to emit a 'fixed' file?
Lasse Schuirmann
@sils
Jan 06 2017 17:57
yeah that summary stuff etc isn't helpful, coala can generate that on it's own as well later but that would work for all bears
Robin Saleh-Jan
@robinsjdotcom
Jan 06 2017 18:13
@jayvdb Will see if it's possible.
@sils Good point
Robin Saleh-Jan
@robinsjdotcom
Jan 06 2017 18:22

It can't emit to a specific file. However the linter has a flag so it drops the unnecessary fluff:

The representation

apps/hashtag_graph/lib/graph/graph_server.ex:1:11: R: Modules should have a @moduledoc tag.
apps/hashtag_graph/lib/hashtag_graph.ex:1:11: R: Modules should have a @moduledoc tag.
apps/hashtag_graph/lib/graph/vertex.ex:1:11: R: Modules should have a @moduledoc tag.

Which I can just use regex to parse, thanks for the input :)

John Vandenberg
@jayvdb
Jan 06 2017 20:21
:+1: