aboutsummaryrefslogtreecommitdiff
path: root/report.go
AgeCommit message (Collapse)Author
2026-01-15report: do not return an error if report file does not existShulhan
When scan running, it will try to load the previous report file to minimize re-scanning of file that has been applied or detected (regular or binary). If the report file does not exist, do not return the error, keep going.
2026-01-15all: move checking REUSE annotation after all files listedShulhan
Use case: on the first scan, the file result in group unknown. User then modify the spdxconv.cfg to add or update the match-file-pattern. The next scan should check again the files in unknown group, in case its match with updated config.
2026-01-15all: add match-file-pattern for common filesShulhan
The Makefile, go.mod, and go.sum are known file names.
2026-01-15all: add group "done" in the reportShulhan
The done group contain list of file that has been processed. File from group regular and binary that has been modified or added with SPDX format will be moved to here.
2026-01-15all: improve the scan by loading the existing reportShulhan
In the second or next scan, load the existing spdxconv.report and check if the file is already scanned before. If the file is in group regular or binary, skip the scan; otherwise re-scan it again.
2026-01-15file: change the flag for grouping to use int instead of boolShulhan
Previously, we use two boolean fields to flag a file as binary and unknown. In order to simplify it in the future we change it to int.
2026-01-14all: handle binary file in post-scanShulhan
File that match with match-file-pattern but without prefix and suffix will be marked as binary.
2026-01-14report: group the file with missing copyright year as unknownShulhan
2026-01-11report: add SPDX identifiers to generated reportShulhan
This is to make all files generated by this program to be SPDX compliant.
2026-01-11all: exclude file that contains both SPDX license and copyright textShulhan
If the file already contains SPDX-License-Identifier and SPDX-FileCopyrightText, in any order, ignore it from being included during scan.
2026-01-10report: store the index line number and comments in reportShulhan
For the index line number, instead of tied to license_id and copyright_id value (separated by ":"), store it in separate column as idx_license_id and idx_copyright_id. For comments, store the prefix and suffix at column 6 and 7 in CSV line.
2026-01-10report: add method loadReportShulhan
The loadReport method load the ReportFile from the current directory, as written by [report.write] method.
2026-01-09report: change the output to use CSV formatShulhan
Using space separated with double quote on some fields are not easy to parse. Using CSV allow us to use the [encoding/csv] package from standard library.
2026-01-09all: implement the scan commandShulhan
The scan command scan the files that need to be converted or inserted with SPDX identifiers in the current directory. The result of scan is stored inside a report file named "spdxconv.report". There are no other files modified after scan completed. User then can inspect and modify the report to exclude certain files or changes the behaviour of apply command. Deleting a line in the report means excluding the file from being processed by "apply" command.