Description:
Tidy output.
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
@@ -1,5 +1,5 | |||||
|
1 |
(defproject project-checkup "0.1. |
|
1 | (defproject project-checkup "0.1.4-SNAPSHOT" |
|
2 | :description "FIXME: write description" |
|
2 | :description "Makes sure your project is healthy. " |
|
3 | :url "http://example.com/FIXME" |
|
3 | :url "http://example.com/FIXME" |
|
4 | :license {:name "Eclipse Public License" |
|
4 | :license {:name "Eclipse Public License" |
|
5 | :url "http://www.eclipse.org/legal/epl-v10.html"} |
|
5 | :url "http://www.eclipse.org/legal/epl-v10.html"} |
@@ -30,6 +30,7 | |||||
|
30 | ; files (string/split (:out (shell/sh "hg" "st" "-m" "-a" "-r" "-d" "-c" "-n" )) #"\n") |
|
30 | ; files (string/split (:out (shell/sh "hg" "st" "-m" "-a" "-r" "-d" "-c" "-n" )) #"\n") |
|
31 |
|
31 | ||
|
32 | files (map #(clojure.string/replace % #"./(.*)" "$1") all-files ) |
|
32 | files (map #(clojure.string/replace % #"./(.*)" "$1") all-files ) |
|
|
33 | ; file-set (set files) | ||
|
33 | ;note that using some here means that if both are present, hg is |
|
34 | ;note that using some here means that if both are present, hg is |
|
34 | ;ignored: |
|
35 | ;ignored: |
|
35 | vcs-systems (set (vector (some #{".git" ".hg"} files))) ] |
|
36 | vcs-systems (set (vector (some #{".git" ".hg"} files))) ] |
@@ -74,7 +75,7 | |||||
|
74 | (= (count (re-find #"(FIXME|TODO)" (:readme project) )) 0)) |
|
75 | (= (count (re-find #"(FIXME|TODO)" (:readme project) )) 0)) |
|
75 |
|
76 | ||
|
76 |
|
77 | ||
|
77 | (def checks [{:name "Has VCS" |
|
78 | (def checks [{:name "Project is checked into revision control" |
|
78 | :description "" |
|
79 | :description "" |
|
79 | :function check-vcs |
|
80 | :function check-vcs |
|
80 | :level :error |
|
81 | :level :error |
@@ -83,17 +84,17 | |||||
|
83 | :function #(or true %) |
|
84 | :function #(or true %) |
|
84 | :level :error |
|
85 | :level :error |
|
85 | :follow-up "This is a bug." } |
|
86 | :follow-up "This is a bug." } |
|
86 |
{:name " |
|
87 | {:name "All files are tracked or ignored" |
|
87 | :description "" |
|
88 | :description "" |
|
88 | :function check-untracked |
|
89 | :function check-untracked |
|
89 | :level :warning |
|
90 | :level :warning |
|
90 | :follow-up "Commit or ignore files from 'hg st -u' or 'git ls-files --others --exclude-standard'." } |
|
91 | :follow-up "Commit or ignore files from 'hg st -u' or 'git ls-files --others --exclude-standard'." } |
|
91 |
{:name " |
|
92 | {:name "Project has a todo file" |
|
92 | :function check-taskpaper |
|
93 | :function check-taskpaper |
|
93 | :description "" |
|
94 | :description "" |
|
94 | :level :suggestion |
|
95 | :level :suggestion |
|
95 | :follow-up "Add a todo file using Taskpaper." } |
|
96 | :follow-up "Add a todo file using Taskpaper." } |
|
96 |
{:name "Has R |
|
97 | {:name "Has README" |
|
97 | :function check-readme |
|
98 | :function check-readme |
|
98 | :description "Readme exists" |
|
99 | :description "Readme exists" |
|
99 | :level :suggestion |
|
100 | :level :suggestion |
@@ -113,12 +114,23 | |||||
|
113 | :suggestion :blue |
|
114 | :suggestion :blue |
|
114 | :warning :yellow |
|
115 | :warning :yellow |
|
115 | :error :red |
|
116 | :error :red |
|
116 |
:red) |
|
117 | :red) |
|
|
118 | prefix (case level | ||
|
|
119 | :suggestion "Suggested follow-up" | ||
|
|
120 | :warning "Recommended follow-up" | ||
|
|
121 | :error "Required follow-up" | ||
|
|
122 | "Follow-up" | ||
|
|
123 | |||
|
|
124 | ) | ||
|
|
125 | ] | ||
|
117 | {:name check-name |
|
126 | {:name check-name |
|
118 | :result result |
|
127 | :result result |
|
119 | :output (if result |
|
128 | :output (if result |
|
120 |
(color :green (str " |
|
129 | (color :green (str "✔" check-name "…passed!")) |
|
121 |
(str |
|
130 | (str (color false-color (str "❌" check-name "…failed!")) "\n\t" prefix " Follow up: " follow-up) |
|
|
131 | ; (str check-name (color false-color " failed! ") "\n\tFollow up: " follow-up) | ||
|
|
132 | |||
|
|
133 | )})) | ||
|
122 |
|
134 | ||
|
123 |
|
135 | ||
|
124 | (defn -main |
|
136 | (defn -main |
You need to be logged in to leave comments.
Login now