Stricter whitespace handling

This commit is contained in:
Manuel Fuhr 2022-11-09 07:29:11 +01:00
parent 227596eb90
commit 6f6d99b3e3
3 changed files with 15 additions and 8 deletions

View file

@ -3,6 +3,7 @@ root = true
[*] [*]
end_of_line = lf end_of_line = lf
insert_final_newline = true insert_final_newline = true
trim_trailing_whitespace = true
[*.java] [*.java]
indent_style = space indent_style = space

View file

@ -11,7 +11,6 @@ import org.junit.AfterClass;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import btools.router.OsmNogoPolygon.Point;
import btools.util.CheapRuler; import btools.util.CheapRuler;
public class OsmNogoPolygonTest { public class OsmNogoPolygonTest {
@ -77,9 +76,9 @@ public class OsmNogoPolygonTest {
@Test @Test
public void testIsWithin() { 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[] 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,}; 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,}; boolean[] within = {true, false, false, false, false, true, true, true, true, true};
for (int i = 0; i < plons.length; i++) { 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))); assertEquals("(" + plons[i] + "," + plats[i] + ")", within[i], polygon.isWithin(toOsmLon(plons[i], OFFSET_X), toOsmLat(plats[i], OFFSET_Y)));

View file

@ -12,10 +12,17 @@
<module name="TreeWalker"> <module name="TreeWalker">
<module name="Indentation"> <module name="Indentation">
<property name="basicOffset" value="2"/> <property name="basicOffset" value="2" />
<property name="caseIndent" value="2"/> <property name="caseIndent" value="2" />
<property name="throwsIndent" value="2"/> <property name="throwsIndent" value="2" />
<property name="lineWrappingIndentation" value="2"/> <property name="lineWrappingIndentation" value="2" />
</module> </module>
<module name="ParenPad" />
<module name="NoWhitespaceBefore">
<property name="allowLineBreaks" value="true" />
</module>
<module name="WhitespaceAfter" />
</module> </module>
</module> </module>