Skip to content

Commit

Permalink
Bump Kondo version
Browse files Browse the repository at this point in the history
  • Loading branch information
camsaul committed Aug 29, 2024
1 parent 305aa83 commit f29849f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ jobs:
uses: codecov/codecov-action@v4.5.0
with:
files: ./target/coverage/codecov.json
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

codespell:
runs-on: ubuntu-20.04
Expand Down
2 changes: 1 addition & 1 deletion deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
;;
;; clojure -M:kondo --copy-configs --dependencies --lint "$(clojure -A:dev -Spath)" --skip-lint --parallel
:kondo
{:replace-deps {clj-kondo/clj-kondo {:mvn/version "2023.09.07" #_"2024.08.01"}}
{:replace-deps {clj-kondo/clj-kondo {:mvn/version "2024.08.29"}}
:main-opts ["-m" "clj-kondo.main"]}

;; lint everything with Kondo
Expand Down
2 changes: 1 addition & 1 deletion src/toucan2/util.clj
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"Locale-agnostic version of [[clojure.string/lower-case]]. `clojure.string/lower-case` uses the default locale in
conversions, turning `ID` into `ıd`, in the Turkish locale. This function always uses the `Locale/US` locale."
[^CharSequence s]
(.. s toString (toLowerCase (java.util.Locale/US))))
(.. s toString (toLowerCase java.util.Locale/US)))

(defn maybe-derive
"Derive `child` from `parent` only if `child` is not already a descendant of `parent`."
Expand Down
6 changes: 3 additions & 3 deletions toucan1/test/toucan/models_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@
;; queue
(deftest ^:synchronized post-insert-test
(test/with-discarded-table-changes Category
(binding [category/*categories-awaiting-moderation* (atom (clojure.lang.PersistentQueue/EMPTY))]
(binding [category/*categories-awaiting-moderation* (atom clojure.lang.PersistentQueue/EMPTY)]
(is (= (instance/instance Category {:id 5, :name "toucannery", :parent-category-id nil})
(t1.db/insert! Category :name "toucannery")))
(testing `category/*categories-awaiting-moderation*
Expand Down Expand Up @@ -385,13 +385,13 @@
;; queue
(deftest ^:synchronized post-update-test
(test/with-discarded-table-changes Category
(binding [category/*categories-recently-updated* (atom (clojure.lang.PersistentQueue/EMPTY))]
(binding [category/*categories-recently-updated* (atom clojure.lang.PersistentQueue/EMPTY)]
(is (= true
(t1.db/update! Category 2 :name "lobster")))
(is (= 2
(peek @category/*categories-recently-updated*)))))
(test/with-discarded-table-changes Category
(binding [category/*categories-recently-updated* (atom (clojure.lang.PersistentQueue/EMPTY))]
(binding [category/*categories-recently-updated* (atom clojure.lang.PersistentQueue/EMPTY)]
(is (= true
(t1.db/update! Category 1 :name "fine-dining")))
(is (= true
Expand Down
4 changes: 2 additions & 2 deletions toucan1/test/toucan/test_models/category.clj
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@

(def ^:dynamic *categories-awaiting-moderation*
"A poor man's message queue of newly added Category IDs that are \"awating moderation\"."
(atom (clojure.lang.PersistentQueue/EMPTY)))
(atom clojure.lang.PersistentQueue/EMPTY))

(defn add-category-to-moderation-queue! [{:keys [id], :as new-category}]
(swap! *categories-awaiting-moderation* conj id)
new-category)

(def ^:dynamic *categories-recently-updated*
"A simple queue of recently updated Category IDs."
(atom (clojure.lang.PersistentQueue/EMPTY)))
(atom clojure.lang.PersistentQueue/EMPTY))

(defn add-category-to-updated-queue! [{:keys [id]}]
(swap! *categories-recently-updated* conj id))
Expand Down

0 comments on commit f29849f

Please sign in to comment.