boot-check
boot-check copied to clipboard
throw-on-errors of with-eastwood does not work
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.
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
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
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.
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.