tableauio / tableau

A modern configuration converter based on Protobuf (proto3).
https://tableauio.github.io
MIT License
32 stars 6 forks source link

protogen(xml): improve XML importer v2.1 #132

Closed Kybxd closed 2 months ago

Kybxd commented 2 months ago
  1. add support for scalar/enum list and predefined struct list
    
    <?xml version="1.0" encoding="UTF-8"?>
    <!--
    <@TABLEAU>
    <Item Sheet="ItemConf" />
    </@TABLEAU>
[int32] [enum<.FruitType>]

-->

1 FRUIT_TYPE_APPLE FRUIT_TYPE_ORANGE FRUIT_TYPE_BANANA


2. for all kinds of lists and maps, auto add the `list` or `map` suffix on generated field name, so you don't need to manually add the  `list` or `map` suffix, or use plurals when naming a xml node or attribute
codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 86.66667% with 10 lines in your changes missing coverage. Please review.

Project coverage is 55.29%. Comparing base (4aca14f) to head (a94df7c). Report is 1 commits behind head on master.

Files Patch % Lines
internal/importer/xml.go 86.11% 8 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #132 +/- ## ========================================== + Coverage 55.13% 55.29% +0.16% ========================================== Files 74 74 Lines 9185 9241 +56 ========================================== + Hits 5064 5110 +46 - Misses 3566 3574 +8 - Partials 555 557 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.