aboutsummaryrefslogtreecommitdiff
path: root/tvloader/parser2v2
AgeCommit message (Collapse)Author
2023-02-28Added blueprints to spdx-tools libraryIbrahim Kanouche
Test: m all Change-Id: Iccd31e33b40d6d7cd1a876ca468332b01d1b9e34
2022-11-30Update 2.2 tag-value parsers to support all algorithmsAdolfo García Veytia (Puerco)
Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>
2022-11-30Add SHA512 support to 2.2 parser testsAdolfo García Veytia (Puerco)
Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>
2022-11-30Update v2.2 parsers to support SHA512Adolfo García Veytia (Puerco)
Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>
2022-07-19replace all v2_1, v2_2 with new conventionBrandon Lum
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
2022-04-25Overhaul structs, refactor JSON parser and saverIan Ling
Signed-off-by: Ian Ling <ian@iancaling.com>
2021-07-04Merge pull request #64 from specter25/package-spdxIdSteve Winslow
Throw error for pkgs / files without SPDX IDs
2021-07-04Minor cleanup edits to text and commentsSteve Winslow
Signed-off-by: Steve Winslow <steve@swinslow.net>
2021-05-12Units Tests in tvloader structured and a few tests addedspecter25
Signed-off-by: specter25 <ujjwalcoding012@gmail.com>
2021-05-12Structural modifications in error checksspecter25
-- Added file name display in error messages - Structured the tests in respective files Signed-off-by: specter25 <ujjwalcoding012@gmail.com>
2021-05-02Merge branch 'issue-59' into issue-59-to-masterSteve Winslow
2021-04-04Structural changes in spdxId fix for package and filesspecter25
- Fix capitalized initials of error messages - Other structural changes to increase code efficiency Signed-off-by: specter25 <ujjwalcoding012@gmail.com>
2021-03-28Error on missing package and file ids in v2.1specter25
- Shows error if a Package has a missing SPDXID tag - Show error if a File has a missing SPDXID tag Signed-off-by: specter25 <ujjwalcoding012@gmail.com>
2021-03-28Error on missing package and file ids in v2.2specter25
- Shows error if a Package has a missing SPDXID tag - Show error if a File has a missing SPDXID tag Signed-off-by: specter25 <ujjwalcoding012@gmail.com>
2021-03-21Combine switch cases and remove redundant NLspecter25
- Combine the switch cases when defined enum for case type - Rmoved redundant NL in the code Signed-off-by: specter25 <ujjwalcoding012@gmail.com>
2021-03-21Change naming convention of checksum structspecter25
- Change the name of Checksum struct so that it can be used by all spdx versions - Remove unnecessary commented code Signed-off-by: specter25 <ujjwalcoding012@gmail.com>
2021-03-20Fix special IDs for right-side 2.2 RelationshipsSteve Winslow
In SPDX 2.2, the right-hand side of Relationships are not limited to SPDX IDs; they can also include the special values NONE and NOASSERTION. To handle these, since Golang doesn't (to my knowledge) have a concept of union types, and since I don't want to use interface{}, this commit instead adds a new SpecialID field to DocElementID. When SpecialID is non-empty, it should be treated as being a "special" ID value, and DocumentRefID / ElementRefID should be ignored. (Unfortunately, we can't just use ElementRefID == "NONE", etc. for this purpose, because in theory an SPDX document could define the identifier SPDXRef-NONE to mean something. Even though they really, really shouldn't do that.) This commit updates tvloader and tvsaver to appropriately handle the possibility of NONE and NOASSERTION for this field. Signed-off-by: Steve Winslow <steve@swinslow.net>
2021-03-21Create struct to store checksumsspecter25
- Store the checksums in a struct with properties algorithm and value - Define permitted algorithm as constants Signed-off-by: specter25 <ujjwalcoding012@gmail.com>
2020-11-11Merge pull request #43 from swinslow/issue-38Steve Winslow
Fix tvloader storing incorrect doc ID
2020-11-08Fix parsing for expanded external document refsSteve Winslow
Signed-off-by: Steve Winslow <steve@swinslow.net>
2020-11-08Fix tvloader storing incorrect doc IDSteve Winslow
Signed-off-by: Steve Winslow <steve@swinslow.net>
2020-06-14Add tvloader and tests for 2.2Steve Winslow
Signed-off-by: Steve Winslow <steve@swinslow.net>