Skip to content

Commit

Permalink
Merge pull request #59 from pmonks/dev
Browse files Browse the repository at this point in the history
Release 2.0.238
  • Loading branch information
pmonks authored Jun 13, 2024
2 parents a80f50f + c2a8a8a commit 03e890e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
Binary file modified demo-check-asf-policy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo-licenses-explain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified demo-licenses-summary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 12 additions & 7 deletions src/tools_licenses/tasks.clj
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,18 @@
(case (:type %)
:declared (ansi/fg-bright :green "Declared")
:concluded (ansi/fg-bright :yellow "Concluded"))
(when-let [confidence (:confidence %)] (str (ansi/bold "\n Confidence: ")
(case confidence
:low (ansi/fg-bright :red "low")
:medium (ansi/fg-bright :yellow "medium")
:high (ansi/fg-bright :green "high"))))
(when-let [strategy (:strategy %)] (str (ansi/bold "\n Strategy: ") (get lcu/strategy->string strategy (name strategy))))
(when-let [source (seq (map remove-file-prefix (:source %)))] (str (ansi/bold "\n Source:") "\n " (s/join "\n" source))))
(when-let [confidence (:confidence %)]
(str (ansi/bold "\n Confidence: ")
(case confidence
:low (ansi/fg-bright :red "low")
:medium (ansi/fg-bright :yellow "medium")
:high (ansi/fg-bright :green "high"))))
(when-let [confidence-explanations (seq (:confidence-explanations %))]
(str " (" (s/join ", " (map (fn [exp] (s/replace (name exp) "-" " ")) (sort confidence-explanations))) ")"))
(when-let [strategy (:strategy %)]
(str (ansi/bold "\n Strategy: ") (get lcu/strategy->string strategy (name strategy))))
(when-let [source (seq (map remove-file-prefix (:source %)))]
(str (ansi/bold "\n Source:") "\n " (s/join "\n" source))))
info-list))))))

(defn- explain-with-licenses!
Expand Down

0 comments on commit 03e890e

Please sign in to comment.