Hello,

This is just a status update for the SPDX Go Parser Library. I’m happy to say 
that most of the features are currently working but not very well tested (only 
the tag parser and lexer are extensively tested at the moment).

The features are:

Library

- Parse SPDX files in RDF and tag formats to a spdx.Document struct
- Write spdx.Document structs in tag and RDF format
- Validate spdx.Document structs
- Support for metadata (knows which line was a property defined on, useful for 
things like nicer error messages when validating)

Note: All RDF syntaxes supported by the raptor library are supported by tool as 
well. If the format used is “rdf” (not a raptor specific format like “rdfxml”), 
the format "xmlrdf-abbrev" is used for writing and raptor's “guess” parser is 
used for parsing.

CLI tool

- guess input format (quite dummy at the moment but if the file extensions are 
good, it saves a bit of typing time on the command line)
- for usage, see "spdx-go -help”
- convert
        - to / from tag and RDF
        - comments are ignored

- pretty-print
        - does not parse the document into a spdx.Document (not really required)
        - for RDF, uses raptor to re-write the document
        - for Tag, it re-prints all the elements in the input file
                - leaves a blank line before the properties “FileName”, 
“PackageName”, “ArtifactOfProjectName”, “LicenseID”, “Reviewer”
                - leaves a blank line before a comment, if the line before is 
not a comment as well
                - etc.

- validate
        - parses the file into a spdx.Document
        - can output validation errors in
                - command line (simple one line, one error format)
                - html
                        - saves a .html file on disk
                        - or saves a temporary .html file and creates a new 
browser window to it


What I’m working on:

- Write tests for RDF parsing and writing
- Write tests for Tag writing
- Write tests for the validator
- Write tests for general functions in the spdx package (parse the ‘creator’ 
format, etc.)
- Write tests for the CLI Tool
- Refactor some things if required
- Better documentation

I would appreciate any suggestions or code reviews.

Thanks,
Vlad
_______________________________________________
Spdx-tech mailing list
Spdx-tech@lists.spdx.org
https://lists.spdx.org/mailman/listinfo/spdx-tech

Reply via email to