codyze
codyze copied to clipboard
Rework integration of Spotless
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.