Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify extra source paths #251

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

jsoo1
Copy link

@jsoo1 jsoo1 commented Jul 22, 2020

This allows specifying extra source directories from the command line:

$ elm-analyse Main.elm other/Main.elm bin/Main.elm

This would fix the underlying problem in #214 and the direct issue in #93

It would also make elm-analyse easier to use on small projects with only a single file. It also will allow checks to be run on Main modules outside of source-directories.

Rationale for the change:

  • elm.json does not allow specifying a Main module, and the Main module may not necessarily live in a source-directory. It instead might be specified specified when using elm make.
  • elm-analyse does not currently do analysis on an entire project because of this limitation. The idea here is to allow for more complete analysis when there are multiple main modules or just a single module outside of a source directory.
  • Using the unnamed cli parameters mirrors the way elm make is used. Compare:
    elm make:
$ elm make Main.elm

elm-analyse:

$ elm-analyse Main.elm

So by convention, elm-analyse should fit into the user's way of working with other elm tools.

* update bufferutil to 3.0.5.
* update utf-8-validate to 5.0.2.
@jsoo1 jsoo1 changed the title Configure main functions Specify extra source directories Jul 22, 2020
@jsoo1 jsoo1 changed the title Specify extra source directories Specify extra source paths Jul 22, 2020
@jsoo1 jsoo1 force-pushed the configure-main-functions branch 4 times, most recently from ef883b0 to c3d2147 Compare July 23, 2020 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant