-
Notifications
You must be signed in to change notification settings - Fork 36
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
-main
: accept an optional classpath argument
#75
Conversation
PR ready tests are failing, but so is I did verify that the proposed command works, in both its Lein and deps.edn variants |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amended with some refinements and an assert
(as a lightweight test)
passed-classpath-string? (s/split classpath-string #":") | ||
(.exists (io/file "deps.edn")) (clojure-cli-classpath) | ||
:else (make-classpath)) | ||
json-str (json/write-str {"classpath" classpath})] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I simplified things a bit here by using json/write-str
, this way the Lein and deps.edn helpers don't have to construct escaped strings by hand
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine 👍
I'll investigate the failure on master
ooh, so it was already moved across 😊 |
Alright! Feel free to LMK when |
Main branch is now green |
Looks like master went red again after f4a7187 |
Progressing... The fix that would also fix master is: (is (== 0 (get-in project [:nvd :highest-score]))) Not really sure it's the right fix though. Originally that test had the opposite intent. But updating dependencies can change things. |
Finally got the build green 😄 (with the caveat of #75 (comment)) Also, I used the occasion to introduce a JVM matrix in CI, so that we're sure lein-nvd runs correctly in all JVMs that Clojure officially supports (today: 8 and 11). Similarly, the integration test script runs in a parallel job, for a faster feedback loop. |
@@ -44,10 +44,10 @@ | |||
(update-db/-main "test/resources/self-test.json") | |||
(let [project (check/-main "test/resources/self-test.json")] | |||
(is (== 11.0 (get-in project [:nvd :fail-threshold]))) | |||
(is (== 5.0 (get-in project [:nvd :highest-score]))) | |||
(is (== 0 (get-in project [:nvd :highest-score]))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
slightly puzzled why this dropped from 7.5 to 5.0 and now to zero .. happy to take this for now, but think i will create an issue to update self-test.json
so we have something that is > 0
By accepting a fixed user-provided string as the classpath, one can be sure that lein-nvd is not interfering in classpath computation and therefore one prevents false positives/negatives.
Fixes #46
Also gives a way to easily solve:
#50
#73
#74