From 52ed86284ab4a457dc16844ae6fce588434bc194 Mon Sep 17 00:00:00 2001 From: Sean Corfield Date: Sun, 14 Jan 2024 17:09:46 -0800 Subject: [PATCH] linting Signed-off-by: Sean Corfield --- CHANGELOG.md | 1 + src/honey/sql.cljc | 4 ++-- src/honey/sql/helpers.cljc | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c49c8a7..7084126 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * Fix [#518](https://github.com/seancorfield/honeysql/issues/518) by moving temporal clause before alias. * Address [#495](https://github.com/seancorfield/honeysql/issues/495) by adding (experimental) `format&` and `formatv` macros (`.clj` only!) -- purely for discussion: may be removed in a subsequent release! * Implemented `CREATE INDEX` [#348](https://github.com/seancorfield/honeysql/issues/348) via PR [#517](https://github.com/seancorfield/honeysql/pull/517) [@dancek](https://github.com/dancek). + * Code cleanup per `clj-kondo`. * 2.5.1103 -- 2023-12-03 * Address [#515](https://github.com/seancorfield/honeysql/issues/515) by: diff --git a/src/honey/sql.cljc b/src/honey/sql.cljc index f985b08..1bad0b5 100644 --- a/src/honey/sql.cljc +++ b/src/honey/sql.cljc @@ -2392,7 +2392,7 @@ (sql/register-op! :<=> :ignore-nil true) ;; and then use the new operator: (sql/format {:select [:*], :from [:table], :where [:<=> nil :x 42]}) - (sql/register-fn! :foo (fn [f args] ["FOO(?)" (first args)])) + (sql/register-fn! :foo (fn [_ args] ["FOO(?)" (first args)])) (sql/format {:select [:*], :from [:table], :where [:foo 1 2 3]}) (defn- foo-formatter [f [x]] (let [[sql & params] (sql/format-expr x)] @@ -2404,7 +2404,7 @@ (sql/format '{select * from table where (foo (+ a 1))}) (let [v 42] (sql/formatf '{select * from table where (foo (+ a ?1))} v)) - (let [v 42] + (let [v 42] (println v) (sql/format& '{select * from table where (foo (+ a v))})) (let [v 42] (sql/formatv [v] '{select * from table where (foo (+ a v))})) diff --git a/src/honey/sql/helpers.cljc b/src/honey/sql/helpers.cljc index 7429ec8..bc2e2a0 100644 --- a/src/honey/sql/helpers.cljc +++ b/src/honey/sql/helpers.cljc @@ -1181,9 +1181,8 @@ :nest :raw)))))) (comment - (require '[honey.sql :refer [format]]) (-> (delete-from :table) (where [:in (composite :first :second) [(composite 1 2) (composite 2 1)]]) - (format)) + (h/format)) )