Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Kondo version #178

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading