Skip to content

Commit

Permalink
docs(spdx): Distinguish all "The name must not be blank" requirements
Browse files Browse the repository at this point in the history
Make it easier to understand from reading logs which SPDX class is
affected.

Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
  • Loading branch information
sschuberth committed May 3, 2024
1 parent 2b19f91 commit a8787d3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion utils/spdx/src/main/kotlin/model/SpdxDocument.kt
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ data class SpdxDocument(

require(spdxVersion.isNotBlank()) { "The SPDX version must not be blank." }

require(name.isNotBlank()) { "The name must not be blank." }
require(name.isNotBlank()) { "The document name for SPDX-ID '$spdxId' must not be blank." }

require(dataLicense.isNotBlank()) { "The data license must not be blank." }

Expand Down
2 changes: 1 addition & 1 deletion utils/spdx/src/main/kotlin/model/SpdxFile.kt
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ data class SpdxFile(

require(copyrightText.isNotBlank()) { "The copyright text must not be blank." }

require(filename.isNotBlank()) { "The filename must not be blank." }
require(filename.isNotBlank()) { "The filename for SPDX-ID '$spdxId' must not be blank." }

require(licenseConcluded.isSpdxExpressionOrNotPresent()) {
"The license concluded must be either an SpdxExpression, 'NONE' or 'NOASSERTION', but was " +
Expand Down
2 changes: 1 addition & 1 deletion utils/spdx/src/main/kotlin/model/SpdxPackage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ data class SpdxPackage(

require(downloadLocation.isNotBlank()) { "The download location must not be blank." }

require(name.isNotBlank()) { "The name must not be blank." }
require(name.isNotBlank()) { "The package name for SPDX-ID '$spdxId' must not be blank." }

val validPrefixes = listOf(SpdxConstants.PERSON, SpdxConstants.ORGANIZATION)

Expand Down
2 changes: 1 addition & 1 deletion utils/spdx/src/main/kotlin/model/SpdxSnippet.kt
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ data class SpdxSnippet(
}

require(name.isNotBlank()) {
"The name must not be blank."
"The snippet name for SPDX-ID '$spdxId' must not be blank."
}

require(snippetFromFile.isNotBlank()) {
Expand Down

0 comments on commit a8787d3

Please sign in to comment.