Skip to content

Commit

Permalink
Disable constant-test linter in assert+.
Browse files Browse the repository at this point in the history
  • Loading branch information
stevana committed Apr 22, 2020
1 parent f34b363 commit 216c159
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ script:
# Exclude namespaces importing rhizome.viz, because compiling those requires
# X11. For full error message, see:
# https://travis-ci.com/github/jepsen-io/jepsen/builds/161202862
- lein eastwood '{:exclude-namespaces [jepsen.tests.cycle.wr jepsen.tests.cycle.append]}'
- lein eastwood '{:config-files [".eastwood.clj"], :exclude-namespaces [jepsen.tests.cycle.wr jepsen.tests.cycle.append]}'
- lein test
notifications:
email:
Expand Down
7 changes: 7 additions & 0 deletions jepsen/.eastwood.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
(disable-warning
{:linter :constant-test
:for-macro 'dom-top.core/assert+
:if-inside-macroexpansion-of #{'clojure.core/let}
:within-depth nil
:reason "The codegen performed by dom-top.core/assert+ checks to see if the
thrown expression is a map at runtime."})
11 changes: 2 additions & 9 deletions jepsen/src/jepsen/cli.clj
Original file line number Diff line number Diff line change
Expand Up @@ -391,15 +391,8 @@ Options:\n")
(merge cli-test)
(assoc :history
(:history stored-test)))]

;; XXX: constant-test: Test expression is always logical
;; true or always logical false: (clojure.core/map?
;; m__8038__auto__) in form (if (clojure.core/map?
;; m__8038__auto__) (clojure.core/ex-info "Assert
;; failed" m__8038__auto__) (new
;; IllegalStateException m__8038__auto__))
;; (assert+ stored-test IllegalStateException
;; "Not sure what the last test was")
(assert+ stored-test IllegalStateException
"Not sure what the last test was")
(assert+ (= (:name stored-test)
(:name cli-test))
IllegalStateException
Expand Down

0 comments on commit 216c159

Please sign in to comment.