Description:
Refactor.
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
@@ -114,19 +114,19 | |||
|
114 | 114 | :level :warning ;going with warning because a project might not have a license before release. |
|
115 | 115 | :follow-up "Add a license to LICENSE. Consider using https://choosealicense.com/ for guidance." }]) |
|
116 | 116 | |
|
117 | (def false-colors {:suggestion :blue | |
|
118 | :warning :yellow | |
|
119 | :error :red}) | |
|
120 | ||
|
121 | (def level-prefixes {:suggestion "Suggested " | |
|
122 | :warning "Recommended " | |
|
123 | :error "Required "}) | |
|
124 | ||
|
117 | 125 | (defn perform-check [check project] |
|
118 | 126 | (let [{check-name :name :keys [function follow-up level]} check |
|
119 | 127 | result (function project) |
|
120 |
false-color ( |
|
|
121 | :suggestion :blue | |
|
122 | :warning :yellow | |
|
123 | :error :red | |
|
124 | :red) | |
|
125 | prefix (case level | |
|
126 | :suggestion "Suggested " | |
|
127 | :warning "Recommended " | |
|
128 | :error "Required " | |
|
129 | "Follow-up")] | |
|
128 | false-color (level false-colors :red) | |
|
129 | prefix (level level-prefixes "Follow-up")] | |
|
130 | 130 | {:name check-name |
|
131 | 131 | :result result |
|
132 | 132 | :output (if result |
You need to be logged in to leave comments.
Login now