Skip to content
This repository has been archived by the owner on Apr 21, 2020. It is now read-only.

Adding elm-analyse to Travis #167

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Adding elm-analyse to Travis #167

wants to merge 14 commits into from

Conversation

bitamar
Copy link
Contributor

@bitamar bitamar commented Sep 16, 2017

@bitamar bitamar self-assigned this Sep 16, 2017
@bitamar
Copy link
Contributor Author

bitamar commented Sep 16, 2017

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.

@@ -13,3 +13,4 @@ if [ -z "${ELM_REVIEW+x}" ] || [ "$ELM_REVIEW" -ne 1 ]; then
fi

npm install -g [email protected]
npm install -g elm-analyse
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let"s always specify a version, if we don't freeze it, we will end up with tons of failing Travis jobs on the day of a major release of Elm Analyse.

… package, it referred to non-existing functions and so on
viewActiveIncidents items =
let
orderedIncidentes =
getOrderedIncidents items
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bitamar As there's no getOrderedIncidents function in the whole project, I decided to do a git rm on the whole file, everything compiles cleanly without it. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@@ -115,8 +113,6 @@ update currentDate backendUrl accessToken user msg model =
HandleFetchedItem itemId (Ok item) ->
let
-- Let Item settings fetch own data.
-- @todo: Pass the activePage here, so we can fetch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see the rationale behind this todo.
image

Drupal Elm Starter does provide a pattern to selectively fetch items, It does fetch all items upon start, but we do it like this for many real-world apps. I'd not invest more in resolving/restoring this todo.
^^ @bitamar

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, let's just remove it then.

@AronNovak
Copy link
Member

@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
Copy link
Contributor Author

bitamar commented Sep 29, 2017

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
Copy link
Contributor Author

bitamar commented Sep 29, 2017

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
Copy link
Member

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

@AronNovak AronNovak changed the title WIP: Adding elm-analyse to travis Adding elm-analyse to travis Sep 30, 2017
@AronNovak AronNovak changed the title Adding elm-analyse to travis Adding elm-analyse to Travis Sep 30, 2017
@bitamar bitamar removed their assignment Oct 2, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants