diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2020-08-22 13:28:33 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2020-08-22 13:28:33 +0200 |
commit | 3f986ef2726c9103081d3782e9149dc11cdfa62e (patch) | |
tree | 51c9ba5cf91c7009d2564b25310054fec5bffb20 | |
parent | 7e71d1c86f44617cfd09caedff1107bdcf27b255 (diff) |
Add Scalafmt to Spotless configuration.
Change-Id: I789221c34222c263507ade58efda3bf29a6a7fdb
-rw-r--r-- | pom.xml | 10 | ||||
-rw-r--r-- | src/main/java/eu/mulk/mulkcms2/benki/posts/Post.java | 6 |
2 files changed, 12 insertions, 4 deletions
@@ -22,7 +22,8 @@ <compiler-plugin.version>3.8.1</compiler-plugin.version> <quarkus.version>1.7.0.Final</quarkus.version> <resources-plugin.version>3.1.0</resources-plugin.version> - <spotless-plugin.version>2.0.1</spotless-plugin.version> + <scalafmt.version>2.6.3</scalafmt.version> + <spotless-plugin.version>2.0.3</spotless-plugin.version> <scala-plugin.version>4.4.0</scala-plugin.version> <!-- <quarkus.platform.artifact-id>quarkus-universe-bom</quarkus.platform.artifact-id> --> @@ -366,6 +367,13 @@ <style>GOOGLE</style> </googleJavaFormat> </java> + + <scala> + <scalafmt> + <version>${scalafmt.version}</version> + <file>${basedir}/.scalafmt.conf</file> + </scalafmt> + </scala> </configuration> </plugin> diff --git a/src/main/java/eu/mulk/mulkcms2/benki/posts/Post.java b/src/main/java/eu/mulk/mulkcms2/benki/posts/Post.java index aa15fa2..2bd9ade 100644 --- a/src/main/java/eu/mulk/mulkcms2/benki/posts/Post.java +++ b/src/main/java/eu/mulk/mulkcms2/benki/posts/Post.java @@ -104,9 +104,9 @@ public abstract class Post extends PanacheEntityBase { @CheckForNull public final String getDescriptionHtml() { - if (cachedDescriptionHtml != null && - cachedDescriptionVersion != null && - cachedDescriptionVersion >= DESCRIPTION_CACHE_VERSION){ + if (cachedDescriptionHtml != null + && cachedDescriptionVersion != null + && cachedDescriptionVersion >= DESCRIPTION_CACHE_VERSION) { return cachedDescriptionHtml; } else { @CheckForNull var descriptionHtml = computeDescriptionHtml(); |