Trivadis / plsql-cop-validators

db* CODECOP Validators
Other
9 stars 5 forks source link

Migrate from Xtend to Java #42

Closed PhilippSalvisberg closed 10 months ago

PhilippSalvisberg commented 3 years ago

To make the validators work in any db* CODECOP supported environment Java 8 compatibility is necessary for the runtime classes. For test classes Java 17 can be used, which is helpful to replace the multiline strings for SQL and PL/SQL code in the test classes.

Using Java instead of Xtend should make it easier to get started in any IDE.

mhoys commented 6 months ago

Hi Philipp, we were using a custom-made Xtend file with our own validations with db*CODECOP version 4.3, but this no longer seems to work with version 5.0.1. I think I will have to convert our custom Xtend files to Java. Is there an easy way to convert Xtend files to Java?

PhilippSalvisberg commented 6 months ago

Is there an easy way to convert Xtend files to Java?

Yes, you could use the file generated by Xtend, but it doesn't look lovely.

I've written a this blog post some time ago with a step-by-step guide. This should help.

mhoys commented 6 months ago

Thanks Philipp! Looks to be working fine indeed.