Skip to content

Commit ab05c3f

Browse files
author
Cameron Mace
authored
Fixed Checkstyle issues and moved GeoJSON to fixtures (#253)
* fixed checkstyle issues and moved geojson to fixtures * fixed more checkstyle issues * fixed usage of wrong file
1 parent 5a65b8b commit ab05c3f

55 files changed

Lines changed: 889 additions & 502 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

checkstyle.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<module name = "Checker">
77
<property name="charset" value="UTF-8"/>
88

9-
<!-- <property name="severity" value="error"/> -->
10-
<property name="severity" value="warning"/>
9+
<property name="severity" value="error"/>
10+
<!-- <property name="severity" value="warning"/> -->
1111

1212
<property name="fileExtensions" value="java, properties, xml"/>
1313
<!-- Checks for whitespace -->
@@ -96,24 +96,24 @@
9696
<message key="name.invalidPattern"
9797
value="Type name ''{0}'' must match pattern ''{1}''."/>
9898
</module>
99-
<module name="MemberName">
99+
<!-- <module name="MemberName">
100100
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
101101
<message key="name.invalidPattern"
102102
value="Member name ''{0}'' must match pattern ''{1}''."/>
103-
</module>
104-
<module name="ParameterName">
103+
</module> -->
104+
<!-- <module name="ParameterName">
105105
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
106106
<message key="name.invalidPattern"
107107
value="Parameter name ''{0}'' must match pattern ''{1}''."/>
108-
</module>
108+
</module> -->
109109
<module name="CatchParameterName">
110110
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
111111
<message key="name.invalidPattern"
112112
value="Catch parameter name ''{0}'' must match pattern ''{1}''."/>
113113
</module>
114114
<module name="LocalVariableName">
115115
<property name="tokens" value="VARIABLE_DEF"/>
116-
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
116+
<!--<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>-->
117117
<property name="allowOneCharVarInForLoop" value="true"/>
118118
<message key="name.invalidPattern"
119119
value="Local variable name ''{0}'' must match pattern ''{1}''."/>
@@ -153,12 +153,12 @@
153153
<property name="arrayInitIndent" value="2"/>
154154
<!-- <property name="forceStrictCondition" value="true"/> -->
155155
</module>
156-
<module name="AbbreviationAsWordInName">
156+
<!-- <module name="AbbreviationAsWordInName">
157157
<property name="ignoreFinal" value="false"/>
158158
<property name="allowedAbbreviationLength" value="1"/>
159-
</module>
159+
</module> -->
160160
<module name="OverloadMethodsDeclarationOrder"/>
161-
<module name="VariableDeclarationUsageDistance"/>
161+
<!--<module name="VariableDeclarationUsageDistance"/>-->
162162
<module name="AvoidStarImport"/>
163163
<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
164164
<module name="RedundantImport"/>

mapbox/app/src/androidTest/java/com/mapbox/services/android/testapp/ExampleInstrumentedTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import org.junit.Test;
88
import org.junit.runner.RunWith;
99

10-
import static org.junit.Assert.*;
10+
import static org.junit.Assert.assertEquals;
1111

1212
/**
1313
* Instrumentation test, which will execute on an Android device.

mapbox/app/src/main/java/com/mapbox/services/android/testapp/MasApplication.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,16 @@ public void onCreate() {
1616
super.onCreate();
1717

1818
// Leak canary
19-
if (LeakCanary.isInAnalyzerProcess(this)) return;
19+
if (LeakCanary.isInAnalyzerProcess(this)) {
20+
return;
21+
}
2022
LeakCanary.install(this);
2123

2224
// Access token
2325
String mapboxAccessToken = Utils.getMapboxAccessToken(getApplicationContext());
24-
if (TextUtils.isEmpty(mapboxAccessToken)) Log.w(LOG_TAG, "Warning: access token isn't set.");
26+
if (TextUtils.isEmpty(mapboxAccessToken)) {
27+
Log.w(LOG_TAG, "Warning: access token isn't set.");
28+
}
2529
MapboxAccountManager.start(getApplicationContext(), mapboxAccessToken);
2630
}
2731
}

mapbox/app/src/main/java/com/mapbox/services/android/testapp/geocoding/GeocodingWidgetActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ protected void onCreate(Bundle savedInstanceState) {
5050
autocomplete.setLimit(10);
5151
autocomplete.setOnFeatureListener(new GeocoderAutoCompleteView.OnFeatureListener() {
5252
@Override
53-
public void OnFeatureClick(CarmenFeature feature) {
53+
public void onFeatureClick(CarmenFeature feature) {
5454
Position position = feature.asPosition();
5555
updateMap(position.getLatitude(), position.getLongitude());
5656
}

mapbox/app/src/main/java/com/mapbox/services/android/testapp/turf/TurfLineSliceActivity.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
import com.mapbox.mapboxsdk.maps.OnMapReadyCallback;
1313
import com.mapbox.services.Constants;
1414
import com.mapbox.services.android.testapp.R;
15+
import com.mapbox.services.api.utils.turf.TurfMisc;
1516
import com.mapbox.services.commons.geojson.LineString;
1617
import com.mapbox.services.commons.geojson.Point;
1718
import com.mapbox.services.commons.models.Position;
18-
import com.mapbox.services.api.utils.turf.TurfMisc;
1919
import com.mapbox.services.commons.utils.PolylineUtils;
2020

2121
import java.util.ArrayList;
@@ -39,7 +39,9 @@ protected void onCreate(Bundle savedInstanceState) {
3939
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
4040

4141
// Full route
42-
routePoints = PolylineUtils.decode("ovnnEzvcrUt@o@z@u@_DkHu@cBM]Wi@q@aB[u@_BwDkBiEcB_EQ_@g@iAk@sAc@cAkA{CqAuCkAqCk@mAWm@S]]y@qBwEYq@]{@Z{@Xw@LYTm@Tm@Rk@Vq@JUJWNc@L]N_@Pc@HQPc@DKBKFO`@gARg@Tg@L[J[Rg@Tm@Nc@Pe@Zw@N_@JUNc@Z{@DIL[Tm@FDFF", Constants.OSRM_PRECISION_V5);
42+
routePoints = PolylineUtils.decode("ovnnEzvcrUt@o@z@u@_DkHu@cBM]Wi@q@aB[u@_BwDkBiEcB_EQ_@g@iAk@sAc@cAkA{CqAuC"
43+
+ "kAqCk@mAWm@S]]y@qBwEYq@]{@Z{@Xw@LYTm@Tm@Rk@Vq@JUJWNc@L]N_@Pc@HQPc@DKBKFO`@gARg@Tg@L[J[Rg@Tm@Nc@Pe@Zw@N_@J"
44+
+ "UNc@Z{@DIL[Tm@FDFF", Constants.OSRM_PRECISION_V5);
4345

4446
mapView = (MapView) findViewById(R.id.mapView);
4547
mapView.onCreate(savedInstanceState);

mapbox/app/src/test/java/com/mapbox/services/android/testapp/ExampleUnitTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import org.junit.Test;
44

5-
import static org.junit.Assert.*;
5+
import static org.junit.Assert.assertEquals;
66

77
/**
88
* Example local unit test, which will execute on the development machine (host).

mapbox/libandroid-services/src/androidTest/java/com/mapbox/services/android/ExampleInstrumentedTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import org.junit.Test;
88
import org.junit.runner.RunWith;
99

10-
import static org.junit.Assert.*;
10+
import static org.junit.Assert.assertEquals;
1111

1212
/**
1313
* Instrumentation test, which will execute on an Android device.

mapbox/libandroid-services/src/test/java/com/mapbox/services/android/ExampleUnitTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import org.junit.Test;
44

5-
import static org.junit.Assert.*;
5+
import static org.junit.Assert.assertEquals;
66

77
/**
88
* Example local unit test, which will execute on the development machine (host).

mapbox/libandroid-telemetry/src/androidTest/java/com/mapbox/services/android/telemetry/ExampleInstrumentedTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import org.junit.Test;
88
import org.junit.runner.RunWith;
99

10-
import static org.junit.Assert.*;
10+
import static org.junit.Assert.assertEquals;
1111

1212
/**
1313
* Instrumentation test, which will execute on an Android device.

mapbox/libandroid-telemetry/src/test/java/com/mapbox/services/android/telemetry/ExampleUnitTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import org.junit.Test;
44

5-
import static org.junit.Assert.*;
5+
import static org.junit.Assert.assertEquals;
66

77
/**
88
* Example local unit test, which will execute on the development machine (host).

0 commit comments

Comments
 (0)