Hi Tim, I really like the idea. For this we need a uniform style guide, right? For the UI we recently switched to ESLint with Prettier as a formatter and for Java we use checkstyle. Are those configurations then used by the pre-commit hook? And what kind of formatting can be done with it?
Where do we need to configure the pre-commit hooks, is that something each developer needs to configure, or can we configure it in the repository? Cheers, Philipp Von: Tim <bosse...@posteo.de> Datum: Sonntag, 23. Oktober 2022 um 13:48 An: dev@streampipes.apache.org <dev@streampipes.apache.org> Betreff: Re: [DISCUSS] Automatic Typescript model generation Hi Philipp, I don't know if this can be solved with the maven plugin used for the TypeScript generation. An alternative idea of mine would be to use a git-hook for this. We could create a git-hook for StreamPipes that checks each committed file for the presence of the Apache header and adds it if it is missing. Pre-commit hooks could also be used for style checks and so on. I'm already planning to have a discussion about that approach in general on our mailing list, but apparently you have been faster ;) So this could be a good first use case for it. What do you think about this idea? Best Tim Am 19.10.2022 22:39 schrieb Philipp Zehnder: > Hi all, > > the TypeScript model for our UI is automatically generated from the > Java classes as described in [1]. > So far this had to be done manually. I added a small script to > automate the process [2]. > > This already eases to update process, however the license headers > still must be inserted manually. > Does anyone have an idea how we could automate this step as well? > > Here is the link to the corresponding issue [3]. > > Cheers, > Philipp > > [1] > https://cwiki.apache.org/confluence/display/STREAMPIPES/Core-UI+Serialization > [2] > https://github.com/apache/incubator-streampipes/blob/dev/create-client-model.sh > [3] > https://issues.apache.org/jira/projects/STREAMPIPES/issues/STREAMPIPES-600