Description:
Cleanup.
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r6:ef498acf0748 -

@@ -7,6 +7,7
7 .git/**
7 .git/**
8 node_modules/*
8 node_modules/*
9 project-checkup-0.*
9 project-checkup-0.*
10 bin/*
10
11
11 syntax: regexp
12 syntax: regexp
12 ^.nrepl-port
13 ^.nrepl-port
@@ -1,4 +1,4
1 (defproject project-checkup "0.1.1"
1 (defproject project-checkup "0.1.2-SNAPSHOT"
2 :description "FIXME: write description"
2 :description "FIXME: write description"
3 :url "http://example.com/FIXME"
3 :url "http://example.com/FIXME"
4 :license {:name "Eclipse Public License"
4 :license {:name "Eclipse Public License"
@@ -6,9 +6,7
6 :dependencies [[org.clojure/clojure "1.8.0"]
6 :dependencies [[org.clojure/clojure "1.8.0"]
7 [org.clojure/clojurescript "1.9.521"]
7 [org.clojure/clojurescript "1.9.521"]
8 ; [andare "0.9.0"]
8 ; [andare "0.9.0"]
9 [org.clojure/core.async "0.4.474"]
9 [org.clojure/core.async "0.4.474"]]
10
11 ]
12
10
13 :plugins [[lein-cljsbuild "1.1.5"]]
11 :plugins [[lein-cljsbuild "1.1.5"]]
14
12
@@ -9,19 +9,15
9 (defn gather-project-info
9 (defn gather-project-info
10 "Creates a dictionary of project information"
10 "Creates a dictionary of project information"
11 []
11 []
12 (let [all-files (set (map str (file-seq (clojure.java.io/file "."))))
12 (let [all-files (map str (file-seq (clojure.java.io/file ".")))
13 ; files (string/split (:out (shell/sh "hg" "st" "-m" "-a" "-r" "-d" "-c" "-n" )) #"\n")
13 ; files (string/split (:out (shell/sh "hg" "st" "-m" "-a" "-r" "-d" "-c" "-n" )) #"\n")
14 files (map #(clojure.string/replace % #"./(.*)" "$1") all-files )
14 files (map #(clojure.string/replace % #"./(.*)" "$1") all-files ) ]
15
16 ]
17 {:files files
15 {:files files
18 :extensions (frequencies (map get-extension files ))
16 :extensions (frequencies (map get-extension files ))
19 :path (:out (shell/sh "pwd"))
17 :path (System/getProperty "user.dir")
20 :untracked-files (string/split (:out (shell/sh "hg" "st" "-u" "-n")) #"\n")
18 :untracked-files (string/split (:out (shell/sh "chg" "st" "-u" "-n")) #"\n")
21 :readme (if-let [filename (some #{"README.md" "README.txt" "README.mkd"} files)] (slurp filename) "")
19 :readme (if-let [filename (some #{"README.md" "README.txt" "README.mkd"} files)] (slurp filename) "")
22 })
20 }) )
23
24 )
25
21
26 (defn color [color string]
22 (defn color [color string]
27 (let [color-sequence (case color
23 (let [color-sequence (case color
@@ -109,14 +105,9
109 "Run checks."
105 "Run checks."
110 [& args]
106 [& args]
111 (try
107 (try
112
113 (doseq [check checks]
108 (doseq [check checks]
114 (println (:output (perform-check check (gather-project-info) ))))
109 (println (:output (perform-check check (gather-project-info) ))))
115
116 (catch Exception ex
110 (catch Exception ex
117 (.printStackTrace ex)
111 (.printStackTrace ex)
118 (str "caught exception: " (.getMessage ex)))
112 (str "caught exception: " (.getMessage ex)))
119 (finally (shutdown-agents) )
113 (finally (shutdown-agents) )) )
120 )
121
122 )
You need to be logged in to leave comments. Login now