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

throw-on-errors of with-eastwood does not work #15

Open
sniperliu opened this issue Nov 16, 2017 · 4 comments
Open

throw-on-errors of with-eastwood does not work #15

sniperliu opened this issue Nov 16, 2017 · 4 comments

Comments

@sniperliu
Copy link

sniperliu commented Nov 16, 2017

throw-on-errors of with-eastwood does not work, it make CI pass even with eastwood warnings.

Did a brief investigation, eastwood/check did not return errors.

The usage of boot.pod/with-eval-in seems the cause of problem.

@tolitius
Copy link
Owner

if you'd like to throw on eastwood errors you should add --throw-on-errors option, or just -t.

check out the docs

$ boot check/with-eastwood -t
...
== Warnings: 11 (not including reflection warnings)  Exceptions thrown: 0
WARN: eastwood found some problems ^^^

...
                    tolitius.boot-check/with-throw           boot_check.clj:   27
                              clojure.core/ex-info                 core.clj: 4617
clojure.lang.ExceptionInfo: eastwood checks fail
    causes: {:err nil, :warning-count 11, :exception-count 0}
clojure.lang.ExceptionInfo: eastwood checks fail
    line: 66

@sniperliu
Copy link
Author

Thanks for your reply.

I had added the flag.

(deftask build []
  (comp (check/with-eastwood "-t")))

Below is the CI logs.

 ^{:line 149}
 (^{:line 149} change-pet-name
  ^{:line 149}
  [^{:line 149} _ ^{:line 149} _ ^{:line 149} _ ^{:line 149} _])
 ^{:line 151} p/TeamAdmin
 ...)


An exception was thrown while analyzing namespace rmi-service.set.datacenter 
Lint results may be incomplete.  If there are compilation errors in
your code, try fixing those.  If not, check above for info on the
exception.
Job succeeded

Boot Version: 2.7.1
boot-check: 0.1.6

@tolitius
Copy link
Owner

your CI is saying that An exception was thrown, but it (your CI) succeeds the job. This would mean the exception is caught and ignored outside of boot-check.

try to run it from command line, you should see the exception.

@robertluo
Copy link

Eastwood raised an exception because the project can not be compiled, while boot-check just checked warnings not exceptions, so the exit code of the task is 0 indicating no error. The workaround is simple for this project: adding "aot -a" before linting.

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

No branches or pull requests

3 participants