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 @@ -114,19 +114,19 @@ :level :warning ;going with warning because a project might not have a license before release. :follow-up "Add a license to LICENSE. Consider using https://choosealicense.com/ for guidance." }]) +(def false-colors {:suggestion :blue + :warning :yellow + :error :red}) + +(def level-prefixes {:suggestion "Suggested " + :warning "Recommended " + :error "Required "}) + (defn perform-check [check project] (let [{check-name :name :keys [function follow-up level]} check result (function project) - false-color (case level - :suggestion :blue - :warning :yellow - :error :red - :red) - prefix (case level - :suggestion "Suggested " - :warning "Recommended " - :error "Required " - "Follow-up")] + false-color (level false-colors :red) + prefix (level level-prefixes "Follow-up")] {:name check-name :result result :output (if result