aboutsummaryrefslogtreecommitdiff
path: root/file_test.go
AgeCommit message (Collapse)Author
2026-01-14match_file_comment: do not add space on prefix and suffixShulhan
The space should be added only when generating the SPDX lines. In the spdxconv.report, it should print the prefix and suffix as in match-file-comment.
2026-01-12all: implement match-file-comment for seting comment based on file nameShulhan
The first thing that the program do is to detect which comment string to be used when inserting SPDX identifiers in the file. For each pattern in the "match-file-comment" section, the program will match it with file name to get the comment prefix and suffix to be used later. User can add their own "match-file-comment" section as they like or modify the existing one. The "match-file-comment" can have empty prefix and suffix. That means, if the file name match, it will create new file with ".license" suffix that contains SPDX identifiers only, instead of inserting to the file.
2026-01-11all: implement apply commandShulhan
The apply command read the "spdxconv.report" and apply the license and copyright as stated on each file in the report. A file that has been successfully processed will be removed from the report.
2026-01-08all: fix wrong copyright year on some filesShulhan
I wrote the initial codes in December 2025 but commit it on year 2026.
2026-01-08all: implement conversion for SPDX-License-IdentifierShulhan
If the file contains "SPDX-License-Identifier", it will not modify it. The program will move the identifier to the top of file after shebang. If the spdxconv.cfg contains match-license, and the pattern match with one of the line in the file, it will use the license_identifier instead of default one and insert it at the top, after shebang. If the files does not contains the identifier, it will insert new one based on default value in spdxconv.cfg file.