Fixed the plugin, removed plugin opts for now
This commit is contained in:
parent
337da5049a
commit
308e638ba6
1 changed files with 5 additions and 7 deletions
|
@ -9,19 +9,17 @@
|
|||
"Suggest idiomatic replacements for patterns of code."
|
||||
[project & opts]
|
||||
(let [paths (or (:source-paths project) [(:source-path project)])
|
||||
source-files (mapcat #(-> % io/file clj-ns/find-clojure-sources-in-dir) paths)
|
||||
kw-opts (apply hash-map (map read-string opts))
|
||||
verbose (or (:verbose kw-opts) false)
|
||||
check (if verbose kibit/check-subforms kibit/check-toplevel-forms)]
|
||||
source-files (mapcat #(-> % io/file clj-ns/find-clojure-sources-in-dir) paths)]
|
||||
(doseq [source-file source-files]
|
||||
(with-open [reader (io/reader source-file)]
|
||||
(printf "== %s ==\n" (or (second (clj-ns/read-file-ns-decl source-file)) source-file))
|
||||
(try
|
||||
(->> (check reader rules/all-rules)
|
||||
(filter #(contains? % :alt))
|
||||
(->> (kibit/check-reader reader)
|
||||
#_(filter #(contains? % :alt))
|
||||
(map reporters/cli-reporter)
|
||||
doall)
|
||||
(catch Exception e
|
||||
(println "Check failed -- skipping rest of file")
|
||||
(when verbose (.printStackTrace e))))))))
|
||||
(println (.getMessage e))))))))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue