From aa9bde95053c3cd5391ede590f67720aceddb990 Mon Sep 17 00:00:00 2001 From: Eric Dallo Date: Thu, 18 Jan 2024 08:40:16 -0300 Subject: [PATCH] fix lint --- .clj-kondo/babashka/fs/config.edn | 1 + .clj-kondo/http-kit/http-kit/config.edn | 3 +++ .../http-kit/http-kit/httpkit/with_channel.clj | 16 ++++++++++++++++ .clj-kondo/rewrite-clj/rewrite-clj/config.edn | 5 +++++ src/deps_bin/impl/bin.clj | 2 +- 5 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 .clj-kondo/babashka/fs/config.edn create mode 100644 .clj-kondo/http-kit/http-kit/config.edn create mode 100644 .clj-kondo/http-kit/http-kit/httpkit/with_channel.clj create mode 100644 .clj-kondo/rewrite-clj/rewrite-clj/config.edn diff --git a/.clj-kondo/babashka/fs/config.edn b/.clj-kondo/babashka/fs/config.edn new file mode 100644 index 0000000..23f3609 --- /dev/null +++ b/.clj-kondo/babashka/fs/config.edn @@ -0,0 +1 @@ +{:lint-as {babashka.fs/with-temp-dir clojure.core/let}} diff --git a/.clj-kondo/http-kit/http-kit/config.edn b/.clj-kondo/http-kit/http-kit/config.edn new file mode 100644 index 0000000..e9dbcd8 --- /dev/null +++ b/.clj-kondo/http-kit/http-kit/config.edn @@ -0,0 +1,3 @@ + +{:hooks + {:analyze-call {org.httpkit.server/with-channel httpkit.with-channel/with-channel}}} diff --git a/.clj-kondo/http-kit/http-kit/httpkit/with_channel.clj b/.clj-kondo/http-kit/http-kit/httpkit/with_channel.clj new file mode 100644 index 0000000..b429de8 --- /dev/null +++ b/.clj-kondo/http-kit/http-kit/httpkit/with_channel.clj @@ -0,0 +1,16 @@ +(ns httpkit.with-channel + (:require [clj-kondo.hooks-api :as api])) + +(defn with-channel [{node :node}] + (let [[request channel & body] (rest (:children node))] + (when-not (and request channel) (throw (ex-info "No request or channel provided" {}))) + (when-not (api/token-node? channel) (throw (ex-info "Missing channel argument" {}))) + (let [new-node + (api/list-node + (list* + (api/token-node 'let) + (api/vector-node [channel (api/vector-node [])]) + request + body))] + + {:node new-node}))) diff --git a/.clj-kondo/rewrite-clj/rewrite-clj/config.edn b/.clj-kondo/rewrite-clj/rewrite-clj/config.edn new file mode 100644 index 0000000..19ecae9 --- /dev/null +++ b/.clj-kondo/rewrite-clj/rewrite-clj/config.edn @@ -0,0 +1,5 @@ +{:lint-as + {rewrite-clj.zip/subedit-> clojure.core/-> + rewrite-clj.zip/subedit->> clojure.core/->> + rewrite-clj.zip/edit-> clojure.core/-> + rewrite-clj.zip/edit->> clojure.core/->>}} diff --git a/src/deps_bin/impl/bin.clj b/src/deps_bin/impl/bin.clj index 22cff8c..bcf7506 100644 --- a/src/deps_bin/impl/bin.clj +++ b/src/deps_bin/impl/bin.clj @@ -77,7 +77,7 @@ * `:no-jar` -- the `:jar` option was missing * `:no-name` -- the `:name` option was missing Additional detail about success and failure is also logged." - [{:keys [help jar name skip-realign platforms] :as options}] + [{:keys [help jar name platforms] :as options}] (cond help