elm-lang / elm-make

A build tool for Elm projects
BSD 3-Clause "New" or "Revised" License
175 stars 45 forks source link

--report json ignores the absence of --warn and always includes warnings #129

Closed tommot348 closed 7 years ago

tommot348 commented 7 years ago

--report json ignores the absence of --warn and always includes warnings in its list. e.g. when I have somthing like:

module Main exposing (..)
import Html exposing (text)
main =
    text "test"

building it with this command: elm-make Main.elm will output

Success! Compiled 1 module.
Successfully generated index.html

but doing this: elm-make Main.elm --report json will output:

[{"tag":"missing type annotation","overview":"Top-level value main does not have a type annotation.","details":"I inferred the type annotation so you can copy it into your code:\n\nmain : Html.Html msg","region":{"start":{"line":7,"column":1},"end":{"line":7,"column":5}},"type":"warning","file":"Main.elm"}] Successfully generated index.html

Is this intended? Thank you!

elm version 0.18.0 on ubuntu 16.04

process-bot commented 7 years ago

Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!

Here is what to expect next, and if anyone wants to comment, keep these things in mind.

evancz commented 7 years ago

The idea is that if you are a robot getting the output, it can be your call what you want to show. So you get it all, and you can show as much or as little as you want.