-
Notifications
You must be signed in to change notification settings - Fork 66
/
project.clj
135 lines (129 loc) · 8.34 KB
/
project.clj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
(def eval-in-leiningen?
(#{"1" "true"} (System/getenv "EVAL_IN_LEININGEN")))
(def plugin-source-path "lein-eastwood")
(require '[clojure.java.io :as io]
'[clojure.string :as string])
(binding [*read-eval* false]
(let [f (->> [(io/file "resources" "EASTWOOD_VERSION")
;; support Eastwood for Lein checkouts:
(io/file (System/getProperty "user.home") "eastwood" "resources" "EASTWOOD_VERSION")]
(filter (fn [^java.io.File f]
(-> f .exists)))
(first))]
(def version (-> f slurp read-string))
(def major (-> version :major (doto assert)))
(def minor (-> version :minor (doto assert)))
(def patch (-> version :patch (doto assert)))
(def version-string (string/join "." [major minor patch]))))
(defproject jonase/eastwood version-string
:description "A Clojure lint tool"
:url "https://github.com/jonase/eastwood"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:source-paths ~(cond-> ["src" "copied-deps"]
eval-in-leiningen? (conj plugin-source-path))
:dependencies [[org.clojure/clojure "1.11.3" :scope "provided"]
[org.clojars.brenton/google-diff-match-patch "0.1"]
[org.ow2.asm/asm "9.7"]]
:deploy-repositories [["clojars" {:url "https://repo.clojars.org"
:username :env/clojars_username
:password :env/clojars_password
:sign-releases true}]]
:profiles {:dev {:dependencies [[org.clojure/tools.macro "0.1.5"]]
:jvm-opts ["-Deastwood.internal.dev-profile-active=true"]}
:dolly {:source-paths ["copy-deps-scripts/dolly"]
:dependencies [[jafingerhut/dolly "0.1.0"]]}
:eastwood-plugin {:source-paths [~plugin-source-path]
:jvm-opts ["-Deastwood.internal.plugin-profile-active=true"]}
:warn-on-reflection {:global-vars {*warn-on-reflection* true}}
:deep-diff {:dependencies [[lambdaisland/deep-diff "0.0-29"]]}
:test {:dependencies
;; NOTE: please don't add non-essential 3rd-party deps here.
;; It is desirable to rest assured that the test suite does not depend on a third-party lib.
;; If you wish to exercise compatibility against a 3rd-party lib, use the `:test-3rd-party-deps` profile instead.
[[commons-io "2.4" #_"Needed for issue-173-test"]]
:resource-paths ["test-resources"
;; if wanting the `cases` to be available during development / the default profile,
;; please simply add `with-profile +test` to your CLI invocation.
"cases"
;; Helps exercising reflection warnings coming from .jars.
;; The .jar can be regenerated by using `lein jar` within `.circleci/reflection-example`:
".circleci/reflection-example/target/reflection-example-0.1.0.jar"]
:jvm-opts ["-Deastwood.internal.running-test-suite=true"
"-Dapple.awt.UIElement=true"]}
:test-3rd-party-deps {:test-paths ^:replace ["test-third-party-deps"]
:dependencies [[com.nedap.staffing-solutions/speced.def "2.0.0"]
[com.taoensso/timbre "5.1.2"]
[com.taoensso/tufte "2.2.0"]
[manifold "0.1.9-alpha4"]
[metosin/spec-tools "0.10.5"]
[org.clojure/core.async "1.6.681"]
[org.clojure/java.jdbc "0.7.12"]]}
:clj-kondo {:dependencies [[clj-kondo "2024.05.24"]]}
:antq {:plugins [[com.github.liquidz/antq "2.8.1201"]]
:antq {:exclude ["nrepl/nrepl" "org.clojure/clojure"]}}
:1.7 {:dependencies [[org.clojure/clojure "1.7.0"]]}
:1.8 {:dependencies [[org.clojure/clojure "1.8.0"]]}
:1.9 {:dependencies [[org.clojure/clojure "1.9.0"]]}
:1.10.1 {:dependencies [[org.clojure/clojure "1.10.1"]]}
:1.10.2 {:dependencies [[org.clojure/clojure "1.10.2"]]}
:1.10.3 {:dependencies [[org.clojure/clojure "1.10.3"]]}
:1.11 {:dependencies [[org.clojure/clojure "1.11.3"]]}
;; NOTE: if adding a new Clojure version here, please be sure var-info.edn remains up-to-date.
;; you can use the `:check-var-info` Lein profile for that.
;; the `:check-var-info` profile helps keeping the var-info.edn up to date. You can exercise it with:
;; lein with-profile -user,-dev,+eastwood-plugin,+check-var-info eastwood '{:debug [:var-info]}'
;; ...among other things, it will print stubs of the missing entries so that one can copy/paste them (after due adaptations)
:check-var-info {:dependencies [;; Latest as of May 25 2021
;; (copied from `crucible/check-var-info`)
;; algo.generic
;; algo.graph
;; cheshire
;; clj-http
;; compojure
[org.clojure/core.async "1.6.681"]
[org.clojure/core.cache "1.1.234"]
[org.clojure/core.memoize "1.1.266"]
[org.clojure/data.codec "0.2.0"]
[org.clojure/data.csv "1.1.0"]
[org.clojure/data.json "2.5.0"]
[org.clojure/data.priority-map "1.2.0"]
;; data.xml
;; data.zip
;; loom?
;; instaparse
[org.clojure/java.jdbc "0.7.12"]
;; math.combinatorics
[org.clojure/math.numeric-tower "0.1.0"]
;; medley
;; plumbing
;; potemkin
;; ring
;; schema
;; timbre
;; tools.analyzer
;; tools.analyzer.jvm
;; tools.cli
;; tools.logging
;; tools.macro
;; tools.namespace
;; tools.nrepl
[org.clojure/tools.reader "1.4.2"]
[org.clojure/tools.trace "0.8.0"]
;; useful
]}
:clojure-core-test {:test-paths ^:replace ["clojure-core-test"]}
:var-info-test {:test-paths ^:replace ["var-info-test"]}
:self-lint {:test-paths ["clojure-core-test"
"var-info-test"]}}
:eastwood {:source-paths ["src"]
:test-paths ["test" "var-info-test" "clojure-core-test"]
:add-linters [:boxed-math :performance]
:debug #{}}
;; Eastwood may work with earlier Leiningen versions, but this is
;; close to the earliest version that it was most tested with.
:min-lein-version "2.3.0"
:resource-paths ["resource" "resources"]
:eval-in ~(if eval-in-leiningen?
:leiningen
:subprocess))