jfmengels / elm-review

Analyzes Elm projects, to help find mistakes before your users find them.
https://package.elm-lang.org/packages/jfmengels/elm-review/latest/
Other
252 stars 13 forks source link

File visit order API #168

Open miniBill opened 6 months ago

miniBill commented 6 months ago

Have an API to either:

Usecase: elm-review-codegen-simplify needs the list of functions in all the Gen.* modules before being able to generate errors for the non-Gen.* modules.

With the current implementation defined order, I need to generate all the errors in the final project evaluation, whereas if I could be sure that I've visited all then Gen.* modules before visiting all the non-Gen.* ones then I could use the normal workflow of generating errors from the module visitor.

In particular, I need to also visit modules that are not included, so "the modules are visited from the leaves to the root" would not be enough for this.