aboutsummaryrefslogtreecommitdiff
path: root/testdata/scan
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2026-01-14 15:41:31 +0700
committerShulhan <ms@kilabit.info>2026-01-14 17:00:11 +0700
commita6f72c549c43ae9d2d74946769221cb3431e9458 (patch)
tree3c709143e14ecdd137091b43e8b8a5f31e9f3daa /testdata/scan
parentb37a4cd18827d6a8dafe2729ba72a8e13e8fbb8c (diff)
downloadspdxconv-a6f72c549c43ae9d2d74946769221cb3431e9458.tar.xz
all: detect annotation from REUSE configuration
During scan, the program will read the REUSE.toml configuration. File that is already annotated inside REUSE.toml will be ignored during scan.
Diffstat (limited to 'testdata/scan')
-rw-r--r--testdata/scan/REUSE.toml13
-rw-r--r--testdata/scan/po/included.go7
-rw-r--r--testdata/scan/po/test.po1
-rw-r--r--testdata/scan/po/test.pot1
4 files changed, 22 insertions, 0 deletions
diff --git a/testdata/scan/REUSE.toml b/testdata/scan/REUSE.toml
new file mode 100644
index 0000000..3621d08
--- /dev/null
+++ b/testdata/scan/REUSE.toml
@@ -0,0 +1,13 @@
+version = 1
+
+[[annotations]]
+path = ["po/*.po", "po/*.pot"]
+precedence = "aggregate"
+SPDX-FileCopyrightText = "2026 M. Shulhan <ms@kilabit.info>"
+SPDX-License-Identifier = "GPL-3.0-only"
+
+[[annotations]]
+path = "tests/resources/**"
+precedence = "override"
+SPDX-FileCopyrightText = "2026 M. Shulhan <ms@kilabit.info>"
+SPDX-License-Identifier = "CC0-1.0"
diff --git a/testdata/scan/po/included.go b/testdata/scan/po/included.go
new file mode 100644
index 0000000..d499f94
--- /dev/null
+++ b/testdata/scan/po/included.go
@@ -0,0 +1,7 @@
+// Copyright 2026, Shulhan <ms@kilabit.info>. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package po
+
+// This file not annotated by REUSE.toml.
diff --git a/testdata/scan/po/test.po b/testdata/scan/po/test.po
new file mode 100644
index 0000000..327d157
--- /dev/null
+++ b/testdata/scan/po/test.po
@@ -0,0 +1 @@
+This file is annotated by REUSE.toml.
diff --git a/testdata/scan/po/test.pot b/testdata/scan/po/test.pot
new file mode 100644
index 0000000..327d157
--- /dev/null
+++ b/testdata/scan/po/test.pot
@@ -0,0 +1 @@
+This file is annotated by REUSE.toml.