Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix codeq lookup of qualified symbols

  • Loading branch information...
commit e18a25a08c31d328689fa0740200d7c8e20c404a 1 parent eb61172
@hugoduncan hugoduncan authored
View
2  nrepl-codeq/src/ritz/nrepl/middleware/codeq.clj
@@ -44,7 +44,7 @@
"Reply to codeq-def message"
[{:keys [project symbol ns datomic-url transport] :as msg}]
(try
- (let [symbol (if (and symbol ns (.contains symbol "/"))
+ (let [symbol (if (or (and symbol (.contains symbol "/")) (not ns))
symbol
(str ns "/" symbol))
res (query-definitions symbol datomic-url)]
View
10 nrepl-codeq/test/ritz/nrepl/middleware/codeq_test.clj
@@ -137,6 +137,16 @@ on the given transport with the handler, until the atom is set to false."
:id 0}
(.take out)))
+ (is (= #{:done} (:status (.take out))))
+
+ (.offer in {:op "codeq-def" :symbol "trace" :ns "ritz.logging"
+ :datomic-url (datomic-url) :id 0})
+ (is (= {:value
+ [["(defmacro trace\n [fmt-str & args]\n `(log :trace ~fmt-str ~@args))"
+ "Sun Jul 03 02:08:35 UTC 2011"]]
+ :id 0}
+ (.take out)))
+
;; shut down the handle loop
(reset! a false)
(.offer in {:op "something to stop the handle loop"}))))
Please sign in to comment.
Something went wrong with that request. Please try again.