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. |
|
|
2 | :description "FIXME: write description" | |
|
1 | (defproject project-checkup "0.1.4-SNAPSHOT" | |
|
2 | :description "Makes sure your project is healthy. " | |
|
3 | 3 | :url "http://example.com/FIXME" |
|
4 | 4 | :license {:name "Eclipse Public License" |
|
5 | 5 | :url "http://www.eclipse.org/legal/epl-v10.html"} |
@@ -30,6 +30,7 | |||
|
30 | 30 | ; files (string/split (:out (shell/sh "hg" "st" "-m" "-a" "-r" "-d" "-c" "-n" )) #"\n") |
|
31 | 31 | |
|
32 | 32 | files (map #(clojure.string/replace % #"./(.*)" "$1") all-files ) |
|
33 | ; file-set (set files) | |
|
33 | 34 | ;note that using some here means that if both are present, hg is |
|
34 | 35 | ;ignored: |
|
35 | 36 | vcs-systems (set (vector (some #{".git" ".hg"} files))) ] |
@@ -74,7 +75,7 | |||
|
74 | 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 | 79 | :description "" |
|
79 | 80 | :function check-vcs |
|
80 | 81 | :level :error |
@@ -83,17 +84,17 | |||
|
83 | 84 | :function #(or true %) |
|
84 | 85 | :level :error |
|
85 | 86 | :follow-up "This is a bug." } |
|
86 |
{:name " |
|
|
87 | {:name "All files are tracked or ignored" | |
|
87 | 88 | :description "" |
|
88 | 89 | :function check-untracked |
|
89 | 90 | :level :warning |
|
90 | 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 | 93 | :function check-taskpaper |
|
93 | 94 | :description "" |
|
94 | 95 | :level :suggestion |
|
95 | 96 | :follow-up "Add a todo file using Taskpaper." } |
|
96 |
{:name "Has R |
|
|
97 | {:name "Has README" | |
|
97 | 98 | :function check-readme |
|
98 | 99 | :description "Readme exists" |
|
99 | 100 | :level :suggestion |
@@ -113,12 +114,23 | |||
|
113 | 114 | :suggestion :blue |
|
114 | 115 | :warning :yellow |
|
115 | 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 | 126 | {:name check-name |
|
118 | 127 | :result result |
|
119 | 128 | :output (if result |
|
120 |
(color :green (str " |
|
|
121 |
(str |
|
|
129 | (color :green (str "✔" check-name "…passed!")) | |
|
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 | 136 | (defn -main |
You need to be logged in to leave comments.
Login now