Skip to content

Commit 3304f41

Browse files
authored
Enabled linting on Firestore
1 parent 5e3a516 commit 3304f41

File tree

2 files changed

+28
-3
lines changed

2 files changed

+28
-3
lines changed

firebase-firestore/firebase-firestore.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@ android {
5959
multiDexEnabled true
6060
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
6161
}
62-
lintOptions {
63-
abortOnError false
64-
}
62+
6563
sourceSets {
6664
main {
6765
proto {

firebase-firestore/lint.xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<lint>
3+
<!--A linter bug prevents us from being able to analyze this file.-->
4+
<!--See: https://storage.googleapis.com/android-ci/pr-logs/pull/firebase_firebase-android-sdk/63/check/1049425133258674177/artifacts/firebase-firestore_build_reports/lint-results.html -->
5+
<issue id="all">
6+
<ignore path="src/test/java/com/google/firebase/firestore/local/LruGarbageCollectorTestCase.java"/>
7+
</issue>
8+
9+
<!--Although usage of assert is not expected to work in the Android Runtime, since this is shared with the firebase backend, it would require significant plumbing to remove the assertions while sharing the code effectively.-->
10+
<issue id="Assert">
11+
<ignore path="src/main/java/com/google/cloud/datastore/core/number/*.java"/>
12+
</issue>
13+
14+
<!--We have validated that HashMaps are better suited to the in memory workloads for these java files.-->
15+
<issue id="UseSparseArrays">
16+
<ignore path="src/main/java/com/google/firebase/firestore/remote/RemoteStore.java"/>
17+
<ignore path="src/main/java/com/google/firebase/firestore/core/SyncEngine.java"/>
18+
<ignore path="src/main/java/com/google/firebase/firestore/remote/WatchChangeAggregator.java"/>
19+
</issue>
20+
21+
22+
<!--gRPC's DNS name resolver checks for javax.naming at runtime to determine if it can be used, but fails gracefullt without it. This lint error is safe to ignore.-->
23+
<!--See : https://github.com/grpc/grpc-java/blob/b0f423295b4674cb5247a6143fd211b050ef0065/core/src/main/java/io/grpc/internal/JndiResourceResolverFactory.java#L73-->
24+
<issue id="InvalidPackage">
25+
<ignore path="*/io.grpc/grpc-core/*"/>
26+
</issue>
27+
</lint>

0 commit comments

Comments
 (0)