opendevstack / ods-jenkins-shared-library

Shared Jenkins library which all ODS projects & components use - provisioning, SonarQube code scanning, Nexus publishing, OpenShift template based deployments and repository orchestration
Apache License 2.0
70 stars 57 forks source link

Provide a code formatter #921

Open serverhorror opened 2 years ago

serverhorror commented 2 years ago

It's quite cumbersome to make changes when CodeNarc starts complaining about Code Style but there is no code formatter (or settings recommendations for IDEs like IDEA or VS Code) available.

Is it possible to add something like https://github.com/sherter/google-java-format-gradle-plugin so we have an easier way to format the whole codebase according to what the CI checks require?

renedupont commented 2 years ago

In Java projects I have used https://github.com/diffplug/spotless which has a gradle plugin and mentions in their readme that it also works for groovy (I have only used it for java so far though).

serverhorror commented 2 years ago

I've been away from Java-ish stuff since Uni.

I was just hoping for something like gofmt (since CodeNarc complained about Code style but there was no easy way to fix it)