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

kcl-lang / kcl-go / 33354133901
29%

Build:
DEFAULT BRANCH: main
Ran 31 Aug 2026 03:32AM 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 03:31AM UTC coverage: 29.267% (+0.6%) from 28.689%
33354133901

push

github

web-flow
feat(go): expose XAMLString and honor __kcl_info_meta__ marker (fixes #2047) (#585)

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>

169 of 274 new or added lines in 5 files covered. (61.68%)

4836 of 16524 relevant lines covered (29.27%)

2.01 hits per line

Uncovered Changes

Lines Coverage ∆ File
45
21.29
4.52% pkg/kcl/api.go
30
82.66
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 33354133901.1 31 Aug 2026 03:32AM UTC 103
29.25
GitHub Action Run
2 33354133901.2 31 Aug 2026 03:32AM UTC 103
29.27
GitHub Action Run
3 33354133901.3 31 Aug 2026 03:32AM UTC 103
29.27
GitHub Action Run
4 33354133901.4 31 Aug 2026 03:32AM UTC 103
29.27
GitHub Action Run
5 33354133901.5 31 Aug 2026 03:32AM UTC 103
29.25
GitHub Action Run
6 33354133901.6 31 Aug 2026 03:32AM UTC 103
29.25
GitHub Action Run
Source Files on build 33354133901
  • Tree
  • List 103
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 81a48adf on github
  • Prev Build on main (#33302352720)
  • Next Build on main (#33359786242)
  • 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