https://bugs.linuxfoundation.org/show_bug.cgi?id=1286
Bug #: 1286
Summary: Add line numbers to errors when parsing SPDX tag
files.
Product: SPDX
Version: 2.0
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: Pretty Printer
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
Created attachment 487
--> https://bugs.linuxfoundation.org/attachment.cgi?id=487
test.tag from SPDX tools, modified to use a lowercase 'or' operator.
When using the SPDX tools and an error occurs when parsing an SPDX tag file
then it is hard to track down the cause due to lack of context. I normally end
up having to repeatedly chop down my tag file and reprocess it until I can work
out which line is the cause of the issue. It would help very much if parsing
errors could include the line number in the original tag file.
As a real example, I had an SPDX file that used lowercase for 'and' and 'or'
operators (not allowed by SPDX spec) and it took me a several hours to track
down why the tool was throwing an error. I have attached the test.tag file from
the SPDX tools with a lowercase 'or' to demonstrate this. Even in this short
file it is difficult to track down the error based just on the supplied error
message. A line number would help enormously.
> java -jar spdx-tools-2.0.0-jar-with-dependencies.jar TagToRDF test.tag
> test.rdf
Error creating SPDX Analysis:
org.spdx.spdxspreadsheet.InvalidLicenseStringException: Invalid license
expression. Expecting more operands.
--
Configure bugmail: https://bugs.linuxfoundation.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Spdx-tech mailing list
[email protected]
https://lists.spdx.org/mailman/listinfo/spdx-tech