mbuscemi / elm-lens

Elm code visualizations for maximum productivity in Atom
https://atom.io/packages/elm-lens
MIT License
51 stars 2 forks source link

Different exposing rule for library projects #5

Open mbuscemi opened 6 years ago

mbuscemi commented 6 years ago

Library projects expose functions without references for good reason. Elm Lens should be able to recognize exposed library methods and provide special markup rules for those.

Issue came to my attention from here: https://github.com/stil4m/elm-analyse/issues/10

zwilias commented 6 years ago

How does whitelisting exposed values from exposed modules sound? Applications shouldn't have exposed-modules, packages expose modules so that their exposed values can be imported externally, so I think that would be more or less accurate.

mbuscemi commented 6 years ago

Elm 0.19 will provide facilities in elm-package.json to differentiate library from application projects. However, I believe I can achieve this goal now.

In Elm 0.18, we already have the exposed-modules field in elm-package.json. The quickest fix would be to turn off the warning markers on zero-ref-external functions in exposed modules. Additionally, I think adding a world icon, or something iconographically similar, to all such functions would be a great additional touch.