Hi all,
is there a way to link check style and reformat code (CTRL + alt +L) to fix some errors automatically? I know from other programming languages that I can call an auto fix e.g. in rubocop. I get an check style error ModifierOrder [1] for example here [2] but don't really know what to change Modifier 'static' differs from the recommended modifier order of the Java Language Specification. (38:11) [ModifierOrder] final static double LONGITUDE_MIN = -180.00; final static double LONGITUDE_MAX = 180.00; final static double LATITUDE_MIN = -90; final static double LATITUDE_MAX = 90; [1] https://checkstyle.sourceforge.io/apidocs/com/puppycrawl/tools/checkstyle/checks/modifier/ModifierOrderCheck.html [2] https://github.com/apache/incubator-streampipes/blob/dev/streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/helper/SpGeometryBuilder.java#L27 Greetings Florian Am Dienstag, dem 25.10.2022 um 19:40 +0000 schrieb Philipp Zehnder: > Hi,<br> > > here are also the links to our checkstyle [1], ESLint [2], and Prettier [3] > configuration files.<br> > > @Tim, I hope they help for the git pre-commit hook.<br> > @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.<br> > Also, if someone else has any other best practices, I am happy to discuss > them to improve our project.<br> > > Philipp<br> > > [1] > [https://github.com/apache/incubator-streampipes/blob/dev/tools/maven/checkstyle.xml](https://github.com/apache/incubator-streampipes/blob/dev/tools/maven/checkstyle.xml)<br> > [2] > [https://github.com/apache/incubator-streampipes/blob/dev/ui/.eslintrc.json](https://github.com/apache/incubator-streampipes/blob/dev/ui/.eslintrc.json)<br> > [3] > [https://github.com/apache/incubator-streampipes/blob/dev/ui/.prettierrc.json](https://github.com/apache/incubator-streampipes/blob/dev/ui/.prettierrc.json)<br> > > > Von: Philipp Zehnder > <[[email protected]](mailto:[email protected])><br> > Datum: Montag, 24. Oktober 2022 um 22:21<br> > An: [[email protected]](mailto:[email protected]) > <[[email protected]](mailto:[email protected])><br> > Betreff: AW: [DISCUSS] Automatic Typescript model generation<br> > Hi Tim,<br> > > I really like the idea.<br> > For this we need a uniform style guide, right?<br> > 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?<br> > And what kind of formatting can be done with it?<br> > > 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?<br> > > Cheers,<br> > Philipp<br> > > > Von: Tim <[[email protected]](mailto:[email protected])><br> > Datum: Sonntag, 23. Oktober 2022 um 13:48<br> > An: [[email protected]](mailto:[email protected]) > <[[email protected]](mailto:[email protected])><br> > Betreff: Re: [DISCUSS] Automatic Typescript model generation<br> > Hi Philipp,<br> > > I don't know if this can be solved with the maven plugin used for the<br> > TypeScript generation.<br> > An alternative idea of mine would be to use a git-hook for this.<br> > We could create a git-hook for StreamPipes that checks each committed<br> > file for the presence of the Apache header and adds it if it is missing.<br> > Pre-commit hooks could also be used for style checks and so on. I'm<br> > already planning to have a discussion about that approach in general on<br> > our mailing list, but apparently you have been faster ;) So this could<br> > be a good first use case for it.<br> > > What do you think about this idea?<br> > > Best<br> > Tim<br> > > Am 19.10.2022 22:39 schrieb Philipp Zehnder:<br> > > Hi all,<br> > > > > the TypeScript model for our UI is automatically generated from the<br> > > Java classes as described in [1].<br> > > So far this had to be done manually. I added a small script to<br> > > automate the process [2].<br> > > > > This already eases to update process, however the license headers<br> > > still must be inserted manually.<br> > > Does anyone have an idea how we could automate this step as well?<br> > > > > Here is the link to the corresponding issue [3].<br> > > > > Cheers,<br> > > Philipp<br> > > > > [1]<br> > > [https://cwiki.apache.org/confluence/display/STREAMPIPES/Core-UI+Serialization](https://cwiki.apache.org/confluence/display/STREAMPIPES/Core-UI+Serialization)<br> > > [2]<br> > > [https://github.com/apache/incubator-streampipes/blob/dev/create-client-model.sh](https://github.com/apache/incubator-streampipes/blob/dev/create-client-model.sh)<br> > > [3]<br> > > [https://issues.apache.org/jira/projects/STREAMPIPES/issues/STREAMPIPES-600](https://issues.apache.org/jira/projects/STREAMPIPES/issues/STREAMPIPES-600)<br>
