Skip to content

Commit f3dee76

Browse files
committed
format-ns
1 parent 2aba561 commit f3dee76

File tree

62 files changed

+325
-411
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+325
-411
lines changed

.lsp/config.edn

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
{:cljfmt {:indents {for-all [[:inner 0]]
2-
are [[:inner 0]]}}}
2+
are [[:inner 0]]}}
3+
:clean {:ns-inner-blocks-indentation :same-line}}

modules/reitit-core/src/reitit/coercion.cljc

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
(ns reitit.coercion
2-
(:require
3-
[clojure.walk :as walk]
4-
[reitit.impl :as impl])
2+
(:require [clojure.walk :as walk]
3+
[reitit.impl :as impl])
54
#?(:clj
6-
(:import
7-
(java.io Writer))))
5+
(:import (java.io Writer))))
86

97
;;
108
;; Protocol

modules/reitit-core/src/reitit/core.cljc

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
(ns reitit.core
2-
(:require
3-
[reitit.exception :as exception]
4-
[reitit.impl :as impl]
5-
[reitit.trie :as trie]))
2+
(:require [reitit.exception :as exception]
3+
[reitit.impl :as impl]
4+
[reitit.trie :as trie]))
65

76
;;
87
;; Expand

modules/reitit-core/src/reitit/dependency.cljc

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
(ns reitit.dependency
22
"Dependency resolution for middleware/interceptors."
3-
(:require
4-
[reitit.exception :as exception]))
3+
(:require [reitit.exception :as exception]))
54

65
(defn- providers
76
"Map from provision key to provider. `get-provides` should return the provision keys of a dependent."

modules/reitit-core/src/reitit/exception.cljc

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
(ns reitit.exception
2-
(:require
3-
[clojure.string :as str]))
2+
(:require [clojure.string :as str]))
43

54
(defn fail!
65
([type]

modules/reitit-core/src/reitit/impl.cljc

+7-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
(ns ^:no-doc reitit.impl
22
#?(:cljs (:require-macros [reitit.impl]))
3-
(:require
4-
[clojure.set :as set]
5-
[clojure.string :as str]
6-
[meta-merge.core :as mm]
7-
[reitit.exception :as ex]
8-
[reitit.trie :as trie])
3+
(:require [clojure.set :as set]
4+
[clojure.string :as str]
5+
[meta-merge.core :as mm]
6+
[reitit.exception :as ex]
7+
[reitit.trie :as trie])
98
#?(:clj
10-
(:import
11-
(java.net URLEncoder URLDecoder)
12-
(java.util HashMap Map))))
9+
(:import (java.net URLEncoder URLDecoder)
10+
(java.util HashMap Map))))
1311

1412
(defn parse [path opts]
1513
(let [path #?(:clj (.intern ^String (trie/normalize path opts)) :cljs (trie/normalize path opts))

modules/reitit-core/src/reitit/interceptor.cljc

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
(ns reitit.interceptor
2-
(:require
3-
[clojure.pprint :as pprint]
4-
[meta-merge.core :refer [meta-merge]]
5-
[reitit.core :as r]
6-
[reitit.exception :as exception]
7-
[reitit.impl :as impl]))
2+
(:require [clojure.pprint :as pprint]
3+
[meta-merge.core :refer [meta-merge]]
4+
[reitit.core :as r]
5+
[reitit.exception :as exception]
6+
[reitit.impl :as impl]))
87

98
(defprotocol IntoInterceptor
109
(into-interceptor [this data opts]))

modules/reitit-core/src/reitit/middleware.cljc

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
(ns reitit.middleware
2-
(:require
3-
[clojure.pprint :as pprint]
4-
[meta-merge.core :refer [meta-merge]]
5-
[reitit.core :as r]
6-
[reitit.exception :as exception]
7-
[reitit.impl :as impl]))
2+
(:require [clojure.pprint :as pprint]
3+
[meta-merge.core :refer [meta-merge]]
4+
[reitit.core :as r]
5+
[reitit.exception :as exception]
6+
[reitit.impl :as impl]))
87

98
(defprotocol IntoMiddleware
109
(into-middleware [this data opts]))

modules/reitit-core/src/reitit/spec.cljc

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
(ns reitit.spec
2-
(:require
3-
[clojure.spec.alpha :as s]
4-
[clojure.spec.gen.alpha :as gen]
5-
[reitit.core :as r]
6-
[reitit.exception :as exception]))
2+
(:require [clojure.spec.alpha :as s]
3+
[clojure.spec.gen.alpha :as gen]
4+
[reitit.core :as r]
5+
[reitit.exception :as exception]))
76

87
;;
98
;; routes

modules/reitit-core/src/reitit/trie.cljc

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
(ns reitit.trie
22
(:refer-clojure :exclude [compile])
3-
(:require
4-
[clojure.string :as str]
5-
[reitit.exception :as ex])
6-
#?(:clj (:import
7-
(java.net URLDecoder)
8-
[reitit Trie Trie$Match Trie$Matcher])))
3+
(:require [clojure.string :as str]
4+
[reitit.exception :as ex])
5+
#?(:clj (:import (java.net URLDecoder)
6+
[reitit Trie Trie$Match Trie$Matcher])))
97

108
(defn ^:no-doc into-set [x]
119
(cond

modules/reitit-dev/src/reitit/dev/pretty.cljc

+12-13
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
(ns reitit.dev.pretty
2-
(:require
3-
[arrangement.core] ;; spell-spec
4-
[clojure.spec.alpha :as s]
5-
[clojure.string :as str]
6-
[expound.alpha] ;; fipp
7-
[expound.ansi]
8-
[fipp.edn]
9-
[fipp.ednize]
10-
[fipp.engine]
11-
[fipp.visit]
12-
[reitit.exception :as exception]
13-
[spell-spec.expound] ;; expound
14-
))
2+
(:require [arrangement.core] ;; spell-spec
3+
[clojure.spec.alpha :as s]
4+
[clojure.string :as str]
5+
[expound.alpha] ;; fipp
6+
[expound.ansi]
7+
[fipp.edn]
8+
[fipp.ednize]
9+
[fipp.engine]
10+
[fipp.visit]
11+
[reitit.exception :as exception]
12+
[spell-spec.expound] ;; expound
13+
))
1514

1615
;;
1716
;; colors

modules/reitit-frontend/src/reitit/frontend.cljs

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
(ns reitit.frontend
2-
(:require
3-
[clojure.set :as set]
4-
[reitit.coercion :as coercion]
5-
[reitit.core :as r])
6-
(:import
7-
goog.Uri
8-
goog.Uri.QueryData))
2+
(:require [clojure.set :as set]
3+
[reitit.coercion :as coercion]
4+
[reitit.core :as r])
5+
(:import goog.Uri
6+
goog.Uri.QueryData))
97

108
(defn- query-param [^QueryData q k]
119
(let [vs (.getValues q k)]

modules/reitit-frontend/src/reitit/frontend/easy.cljs

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
"Easy wrapper over reitit.frontend.history,
33
handling the state. Only one router can be active
44
at a time."
5-
(:require
6-
[reitit.frontend.history :as rfh]))
5+
(:require [reitit.frontend.history :as rfh]))
76

87
(defonce history (atom nil))
98

modules/reitit-frontend/src/reitit/frontend/history.cljs

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
(ns reitit.frontend.history
22
"Provides integration to hash-change or HTML5 History
33
events."
4-
(:require
5-
[goog.events :as gevents]
6-
[reitit.core :as reitit]
7-
[reitit.frontend :as rf])
8-
(:import
9-
goog.Uri))
4+
(:require [goog.events :as gevents]
5+
[reitit.core :as reitit]
6+
[reitit.frontend :as rf])
7+
(:import goog.Uri))
108

119
(defprotocol History
1210
(-init [this] "Create event listeners")

modules/reitit-http/src/reitit/http.cljc

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
(ns reitit.http
2-
(:require
3-
[meta-merge.core :refer [meta-merge]]
4-
[reitit.core :as r]
5-
[reitit.exception :as ex]
6-
[reitit.interceptor :as interceptor]
7-
[reitit.ring :as ring]))
2+
(:require [meta-merge.core :refer [meta-merge]]
3+
[reitit.core :as r]
4+
[reitit.exception :as ex]
5+
[reitit.interceptor :as interceptor]
6+
[reitit.ring :as ring]))
87

98
(defrecord Endpoint [data interceptors queue handler path method])
109

modules/reitit-http/src/reitit/http/coercion.cljc

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
(ns reitit.http.coercion
2-
(:require
3-
[reitit.coercion :as coercion]
4-
[reitit.impl :as impl]
5-
[reitit.spec :as rs]))
2+
(:require [reitit.coercion :as coercion]
3+
[reitit.impl :as impl]
4+
[reitit.spec :as rs]))
65

76
(defn coerce-request-interceptor
87
"Interceptor for pluggable request coercion.

modules/reitit-http/src/reitit/http/spec.cljc

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
(ns reitit.http.spec
2-
(:require
3-
[clojure.spec.alpha :as s]
4-
[reitit.exception :as exception]
5-
[reitit.interceptor :as interceptor]
6-
[reitit.ring.spec :as rrs]
7-
[reitit.spec :as rs]))
2+
(:require [clojure.spec.alpha :as s]
3+
[reitit.exception :as exception]
4+
[reitit.interceptor :as interceptor]
5+
[reitit.ring.spec :as rrs]
6+
[reitit.spec :as rs]))
87

98
;;
109
;; Specs

modules/reitit-interceptors/src/reitit/http/interceptors/dev.clj

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
(ns reitit.http.interceptors.dev
2-
(:require
3-
[lambdaisland.deep-diff :as ddiff]
4-
[lambdaisland.deep-diff.printer :as printer]
5-
[puget.color :as color]
6-
[reitit.core :as r]))
2+
(:require [lambdaisland.deep-diff :as ddiff]
3+
[lambdaisland.deep-diff.printer :as printer]
4+
[puget.color :as color]
5+
[reitit.core :as r]))
76

87
(def printer
98
(-> (printer/puget-printer)

modules/reitit-interceptors/src/reitit/http/interceptors/exception.clj

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
(ns reitit.http.interceptors.exception
2-
(:require
3-
[clojure.spec.alpha :as s]
4-
[clojure.string :as str]
5-
[reitit.coercion :as coercion]
6-
[reitit.ring :as ring])
7-
(:import
8-
(java.io PrintWriter Writer)
9-
(java.time Instant)))
2+
(:require [clojure.spec.alpha :as s]
3+
[clojure.string :as str]
4+
[reitit.coercion :as coercion]
5+
[reitit.ring :as ring])
6+
(:import (java.io PrintWriter Writer)
7+
(java.time Instant)))
108

119
(s/def ::handlers (s/map-of any? fn?))
1210
(s/def ::spec (s/keys :opt-un [::handlers]))

modules/reitit-interceptors/src/reitit/http/interceptors/multipart.clj

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
(ns reitit.http.interceptors.multipart
2-
(:require
3-
[clojure.spec.alpha :as s]
4-
[reitit.coercion :as coercion]
5-
[reitit.spec]
6-
[ring.middleware.multipart-params :as multipart-params]
7-
[spec-tools.core :as st])
8-
(:import
9-
(java.io File)))
2+
(:require [clojure.spec.alpha :as s]
3+
[reitit.coercion :as coercion]
4+
[reitit.spec]
5+
[ring.middleware.multipart-params :as multipart-params]
6+
[spec-tools.core :as st])
7+
(:import (java.io File)))
108

119
(s/def ::filename string?)
1210
(s/def ::content-type string?)

modules/reitit-interceptors/src/reitit/http/interceptors/muuntaja.clj

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
(ns reitit.http.interceptors.muuntaja
2-
(:require
3-
[clojure.spec.alpha :as s]
4-
[muuntaja.core :as m]
5-
[muuntaja.interceptor]))
2+
(:require [clojure.spec.alpha :as s]
3+
[muuntaja.core :as m]
4+
[muuntaja.interceptor]))
65

76
(s/def ::muuntaja m/muuntaja?)
87
(s/def ::spec (s/keys :opt-un [::muuntaja]))

modules/reitit-interceptors/src/reitit/http/interceptors/parameters.clj

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
(ns reitit.http.interceptors.parameters
2-
(:require
3-
[ring.middleware.params :as params]))
2+
(:require [ring.middleware.params :as params]))
43

54
(defn parameters-interceptor
65
"Interceptor to parse urlencoded parameters from the query string and form

modules/reitit-malli/src/reitit/coercion/malli.cljc

+10-11
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
(ns reitit.coercion.malli
2-
(:require
3-
[clojure.set :as set]
4-
[clojure.walk :as walk]
5-
[malli.core :as m]
6-
[malli.edn :as edn]
7-
[malli.error :as me]
8-
[malli.experimental.lite :as l]
9-
[malli.swagger :as swagger]
10-
[malli.transform :as mt]
11-
[malli.util :as mu]
12-
[reitit.coercion :as coercion]))
2+
(:require [clojure.set :as set]
3+
[clojure.walk :as walk]
4+
[malli.core :as m]
5+
[malli.edn :as edn]
6+
[malli.error :as me]
7+
[malli.experimental.lite :as l]
8+
[malli.swagger :as swagger]
9+
[malli.transform :as mt]
10+
[malli.util :as mu]
11+
[reitit.coercion :as coercion]))
1312

1413
;;
1514
;; coercion

modules/reitit-malli/src/reitit/ring/malli.cljc

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
(ns reitit.ring.malli
2-
#?(:clj (:import
3-
(java.io File))))
2+
#?(:clj (:import (java.io File))))
43

54
#?(:clj
65
(def temp-file-part

modules/reitit-middleware/src/reitit/ring/middleware/dev.clj

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
(ns reitit.ring.middleware.dev
2-
(:require
3-
[lambdaisland.deep-diff :as ddiff]
4-
[lambdaisland.deep-diff.printer :as printer]
5-
[puget.color :as color]
6-
[reitit.core :as r]))
2+
(:require [lambdaisland.deep-diff :as ddiff]
3+
[lambdaisland.deep-diff.printer :as printer]
4+
[puget.color :as color]
5+
[reitit.core :as r]))
76

87
(def printer
98
(-> (printer/puget-printer)

modules/reitit-middleware/src/reitit/ring/middleware/exception.clj

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
(ns reitit.ring.middleware.exception
2-
(:require
3-
[clojure.spec.alpha :as s]
4-
[clojure.string :as str]
5-
[reitit.coercion :as coercion]
6-
[reitit.ring :as ring])
7-
(:import
8-
(java.io Writer PrintWriter)
9-
(java.time Instant)))
2+
(:require [clojure.spec.alpha :as s]
3+
[clojure.string :as str]
4+
[reitit.coercion :as coercion]
5+
[reitit.ring :as ring])
6+
(:import (java.io Writer PrintWriter)
7+
(java.time Instant)))
108

119
(s/def ::handlers (s/map-of any? fn?))
1210
(s/def ::spec (s/keys :opt-un [::handlers]))

0 commit comments

Comments
 (0)