sosy-lab/sv-benchmarks

Linter for the Java tasks

mmuesly opened this issue · 2 comments

There are a lot of discussions related to formatting in the Java PRs.

I think we should to aim for a linting step in the CI that checks formatting and decides whether a file is acceptable to SV-COMP standard or not. This should reduce review cycles and save some time for reviewers.

Any suggestions or opinions how we might build this check?

There is already a check that the tasks compile. Other checks could be added in a similar manner. So the technical part of this question is easy, it just needs to be discussed what to check. For integration in CI I would then be willing to help.

For checks about the general structure of the Java part of the repository, a script like c/check.py is probably useful, and there might even be checks in that script that apply to the Java tasks as well.

For formatting, we could of course use google-java-format, though I am not sure whether this is worth it, or whether it is better to keep the source code in the format of the original program.

The java community agreed on the preference for including google-java-format into CI. I am happy to work with you on a plan for the required steps.