• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

spdx / tools-golang / 29122752175
86%
main: 86%

Build:
Build:
LAST BUILD BRANCH: chore/guard-nil-package
DEFAULT BRANCH: main
Ran 10 Jul 2026 10:12PM UTC
Jobs 1
Files 138
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

10 Jul 2026 08:49PM UTC coverage: 86.471% (+0.04%) from 86.431%
29122752175

Pull #291

github

arpitjain099
Guard against a nil *Package when reading JSON

A JSON document with a null entry in the packages array (for example
{"packages":[null]}) decodes to a nil *Package. The custom Document
unmarshaller walks d.Packages to build hasFiles relationships and
dereferenced that nil, so json.Read panicked instead of returning an
error-free document.

Skip nil package entries in the hasFiles loop, matching the existing
nil-relationships strip added for #238. Applied to both v2_2 and v2_3,
with a regression fixture and test in the json package.

Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
Pull Request #291: Guard against a nil *Package when reading JSON

4 of 4 new or added lines in 2 files covered. (100.0%)

2 existing lines in 1 file now uncovered.

7574 of 8759 relevant lines covered (86.47%)

18.6 hits per line

Coverage Regressions

Lines Coverage ∆ File
2
98.25
-1.75% spdx/v2/v2_3/rdf/reader/parse_relationship.go
Jobs
ID Job ID Ran Files Coverage
1 29122752175.1 10 Jul 2026 10:12PM UTC 138
86.47
GitHub Action Run
Source Files on build 29122752175
  • Tree
  • List 138
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #291
  • PR Base - main (#28206827284)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc