aboutsummaryrefslogtreecommitdiff
path: root/spdx
AgeCommit message (Collapse)Author
2023-02-28Added blueprints to spdx-tools libraryIbrahim Kanouche
Test: m all Change-Id: Iccd31e33b40d6d7cd1a876ca468332b01d1b9e34
2023-01-04Merge pull request #174 from jedevc/json-tagsBrandon Lum
Ensure consistency between JSON struct tags across different SPDX versions
2022-12-05json: sync exported struct tags across spdx versionsJustin Chadwell
Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-12-05json: hide deprecated and non-spec fieldsJustin Chadwell
Some non-spec defined fields and deprecated fields were being incorrectly exported as part of the v2_1 and v2_2 module, so they were out-of-sync with v2_3. Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-12-05json: add omitempty tag to comment fieldsJustin Chadwell
Tags are marked as optional by the spec, so we should avoid writing the field on JSON output if it's unset. Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-11-30Update 2.3 parsers to support SHA512Adolfo 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-11-07fix: JSON decoding not properly handling SPDXRef- prefixesKeith Zantow
Signed-off-by: Keith Zantow <kzantow@gmail.com>
2022-10-24chore: add common hash algorithmsKeith Zantow
Signed-off-by: Keith Zantow <kzantow@gmail.com>
2022-10-07chore: add tag value reader and parser for v2.3Keith Zantow
Signed-off-by: Keith Zantow <kzantow@gmail.com>
2022-10-07chore: Add YAML support for v2.3 data modelKeith Zantow
Signed-off-by: Keith Zantow <kzantow@gmail.com>
2022-10-06chore: Add v2.3 data model and JSON supportKeith Zantow
Signed-off-by: Keith Zantow <kzantow@gmail.com>
2022-10-06chore: Fix section numbers in 2.2 data modelKeith Zantow
Signed-off-by: Keith Zantow <kzantow@gmail.com>
2022-10-03updated constantspxp928
Signed-off-by: pxp928 <parth.psu@gmail.com>
2022-09-28changed to string type based on commentpxp928
Signed-off-by: pxp928 <parth.psu@gmail.com>
2022-09-28added referenceType enumpxp928
Signed-off-by: pxp928 <parth.psu@gmail.com>
2022-06-06convert spdx structs to versioned pkgsBrandon 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-05-02Merge branch 'issue-59' into issue-59-to-masterSteve Winslow
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-08Expand external document ref data structureSteve 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-07Add tvsaver and tests for 2.2Steve Winslow
Signed-off-by: Steve Winslow <steve@swinslow.net>
2020-06-07Update 2.2 version of data structuresSteve Winslow
Signed-off-by: Steve Winslow <steve@swinslow.net>
2020-06-07Merge branch 'master' into issue-25Steve Winslow
2020-05-09Refactor tvsaver to handle element ID mapsSteve Winslow
Signed-off-by: Steve Winslow <steve@swinslow.net>
2020-05-09Refactor parser to handle element ID mapsSteve Winslow
Signed-off-by: Steve Winslow <steve@swinslow.net>
2020-04-25Change to element IDs and mapsSteve Winslow
Signed-off-by: Steve Winslow <steve@swinslow.net>
2020-04-25WIP: Add 2.2 version of data structuresSteve Winslow
Signed-off-by: Steve Winslow <steve@swinslow.net>
2020-01-09Create Go ModuleRishabhBhatnagar
- Unpack directory v0 to move all the content to the root directory. - ./v0/* converted to ./* - all the test cases were fixed to remove one directory less indexing for test files - add go.mod - go version 1.13 is used to have a relatively stable versioning system Signed-off-by: RishabhBhatnagar <bhatnagarrishabh4@gmail.com>