Skip to content

Commit

Permalink
fixing pdf disclosure doc (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
edulix committed Nov 25, 2021
1 parent 3a0c5b1 commit 66bcaa3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ort.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
ort-extra-args: -P ort.severeRuleViolationThreshold=HINT
report-extra-args: >
--report-option
ADocTemplate=template.path=/project/.ort-data/disclosure_document.ftl
PdfTemplate=template.path=/project/.ort-data/disclosure_document.ftl
- uses: actions/upload-artifact@v2
with:
Expand Down
64 changes: 26 additions & 38 deletions .ort-data/disclosure_document.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,37 @@ If not present, the text is displayed normally.
:revdate: ${now?date?iso_local}
:revnumber: 1.0.0

== Issue Summary

[#-- List all issues and their status --]
[#if tabularScanRecord.issueSummary.rows?size > 0]

[#assign
issueErrors = tabularScanRecord
.issueSummary
.errorCount
]

[#assign
issueWarns = tabularScanRecord
.issueSummary
.warningCount
]

[#assign
issueHint = tabularScanRecord
.issueSummary
.hintCount
]
${issueErrors} errors, ${issueWarns} warnings, ${issueHint} hints to resolve
[#else]
0 errors, 0 warnings, 0 hints to resolve[/#if]

== Projects Licenses
[#if projects?has_content]
[#--Merge the licenses and copyrights of all projects into a single list. The default LicenseView.ALL is used because--]
[#--projects cannot have a concluded license (compare with the handling of packages below). --]

== Projects Licenses

[#list projects as project]

=== ${project.id.name}
Expand All @@ -71,14 +95,10 @@ If not present, the text is displayed normally.
[#assign copyrights = resolvedLicense.getCopyrights(true)]
[#list copyrights as copyright]
** +${copyright}+
[#else]
** No copyright found.
[/#list]

[/#list]
[/#list]
[/#if]
<<<

[#-- List all rule violations and their status --]
== Rule Violation Summary
Expand Down Expand Up @@ -127,31 +147,6 @@ No rule violations found.

[/#if]

[#-- List all issues and their status --]
[#if tabularScanRecord.issueSummary.rows?size > 0]
== Issue Summary

[#assign
issueErrors = tabularScanRecord
.issueSummary
.errorCount
]

[#assign
issueWarns = tabularScanRecord
.issueSummary
.warningCount
]

[#assign
issueHint = tabularScanRecord
.issueSummary
.hintCount
]
${issueErrors} errors, ${issueWarns} warnings, ${issueHint} hints to resolve

[/#if]

[#-- Add the licenses of all dependencies. --]
== Dependencies

Expand Down Expand Up @@ -179,8 +174,6 @@ License File: <<${ModelExtensions.toPurl(package.id)} ${licenseFile.path}, ${lic
[#assign copyrights = licenseFile.getCopyrights()]
[#list copyrights as copyright]
** +${copyright}+
[#else]
** No copyright found.
[/#list]

[/#list]
Expand Down Expand Up @@ -216,14 +209,11 @@ The following licenses and copyrights were found in the source code of this pack
[#assign copyrights = resolvedLicense.getCopyrights(true)]
[#list copyrights as copyright]
** +${copyright}+
[#else]
** No copyright found.
[/#list]

[/#list]
[/#if]
[/#list]
<<<

[#assign
packagesWithLicenseFiles =
Expand Down Expand Up @@ -297,6 +287,4 @@ ${exceptionText}

[/#if]
[/#if]
++++
<<<
[/#list]

0 comments on commit 66bcaa3

Please sign in to comment.