[android] add lint using current baseline as starting point (#9318)
This commit is contained in:
12
Makefile
12
Makefile
@@ -616,6 +616,18 @@ test-code-android:
|
||||
android-checkstyle: platform/android/configuration.gradle
|
||||
cd platform/android && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=none checkstyle
|
||||
|
||||
.PHONY: android-lint-sdk
|
||||
android-lint-sdk: platform/android/configuration.gradle
|
||||
cd platform/android && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=none :MapboxGLAndroidSDK:lint
|
||||
|
||||
.PHONY: android-lint-test-app
|
||||
android-lint-test-app: platform/android/configuration.gradle
|
||||
cd platform/android && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=none :MapboxGLAndroidSDKTestApp:lint
|
||||
|
||||
.PHONY: android-lint-wear-app
|
||||
android-lint-wear-app: platform/android/configuration.gradle
|
||||
cd platform/android && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=none :MapboxGLAndroidSDKWearTestApp:lint
|
||||
|
||||
.PHONY: android-javadoc
|
||||
android-javadoc: platform/android/configuration.gradle
|
||||
cd platform/android && $(MBGL_ANDROID_GRADLE) -Pmapbox.abis=none :MapboxGLAndroidSDK:javadocrelease
|
||||
|
||||
32
circle.yml
32
circle.yml
@@ -152,6 +152,7 @@ jobs:
|
||||
LIBSYSCONFCPUS: 4
|
||||
JOBS: 4
|
||||
BUILDTYPE: Debug
|
||||
IS_LOCAL_DEVELOPMENT: false
|
||||
steps:
|
||||
- checkout
|
||||
- *generate-cache-key
|
||||
@@ -175,6 +176,18 @@ jobs:
|
||||
- run:
|
||||
name: Check Java code style
|
||||
command: make android-checkstyle
|
||||
- run:
|
||||
name: Check Android modules for potential bugs (Lint SDK)
|
||||
command: |
|
||||
make android-lint-sdk
|
||||
- run:
|
||||
name: Check Android modules for potential bugs (Lint Test App)
|
||||
command: |
|
||||
make android-lint-test-app
|
||||
- run:
|
||||
name: Check Android modules for potential bugs (Lint Wear Test App)
|
||||
command: |
|
||||
make android-lint-wear-app
|
||||
- run:
|
||||
name: Build Test APK
|
||||
command: |
|
||||
@@ -213,6 +226,24 @@ jobs:
|
||||
- store_artifacts:
|
||||
path: platform/android/MapboxGLAndroidSDKTestApp/build/outputs/apk
|
||||
destination: .
|
||||
- store_artifacts:
|
||||
path: platform/android/MapboxGLAndroidSDK/build/reports/lint-results.html
|
||||
- store_artifacts:
|
||||
path: platform/android/MapboxGLAndroidSDK/build/reports/lint-results.xml
|
||||
- store_artifacts:
|
||||
path: platform/android/MapboxGLAndroidSDK/lint-baseline.xml
|
||||
- store_artifacts:
|
||||
path: platform/android/MapboxGLAndroidSDKTestApp/build/reports/lint-results.html
|
||||
- store_artifacts:
|
||||
path: platform/android/MapboxGLAndroidSDKTestApp/build/reports/lint-results.xml
|
||||
- store_artifacts:
|
||||
path: platform/android/MapboxGLAndroidSDKTestApp/lint-baseline.xml
|
||||
- store_artifacts:
|
||||
path: platform/android/MapboxGLAndroidSDKWearTestApp/build/reports/lint-results.html
|
||||
- store_artifacts:
|
||||
path: platform/android/MapboxGLAndroidSDKWearTestApp/build/reports/lint-results.xml
|
||||
- store_artifacts:
|
||||
path: platform/android/MapboxGLAndroidSDKWearTestApp/lint-baseline.xml
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
android-release-all:
|
||||
@@ -223,6 +254,7 @@ jobs:
|
||||
LIBSYSCONFCPUS: 4
|
||||
JOBS: 4
|
||||
BUILDTYPE: Release
|
||||
IS_LOCAL_DEVELOPMENT: false
|
||||
steps:
|
||||
- checkout
|
||||
- *generate-cache-key
|
||||
|
||||
2
platform/android/MapboxGLAndroidSDK/.gitignore
vendored
Normal file
2
platform/android/MapboxGLAndroidSDK/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
lint-baseline.xml
|
||||
lint/lint-baseline-local.xml
|
||||
@@ -116,6 +116,7 @@ android {
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
baseline file("lint-baseline.xml")
|
||||
checkAllWarnings true
|
||||
warningsAsErrors true
|
||||
}
|
||||
@@ -152,3 +153,4 @@ apply from: 'gradle-javadoc.gradle'
|
||||
apply from: 'gradle-publish.gradle'
|
||||
apply from: 'gradle-checkstyle.gradle'
|
||||
apply from: 'gradle-tests-staticblockremover.gradle'
|
||||
apply from: '../gradle-lint.gradle'
|
||||
|
||||
629
platform/android/MapboxGLAndroidSDK/lint/lint-baseline-ci.xml
Normal file
629
platform/android/MapboxGLAndroidSDK/lint/lint-baseline-ci.xml
Normal file
@@ -0,0 +1,629 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- REMEMBER! First you run Lint locally you'll need to move the lint-baseline.xml file
|
||||
generated into the lint folder and called it lint-baseline-local.xml
|
||||
If you remove any error when running Lint locally, you'll get a warning from the command
|
||||
line advising you to remove it from the baseline. If you remove it (remember to remove it
|
||||
from lint-baseline-local.xml file) you should remove it too from
|
||||
lint-baseline-ci.xml (THIS FILE) which is the only one included in the repo.
|
||||
Eventually, it'll be removed (when we remove all current lint errors included). -->
|
||||
<issues format="4" by="lint 2.3.1">
|
||||
|
||||
<issue
|
||||
id="MissingPermission"
|
||||
message="Call requires permission which may be rejected by user: code should explicitly check to see if permission is available (with `checkPermission`) or explicitly handle a potential `SecurityException`"
|
||||
errorLine1=" Location lastKnownLocation = locationEngine.getLastLocation();"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/maps/widgets/MyLocationView.java"
|
||||
line="783"
|
||||
column="38"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="MissingPermission"
|
||||
message="Call requires permission which may be rejected by user: code should explicitly check to see if permission is available (with `checkPermission`) or explicitly handle a potential `SecurityException`"
|
||||
errorLine1=" locationEngine.requestLocationUpdates();"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/maps/widgets/MyLocationView.java"
|
||||
line="787"
|
||||
column="9"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="DefaultLocale"
|
||||
message="Implicitly using the default locale is a common source of bugs: Use `String.format(Locale, ...)` instead"
|
||||
errorLine1=" Timber.v(String.format("[HTTP] Request was successful (code = %d).", response.code()));"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
|
||||
line="112"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="DefaultLocale"
|
||||
message="Implicitly using the default locale is a common source of bugs: Use `String.format(Locale, ...)` instead"
|
||||
errorLine1=" Timber.d(String.format("
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
|
||||
line="116"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="TimberArgCount"
|
||||
message="Wrong argument count, format string `Failed to read the package metadata: ` requires `0` but format call supplies `1`"
|
||||
errorLine1=" Timber.e("Failed to read the package metadata: ", exception);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java"
|
||||
line="75"
|
||||
column="7"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="TimberArgCount"
|
||||
message="Wrong argument count, format string `Failed to read the storage key: ` requires `0` but format call supplies `1`"
|
||||
errorLine1=" Timber.e("Failed to read the storage key: ", exception);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java"
|
||||
line="77"
|
||||
column="7"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="TimberArgCount"
|
||||
message="Wrong argument count, format string `Failed to obtain the external storage path: ` requires `0` but format call supplies `1`"
|
||||
errorLine1=" Timber.e("Failed to obtain the external storage path: ", exception);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java"
|
||||
line="86"
|
||||
column="9"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="TimberArgCount"
|
||||
message="Wrong argument count, format string `Failed to delete old ambient cache database: ` requires `0` but format call supplies `1`"
|
||||
errorLine1=" Timber.e("Failed to delete old ambient cache database: ", exception);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java"
|
||||
line="113"
|
||||
column="11"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="MissingTranslation"
|
||||
message=""`mapbox_attributionErrorNoBrowser`" is not translated in "ca" (Catalan), "es" (Spanish), "lt" (Lithuanian), "nl" (Dutch), "sv" (Swedish), "vi" (Vietnamese)"
|
||||
errorLine1=" <string name="mapbox_attributionErrorNoBrowser">No web browser installed on device, can\'t open web page.</string>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/strings.xml"
|
||||
line="13"
|
||||
column="13"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="MissingTranslation"
|
||||
message=""`mapbox_telemetrySettings`" is not translated in "ca" (Catalan), "es" (Spanish), "lt" (Lithuanian), "nl" (Dutch), "sv" (Swedish), "vi" (Vietnamese)"
|
||||
errorLine1=" <string name="mapbox_telemetrySettings">Telemetry Settings</string>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/strings.xml"
|
||||
line="15"
|
||||
column="13"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="BinaryOperationInTimber"
|
||||
message="Replace String concatenation with Timber's string formatting"
|
||||
errorLine1=" Timber.v("Connected: " + connected);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/net/ConnectivityReceiver.java"
|
||||
line="85"
|
||||
column="14"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="BinaryOperationInTimber"
|
||||
message="Replace String concatenation with Timber's string formatting"
|
||||
errorLine1=" Timber.e("Device returned an out of range width size, ""
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java"
|
||||
line="178"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="BinaryOperationInTimber"
|
||||
message="Replace String concatenation with Timber's string formatting"
|
||||
errorLine1=" Timber.e("Device returned an out of range height size, ""
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java"
|
||||
line="185"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="BinaryOperationInTimber"
|
||||
message="Replace String concatenation with Timber's string formatting"
|
||||
errorLine1=" Timber.d("Old ambient cache database deleted to save space: " + path);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java"
|
||||
line="110"
|
||||
column="22"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="BinaryOperationInTimber"
|
||||
message="Replace String concatenation with Timber's string formatting"
|
||||
errorLine1=" Timber.e("Not setting minZoomPreference, value is in unsupported range: " + minZoom);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/maps/Transform.java"
|
||||
line="349"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="BinaryOperationInTimber"
|
||||
message="Replace String concatenation with Timber's string formatting"
|
||||
errorLine1=" Timber.e("Not setting maxZoomPreference, value is in unsupported range: " + maxZoom);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/maps/Transform.java"
|
||||
line="361"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StringFormatInTimber"
|
||||
message="Using 'String#format' inside of 'Timber'"
|
||||
errorLine1=" Timber.e(String.format("Stops: %s is a different type: %s", stops.getClass(), exception));"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/style/functions/Function.java"
|
||||
line="282"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StringFormatInTimber"
|
||||
message="Using 'String#format' inside of 'Timber'"
|
||||
errorLine1=" Timber.v(String.format("[HTTP] Request was successful (code = %d).", response.code()));"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
|
||||
line="112"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StringFormatInTimber"
|
||||
message="Using 'String#format' inside of 'Timber'"
|
||||
errorLine1=" Timber.d(String.format("
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
|
||||
line="116"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StringFormatInTimber"
|
||||
message="Using 'String#format' inside of 'Timber'"
|
||||
errorLine1=" Timber.d(String.format(MapboxConstants.MAPBOX_LOCALE,"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
|
||||
line="163"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StringFormatInTimber"
|
||||
message="Using 'String#format' inside of 'Timber'"
|
||||
errorLine1=" Timber.i(String.format(MapboxConstants.MAPBOX_LOCALE,"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
|
||||
line="166"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StringFormatInTimber"
|
||||
message="Using 'String#format' inside of 'Timber'"
|
||||
errorLine1=" Timber.w(String.format(MapboxConstants.MAPBOX_LOCALE,"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
|
||||
line="170"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StringFormatInTimber"
|
||||
message="Using 'String#format' inside of 'Timber'"
|
||||
errorLine1=" Timber.e(String.format("Layer: %s is a different type: %s", layerId, exception));"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java"
|
||||
line="286"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StringFormatInTimber"
|
||||
message="Using 'String#format' inside of 'Timber'"
|
||||
errorLine1=" Timber.e(String.format("Source: %s is a different type: %s", sourceId, exception));"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java"
|
||||
line="407"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StringFormatInTimber"
|
||||
message="Using 'String#format' inside of 'Timber'"
|
||||
errorLine1=" Timber.e(String.format(MapboxConstants.MAPBOX_LOCALE,"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java"
|
||||
line="92"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="ThrowableNotAtBeginning"
|
||||
message="Throwable should be first argument"
|
||||
errorLine1=" Timber.e("Failed to read the package metadata: ", exception);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java"
|
||||
line="75"
|
||||
column="7"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="ThrowableNotAtBeginning"
|
||||
message="Throwable should be first argument"
|
||||
errorLine1=" Timber.e("Failed to read the storage key: ", exception);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java"
|
||||
line="77"
|
||||
column="7"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="ThrowableNotAtBeginning"
|
||||
message="Throwable should be first argument"
|
||||
errorLine1=" Timber.e("Failed to obtain the external storage path: ", exception);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java"
|
||||
line="86"
|
||||
column="9"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="ThrowableNotAtBeginning"
|
||||
message="Throwable should be first argument"
|
||||
errorLine1=" Timber.e("Failed to delete old ambient cache database: ", exception);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java"
|
||||
line="113"
|
||||
column="11"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StaticFieldLeak"
|
||||
message="Do not place Android context classes in static fields (static reference to `ConnectivityReceiver` which has field `context` pointing to `Context`); this is a memory leak (and also breaks Instant Run)"
|
||||
errorLine1=" private static ConnectivityReceiver INSTANCE;"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/net/ConnectivityReceiver.java"
|
||||
line="24"
|
||||
column="3"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StaticFieldLeak"
|
||||
message="Do not place Android context classes in static fields (static reference to `IconFactory` which has field `context` pointing to `Context`); this is a memory leak (and also breaks Instant Run)"
|
||||
errorLine1=" private static IconFactory instance;"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/annotations/IconFactory.java"
|
||||
line="38"
|
||||
column="3"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StaticFieldLeak"
|
||||
message="Do not place Android context classes in static fields (static reference to `Mapbox` which has field `context` pointing to `Context`); this is a memory leak (and also breaks Instant Run)"
|
||||
errorLine1=" private static Mapbox INSTANCE;"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/Mapbox.java"
|
||||
line="29"
|
||||
column="3"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StaticFieldLeak"
|
||||
message="Do not place Android context classes in static fields (static reference to `OfflineManager` which has field `context` pointing to `Context`); this is a memory leak (and also breaks Instant Run)"
|
||||
errorLine1=" // This object is implemented as a singleton"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java"
|
||||
line="42"
|
||||
column="3"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapbox_my_location_ring` appears to be unused"
|
||||
errorLine1=" <color name="mapbox_my_location_ring">@color/mapbox_blue</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="6"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.dimen.mapbox_infowindow_offset` appears to be unused"
|
||||
errorLine1=" <dimen name="mapbox_infowindow_offset">-2dp</dimen>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/dimens.xml"
|
||||
line="5"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.dimen.mapbox_infowindow_line_width` appears to be unused"
|
||||
errorLine1=" <dimen name="mapbox_infowindow_line_width">1.5dp</dimen>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/dimens.xml"
|
||||
line="6"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.dimen.mapbox_attribution_icon_left_padding` appears to be unused"
|
||||
errorLine1=" <dimen name="mapbox_attribution_icon_left_padding">@dimen/mapbox_two_dp</dimen>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/dimens.xml"
|
||||
line="7"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.dimen.mapbox_attribution_icon_top_padding` appears to be unused"
|
||||
errorLine1=" <dimen name="mapbox_attribution_icon_top_padding">@dimen/mapbox_two_dp</dimen>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/dimens.xml"
|
||||
line="8"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.dimen.mapbox_attribution_icon_right_padding` appears to be unused"
|
||||
errorLine1=" <dimen name="mapbox_attribution_icon_right_padding">@dimen/mapbox_two_dp</dimen>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/dimens.xml"
|
||||
line="9"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.dimen.mapbox_attribution_icon_bottom_padding` appears to be unused"
|
||||
errorLine1=" <dimen name="mapbox_attribution_icon_bottom_padding">@dimen/mapbox_two_dp</dimen>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/dimens.xml"
|
||||
line="10"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.dimen.mapbox_two_dp` appears to be unused"
|
||||
errorLine1=" <dimen name="mapbox_two_dp">2dp</dimen>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/dimens.xml"
|
||||
line="11"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.dimen.mapbox_ten_dp` appears to be unused"
|
||||
errorLine1=" <dimen name="mapbox_ten_dp">10dp</dimen>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/dimens.xml"
|
||||
line="14"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.dimen.mapbox_sixteen_dp` appears to be unused"
|
||||
errorLine1=" <dimen name="mapbox_sixteen_dp">16dp</dimen>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/dimens.xml"
|
||||
line="15"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.drawable.mapbox_infowindow_icon_bg` appears to be unused">
|
||||
<location
|
||||
file="src/main/res/drawable-xxxhdpi/mapbox_infowindow_icon_bg.9.png"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapbox_material_bg_selector` appears to be unused"
|
||||
errorLine1="<selector xmlns:android="http://schemas.android.com/apk/res/android">"
|
||||
errorLine2="^">
|
||||
<location
|
||||
file="src/main/res/color/mapbox_material_bg_selector.xml"
|
||||
line="2"
|
||||
column="1"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.string.mapbox_style_outdoors` appears to be unused"
|
||||
errorLine1=" <string name="mapbox_style_outdoors" translatable="false">mapbox://styles/mapbox/outdoors-v10</string>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/strings.xml"
|
||||
line="22"
|
||||
column="13"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.string.mapbox_style_traffic_day` appears to be unused"
|
||||
errorLine1=" <string name="mapbox_style_traffic_day" translatable="false">mapbox://styles/mapbox/traffic-day-v2</string>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/strings.xml"
|
||||
line="27"
|
||||
column="13"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.string.mapbox_style_traffic_night` appears to be unused"
|
||||
errorLine1=" <string name="mapbox_style_traffic_night" translatable="false">mapbox://styles/mapbox/traffic-night-v2</string>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/strings.xml"
|
||||
line="28"
|
||||
column="13"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedIds"
|
||||
message="The resource `R.id.infowindow_subdescription` appears to be unused"
|
||||
errorLine1=" android:id="@+id/infowindow_subdescription""
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/layout/mapbox_infowindow_content.xml"
|
||||
line="43"
|
||||
column="9"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="TypographyQuotes"
|
||||
message="Replace straight quotes ('') with directional quotes (‘’, &#8216; and &#8217;) ?"
|
||||
errorLine1=" <string name="mapbox_attributionTelemetryMessage">Estàs ajudant a millorar els mapes d\'OpenStreetMap i de Mapbox aportant dades d\'ús anònimes.</string>"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/res/values-ca/strings.xml"
|
||||
line="9"
|
||||
column="55"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="IconDensities"
|
||||
message="Missing the following drawables in `drawable-hdpi`: mapbox_infowindow_icon_bg.9.png, mapbox_mapview_preview.jpg">
|
||||
<location
|
||||
file="src/main/res/drawable-hdpi"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="IconDensities"
|
||||
message="Missing the following drawables in `drawable-mdpi`: mapbox_infowindow_icon_bg.9.png, mapbox_mapview_preview.jpg">
|
||||
<location
|
||||
file="src/main/res/drawable-mdpi"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="IconDensities"
|
||||
message="Missing the following drawables in `drawable-xhdpi`: mapbox_infowindow_icon_bg.9.png, mapbox_mapview_preview.jpg">
|
||||
<location
|
||||
file="src/main/res/drawable-xhdpi"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="IconDensities"
|
||||
message="Missing the following drawables in `drawable-xxhdpi`: mapbox_infowindow_icon_bg.9.png (found in drawable-xxxhdpi)">
|
||||
<location
|
||||
file="src/main/res/drawable-xxhdpi"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="SelectableText"
|
||||
message="Consider making the text value selectable by specifying `android:textIsSelectable="true"`"
|
||||
errorLine1="<TextView"
|
||||
errorLine2="^">
|
||||
<location
|
||||
file="src/main/res/layout/mapbox_attribution_list_item.xml"
|
||||
line="2"
|
||||
column="1"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="SelectableText"
|
||||
message="Consider making the text value selectable by specifying `android:textIsSelectable="true"`"
|
||||
errorLine1=" <TextView"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/res/layout/mapbox_infowindow_content.xml"
|
||||
line="21"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="SelectableText"
|
||||
message="Consider making the text value selectable by specifying `android:textIsSelectable="true"`"
|
||||
errorLine1=" <TextView"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/res/layout/mapbox_infowindow_content.xml"
|
||||
line="31"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="ContentDescription"
|
||||
message="[Accessibility] Missing `contentDescription` attribute on image"
|
||||
errorLine1="<ImageView xmlns:android="http://schemas.android.com/apk/res/android""
|
||||
errorLine2="^">
|
||||
<location
|
||||
file="src/main/res/layout/mapbox_view_image_marker.xml"
|
||||
line="2"
|
||||
column="1"/>
|
||||
</issue>
|
||||
|
||||
</issues>
|
||||
2
platform/android/MapboxGLAndroidSDKTestApp/.gitignore
vendored
Normal file
2
platform/android/MapboxGLAndroidSDKTestApp/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
lint-baseline.xml
|
||||
lint/lint-baseline-local.xml
|
||||
@@ -25,6 +25,7 @@ android {
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
baseline file("lint-baseline.xml")
|
||||
checkAllWarnings true
|
||||
warningsAsErrors true
|
||||
disable 'MissingTranslation'
|
||||
@@ -84,5 +85,6 @@ apply from: 'gradle-config.gradle'
|
||||
apply from: 'gradle-device-farm.gradle'
|
||||
apply from: 'gradle-spoon.gradle'
|
||||
apply from: 'gradle-checkstyle.gradle'
|
||||
apply from: '../gradle-lint.gradle'
|
||||
|
||||
|
||||
|
||||
2569
platform/android/MapboxGLAndroidSDKTestApp/lint/lint-baseline-ci.xml
Normal file
2569
platform/android/MapboxGLAndroidSDKTestApp/lint/lint-baseline-ci.xml
Normal file
File diff suppressed because it is too large
Load Diff
2
platform/android/MapboxGLAndroidSDKWearTestApp/.gitignore
vendored
Normal file
2
platform/android/MapboxGLAndroidSDKWearTestApp/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
lint-baseline.xml
|
||||
lint/lint-baseline-local.xml
|
||||
@@ -13,6 +13,7 @@ android {
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
baseline file("lint-baseline.xml")
|
||||
disable 'MissingTranslation'
|
||||
}
|
||||
|
||||
@@ -48,3 +49,4 @@ dependencies {
|
||||
|
||||
apply from: 'gradle-config.gradle'
|
||||
apply from: 'gradle-checkstyle.gradle'
|
||||
apply from: '../gradle-lint.gradle'
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//
|
||||
|
||||
task accessToken {
|
||||
def tokenFile = new File("MapboxGLAndroidSDKWearTestApp/src/main/res/values/developer-config.xml")
|
||||
def tokenFile = new File("${projectDir}/src/main/res/values/developer-config.xml")
|
||||
if (!tokenFile.exists()) {
|
||||
String tokenFileContents = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
|
||||
"<resources>\n" +
|
||||
|
||||
@@ -0,0 +1,823 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- REMEMBER! First you run Lint locally you'll need to move the lint-baseline.xml file
|
||||
generated into the lint folder and called it lint-baseline-local.xml
|
||||
If you remove any error when running Lint locally, you'll get a warning from the command
|
||||
line advising you to remove it from the baseline. If you remove it (remember to remove it
|
||||
from lint-baseline-local.xml file) you should remove it too from
|
||||
lint-baseline-ci.xml (THIS FILE) which is the only one included in the repo.
|
||||
Eventually, it'll be removed (when we remove all current lint errors included). -->
|
||||
<issues format="4" by="lint 2.3.1">
|
||||
|
||||
<issue
|
||||
id="MissingPermission"
|
||||
message="Call requires permission which may be rejected by user: code should explicitly check to see if permission is available (with `checkPermission`) or explicitly handle a potential `SecurityException`"
|
||||
errorLine1=" Location lastKnownLocation = locationEngine.getLastLocation();"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/maps/widgets/MyLocationView.java"
|
||||
line="783"
|
||||
column="38"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="MissingPermission"
|
||||
message="Call requires permission which may be rejected by user: code should explicitly check to see if permission is available (with `checkPermission`) or explicitly handle a potential `SecurityException`"
|
||||
errorLine1=" locationEngine.requestLocationUpdates();"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/maps/widgets/MyLocationView.java"
|
||||
line="787"
|
||||
column="9"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="GradleCompatible"
|
||||
message="All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 25.3.1, 23.0.1. Examples include `com.android.support:animated-vector-drawable:25.3.1` and `com.android.support:percent:23.0.1`">
|
||||
<location
|
||||
file="build.gradle"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="DefaultLocale"
|
||||
message="Implicitly using the default locale is a common source of bugs: Use `String.format(Locale, ...)` instead"
|
||||
errorLine1=" Timber.v(String.format("[HTTP] Request was successful (code = %d).", response.code()));"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
|
||||
line="112"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="DefaultLocale"
|
||||
message="Implicitly using the default locale is a common source of bugs: Use `String.format(Locale, ...)` instead"
|
||||
errorLine1=" Timber.d(String.format("
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
|
||||
line="116"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="TimberArgCount"
|
||||
message="Wrong argument count, format string `Failed to read the package metadata: ` requires `0` but format call supplies `1`"
|
||||
errorLine1=" Timber.e("Failed to read the package metadata: ", exception);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java"
|
||||
line="75"
|
||||
column="7"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="TimberArgCount"
|
||||
message="Wrong argument count, format string `Failed to read the storage key: ` requires `0` but format call supplies `1`"
|
||||
errorLine1=" Timber.e("Failed to read the storage key: ", exception);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java"
|
||||
line="77"
|
||||
column="7"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="TimberArgCount"
|
||||
message="Wrong argument count, format string `Failed to obtain the external storage path: ` requires `0` but format call supplies `1`"
|
||||
errorLine1=" Timber.e("Failed to obtain the external storage path: ", exception);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java"
|
||||
line="86"
|
||||
column="9"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="TimberArgCount"
|
||||
message="Wrong argument count, format string `Failed to delete old ambient cache database: ` requires `0` but format call supplies `1`"
|
||||
errorLine1=" Timber.e("Failed to delete old ambient cache database: ", exception);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java"
|
||||
line="113"
|
||||
column="11"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="BinaryOperationInTimber"
|
||||
message="Replace String concatenation with Timber's string formatting"
|
||||
errorLine1=" Timber.v("Connected: " + connected);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/net/ConnectivityReceiver.java"
|
||||
line="85"
|
||||
column="14"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="BinaryOperationInTimber"
|
||||
message="Replace String concatenation with Timber's string formatting"
|
||||
errorLine1=" Timber.e("Device returned an out of range width size, ""
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java"
|
||||
line="178"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="BinaryOperationInTimber"
|
||||
message="Replace String concatenation with Timber's string formatting"
|
||||
errorLine1=" Timber.e("Device returned an out of range height size, ""
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java"
|
||||
line="185"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="BinaryOperationInTimber"
|
||||
message="Replace String concatenation with Timber's string formatting"
|
||||
errorLine1=" Timber.d("Old ambient cache database deleted to save space: " + path);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java"
|
||||
line="110"
|
||||
column="22"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="BinaryOperationInTimber"
|
||||
message="Replace String concatenation with Timber's string formatting"
|
||||
errorLine1=" Timber.e("Not setting minZoomPreference, value is in unsupported range: " + minZoom);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/maps/Transform.java"
|
||||
line="349"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="BinaryOperationInTimber"
|
||||
message="Replace String concatenation with Timber's string formatting"
|
||||
errorLine1=" Timber.e("Not setting maxZoomPreference, value is in unsupported range: " + maxZoom);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/maps/Transform.java"
|
||||
line="361"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StringFormatInTimber"
|
||||
message="Using 'String#format' inside of 'Timber'"
|
||||
errorLine1=" Timber.e(String.format("Stops: %s is a different type: %s", stops.getClass(), exception));"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/style/functions/Function.java"
|
||||
line="282"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StringFormatInTimber"
|
||||
message="Using 'String#format' inside of 'Timber'"
|
||||
errorLine1=" Timber.v(String.format("[HTTP] Request was successful (code = %d).", response.code()));"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
|
||||
line="112"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StringFormatInTimber"
|
||||
message="Using 'String#format' inside of 'Timber'"
|
||||
errorLine1=" Timber.d(String.format("
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
|
||||
line="116"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StringFormatInTimber"
|
||||
message="Using 'String#format' inside of 'Timber'"
|
||||
errorLine1=" Timber.d(String.format(MapboxConstants.MAPBOX_LOCALE,"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
|
||||
line="163"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StringFormatInTimber"
|
||||
message="Using 'String#format' inside of 'Timber'"
|
||||
errorLine1=" Timber.i(String.format(MapboxConstants.MAPBOX_LOCALE,"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
|
||||
line="166"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StringFormatInTimber"
|
||||
message="Using 'String#format' inside of 'Timber'"
|
||||
errorLine1=" Timber.w(String.format(MapboxConstants.MAPBOX_LOCALE,"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/http/HTTPRequest.java"
|
||||
line="170"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StringFormatInTimber"
|
||||
message="Using 'String#format' inside of 'Timber'"
|
||||
errorLine1=" Timber.e(String.format("Layer: %s is a different type: %s", layerId, exception));"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java"
|
||||
line="286"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StringFormatInTimber"
|
||||
message="Using 'String#format' inside of 'Timber'"
|
||||
errorLine1=" Timber.e(String.format("Source: %s is a different type: %s", sourceId, exception));"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java"
|
||||
line="407"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StringFormatInTimber"
|
||||
message="Using 'String#format' inside of 'Timber'"
|
||||
errorLine1=" Timber.e(String.format(MapboxConstants.MAPBOX_LOCALE,"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java"
|
||||
line="92"
|
||||
column="16"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="ThrowableNotAtBeginning"
|
||||
message="Throwable should be first argument"
|
||||
errorLine1=" Timber.e("Failed to read the package metadata: ", exception);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java"
|
||||
line="75"
|
||||
column="7"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="ThrowableNotAtBeginning"
|
||||
message="Throwable should be first argument"
|
||||
errorLine1=" Timber.e("Failed to read the storage key: ", exception);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java"
|
||||
line="77"
|
||||
column="7"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="ThrowableNotAtBeginning"
|
||||
message="Throwable should be first argument"
|
||||
errorLine1=" Timber.e("Failed to obtain the external storage path: ", exception);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/storage/FileSource.java"
|
||||
line="86"
|
||||
column="9"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="ThrowableNotAtBeginning"
|
||||
message="Throwable should be first argument"
|
||||
errorLine1=" Timber.e("Failed to delete old ambient cache database: ", exception);"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java"
|
||||
line="113"
|
||||
column="11"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="AllowBackup"
|
||||
message="On SDK version 23 and up, your app data will be automatically backed up and restored on app install. Consider adding the attribute `android:fullBackupContent` to specify an `@xml` resource which configures which files to backup. More info: https://developer.android.com/training/backup/autosyncapi.html"
|
||||
errorLine1=" <application"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/AndroidManifest.xml"
|
||||
line="14"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StaticFieldLeak"
|
||||
message="Do not place Android context classes in static fields (static reference to `ConnectivityReceiver` which has field `context` pointing to `Context`); this is a memory leak (and also breaks Instant Run)"
|
||||
errorLine1=" private static ConnectivityReceiver INSTANCE;"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/net/ConnectivityReceiver.java"
|
||||
line="24"
|
||||
column="3"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StaticFieldLeak"
|
||||
message="Do not place Android context classes in static fields (static reference to `IconFactory` which has field `context` pointing to `Context`); this is a memory leak (and also breaks Instant Run)"
|
||||
errorLine1=" private static IconFactory instance;"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/annotations/IconFactory.java"
|
||||
line="38"
|
||||
column="3"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StaticFieldLeak"
|
||||
message="Do not place Android context classes in static fields (static reference to `Mapbox` which has field `context` pointing to `Context`); this is a memory leak (and also breaks Instant Run)"
|
||||
errorLine1=" private static Mapbox INSTANCE;"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/Mapbox.java"
|
||||
line="29"
|
||||
column="3"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="StaticFieldLeak"
|
||||
message="Do not place Android context classes in static fields (static reference to `OfflineManager` which has field `context` pointing to `Context`); this is a memory leak (and also breaks Instant Run)"
|
||||
errorLine1=" // This object is implemented as a singleton"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/java/com/mapbox/mapboxsdk/offline/OfflineManager.java"
|
||||
line="42"
|
||||
column="3"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="MergeRootFrame"
|
||||
message="This `<FrameLayout>` can be replaced with a `<merge>` tag"
|
||||
errorLine1="<FrameLayout"
|
||||
errorLine2="^">
|
||||
<location
|
||||
file="src/main/res/layout/activity_simple_mapview.xml"
|
||||
line="2"
|
||||
column="1"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.colorPrimary` appears to be unused"
|
||||
errorLine1=" <color name="colorPrimary">@color/mapboxBlue</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="5"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.colorPrimaryDark` appears to be unused"
|
||||
errorLine1=" <color name="colorPrimaryDark">@color/mapboxBlueDark</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="6"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapbox_my_location_ring` appears to be unused"
|
||||
errorLine1=" <color name="mapbox_my_location_ring">@color/mapbox_blue</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/src/platform/android/MapboxGLAndroidSDK/src/main/res/values/colors.xml"
|
||||
line="6"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.colorAccent` appears to be unused"
|
||||
errorLine1=" <color name="colorAccent">@color/mapboxRed</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="7"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.materialGrey` appears to be unused"
|
||||
errorLine1=" <color name="materialGrey">#F5F5F5</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="9"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.materialDarkGrey` appears to be unused"
|
||||
errorLine1=" <color name="materialDarkGrey">#DFDFDF</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="10"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxCyan` appears to be unused"
|
||||
errorLine1=" <color name="mapboxCyan">#3BB2D0</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="13"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxGreen` appears to be unused"
|
||||
errorLine1=" <color name="mapboxGreen">#56B881</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="14"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxBlue` appears to be unused"
|
||||
errorLine1=" <color name="mapboxBlue">#3887BE</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="15"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxBlueDark` appears to be unused"
|
||||
errorLine1=" <color name="mapboxBlueDark">#1F6EA5</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="16"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxPurple` appears to be unused"
|
||||
errorLine1=" <color name="mapboxPurple">#8A8ACB</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="17"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxPurpleDark` appears to be unused"
|
||||
errorLine1=" <color name="mapboxPurpleDark">#7171b2</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="18"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxPurpleLight` appears to be unused"
|
||||
errorLine1=" <color name="mapboxPurpleLight">#A4A4E5</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="19"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxDenim` appears to be unused"
|
||||
errorLine1=" <color name="mapboxDenim">#50667F</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="21"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxTeal` appears to be unused"
|
||||
errorLine1=" <color name="mapboxTeal">#41AFA5</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="22"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxOrange` appears to be unused"
|
||||
errorLine1=" <color name="mapboxOrange">#F9886C</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="23"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxRed` appears to be unused"
|
||||
errorLine1=" <color name="mapboxRed">#E55E5E</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="24"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxPink` appears to be unused"
|
||||
errorLine1=" <color name="mapboxPink">#ED6498</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="25"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxYellow` appears to be unused"
|
||||
errorLine1=" <color name="mapboxYellow">#f1f075</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="26"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxMustard` appears to be unused"
|
||||
errorLine1=" <color name="mapboxMustard">#FBB03B</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="27"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxNavy` appears to be unused"
|
||||
errorLine1=" <color name="mapboxNavy">#28353D</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="28"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapboxNavyDark` appears to be unused"
|
||||
errorLine1=" <color name="mapboxNavyDark">#222B30</color>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/res/values/colors.xml"
|
||||
line="29"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.dimen.mapbox_infowindow_offset` appears to be unused"
|
||||
errorLine1=" <dimen name="mapbox_infowindow_offset">-2dp</dimen>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/src/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml"
|
||||
line="5"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.dimen.mapbox_infowindow_line_width` appears to be unused"
|
||||
errorLine1=" <dimen name="mapbox_infowindow_line_width">1.5dp</dimen>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/src/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml"
|
||||
line="6"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.dimen.mapbox_attribution_icon_left_padding` appears to be unused"
|
||||
errorLine1=" <dimen name="mapbox_attribution_icon_left_padding">@dimen/mapbox_two_dp</dimen>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/src/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml"
|
||||
line="7"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.dimen.mapbox_attribution_icon_top_padding` appears to be unused"
|
||||
errorLine1=" <dimen name="mapbox_attribution_icon_top_padding">@dimen/mapbox_two_dp</dimen>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/src/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml"
|
||||
line="8"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.dimen.mapbox_attribution_icon_right_padding` appears to be unused"
|
||||
errorLine1=" <dimen name="mapbox_attribution_icon_right_padding">@dimen/mapbox_two_dp</dimen>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/src/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml"
|
||||
line="9"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.dimen.mapbox_attribution_icon_bottom_padding` appears to be unused"
|
||||
errorLine1=" <dimen name="mapbox_attribution_icon_bottom_padding">@dimen/mapbox_two_dp</dimen>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/src/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml"
|
||||
line="10"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.dimen.mapbox_two_dp` appears to be unused"
|
||||
errorLine1=" <dimen name="mapbox_two_dp">2dp</dimen>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/src/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml"
|
||||
line="11"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.dimen.mapbox_ten_dp` appears to be unused"
|
||||
errorLine1=" <dimen name="mapbox_ten_dp">10dp</dimen>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/src/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml"
|
||||
line="14"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.dimen.mapbox_sixteen_dp` appears to be unused"
|
||||
errorLine1=" <dimen name="mapbox_sixteen_dp">16dp</dimen>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/src/platform/android/MapboxGLAndroidSDK/src/main/res/values/dimens.xml"
|
||||
line="15"
|
||||
column="12"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.drawable.mapbox_infowindow_icon_bg` appears to be unused">
|
||||
<location
|
||||
file="/src/platform/android/MapboxGLAndroidSDK/src/main/res/drawable-xxxhdpi/mapbox_infowindow_icon_bg.9.png"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.color.mapbox_material_bg_selector` appears to be unused"
|
||||
errorLine1="<selector xmlns:android="http://schemas.android.com/apk/res/android">"
|
||||
errorLine2="^">
|
||||
<location
|
||||
file="/src/platform/android/MapboxGLAndroidSDK/src/main/res/color/mapbox_material_bg_selector.xml"
|
||||
line="2"
|
||||
column="1"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.string.mapbox_style_outdoors` appears to be unused"
|
||||
errorLine1=" <string name="mapbox_style_outdoors" translatable="false">mapbox://styles/mapbox/outdoors-v10</string>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/src/platform/android/MapboxGLAndroidSDK/src/main/res/values/strings.xml"
|
||||
line="22"
|
||||
column="13"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.string.mapbox_style_traffic_day` appears to be unused"
|
||||
errorLine1=" <string name="mapbox_style_traffic_day" translatable="false">mapbox://styles/mapbox/traffic-day-v2</string>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/src/platform/android/MapboxGLAndroidSDK/src/main/res/values/strings.xml"
|
||||
line="27"
|
||||
column="13"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="UnusedResources"
|
||||
message="The resource `R.string.mapbox_style_traffic_night` appears to be unused"
|
||||
errorLine1=" <string name="mapbox_style_traffic_night" translatable="false">mapbox://styles/mapbox/traffic-night-v2</string>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="/src/platform/android/MapboxGLAndroidSDK/src/main/res/values/strings.xml"
|
||||
line="28"
|
||||
column="13"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="IconDensities"
|
||||
message="Missing the following drawables in `drawable-hdpi`: mapbox_infowindow_icon_bg.9.png, mapbox_mapview_preview.jpg">
|
||||
<location
|
||||
file="src/main/res/drawable-hdpi"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="IconDensities"
|
||||
message="Missing the following drawables in `drawable-mdpi`: mapbox_infowindow_icon_bg.9.png, mapbox_mapview_preview.jpg">
|
||||
<location
|
||||
file="src/main/res/drawable-mdpi"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="IconDensities"
|
||||
message="Missing the following drawables in `drawable-xhdpi`: mapbox_infowindow_icon_bg.9.png, mapbox_mapview_preview.jpg">
|
||||
<location
|
||||
file="src/main/res/drawable-xhdpi"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="IconDensities"
|
||||
message="Missing the following drawables in `drawable-xxhdpi`: mapbox_infowindow_icon_bg.9.png (found in drawable-xxxhdpi)">
|
||||
<location
|
||||
file="src/main/res/drawable-xxhdpi"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="GoogleAppIndexingWarning"
|
||||
message="App is not indexable by Google Search; consider adding at least one Activity with an ACTION-VIEW intent filter. See issue explanation for more details."
|
||||
errorLine1=" <application"
|
||||
errorLine2=" ^">
|
||||
<location
|
||||
file="src/main/AndroidManifest.xml"
|
||||
line="14"
|
||||
column="5"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="ContentDescription"
|
||||
message="[Accessibility] Missing `contentDescription` attribute on image"
|
||||
errorLine1="<ImageView xmlns:android="http://schemas.android.com/apk/res/android""
|
||||
errorLine2="^">
|
||||
<location
|
||||
file="src/main/res/layout/mapbox_view_image_marker.xml"
|
||||
line="2"
|
||||
column="1"/>
|
||||
</issue>
|
||||
|
||||
</issues>
|
||||
30
platform/android/gradle-lint.gradle
Normal file
30
platform/android/gradle-lint.gradle
Normal file
@@ -0,0 +1,30 @@
|
||||
task ciLint(type: Copy) {
|
||||
if (isLocalBuild()) {
|
||||
from "${projectDir}/lint/lint-baseline-local.xml"
|
||||
into "${projectDir}"
|
||||
rename { String fileName ->
|
||||
fileName.replace("lint-baseline-local.xml", "lint-baseline.xml")
|
||||
}
|
||||
} else {
|
||||
from "${projectDir}/lint/lint-baseline-ci.xml"
|
||||
into "${projectDir}"
|
||||
rename { String fileName ->
|
||||
fileName.replace("lint-baseline-ci.xml", "lint-baseline.xml")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def isLocalBuild() {
|
||||
if (System.getenv('IS_LOCAL_DEVELOPMENT') != null) {
|
||||
return System.getenv('IS_LOCAL_DEVELOPMENT').toBoolean()
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
lint.dependsOn ciLint
|
||||
|
||||
tasks.whenTaskAdded { task ->
|
||||
if (task.name == 'lintVitalRelease') {
|
||||
task.dependsOn ciLint
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user