SpineEventEngine / validation

Apache License 2.0
2 stars 0 forks source link

Implement `ValidatingBuilder` instead of McJava #127

Closed alexander-yevsyukov closed 2 months ago

alexander-yevsyukov commented 2 months ago

This PR makes the Validation library make Builder classes implement ValidatingBuilder instead of McJava.

Currently, McJava does that via the io.spine.tools.mc.java.protoc.message.BuilderGen and associated classes which work in the protoc plugin of McJava.

This PR introduces ImplementValidatingBuilder renderer which makes Builder classes implement ValidatingBuilder. Adding the code is done only if the Builder class does not implement the interface already. Such a case is possible when older McJava is used together with new Validation. Once McJava migrates to newer Validation, the check would be always false.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 0% with 46 lines in your changes missing coverage. Please review.

Project coverage is 37.82%. Comparing base (7129197) to head (6a5ee6b).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #127 +/- ## ============================================ - Coverage 38.32% 37.82% -0.51% Complexity 353 353 ============================================ Files 125 127 +2 Lines 2338 2369 +31 Branches 197 200 +3 ============================================ Hits 896 896 - Misses 1380 1411 +31 Partials 62 62 ```