From 6f6d99b3e37babbe312e3e7126a93bd298bcc752 Mon Sep 17 00:00:00 2001 From: Manuel Fuhr Date: Wed, 9 Nov 2022 07:29:11 +0100 Subject: [PATCH] Stricter whitespace handling --- .editorconfig | 1 + .../java/btools/router/OsmNogoPolygonTest.java | 7 +++---- config/checkstyle/checkstyle.xml | 15 +++++++++++---- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.editorconfig b/.editorconfig index 26238e9..2b939e7 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,6 +3,7 @@ root = true [*] end_of_line = lf insert_final_newline = true +trim_trailing_whitespace = true [*.java] indent_style = space diff --git a/brouter-core/src/test/java/btools/router/OsmNogoPolygonTest.java b/brouter-core/src/test/java/btools/router/OsmNogoPolygonTest.java index 76c07b3..569f0df 100644 --- a/brouter-core/src/test/java/btools/router/OsmNogoPolygonTest.java +++ b/brouter-core/src/test/java/btools/router/OsmNogoPolygonTest.java @@ -11,7 +11,6 @@ import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; -import btools.router.OsmNogoPolygon.Point; import btools.util.CheapRuler; public class OsmNogoPolygonTest { @@ -77,9 +76,9 @@ public class OsmNogoPolygonTest { @Test public void testIsWithin() { - double[] plons = {0.0, 0.5, 1.0, -1.5, -0.5, 1.0, 1.0, 0.5, 0.5, 0.5,}; - double[] plats = {0.0, 1.5, 0.0, 0.5, -1.5, -1.0, -0.1, -0.1, 0.0, 0.1,}; - boolean[] within = {true, false, false, false, false, true, true, true, true, true,}; + double[] plons = {0.0, 0.5, 1.0, -1.5, -0.5, 1.0, 1.0, 0.5, 0.5, 0.5}; + double[] plats = {0.0, 1.5, 0.0, 0.5, -1.5, -1.0, -0.1, -0.1, 0.0, 0.1}; + boolean[] within = {true, false, false, false, false, true, true, true, true, true}; for (int i = 0; i < plons.length; i++) { assertEquals("(" + plons[i] + "," + plats[i] + ")", within[i], polygon.isWithin(toOsmLon(plons[i], OFFSET_X), toOsmLat(plats[i], OFFSET_Y))); diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml index b068eab..948e880 100644 --- a/config/checkstyle/checkstyle.xml +++ b/config/checkstyle/checkstyle.xml @@ -12,10 +12,17 @@ - - - - + + + + + + + + + + +