| Age | Commit message (Collapse) | Author |
|
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.
|
|
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.
|
|
The Makefile, go.mod, and go.sum are known file names.
|
|
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.
|
|
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.
|
|
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.
|
|
File that match with match-file-pattern but without prefix and suffix
will be marked as binary.
|
|
|
|
This is to make all files generated by this program to be SPDX compliant.
|
|
If the file already contains SPDX-License-Identifier and
SPDX-FileCopyrightText, in any order, ignore it from being included
during scan.
|
|
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.
|
|
The loadReport method load the ReportFile from the current directory,
as written by [report.write] method.
|
|
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.
|
|
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.
|