Skip to content

Commit

Permalink
Format with cljfmt and add other useful Leiningen plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
axvr committed Jun 11, 2023
1 parent 5ae94c2 commit 0f9d4a6
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 15 deletions.
3 changes: 3 additions & 0 deletions .clj-kondo/config.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{:skip-comments true
:linters
{:refer-all {:exclude [clojure.test]}}}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ target/
.nrepl-port
.lein-repl-history
.lein-failures
.clj-kondo/
.clj-kondo/*
!.clj-kondo/config.edn

# macOS
Expand Down
8 changes: 7 additions & 1 deletion project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,10 @@
*assert* false}
:dependencies [[org.clojure/clojure "1.11.1" :scope "provided"]
[ch.qos.logback/logback-classic "1.4.7" :scope "provided"]
[metosin/jsonista "0.3.7"]])
[metosin/jsonista "0.3.7"]]
:plugins [[com.github.clj-kondo/lein-clj-kondo "RELEASE"]
[com.github.liquidz/antq "RELEASE"]
[dev.weavejester/lein-cljfmt "RELEASE"]]
:aliases {"lint" ["clj-kondo" "--lint" "src" "test"]
"fmt" ["cljfmt" "fix"]
"antq" ["with-profile" "+dev" "antq"]})
22 changes: 10 additions & 12 deletions src/com/kroo/typeset/logback/JsonLayout.clj
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,16 @@
[setIncludeExData [Boolean] void]]))

;; Record providing fast access to JsonLayout options in lieu of fields.
(defrecord JsonLayoutOpts
[append-newline
include-logger-ctx
include-level-val
include-mdc
include-markers
include-exception
include-ex-data
exception-as-str
object-mapper
ex-converter])
(defrecord JsonLayoutOpts [append-newline
include-logger-ctx
include-level-val
include-mdc
include-markers
include-exception
include-ex-data
exception-as-str
object-mapper
ex-converter])

(defn -init
"Method invoked during object initialisation. Sets the default value for the
Expand Down Expand Up @@ -159,7 +158,6 @@
(.superStop this)
(.stop ^ThrowableProxyConverter (:ex-converter @(.state this))))


;;; -------------------------------------
;;; Expose Logback configuration options.

Expand Down
1 change: 0 additions & 1 deletion test/com/kroo/typeset/logback/JsonLayout_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
(is (str/starts-with? (actual "exception")
"clojure.lang.ExceptionInfo: Some throwable\n\tat com.kroo.typeset.logback.JsonLayout_test")))))


(deftest typeset-options-test
(let [typeset (doto (JsonLayout.)
(.setPrettyPrint true)
Expand Down

0 comments on commit 0f9d4a6

Please sign in to comment.