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

kcl-lang / kcl-go / 33352004073
29%
main: 29%

Build:
Build:
LAST BUILD BRANCH: fix/jsonschema-if-type-guard
DEFAULT BRANCH: main
Ran 31 Aug 2026 02:52AM UTC
Jobs 6
Files 103
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

31 Aug 2026 02:51AM UTC coverage: 29.254% (+0.6%) from 28.689%
33352004073

Pull #585

github

Peefy
feat(go): expose XAMLString and WithOutputFormat, honor __kcl_info_meta__ marker

PR-1 of issue #2047. Vendors pkg/format/xml + pkg/format/yaml from
kcl-lang/cli so kcl-go can render XML locally without a proto change,
then adds the attribute-aware XAML API.

- New XAMLString() on KCLResult mirrors YAMLString(); produced by a
  default xmlHook post-processor that runs when WithOutputFormat("xaml")
  is set.
- WithOutputFormat(format) Option sets the proto Format field. The CLI
  --format xml path is unaffected; this only matters for the XAML route.
- pkg/format/xml.Convert honours the new marker key (formerly
  __kcl_xml_attrs__) __kcl_info_meta__: splitAttrs reads the marker,
  emits the listed keys as name="value" attributes on the parent
  element, and deletes the marker so it is never rendered.
- pkg/format/yaml vendors ParseStream/IsStream (37 lines) so the xml
  hook can split multi-doc input.
- Renderer never emits a literal <__kcl_info_meta__> element even when
  the marker is missing.

PR-3 (kcl-lang/kcl) sets the marker; without that PR this code path
is inert. PR-2 (kcl-lang/cli) wires the same marker into --format xml.

Tests: pkg/format/xml (8), pkg/kcl (XAMLString mocked) all pass.
Signed-off-by: Peefy <xpf6677@163.com>
Pull Request #585: feat(go): expose XAMLString and honor __kcl_info_meta__ marker (fixes #2047)

167 of 274 new or added lines in 5 files covered. (60.95%)

4834 of 16524 relevant lines covered (29.25%)

2.01 hits per line

Uncovered Changes

Lines Coverage ∆ File
45
21.29
4.52% pkg/kcl/api.go
32
81.5
pkg/format/xml/xml.go
20
0.0
pkg/format/yaml/yaml.go
7
51.64
-1.53% pkg/kcl/opt.go
3
52.94
-1.6% kcl.go
Jobs
ID Job ID Ran Files Coverage
1 33352004073.1 31 Aug 2026 02:52AM UTC 103
29.25
GitHub Action Run
2 33352004073.2 31 Aug 2026 02:52AM UTC 103
29.25
GitHub Action Run
3 33352004073.3 31 Aug 2026 02:52AM UTC 103
29.25
GitHub Action Run
4 33352004073.4 31 Aug 2026 02:52AM UTC 103
29.25
GitHub Action Run
5 33352004073.5 31 Aug 2026 02:52AM UTC 103
29.25
GitHub Action Run
6 33352004073.6 31 Aug 2026 02:52AM UTC 103
29.25
GitHub Action Run
Source Files on build 33352004073
  • Tree
  • List 103
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #585
  • PR Base - main (#33302352720)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc