Skip to content

Commit fbdb6e6

Browse files
solar05bbatsov
authored andcommitted
Fix clj-kondo warnings
1 parent 7973510 commit fbdb6e6

24 files changed

+50
-52
lines changed

.clj-kondo/config.edn

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{:linters {:unresolved-symbol {:exclude [(cider.nrepl/def-wrapper)
2+
(cider.nrepl.middleware.util.instrument/definstrumenter)
3+
(cider.nrepl.middleware.util.instrument/with-break)
4+
(cider.nrepl.middleware.util.instrument/instrument-special-form)
5+
(cider.nrepl.middleware.util.instrument/instrument-coll)
6+
(cider.nrepl.print-method/def-print-method)]}
7+
:unresolved-namespace {:exclude [clojure.main]}}
8+
:output {:progress true
9+
:exclude-files ["data_readers" "tasks"]}}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ out
1717
.lein-repl-history
1818
.nrepl-port
1919
.source-deps
20+
.clj-kondo/.cache

src/cider/nrepl/middleware/classpath.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
(and (misc/url? u)
1111
(= (.getProtocol ^java.net.URL u) "file")))
1212

13-
(defn classpath-reply [msg]
13+
(defn classpath-reply [_msg]
1414
{:classpath (->> (cp/classpath)
1515
(filter file-url?)
1616
(map io/as-file)

src/cider/nrepl/middleware/complete.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
[::suitable-sources/cljs-source])
2828

2929
(defn complete
30-
[{:keys [ns prefix symbol context extra-metadata enhanced-cljs-completion?] :as msg}]
30+
[{:keys [ns prefix symbol context extra-metadata] :as msg}]
3131
;; TODO: Drop legacy symbol param in version 1.0
3232
(let [prefix (str (or prefix symbol))
3333
completion-opts {:ns (misc/as-sym ns)
@@ -56,7 +56,7 @@
5656
{:completion-doc (completion-doc msg)})
5757

5858
(defn flush-caches-reply
59-
[msg]
59+
[_msg]
6060
(complete-utils/flush-caches)
6161
{})
6262

src/cider/nrepl/middleware/content_type.clj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
(:require
4646
[cider.nrepl.middleware.slurp :refer [slurp-reply]])
4747
(:import
48-
java.awt.Image
4948
[java.awt.image RenderedImage]
5049
[java.io ByteArrayOutputStream File OutputStream]
5150
[java.net URI URL]
@@ -80,7 +79,7 @@
8079
recognized as an AWT Image, a File, or a File URI, rewrite the
8180
response to have a `:content-type` being a MIME type of the content,
8281
and a `:body` to re-use the RFC term for the message payload."
83-
[{:keys [session value] :as response}]
82+
[{:keys [value] :as response}]
8483
(cond
8584
;; FIXME (arrdem 2018-04-03):
8685
;;

src/cider/nrepl/middleware/debug.clj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
[cider.nrepl.middleware.util.nrepl :refer [notify-client]]
1111
[nrepl.middleware.interruptible-eval :refer [*msg*]]
1212
[nrepl.middleware.print :as print]
13-
[nrepl.middleware.session :as session]
1413
[nrepl.misc :refer [response-for]]
1514
[nrepl.transport :as transport]
1615
[orchard.info :as info]
@@ -624,7 +623,7 @@ this map (identified by a key), and will `dissoc` it afterwards."}
624623
;; new-line in REPL always throws; skip for debug convenience
625624
(when (> (count code) 3)
626625
(read-string {:read-cond :allow} code))
627-
(catch Exception e)))
626+
(catch Exception _e)))
628627
(if @has-debug?
629628
;; Technically, `instrument-and-eval` acts like a regular eval
630629
;; if there are no debugging macros. But we still only use it

src/cider/nrepl/middleware/enlighten.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
Currently this only instruments forms that could run several times
3333
in a single evaluation. This is necessary so that the client can
3434
clean-up overlays from previous evaluations."
35-
[[head & args :as form] {:keys [coor] :as extras}]
35+
[[head & args :as form] {:keys [coor]}]
3636
(let [erase `(d/debugger-send (assoc (:msg ~'STATE__)
3737
:coor ~coor
3838
:status :enlighten

src/cider/nrepl/middleware/format.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
indents))
2727

2828
(defn format-code-reply
29-
[{:keys [code options] :as msg}]
29+
[{:keys [code options]}]
3030
(let [opts (some-> options
3131
(select-keys [:indents :alias-map])
3232
(update :indents generate-user-indents)
@@ -56,7 +56,7 @@
5656
(str/trim)))
5757

5858
(defn format-edn-reply
59-
[{:keys [edn ::print/print-fn] :as msg}]
59+
[{:keys [edn ::print/print-fn]}]
6060
{:formatted-edn (format-edn edn print-fn)})
6161

6262
;;; Middleware op handling

src/cider/nrepl/middleware/info.clj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
[cider.nrepl.middleware.util :as util]
44
[cider.nrepl.middleware.util.cljs :as cljs]
55
[cider.nrepl.middleware.util.error-handling :refer [with-safe-transport]]
6-
[clojure.java.io :as io]
76
[clojure.string :as str]
87
[orchard.eldoc :as eldoc]
98
[orchard.info :as info]
@@ -87,7 +86,7 @@
8786
{:status :no-eldoc}))
8887

8988
(defn eldoc-datomic-query-reply
90-
[{:keys [ns sym symbol] :as msg}]
89+
[{:keys [ns sym symbol]}]
9190
(try
9291
(eldoc/datomic-query ns (or sym symbol))
9392
(catch Throwable _ {:status :no-eldoc})))

src/cider/nrepl/middleware/inspect.clj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
nrepl.transport.Transport))
1212

1313
(defn swap-inspector!
14-
[{:keys [session] :as msg} f & args]
14+
[{:keys [session]} f & args]
1515
(-> session
1616
(alter-meta! update ::inspector #(apply f % args))
1717
(get ::inspector)))
1818

1919
(defn- inspector-response
2020
([msg inspector]
2121
(inspector-response msg inspector {:status :done}))
22-
([msg {:keys [rendered] :as inspector} resp]
22+
([msg {:keys [rendered]} resp]
2323
(let [value (binding [*print-length* nil]
2424
(pr-str rendered))]
2525
(response-for msg resp {:value value}))))
@@ -33,7 +33,7 @@
3333
(transport/send transport (inspector-response msg inspector {}))))
3434

3535
(defn inspector-transport
36-
[{:keys [^Transport transport, session] :as msg}]
36+
[{:keys [^Transport transport] :as msg}]
3737
(reify Transport
3838
(recv [this] (.recv transport))
3939
(recv [this timeout] (.recv transport timeout))
@@ -72,7 +72,7 @@
7272
(defn refresh-reply [msg]
7373
(inspector-response msg (swap-inspector! msg #(or % (inspect/fresh)))))
7474

75-
(defn get-path-reply [{:keys [session] :as msg}]
75+
(defn get-path-reply [{:keys [session]}]
7676
(get-in (meta session) [::inspector :path]))
7777

7878
(defn next-page-reply [msg]

0 commit comments

Comments
 (0)