|
149 | 149 | (def default-options
|
150 | 150 | {:project-root "."
|
151 | 151 | :file-pattern #"\.clj[csx]?$"
|
152 |
| - :ansi? true |
153 |
| - :indentation? true |
154 |
| - :insert-missing-whitespace? true |
155 |
| - :remove-multiple-non-indenting-spaces? false |
156 |
| - :remove-surrounding-whitespace? true |
157 |
| - :remove-trailing-whitespace? true |
158 |
| - :remove-consecutive-blank-lines? true |
159 |
| - :split-keypairs-over-multiple-lines? false |
160 |
| - :indents cljfmt/default-indents |
161 |
| - :alias-map {}}) |
| 152 | + :ansi? true}) |
162 | 153 |
|
163 | 154 | (defn merge-default-options [options]
|
164 | 155 | (-> (merge default-options options)
|
|
182 | 173 | :default (:ansi? default-options)
|
183 | 174 | :id :ansi?]
|
184 | 175 | [nil "--[no-]indentation"
|
185 |
| - :default (:indentation? default-options) |
| 176 | + :default (:indentation? cljfmt/default-options) |
186 | 177 | :id :indentation?]
|
187 | 178 | [nil "--[no-]remove-multiple-non-indenting-spaces"
|
188 |
| - :default (:remove-multiple-non-indenting-spaces? default-options) |
| 179 | + :default (:remove-multiple-non-indenting-spaces? cljfmt/default-options) |
189 | 180 | :id :remove-multiple-non-indenting-spaces?]
|
190 | 181 | [nil "--[no-]remove-surrounding-whitespace"
|
191 |
| - :default (:remove-surrounding-whitespace? default-options) |
| 182 | + :default (:remove-surrounding-whitespace? cljfmt/default-options) |
192 | 183 | :id :remove-surrounding-whitespace?]
|
193 | 184 | [nil "--[no-]remove-trailing-whitespace"
|
194 |
| - :default (:remove-trailing-whitespace? default-options) |
| 185 | + :default (:remove-trailing-whitespace? cljfmt/default-options) |
195 | 186 | :id :remove-trailing-whitespace?]
|
196 | 187 | [nil "--[no-]insert-missing-whitespace"
|
197 |
| - :default (:insert-missing-whitespace? default-options) |
| 188 | + :default (:insert-missing-whitespace? cljfmt/default-options) |
198 | 189 | :id :insert-missing-whitespace?]
|
199 | 190 | [nil "--[no-]remove-consecutive-blank-lines"
|
200 |
| - :default (:remove-consecutive-blank-lines? default-options) |
| 191 | + :default (:remove-consecutive-blank-lines? cljfmt/default-options) |
201 | 192 | :id :remove-consecutive-blank-lines?]
|
202 | 193 | [nil "--[no-]split-keypairs-over-multiple-lines"
|
203 |
| - :default (:split-keypairs-over-multiple-lines? default-options) |
| 194 | + :default (:split-keypairs-over-multiple-lines? cljfmt/default-options) |
204 | 195 | :id :split-keypairs-over-multiple-lines?]])
|
205 | 196 |
|
206 | 197 | (defn- file-exists? [path]
|
|
0 commit comments