diff options
| author | eltrac <hi@eltr.ac> | 2026-10-13 21:27:29 +0800 |
|---|---|---|
| committer | eltrac <hi@eltr.ac> | 2026-10-13 21:27:29 +0800 |
| commit | 3989bf6fbbb242ad5bd6a1d1f91f70a6a222f8e2 (patch) | |
| tree | 435dfee792ec80de7b4cfc233efd53fab579529e /scripts/ci | |
| parent | 29344c41cc11c2d5d34bdfdbcfb8d093fad1002a (diff) | |
style: cljfmt everything
Diffstat (limited to 'scripts/ci')
| -rw-r--r-- | scripts/ci/coverage_badge.clj | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/scripts/ci/coverage_badge.clj b/scripts/ci/coverage_badge.clj index a8a0948..4cb5947 100644 --- a/scripts/ci/coverage_badge.clj +++ b/scripts/ci/coverage_badge.clj @@ -7,25 +7,25 @@ (def cloverage-output "target/coverage/index.html")
(def coverage (let [rows (-> cloverage-output
- slurp
- h/parse
- h/as-hickory
- :content first ;; get <html>
- :content (nth 3) ;; get <body>
- :content second ;; get <table>
- :content last ;; get <tbody>
- :content)
- total-row (->> rows
- (map :content)
- (filter sequential?)
- (filter #(= "Totals:" (get-in % [0 :content 0])))
- first
- (filter map?))]
+ slurp
+ h/parse
+ h/as-hickory
+ :content first ;; get <html>
+ :content (nth 3) ;; get <body>
+ :content second ;; get <table>
+ :content last ;; get <tbody>
+ :content)
+ total-row (->> rows
+ (map :content)
+ (filter sequential?)
+ (filter #(= "Totals:" (get-in % [0 :content 0])))
+ first
+ (filter map?))]
(-> total-row
- (nth 2)
- :content
- first
- (string/replace " " ""))))
+ (nth 2)
+ :content
+ first
+ (string/replace " " ""))))
;; "25" will make "%25" which decoded to "%", removing it will result in a Bad Request
(def badge-url (str "https://img.shields.io/badge/coverage-" coverage "25-green"))
(def badge-html
|
