Hi,

here are also the links to our checkstyle [1], ESLint [2], and Prettier [3] 
configuration files.

@Tim, I hope they help for the git pre-commit hook.
@all, please have a look if you like the configurations. I think we can 
customize the styles, but we should see that all developers use the same 
configurations.
Also, if someone else has any other best practices, I am happy to discuss them 
to improve our project.

Philipp

[1] 
https://github.com/apache/incubator-streampipes/blob/dev/tools/maven/checkstyle.xml
[2] https://github.com/apache/incubator-streampipes/blob/dev/ui/.eslintrc.json
[3] https://github.com/apache/incubator-streampipes/blob/dev/ui/.prettierrc.json


Von: Philipp Zehnder <[email protected]>
Datum: Montag, 24. Oktober 2022 um 22:21
An: [email protected] <[email protected]>
Betreff: AW: [DISCUSS] Automatic Typescript model generation
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 <[email protected]>
Datum: Sonntag, 23. Oktober 2022 um 13:48
An: [email protected] <[email protected]>
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

Reply via email to