diff options
| author | Shulhan <ms@kilabit.info> | 2026-01-10 18:20:52 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2026-01-10 18:20:52 +0700 |
| commit | 187cf1cb9cc684f3860426be86e9c682aa6c849f (patch) | |
| tree | 95bb19caf30f9685916c453dcff4e4c0297a3fbf /README.md | |
| parent | 6b1ee0dbb0e0801afbf98199e0ca0dd5b2dbe3cb (diff) | |
| download | spdxconv-187cf1cb9cc684f3860426be86e9c682aa6c849f.tar.xz | |
report: store the index line number and comments in report
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.
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 45 |
1 files changed, 26 insertions, 19 deletions
@@ -135,7 +135,8 @@ Each line in the report file is formatted using CSV and has several columns separated by comma, ``` -path "," license_id "," year "," copyright_id +path "," license_id "," idx_license_id "," year "," copyright_id "," + idx_copyright_id "," comment_prefix "," comment_suffix ``` where each column has the following values, @@ -143,17 +144,14 @@ where each column has the following values, ``` path = { unicode_char } -license_id = "default" | exist_at_index | license_text - exist_at_index = "exists:" decimal_digit - license_text = 1 * { unicode_char } +license_id = "default" | "exist" | "match" +idx_license_id = 1 * decimal_digit year = "unknown" | 4 * decimal_digit | 4 * decimal_digit "-" 4*decimal_digit -copyright_id = "default" | exist_at_index | copyright_text - copyright_text = author contact - author = 1 * { unicode_char } - contact = "<" 1 * { unicode_char } ">" +copyright_id = "default" | "exist" | "match" +idx_copyright_id = 1 * decimal_digit ``` The `path` column define the path to the file that will be processed by @@ -164,11 +162,14 @@ The value either, - default - insert new identifier and using the default license_identifier value from configuration. -- exist:index - the SPDX-License-Identifier already exist in the file at - line `index`. - Positive index means from the top, and negative means from the bottom. -- license_text - the value of license_identifier from one of match-license - section. +- exist - the SPDX-License-Identifier already exist in file. +- match - one of the pattern in match-license found in file at line number + set in `idx_license_id`. + +The `idx_license_id` define the line number in file where license_id is +"exist" or "match". +Positive value means match found at the top, and negative value means match +found at the bottom. The `year` column define the copyright year for the work. The value is either, @@ -182,11 +183,17 @@ The value is either, - default - insert new identifier using the default copyright_text value from configuration. -- exist:index - the SPDX-FileCopyrightText already exist in the file at - line `index`. - Positive index means from the top, and negative means from the bottom. -- copyright_text - the value of author and contact regex match group from - one of the match-copyright pattern. +- exist - the SPDX-FileCopyrightText already exist in file. +- match - one of the pattern in the match-copyright found in file at line + number set in `idx_copyright_id`. + +The `idx_copyright_id` define the line number in file where copyright_id is +"exist" or "match". +Positive value means match found at the top, and negative value means match +found at the bottom. + +The `comment_prefix` and `comment_suffix` contains the prefix and suffix +used as comment in the file. ### spdxconv.report file groups @@ -224,7 +231,7 @@ configuration and rerun the scan command for the next cycle. ## apply command The apply command read the "spdxconv.report" and apply the license and -copyright as stated on each line in the report. +copyright in the file as stated on each line in the report. ## References |
