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

kcl-lang / kcl-go / 22546936236 / 2
26%
main: 26%

Build:
DEFAULT BRANCH: main
Ran 01 Mar 2026 03:54PM UTC
Files 100
Run time 2s
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

01 Mar 2026 03:53PM UTC coverage: 26.062% (+0.05%) from 26.015%
22546936236.2

push

github

web-flow
fix(gen-jsonschema): fix allOf $ref schema naming and sort closure bugs (#526)

Three bugs in the JSON schema to KCL generator caused schemas using the
allOf + placeholder-properties pattern (e.g., cloud-init) to produce
incorrect output:

1. Sort closure variable shadowing: sort.SliceStable closures used i,j
   parameter names that shadowed the outer loop variable, causing $ref
   (order 0) to sort after properties (order 2), so properties were
   converted before allOf refs could merge in real types.

2. Empty placeholder properties not replaced: when merging allOf member
   properties into an existing schema, properties with empty keyword
   sets (placeholder schemas like "count": {}) were silently skipped
   instead of being replaced with the typed schema from the allOf member.

3. $ref residue causing wrong schema names: the first $ref encountered
   in an allOf fell through to default: and was stored in s.Keywords
   rather than resolved, causing the main keyword loop to later set
   reference = "#/$defs/first_ref" and derive the schema name from it
   instead of from $id or the filename. Fixed by adding case
   *jsonschema.Ref: to the outer allOf switch so all refs are always
   resolved into schs immediately.

Adds a minimal regression test (allof-placeholder-props) and the
previously missing cloud-init/expect.k test fixture.

Signed-off-by: Richard Hillmann <richard@flowers-software.de>

4061 of 15582 relevant lines covered (26.06%)

0.3 hits per line

Source Files on job 22546936236.2
  • Tree
  • List 100
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 22546936236
  • bc4db85b on github
  • Prev Job for on main (#22054664759.5)
  • Delete
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