Gizra / drupal-elm-starter

DEPRECATED - See https://github.com/Gizra/drupal-starter
33 stars 9 forks source link

Adding elm-analyse to Travis #167

Open bitamar opened 7 years ago

bitamar commented 7 years ago

166

bitamar commented 7 years ago

Apparently the build fails now for the elm-analyse warnings:

Messages:
---------
Exposing all in file "src/elm/App/Model.elm" at ((4,14),(4,16))
Exposing all in file "src/elm/App/Model.elm" at ((6,18),(6,20))
Importing all from module `App.PageType`in file "src/elm/App/Model.elm" at ((9,35),(9,37))
Importing all from module `RemoteData`in file "src/elm/App/Model.elm" at ((14,39),(14,41))
Variable `emptyModel` is redefined in file "src/elm/App/Model.elm". At ((15,35),(15,45)) and ((59,0),(59,10))
Importing all from module `User.Model`in file "src/elm/App/Model.elm" at ((17,28),(17,30))

...

Unused imported variable `map` in file "src/elm/Utils/Json.elm" at ((13,84),(13,87))
Unused imported variable `nullable` in file "src/elm/Utils/Json.elm" at ((13,95),(13,103))
Variable `value` is redefined in file "src/elm/Utils/Json.elm". At ((13,129),(13,134)) and ((91,33),(91,38))
Unused variable `val` in file "src/elm/Utils/Json.elm" at ((21,21),(21,24))
Importing all from module `Html`in file "src/elm/Utils/WebData.elm" at ((3,22),(3,24))
Importing all from module `HttpBuilder`in file "src/elm/Utils/WebData.elm" at ((5,29),(5,31))
Unused variable `message` inside pattern in file "src/elm/Utils/WebData.elm" at ((13,20),(13,27))
The command "$TRAVIS_BUILD_DIR/ci-scripts/test_elm_analyse.sh" exited with 1.
AronNovak commented 7 years ago

@bitamar after pushing two more commits and did a check, in my opinion it's close to be ready, as it's your PR, i did not set it to ready to be reviewed however. :)

I wanted to check how to add it to PHPStorm, to execute automatically, but I failed. If you can, we could add a word about Atom or PHPStorm.

bitamar commented 7 years ago

Thanks! I just didn't have time to get to it until now. I'll try to run it in phpstorm, and update the readme. I also want to include the importAll/exposeAll tests, but these can also be a follow up.

bitamar commented 7 years ago

I couldn't find a way to elm-analyse a single file, and running it on all the project is a bit much for every save. So I think it should be something you do manually before committing elm files. Or do you have a better idea?

AronNovak commented 7 years ago

@bitamar Let's stick to manual execution, in the issue queue, there are debates about IDE integration, but without a solution (https://github.com/stil4m/elm-analyse/issues/77), so likely it's not a low-hanging fruit.