File tree Expand file tree Collapse file tree 7 files changed +40
-21
lines changed
Expand file tree Collapse file tree 7 files changed +40
-21
lines changed Original file line number Diff line number Diff line change 33 clojure.java.jdbc/with-db-transaction clojure.core/let}
44
55 :linters
6- {:unresolved-symbol
6+ {:consistent-alias
7+ {:aliases {clojure.string str
8+
9+ honey.sql hsql
10+
11+ next.jdbc jdbc
12+ next.jdbc.prepare jdbc.prepare
13+ next.jdbc.result-set jdbc.result-set
14+ next.jdbc.sql sql
15+ next.jdbc.types jdbc.types}}
16+
17+ ; ; use false?/true? instead of = false/true
18+ :equals-false {:level :warning }
19+ :equals-true {:level :warning }
20+
21+ ; ; warn if assoc-in/get-in/update-in are used with a single key
22+ :single-key-in {:level :warning }
23+
24+ :unresolved-symbol
725 {:exclude [(clojure.test/is [match?])]}}}
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ pom.xml
2424/.nrepl-port
2525/local-resources
2626
27- .clj-kondo /.cache
27+ .clj-kondo /*
28+ ! .clj-kondo /config.edn
2829bin /.cache
2930.cpcache
Original file line number Diff line number Diff line change 33
44set -euo pipefail
55
6- CLJ_KONDO_VERSION=" 2023.09.07 "
6+ CLJ_KONDO_VERSION=" 2023.10.20 "
77ROOT=$( cd " $( dirname " ${BASH_SOURCE[0]} " ) /../" && pwd)
88
99function ensure_clj_kondo() {
Original file line number Diff line number Diff line change 7070 form-config
7171 (::friend/auth-config request))
7272 #'workflows/interactive-login-redirect)
73- (update-in request [ ::friend/auth-config ] merge form-config)))))))
73+ (update request ::friend/auth-config merge form-config)))))))
7474
7575(defn parse-authorization-header
7676 " Parses a Basic auth header into username and password."
Original file line number Diff line number Diff line change 1010 (fn [req]
1111 (let [response (handler req)]
1212 (if (= 200 (:status response))
13- (update-in response [ :headers ] assoc " Access-Control-Allow-Origin" " *" )
13+ (update response :headers assoc " Access-Control-Allow-Origin" " *" )
1414 response))))
1515
1616(defn https-request? [req]
Original file line number Diff line number Diff line change 1616 (assoc
1717 :recent_versions (db/recent-versions db group-id artifact-id)
1818 :downloads (stats/download-count stats group-id artifact-id))
19- (update-in [ :recent_versions ]
20- (fn [versions]
21- (map (fn [version]
22- (assoc version
23- :downloads (stats/download-count stats group-id artifact-id (:version version))))
24- versions)))
19+ (update :recent_versions
20+ (fn [versions]
21+ (map (fn [version]
22+ (assoc version
23+ :downloads (stats/download-count stats group-id artifact-id (:version version))))
24+ versions)))
2525 response)
2626 (not-found nil )))
2727
Original file line number Diff line number Diff line change 1616 help/with-clean-database)
1717
1818(deftest test-group+domain-correspond?
19- (are [exp group domain]
20- (= exp (nut/group+domain-correspond? group domain))
21- true " com.foo" " foo.com"
22- true " com.foo.bar" " foo.com"
23- false " com.foo" " foo.org"
24- false " com.foo.bar" " foo.org"
25- false " foo" " foo"
26- false " foo." " .foo"
27- false " " " "
28- false nil nil ))
19+ (are [pred group domain]
20+ (pred (nut/group+domain-correspond? group domain))
21+ true ? " com.foo" " foo.com"
22+ true ? " com.foo.bar" " foo.com"
23+ false ? " com.foo" " foo.org"
24+ false ? " com.foo.bar" " foo.org"
25+ false ? " foo" " foo"
26+ false ? " foo." " .foo"
27+ false ? " " " "
28+ false ? nil nil ))
2929
3030(deftest verify-group-by-TXT-with-invalid-domain
3131 (are [given] (= " The domain name is not a valid domain name."
You can’t perform that action at this time.
0 commit comments