-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add kotlin formatting plugin #27673
Add kotlin formatting plugin #27673
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
<profile> | ||
<id>format-kotlin</id> | ||
<activation> | ||
<activeByDefault>true</activeByDefault> | ||
<property> | ||
<name>!no-format</name> | ||
</property> | ||
<file> | ||
<exists>src/main/kotlin</exists> | ||
</file> | ||
</activation> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>com.diffplug.spotless</groupId> | ||
<artifactId>spotless-maven-plugin</artifactId> | ||
<version>2.25.0</version> | ||
<executions> | ||
<execution> | ||
<id>format-kotlin</id> | ||
<phase>process-sources</phase> | ||
<goals> | ||
<goal>apply</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
|
||
<configuration> | ||
<kotlin> | ||
<!-- | ||
<ktfmt> | ||
<style>DEFAULT</style> <!– optional, other options are DEFAULT, DROPBOX, GOOGLE and KOTLINLANG –> | ||
</ktfmt> | ||
--> | ||
<ktlint/> | ||
|
||
</kotlin> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need a different profile? Would it not be better to use the existing profiles?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ok combining them but this one also looks for the existence of kotlin sources to activate. So it's not trying to do work most of the time. It might be a microoptimization but it made sense at the time. @gsmet?
Failing Jobs - Building 5c8c077
Full information is available in the Build summary check run. Failures⚙️ JVM Tests - JDK 17 #- Failing: extensions/smallrye-reactive-messaging-kafka/deployment
! Skipped: integration-tests/kafka-oauth-keycloak integration-tests/kafka-sasl-elytron integration-tests/kubernetes/quarkus-standard-way-kafka and 3 more 📦 extensions/smallrye-reactive-messaging-kafka/deployment✖
|
The failures look unrelated at this point. What do we think about this one? |
Yeah, it's a flaky test |
this change will cause the kotlin sources to be formatted and cleaned up the same way the java sources are.