Skip to content

Commit 64e6903

Browse files
authored
Fix lint and tests (#102)
1 parent 07d77c1 commit 64e6903

File tree

4 files changed

+21
-19
lines changed

4 files changed

+21
-19
lines changed

bbin

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ WARNING: (We won't make any changes without asking you first.)
267267
lib-opts->template-deps-fn))
268268

269269
(defn- invalid-lib-opts-error [provided-lib-opts]
270-
(ex-info (str "Provided invalid combination of CLI options")
270+
(ex-info "Provided invalid combination of CLI options"
271271
{:provided-opts (set (keys provided-lib-opts))
272272
:valid-combinations valid-lib-opts}))
273273

@@ -383,8 +383,9 @@ WARNING: (We won't make any changes without asking you first.)
383383
(and (#{:http} procurer) (re-seq #"\.git$" (:script/lib cli-opts))))
384384
:dir
385385

386-
(or (and (#{:local} procurer) (and (:script/lib cli-opts)
387-
(regular-file? (:script/lib cli-opts))))
386+
(or (and (#{:local} procurer)
387+
(:script/lib cli-opts)
388+
(regular-file? (:script/lib cli-opts)))
388389
(and (#{:http} procurer) (re-seq #"\.(cljc?|bb)$" (:script/lib cli-opts))))
389390
:file
390391

src/babashka/bbin/deps.clj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
lib-opts->template-deps-fn))
7373

7474
(defn- invalid-lib-opts-error [provided-lib-opts]
75-
(ex-info (str "Provided invalid combination of CLI options")
75+
(ex-info "Provided invalid combination of CLI options"
7676
{:provided-opts (set (keys provided-lib-opts))
7777
:valid-combinations valid-lib-opts}))
7878

@@ -188,8 +188,9 @@
188188
(and (#{:http} procurer) (re-seq #"\.git$" (:script/lib cli-opts))))
189189
:dir
190190

191-
(or (and (#{:local} procurer) (and (:script/lib cli-opts)
192-
(regular-file? (:script/lib cli-opts))))
191+
(or (and (#{:local} procurer)
192+
(:script/lib cli-opts)
193+
(regular-file? (:script/lib cli-opts)))
193194
(and (#{:http} procurer) (re-seq #"\.(cljc?|bb)$" (:script/lib cli-opts))))
194195
:file
195196

test/babashka/bbin/migrate_test.clj

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@
7676
[:copying {:src (str (fs/file (dirs/legacy-bin-dir) "hello.bat"))
7777
:dest (str (fs/file (dirs/xdg-bin-dir nil) "hello.bat"))}])
7878
[:moving {:src (str (dirs/legacy-bin-dir))
79-
:dest (str (migrate/src-backup-path
80-
(dirs/legacy-bin-dir)
81-
(inst-ms (util/now))))}]
79+
:dest (migrate/src-backup-path
80+
(dirs/legacy-bin-dir)
81+
(inst-ms (util/now)))}]
8282
[:done]])
8383
commands-2 [[:up-to-date]]]
8484
(is (= commands-1
@@ -113,9 +113,9 @@
113113
[:migrating]
114114
[:skipping {:src (str (fs/file (dirs/legacy-bin-dir) "hello"))}]
115115
[:moving {:src (str (dirs/legacy-bin-dir))
116-
:dest (str (migrate/src-backup-path
117-
(dirs/legacy-bin-dir)
118-
(inst-ms (util/now))))}]
116+
:dest (migrate/src-backup-path
117+
(dirs/legacy-bin-dir)
118+
(inst-ms (util/now)))}]
119119
[:done]]
120120
commands-2 [[:up-to-date]]]
121121
(is (= commands-1
@@ -161,13 +161,13 @@
161161
[:copying {:src (str (fs/file (dirs/legacy-jars-dir) "hello.jar"))
162162
:dest (str (fs/file (dirs/xdg-jars-dir nil) "hello.jar"))}]
163163
[:moving {:src (str (dirs/legacy-bin-dir))
164-
:dest (str (migrate/src-backup-path
165-
(dirs/legacy-bin-dir)
166-
(inst-ms (util/now))))}]
164+
:dest (migrate/src-backup-path
165+
(dirs/legacy-bin-dir)
166+
(inst-ms (util/now)))}]
167167
[:moving {:src (str (dirs/legacy-jars-dir))
168-
:dest (str (migrate/src-backup-path
169-
(dirs/legacy-jars-dir)
170-
(inst-ms (util/now))))}]
168+
:dest (migrate/src-backup-path
169+
(dirs/legacy-jars-dir)
170+
(inst-ms (util/now)))}]
171171
[:done]])
172172
commands-2 [[:up-to-date]]]
173173
(is (= commands-1

test/babashka/bbin/scripts/maven_jar_test.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
(is (= `{~'http-server ~maven-lib} (tu/run-ls))))))
2929

3030
(def upgraded-lib
31-
(assoc-in maven-lib [:coords :mvn/version] "0.1.13"))
31+
(assoc-in maven-lib [:coords :mvn/version] "0.1.14"))
3232

3333
(deftest upgrade-maven-jar-test
3434
(testing "upgrade (maven jar)"

0 commit comments

Comments
 (0)