# HG changeset patch # User alys # Date 2018-10-11 03:21:03 # Node ID ef498acf0748fdd8be65e8bd4c8ab813be9f0007 # Parent 08eea388d044a26c9e8fe61f15132d238b2f3129 Cleanup. diff --git a/.hgignore b/.hgignore --- a/.hgignore +++ b/.hgignore @@ -7,6 +7,7 @@ .git/** node_modules/* project-checkup-0.* +bin/* syntax: regexp ^.nrepl-port diff --git a/project.clj b/project.clj --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject project-checkup "0.1.1" +(defproject project-checkup "0.1.2-SNAPSHOT" :description "FIXME: write description" :url "http://example.com/FIXME" :license {:name "Eclipse Public License" @@ -6,9 +6,7 @@ :dependencies [[org.clojure/clojure "1.8.0"] [org.clojure/clojurescript "1.9.521"] ; [andare "0.9.0"] - [org.clojure/core.async "0.4.474"] - - ] + [org.clojure/core.async "0.4.474"]] :plugins [[lein-cljsbuild "1.1.5"]] diff --git a/src/project_checkup/core.clj b/src/project_checkup/core.clj --- a/src/project_checkup/core.clj +++ b/src/project_checkup/core.clj @@ -9,19 +9,15 @@ (defn gather-project-info "Creates a dictionary of project information" [] - (let [all-files (set (map str (file-seq (clojure.java.io/file ".")))) + (let [all-files (map str (file-seq (clojure.java.io/file "."))) ; files (string/split (:out (shell/sh "hg" "st" "-m" "-a" "-r" "-d" "-c" "-n" )) #"\n") - files (map #(clojure.string/replace % #"./(.*)" "$1") all-files ) - - ] + files (map #(clojure.string/replace % #"./(.*)" "$1") all-files ) ] {:files files :extensions (frequencies (map get-extension files )) - :path (:out (shell/sh "pwd")) - :untracked-files (string/split (:out (shell/sh "hg" "st" "-u" "-n")) #"\n") + :path (System/getProperty "user.dir") + :untracked-files (string/split (:out (shell/sh "chg" "st" "-u" "-n")) #"\n") :readme (if-let [filename (some #{"README.md" "README.txt" "README.mkd"} files)] (slurp filename) "") - }) - - ) + }) ) (defn color [color string] (let [color-sequence (case color @@ -109,14 +105,9 @@ "Run checks." [& args] (try - (doseq [check checks] (println (:output (perform-check check (gather-project-info) )))) - (catch Exception ex (.printStackTrace ex) (str "caught exception: " (.getMessage ex))) - (finally (shutdown-agents) ) - ) - - ) + (finally (shutdown-agents) )) )