tolitius / boot-check

check, analyze and inspect Clojure/Script code
Eclipse Public License 1.0
70 stars 9 forks source link

define entry point for yagni #3

Closed kurt-o-sys closed 8 years ago

kurt-o-sys commented 8 years ago

yagni uses :main in a leiningen project to find the entry point. This entry point is skipped in the yagni analysis. However, in using boot and boot-check, this entry point is not found by yagni and there's no way to add a :main entry to boot-check (adding a :main to the jar task-options isn't really helpful here). This results always in:

 WARN: could not find any references to the following:

<project>/-main

or something similar.

It is possible to add the main entry point in .lein-yagni, but this is somewhat confusing as one is using boot and needs to add a file which clearly points to leiningen. It would make much more sense to be able to add the entry points inside build.boot, or in .boot-yagni or something similar.

tolitius commented 8 years ago

sure, the args part of all the checkers is a TO DO including yagni.

I'll add args to the yagni task, so it'd be possible to pass main entry points to with-yagni

tolitius commented 8 years ago

@qsys I added options to yagni. check out the test run.

i.e.

(check/with-yagni :options {:entry-points ["app.foo/-main"
                                           "app.bar/fun"
                                           "app.baz/another-entry-point"]})))

try it out with 0.1.3-SNAPSHOT, let me know if it works for you.

tolitius commented 8 years ago

I released boot-check 0.1.3 with this feature.

feel free to reopen this in case you have any more questions.

kurt-o-sys commented 8 years ago

Great, thanks! It works :)

Op 29 juli 2016 om 18:05 schreef Anatoly notifications@github.com:

Closed #3.


You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/tolitius/boot-check/issues/3#event-739388229