Skip to content

Commit 51ba6a5

Browse files
authored
Add REUSE compliance: LICENSES/, .reuse/dep5, and fix invalid SPDX ex… (#9)
* Add REUSE compliance: LICENSES/, .reuse/dep5, and fix invalid SPDX expressions - Add LICENSES/Apache-2.0.txt (copy of LICENSE) as required by REUSE spec - Add .reuse/dep5 to provide copyright/license info for files without inline headers - Fix invalid SPDX expressions in OtelImplJavadocTest and OtelInternalJavadocTest by wrapping embedded SPDX-License-Identifier strings in REUSE-IgnoreStart/End comments to prevent the REUSE linter from treating test fixture content as actual license declarations * reuse convert-dep5 Signed-off-by: Hilmar Falkenberg <hilmar.falkenberg@sap.com> --------- Signed-off-by: Hilmar Falkenberg <hilmar.falkenberg@sap.com>
1 parent 315facc commit 51ba6a5

3 files changed

Lines changed: 26 additions & 0 deletions

File tree

REUSE.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version = 1
2+
SPDX-PackageName = "OpenTelemetry Java"
3+
SPDX-PackageSupplier = "opentelemetry-java@googlegroups.com"
4+
SPDX-PackageDownloadLocation = "https://github.com/open-telemetry/opentelemetry-java"
5+
6+
[[annotations]]
7+
path = "gradle/wrapper/gradle-wrapper.jar"
8+
precedence = "aggregate"
9+
SPDX-FileCopyrightText = "Copyright Gradle, Inc."
10+
SPDX-License-Identifier = "Apache-2.0"
11+
12+
[[annotations]]
13+
path = "**"
14+
precedence = "aggregate"
15+
SPDX-FileCopyrightText = "Copyright The OpenTelemetry Authors"
16+
SPDX-License-Identifier = "Apache-2.0"

custom-checks/src/test/java/io/opentelemetry/gradle/customchecks/OtelImplJavadocTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ void positiveCases() {
1515
CompilationTestHelper.newInstance(OtelImplJavadoc.class, OtelImplJavadocTest.class)
1616
.addSourceLines(
1717
"impl/ImplJavadocPositiveCases.java",
18+
// REUSE-IgnoreStart
1819
"/*",
1920
" * Copyright The OpenTelemetry Authors",
2021
" * SPDX-License-Identifier: Apache-2.0",
2122
" */",
23+
// REUSE-IgnoreEnd
2224
"package io.opentelemetry.gradle.customchecks.impl;",
2325
"// BUG: Diagnostic contains: missing the required javadoc disclaimer",
2426
"public class ImplJavadocPositiveCases {",
@@ -36,10 +38,12 @@ void negativeCases() {
3638
CompilationTestHelper.newInstance(OtelImplJavadoc.class, OtelImplJavadocTest.class)
3739
.addSourceLines(
3840
"impl/ImplJavadocNegativeCases.java",
41+
// REUSE-IgnoreStart
3942
"/*",
4043
" * Copyright The OpenTelemetry Authors",
4144
" * SPDX-License-Identifier: Apache-2.0",
4245
" */",
46+
// REUSE-IgnoreEnd
4347
"package io.opentelemetry.gradle.customchecks.impl;",
4448
"/**",
4549
" * This class is not intended for use by application developers. Its API is stable and",
@@ -62,10 +66,12 @@ void nonImplPackageIgnored() {
6266
CompilationTestHelper.newInstance(OtelImplJavadoc.class, OtelImplJavadocTest.class)
6367
.addSourceLines(
6468
"other/NonImplPackageCases.java",
69+
// REUSE-IgnoreStart
6570
"/*",
6671
" * Copyright The OpenTelemetry Authors",
6772
" * SPDX-License-Identifier: Apache-2.0",
6873
" */",
74+
// REUSE-IgnoreEnd
6975
"package io.opentelemetry.gradle.customchecks.other;",
7076
"public class NonImplPackageCases {",
7177
" public static class One {}",

custom-checks/src/test/java/io/opentelemetry/gradle/customchecks/OtelInternalJavadocTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ void positiveCases() {
1515
CompilationTestHelper.newInstance(OtelInternalJavadoc.class, OtelInternalJavadocTest.class)
1616
.addSourceLines(
1717
"internal/InternalJavadocPositiveCases.java",
18+
// REUSE-IgnoreStart
1819
"/*",
1920
" * Copyright The OpenTelemetry Authors",
2021
" * SPDX-License-Identifier: Apache-2.0",
2122
" */",
23+
// REUSE-IgnoreEnd
2224
"package io.opentelemetry.gradle.customchecks.internal;",
2325
"// BUG: Diagnostic contains: doesn't end with any of the applicable javadoc disclaimers",
2426
"public class InternalJavadocPositiveCases {",
@@ -36,10 +38,12 @@ void negativeCases() {
3638
CompilationTestHelper.newInstance(OtelInternalJavadoc.class, OtelInternalJavadocTest.class)
3739
.addSourceLines(
3840
"internal/InternalJavadocNegativeCases.java",
41+
// REUSE-IgnoreStart
3942
"/*",
4043
" * Copyright The OpenTelemetry Authors",
4144
" * SPDX-License-Identifier: Apache-2.0",
4245
" */",
46+
// REUSE-IgnoreEnd
4347
"package io.opentelemetry.gradle.customchecks.internal;",
4448
"/**",
4549
" * This class is internal and is hence not for public use. Its APIs are unstable and can change at",

0 commit comments

Comments
 (0)