Skip to content
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
36 changes: 36 additions & 0 deletions .clj-kondo/imports/babashka/fs/babashka/fs.clj_kondo
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
(ns babashka.fs
(:require [clj-kondo.hooks-api :as api]))

(defn- symbol-node? [node]
(and (api/token-node? node)
(symbol? (api/sexpr node))))

(defn with-temp-dir
[{:keys [node]}]
(let [args (rest (:children node))
binding-like-vector (first args)
body (rest args)]
(when-not (zero? (count args)) ;; let clj-kondo report on arity
(if-not (api/vector-node? binding-like-vector)
(api/reg-finding! (assoc (meta binding-like-vector)
:message "babashka.fs/with-temp-dir requires a vector for first arg"
:type :babashka-fs/with-temp-dir-first-arg-not-vector))
(let [[binding-sym options & rest-in-vec] (:children binding-like-vector)]
(when (not (symbol-node? binding-sym))
(api/reg-finding! (assoc (meta (or binding-sym binding-like-vector))
:message "babashka.fs/with-temp-dir vector arg requires binding-name symbol as first value"
:type :babashka-fs/with-temp-dir-vector-arg-needs-binding-symbol)))
(doseq [extra-vector-arg rest-in-vec]
(api/reg-finding! (assoc (meta extra-vector-arg)
:message "babashka.fs/with-temp-dir vector arg accepts at most 2 values"
:type :babashka-fs/with-temp-dir-vector-arg-extra-value)))

(when binding-sym
{:node (api/list-node
;; satisfy linter by creating binding for for binding-sym
(list*
(api/token-node 'let)
;; it doesn't really matter what we bind to, so long as it is bound
(api/vector-node [binding-sym (api/token-node nil)])
options ;; avoid unused binding when options is a binding
body))}))))))
5 changes: 4 additions & 1 deletion .clj-kondo/imports/babashka/fs/config.edn
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
{:lint-as {babashka.fs/with-temp-dir clojure.core/let}}
{:linters {:babashka-fs/with-temp-dir-first-arg-not-vector {:level :error}
:babashka-fs/with-temp-dir-vector-arg-needs-binding-symbol {:level :error}
:babashka-fs/with-temp-dir-vector-arg-extra-value {:level :error}}
:hooks {:analyze-call {babashka.fs/with-temp-dir babashka.fs/with-temp-dir}}}
2 changes: 1 addition & 1 deletion .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Setup
uses: ./.github/workflows/shared-setup
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/libs-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Setup
uses: ./.github/workflows/shared-setup
Expand All @@ -41,7 +41,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/native-image-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
if: matrix.os == 'windows'

- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Setup
uses: ./.github/workflows/shared-setup
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Setup
uses: ./.github/workflows/shared-setup
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Setup
uses: ./.github/workflows/shared-setup
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
if: matrix.os == 'windows'

- name: Checkout
uses: actions/checkout@v5
uses: actions/checkout@v6

- name: Setup
uses: ./.github/workflows/shared-setup
Expand Down
2 changes: 1 addition & 1 deletion deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
;; Test support
;;

:test-common {:extra-deps {org.clojure/test.check {:mvn/version "1.1.1"}}
:test-common {:extra-deps {org.clojure/test.check {:mvn/version "1.1.2"}}
:extra-paths ["test"]}

:test-isolated {:extra-paths ["test-isolated"]}
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"karma-cljs-test": "0.1.0",
"karma-junit-reporter": "2.0.1",
"karma-spec-reporter": "0.0.36",
"shadow-cljs": "3.2.1"
"shadow-cljs": "3.3.1"
}
}
6 changes: 3 additions & 3 deletions script/test_libs.clj
Original file line number Diff line number Diff line change
Expand Up @@ -299,14 +299,14 @@
:show-deps-fn cli-deps-tree
:test-cmds ["clojure -T:build ci"]}
{:name "cljfmt"
:version "0.15.5"
:version "0.15.6"
:platforms [:clj :cljs]
:root "cljfmt"
:github-release {:repo "weavejester/cljfmt"
:via :tag}
:patch-fn project-clj-v1-patch
:show-deps-fn lein-deps-tree
:test-cmds ["lein test"]}
:test-cmds ["lein test-all"]}
{:name "cljstyle"
:version "0.17.642"
:platforms [:clj]
Expand All @@ -318,7 +318,7 @@
"bin/test unit"]}
{:name "clojure-lsp"
:platforms [:clj]
:version "2025.08.25-14.21.46"
:version "2025.11.28-12.47.43"
:github-release {:repo "clojure-lsp/clojure-lsp"}
:patch-fn clojure-lsp-patch
:show-deps-fn clojure-lsp-deps
Expand Down
2 changes: 1 addition & 1 deletion shadow-cljs.edn
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{:source-paths ["src" "test"]
:dependencies [[org.clojure/test.check "1.1.1"]]
:dependencies [[org.clojure/test.check "1.1.2"]]
:builds {:test {:target :node-test
:output-to "target/shadow-cljs/node-test.js"
:compiler-options {:warnings
Expand Down
Loading