Fraunhofer-AISEC / codyze

Codyze is a static analyzer for Java, C, C++ based on code property graphs

Home Page:https://www.codyze.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rework integration of Spotless

fwendland opened this issue · comments

We're using Spotless to enforce a consistent programming style. Currently, we're applying Spotless before the compilation step. As a result, Spotless checks will always succeed. The downside is that checked out code "regularly" results in formatting changes being present.

We should optimse the order of Spotless operations. Maybe it's ok to fail in a PR if code isn't properly formatted.

  • Decide on a modus operandi for Spotless
  • Change Gradle build accordingly

In the cpg project, we are using spotlessCheck -x spotlessApply build in the CI to intentionally not trigger the spotlessApply in the CI but keep it as a depending task if you build locally so that it gets formatted locally with a high chance.