├── .gitignore ├── README.md ├── project.clj └── src └── leiningen └── checkall.clj /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /lib 3 | /classes 4 | /checkouts 5 | pom.xml 6 | pom.xml.asc 7 | *.jar 8 | *.class 9 | .lein-deps-sum 10 | .lein-failures 11 | .lein-plugins 12 | .lein-repl-history 13 | .lein-env 14 | 15 | 16 | /doc 17 | /bin 18 | 19 | .project 20 | .classpath 21 | .settings/ 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # lein-checkall 2 | 3 | A Leiningen plugin to do many wonderful things. 4 | 5 | "lein check && lein kibit && lein eastwood && lein bikeshed" 6 | 7 | ## Usage 8 | 9 | Use this for user-level plugins: 10 | 11 | Put `[lein-checkall "0.1.1"]` into the `:plugins` vector of your 12 | `:user` profile, or if you are on Leiningen 1.x do `lein plugin install 13 | lein-checkall 0.1.1`. 14 | 15 | Use this for project-level plugins: 16 | 17 | Put `[lein-checkall "0.1.1"]` into the `:plugins` vector of your project.clj. 18 | 19 | and add an example usage that actually makes sense: 20 | 21 | $ lein checkall 22 | 23 | ## License 24 | 25 | Copyright © 2013 itang 26 | 27 | Distributed under the Eclipse Public License, the same as Clojure. 28 | -------------------------------------------------------------------------------- /project.clj: -------------------------------------------------------------------------------- 1 | (defproject lein-checkall "0.1.1" 2 | :description "lein check && lein kibit && lein eastwood && lein bikeshed" 3 | :url "http://lein-checkall.itang.me" 4 | :license {:name "Eclipse Public License" 5 | :url "http://www.eclipse.org/legal/epl-v10.html"} 6 | :dependencies [[org.clojure/clojure "1.4.0"] 7 | [lein-kibit "0.0.8"] 8 | [jonase/eastwood "0.0.2"] 9 | [lein-bikeshed "0.1.3"]] 10 | :eval-in-leiningen true 11 | :pom-addition [:developers [:developer 12 | [:id "itang"] 13 | [:name "唐古拉山"] 14 | [:url "http://www.itang.me"] 15 | [:email "live.tang@gmail.com"]]]) 16 | -------------------------------------------------------------------------------- /src/leiningen/checkall.clj: -------------------------------------------------------------------------------- 1 | (ns leiningen.checkall 2 | (:require [clojure.string :as str] 3 | [leiningen.check :refer [check]] 4 | [leiningen.kibit :refer [kibit]] 5 | [leiningen.eastwood :refer [eastwood]] 6 | [leiningen.bikeshed :refer [bikeshed]])) 7 | 8 | (defn- print-line [s ft] 9 | (println (str (when-not ft "\n\n\n") 10 | s 11 | (str/join "" (repeat (- 70 (count s)) "="))))) 12 | 13 | (defn- do-check [project msg check-fn & {:keys [first?] :or {first? false}}] 14 | (print-line msg first?) 15 | (check-fn project) 16 | project) 17 | 18 | (defn- do-checks [project] 19 | (-> project 20 | (do-check "[lein check]" check :first? true) 21 | (do-check "[lein kibit]" kibit) 22 | (do-check "[lein eastwood]" eastwood) 23 | (do-check "[lein bikeshed]" bikeshed))) 24 | 25 | (defn checkall 26 | "lein check && lein kibit && lein eastwood && lein bikeshed" 27 | [project & args] 28 | (do-checks project)) 29 | --------------------------------------------------------------------------------