-
Notifications
You must be signed in to change notification settings - Fork 0
/
lint-report.html
1185 lines (1140 loc) · 87.6 KB
/
lint-report.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Lint Report</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://code.getmdl.io/1.2.1/material.blue-indigo.min.css" />
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:300,400,500,700" type="text/css">
<script defer src="https://code.getmdl.io/1.2.0/material.min.js"></script>
<style>
section.section--center {
max-width: 860px;
}
.mdl-card__supporting-text + .mdl-card__actions {
border-top: 1px solid rgba(0, 0, 0, 0.12);
}
main > .mdl-layout__tab-panel {
padding: 8px;
padding-top: 48px;
}
.mdl-card__actions {
margin: 0;
padding: 4px 40px;
color: inherit;
}
.mdl-card > * {
height: auto;
}
.mdl-card__actions a {
color: #00BCD4;
margin: 0;
}
.error-icon {
color: #bb7777;
vertical-align: bottom;
}
.warning-icon {
vertical-align: bottom;
}
.mdl-layout__content section:not(:last-of-type) {
position: relative;
margin-bottom: 48px;
}
.mdl-card .mdl-card__supporting-text {
margin: 40px;
-webkit-flex-grow: 1;
-ms-flex-positive: 1;
flex-grow: 1;
padding: 0;
color: inherit;
width: calc(100% - 80px);
}
div.mdl-layout__drawer-button .material-icons {
line-height: 48px;
}
.mdl-card .mdl-card__supporting-text {
margin-top: 0px;
}
.chips {
float: right;
vertical-align: middle;
}
pre.errorlines {
background-color: white;
font-family: monospace;
border: 1px solid #e0e0e0;
line-height: 0.9rem;
font-size: 0.9rem; padding: 1px 0px 1px; 1px;
overflow: scroll;
}
.prefix {
color: #660e7a;
font-weight: bold;
}
.attribute {
color: #0000ff;
font-weight: bold;
}
.value {
color: #008000;
font-weight: bold;
}
.tag {
color: #000080;
font-weight: bold;
}
.comment {
color: #808080;
font-style: italic;
}
.javadoc {
color: #808080;
font-style: italic;
}
.annotation {
color: #808000;
}
.string {
color: #008000;
font-weight: bold;
}
.number {
color: #0000ff;
}
.keyword {
color: #000080;
font-weight: bold;
}
.caretline {
background-color: #fffae3;
}
.lineno {
color: #999999;
background-color: #f0f0f0;
}
.error {
display: inline-block;
position:relative;
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AwCFR4T/3uLMgAAADxJREFUCNdNyLERQEAABMCjL4lQwIzcjErpguAL+C9AvgKJDbeD/PRpLdm35Hm+MU+cB+tCKaJW4L4YBy+CAiLJrFs9mgAAAABJRU5ErkJggg==) bottom repeat-x;
}
.warning {
text-decoration: none;
background-color: #f6ebbc;
}
.overview {
padding: 10pt;
width: 100%;
overflow: auto;
border-collapse:collapse;
}
.overview tr {
border-bottom: solid 1px #eeeeee;
}
.categoryColumn a {
text-decoration: none;
color: inherit;
}
.countColumn {
text-align: right;
padding-right: 20px;
width: 50px;
}
.issueColumn {
padding-left: 16px;
}
.categoryColumn {
position: relative;
left: -50px;
padding-top: 20px;
padding-bottom: 5px;
}
.options {
padding-left: 16px;
}
</style>
<script language="javascript" type="text/javascript">
<!--
function reveal(id) {
if (document.getElementById) {
document.getElementById(id).style.display = 'block';
document.getElementById(id+'Link').style.display = 'none';
}
}
function hideid(id) {
if (document.getElementById) {
document.getElementById(id).style.display = 'none';
}
}
//-->
</script>
</head>
<body class="mdl-color--grey-100 mdl-color-text--grey-700 mdl-base">
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
<header class="mdl-layout__header">
<div class="mdl-layout__header-row">
<span class="mdl-layout-title">Lint Report: 32 warnings</span>
<div class="mdl-layout-spacer"></div>
<nav class="mdl-navigation mdl-layout--large-screen-only">
Check performed at Tue Nov 29 09:59:30 CST 2022 </nav>
</div>
</header>
<div class="mdl-layout__drawer">
<span class="mdl-layout-title">Issue Types</span>
<nav class="mdl-navigation">
<a class="mdl-navigation__link" href="#overview"><i class="material-icons">dashboard</i>Overview</a>
<a class="mdl-navigation__link" href="#GradleDependency"><i class="material-icons warning-icon">warning</i>Obsolete Gradle Dependency (5)</a>
<a class="mdl-navigation__link" href="#LintImplTextFormat"><i class="material-icons warning-icon">warning</i>Lint Text Format (25)</a>
<a class="mdl-navigation__link" href="#UastImplementation"><i class="material-icons warning-icon">warning</i>Avoid using UAST implementation (2)</a>
</nav>
</div>
<main class="mdl-layout__content">
<div class="mdl-layout__tab-panel is-active">
<a name="overview"></a>
<section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp" id="OverviewCard" style="display: block;">
<div class="mdl-card mdl-cell mdl-cell--12-col">
<div class="mdl-card__title">
<h2 class="mdl-card__title-text">Overview</h2>
</div>
<div class="mdl-card__supporting-text">
<table class="overview">
<tr><td class="countColumn"></td><td class="categoryColumn"><a href="#Correctness">Correctness</a>
</td></tr>
<tr>
<td class="countColumn">5</td><td class="issueColumn"><i class="material-icons warning-icon">warning</i>
<a href="#GradleDependency">GradleDependency</a>: Obsolete Gradle Dependency</td></tr>
<tr><td class="countColumn"></td><td class="categoryColumn"><a href="#Lint Implementation Issues">Lint Implementation Issues</a>
</td></tr>
<tr>
<td class="countColumn">25</td><td class="issueColumn"><i class="material-icons warning-icon">warning</i>
<a href="#LintImplTextFormat">LintImplTextFormat</a>: Lint Text Format</td></tr>
<tr>
<td class="countColumn">2</td><td class="issueColumn"><i class="material-icons warning-icon">warning</i>
<a href="#UastImplementation">UastImplementation</a>: Avoid using UAST implementation</td></tr>
<tr><td></td><td class="categoryColumn"><a href="#MissingIssues">Disabled Checks (35)</a>
</td></tr></table>
<br/> </div>
<div class="mdl-card__actions mdl-card--border">
<button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="OverviewCardLink" onclick="hideid('OverviewCard');">
Dismiss</button> </div>
</div>
</section>
<a name="Correctness"></a>
<a name="GradleDependency"></a>
<section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp" id="GradleDependencyCard" style="display: block;">
<div class="mdl-card mdl-cell mdl-cell--12-col">
<div class="mdl-card__title">
<h2 class="mdl-card__title-text">Obsolete Gradle Dependency</h2>
</div>
<div class="mdl-card__supporting-text">
<div class="issue">
<div class="warningslist">
<span class="location"><a href="../../build.gradle">build.gradle</a>:20</span>: <span class="message">A newer version of com.android.tools.lint:lint-api than 30.2.0 is available: 30.3.1</span><br /><pre class="errorlines">
<span class="lineno"> 17 </span>}
<span class="lineno"> 18 </span>
<span class="lineno"> 19 </span>dependencies {
<span class="caretline"><span class="lineno"> 20 </span> compileOnly <span class="warning"><span class="string">"com.android.tools.lint:lint-api:$lintVersion"</span></span> </span>
<span class="lineno"> 21 </span> compileOnly <span class="string">"com.android.tools.lint:lint-checks:$lintVersion"</span>
<span class="lineno"> 22 </span> compileOnly <span class="string">"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"</span>
<span class="lineno"> 23 </span> testImplementation <span class="string">"junit:junit:4.13.2"</span></pre>
<span class="location"><a href="../../build.gradle">build.gradle</a>:21</span>: <span class="message">A newer version of com.android.tools.lint:lint-checks than 30.2.0 is available: 30.3.1</span><br /><pre class="errorlines">
<span class="lineno"> 18 </span>
<span class="lineno"> 19 </span>dependencies {
<span class="lineno"> 20 </span> compileOnly <span class="string">"com.android.tools.lint:lint-api:$lintVersion"</span>
<span class="caretline"><span class="lineno"> 21 </span> compileOnly <span class="warning"><span class="string">"com.android.tools.lint:lint-checks:$lintVersion"</span></span> </span>
<span class="lineno"> 22 </span> compileOnly <span class="string">"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"</span>
<span class="lineno"> 23 </span> testImplementation <span class="string">"junit:junit:4.13.2"</span>
<span class="lineno"> 24 </span> testImplementation <span class="string">"com.android.tools.lint:lint:$lintVersion"</span></pre>
<span class="location"><a href="../../build.gradle">build.gradle</a>:22</span>: <span class="message">A newer version of org.jetbrains.kotlin:kotlin-stdlib-jdk7 than 1.6.21 is available: 1.7.10</span><br /><pre class="errorlines">
<span class="lineno"> 19 </span>dependencies {
<span class="lineno"> 20 </span> compileOnly <span class="string">"com.android.tools.lint:lint-api:$lintVersion"</span>
<span class="lineno"> 21 </span> compileOnly <span class="string">"com.android.tools.lint:lint-checks:$lintVersion"</span>
<span class="caretline"><span class="lineno"> 22 </span> compileOnly <span class="warning"><span class="string">"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"</span></span> </span>
<span class="lineno"> 23 </span> testImplementation <span class="string">"junit:junit:4.13.2"</span>
<span class="lineno"> 24 </span> testImplementation <span class="string">"com.android.tools.lint:lint:$lintVersion"</span>
<span class="lineno"> 25 </span> testImplementation <span class="string">"com.android.tools.lint:lint-tests:$lintVersion"</span></pre>
<span class="location"><a href="../../build.gradle">build.gradle</a>:24</span>: <span class="message">A newer version of com.android.tools.lint:lint than 30.2.0 is available: 30.3.1</span><br /><pre class="errorlines">
<span class="lineno"> 21 </span> compileOnly <span class="string">"com.android.tools.lint:lint-checks:$lintVersion"</span>
<span class="lineno"> 22 </span> compileOnly <span class="string">"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"</span>
<span class="lineno"> 23 </span> testImplementation <span class="string">"junit:junit:4.13.2"</span>
<span class="caretline"><span class="lineno"> 24 </span> testImplementation <span class="warning"><span class="string">"com.android.tools.lint:lint:$lintVersion"</span></span> </span>
<span class="lineno"> 25 </span> testImplementation <span class="string">"com.android.tools.lint:lint-tests:$lintVersion"</span>
<span class="lineno"> 26 </span>}
</pre>
<span class="location"><a href="../../build.gradle">build.gradle</a>:25</span>: <span class="message">A newer version of com.android.tools.lint:lint-tests than 30.2.0 is available: 30.3.1</span><br /><pre class="errorlines">
<span class="lineno"> 22 </span> compileOnly <span class="string">"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"</span>
<span class="lineno"> 23 </span> testImplementation <span class="string">"junit:junit:4.13.2"</span>
<span class="lineno"> 24 </span> testImplementation <span class="string">"com.android.tools.lint:lint:$lintVersion"</span>
<span class="caretline"><span class="lineno"> 25 </span> testImplementation <span class="warning"><span class="string">"com.android.tools.lint:lint-tests:$lintVersion"</span></span> </span>
<span class="lineno"> 26 </span>}
<span class="lineno"> 27 </span>
<span class="lineno"> 28 </span>sourceCompatibility = JavaVersion.VERSION_1_8
</pre>
</div>
<div class="metadata"><div class="explanation" id="explanationGradleDependency" style="display: none;">
This detector looks for usages of libraries where the version you are using is not the current stable release. Using older versions is fine, and there are cases where you deliberately want to stick with an older version. However, you may simply not be aware that a more recent version is available, and that is what this lint check helps find.<br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
To suppress this error, use the issue id "GradleDependency" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
<br/></div>
</div>
</div>
<div class="chips">
<span class="mdl-chip">
<span class="mdl-chip__text">GradleDependency</span>
</span>
<span class="mdl-chip">
<span class="mdl-chip__text">Correctness</span>
</span>
<span class="mdl-chip">
<span class="mdl-chip__text">Warning</span>
</span>
<span class="mdl-chip">
<span class="mdl-chip__text">Priority 4/10</span>
</span>
</div>
</div>
<div class="mdl-card__actions mdl-card--border">
<button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="explanationGradleDependencyLink" onclick="reveal('explanationGradleDependency');">
Explain</button><button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="GradleDependencyCardLink" onclick="hideid('GradleDependencyCard');">
Dismiss</button> </div>
</div>
</section>
<a name="Lint Implementation Issues"></a>
<a name="LintImplTextFormat"></a>
<section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp" id="LintImplTextFormatCard" style="display: block;">
<div class="mdl-card mdl-cell mdl-cell--12-col">
<div class="mdl-card__title">
<h2 class="mdl-card__title-text">Lint Text Format</h2>
</div>
<div class="mdl-card__supporting-text">
<div class="issue">
<div class="warningslist">
<span class="location"><a href="../../src/main/java/com/lint/core/detector/ActivityDetector.kt">src/main/java/com/lint/core/detector/ActivityDetector.kt</a>:24</span>: <span class="message">"BaseActivity" looks pang a code reference; surround with backtics in string to display as symbol, e.g. `BaseActivity`</span><br /><pre class="errorlines">
<span class="lineno"> 21 </span> <span class="keyword">val</span> ISSUE = Issue.create(
<span class="lineno"> 22 </span> <span class="string">"ActivityStandard"</span>,
<span class="lineno"> 23 </span> <span class="string">"Activity继承不规范"</span>,
<span class="caretline"><span class="lineno"> 24 </span> <span class="warning">MESSAGE</span>, </span>
<span class="lineno"> 25 </span> Category.MESSAGES,
<span class="lineno"> 26 </span> <span class="number">7</span>,
<span class="lineno"> 27 </span> Severity.FATAL,
</pre>
<span class="location"><a href="../../src/main/java/com/lint/core/detector/ActivityDetector.kt">src/main/java/com/lint/core/detector/ActivityDetector.kt</a>:47</span>: <span class="message">"BaseActivity" looks pang a code reference; surround with backtics in string to display as symbol, e.g. `BaseActivity`</span><br /><pre class="errorlines">
<span class="lineno"> 44 </span> }
<span class="lineno"> 45 </span> <span class="comment">//判断是否继承指定类</span>
<span class="lineno"> 46 </span> <span class="keyword">if</span> (!evaluator.extendsClass(declaration.javaPsi, PROJECT_ACTIVITY, <span class="keyword">true</span>)) {
<span class="caretline"><span class="lineno"> 47 </span> context.report(ISSUE, declaration, context.getNameLocation(declaration), <span class="warning">MESSAGE</span>) </span>
<span class="lineno"> 48 </span> }
<span class="lineno"> 49 </span> }
</pre>
<span class="location"><a href="../../src/main/java/com/lint/core/detector/AdapterDetector.kt">src/main/java/com/lint/core/detector/AdapterDetector.kt</a>:25</span>: <span class="message">"BaseViewBindingAdapter" looks pang a code reference; surround with backtics in string to display as symbol, e.g. `BaseViewBindingAdapter`</span><br /><pre class="errorlines">
<span class="lineno"> 22 </span> <span class="keyword">val</span> ISSUE = Issue.create(
<span class="lineno"> 23 </span> <span class="string">"AdapterStandard"</span>,
<span class="lineno"> 24 </span> <span class="string">"Adapter继承不规范"</span>,
<span class="caretline"><span class="lineno"> 25 </span> <span class="warning">MESSAGE</span>, </span>
<span class="lineno"> 26 </span> Category.MESSAGES,
<span class="lineno"> 27 </span> <span class="number">7</span>,
<span class="lineno"> 28 </span> Severity.FATAL,
</pre>
<span class="location"><a href="../../src/main/java/com/lint/core/detector/AdapterDetector.kt">src/main/java/com/lint/core/detector/AdapterDetector.kt</a>:43</span>: <span class="message">"BaseViewBindingAdapter" looks pang a code reference; surround with backtics in string to display as symbol, e.g. `BaseViewBindingAdapter`</span><br /><pre class="errorlines">
<span class="lineno"> 40 </span> <span class="keyword">if</span> (!evaluator.extendsClass(declaration.javaPsi, PROJECT_SINGLE_ADAPTER, <span class="keyword">true</span>) ||
<span class="lineno"> 41 </span> !evaluator.extendsClass(declaration.javaPsi, PROJECT_MULTI_ADAPTER, <span class="keyword">true</span>)
<span class="lineno"> 42 </span> ) {
<span class="caretline"><span class="lineno"> 43 </span> context.report(ISSUE, declaration, context.getNameLocation(declaration), <span class="warning">MESSAGE</span>) </span>
<span class="lineno"> 44 </span> }
<span class="lineno"> 45 </span> }
<span class="lineno"> 46 </span>}</pre>
<span class="location"><a href="../../src/main/java/com/lint/core/detector/AndroidDetector.kt">src/main/java/com/lint/core/detector/AndroidDetector.kt</a>:28</span>: <span class="message">"getDrawable()" looks pang a call; surround with backtics in string to display as symbol, e.g. `getDrawable()`</span><br /><pre class="errorlines">
<span class="lineno"> 25 </span> <span class="keyword">val</span> ISSUE_RESOURCES_GET_DRAWABLE = Issue.create(
<span class="lineno"> 26 </span> <span class="string">"ResourcesGetDrawableStandard"</span>,
<span class="lineno"> 27 </span> <span class="string">"Resources 已经弃用getDrawable()"</span>,
<span class="caretline"><span class="lineno"> 28 </span> <span class="warning">MESSAGE_RESOURCES_GET_DRAWABLE</span>, </span>
<span class="lineno"> 29 </span> Category.MESSAGES, <span class="number">7</span>, Severity.FATAL,
<span class="lineno"> 30 </span> Implementation(AndroidDetector::<span class="keyword">class</span>.java, Scope.JAVA_FILE_SCOPE),
<span class="lineno"> 31 </span> )
</pre>
<button class="mdl-button mdl-js-button mdl-button--primary" id="LintImplTextFormatDivLink" onclick="reveal('LintImplTextFormatDiv');" />+ 20 More Occurrences...</button>
<div id="LintImplTextFormatDiv" style="display: none">
<span class="location"><a href="../../src/main/java/com/lint/core/detector/AndroidDetector.kt">src/main/java/com/lint/core/detector/AndroidDetector.kt</a>:37</span>: <span class="message">"getColor()" looks pang a call; surround with backtics in string to display as symbol, e.g. `getColor()`</span><br /><pre class="errorlines">
<span class="lineno"> 34 </span> <span class="keyword">val</span> ISSUE_RESOURCES_GET_COLOR = Issue.create(
<span class="lineno"> 35 </span> <span class="string">"ResourcesGetColorStandard"</span>,
<span class="lineno"> 36 </span> <span class="string">"Resources 已经弃用getColor()"</span>,
<span class="caretline"><span class="lineno"> 37 </span> <span class="warning">MESSAGE_RESOURCES_GET_COLOR</span>, </span>
<span class="lineno"> 38 </span> Category.MESSAGES, <span class="number">7</span>, Severity.FATAL,
<span class="lineno"> 39 </span> Implementation(AndroidDetector::<span class="keyword">class</span>.java, Scope.JAVA_FILE_SCOPE),
<span class="lineno"> 40 </span> )
</pre>
<span class="location"><a href="../../src/main/java/com/lint/core/detector/AndroidDetector.kt">src/main/java/com/lint/core/detector/AndroidDetector.kt</a>:46</span>: <span class="message">"getColorStateList()" looks pang a call; surround with backtics in string to display as symbol, e.g. `getColorStateList()`</span><br /><pre class="errorlines">
<span class="lineno"> 43 </span> <span class="keyword">val</span> ISSUE_RESOURCES_GET_COLOR_STATE_LIST = Issue.create(
<span class="lineno"> 44 </span> <span class="string">"ResourcesGetColorStateListStandard"</span>,
<span class="lineno"> 45 </span> <span class="string">"Resources 已经弃用getColorStateList()"</span>,
<span class="caretline"><span class="lineno"> 46 </span> <span class="warning">MESSAGE_RESOURCES_GET_COLOR_STATE_LIST</span>, </span>
<span class="lineno"> 47 </span> Category.MESSAGES,
<span class="lineno"> 48 </span> <span class="number">7</span>,
<span class="lineno"> 49 </span> Severity.FATAL,
</pre>
<span class="location"><a href="../../src/main/java/com/lint/core/detector/AndroidDetector.kt">src/main/java/com/lint/core/detector/AndroidDetector.kt</a>:68</span>: <span class="message">"getDrawable()" looks pang a call; surround with backtics in string to display as symbol, e.g. `getDrawable()`</span><br /><pre class="errorlines">
<span class="lineno"> 65 </span> ISSUE_RESOURCES_GET_DRAWABLE,
<span class="lineno"> 66 </span> node,
<span class="lineno"> 67 </span> context.getLocation(node),
<span class="caretline"><span class="lineno"> 68 </span> <span class="warning">MESSAGE_RESOURCES_GET_DRAWABLE</span>, </span>
<span class="lineno"> 69 </span> lintFix(context, <span class="string">"getDrawable"</span>, node.valueArguments[<span class="number">0</span>].asSourceString())
<span class="lineno"> 70 </span> )
<span class="lineno"> 71 </span> }
</pre>
<span class="location"><a href="../../src/main/java/com/lint/core/detector/AndroidDetector.kt">src/main/java/com/lint/core/detector/AndroidDetector.kt</a>:78</span>: <span class="message">"getColor()" looks pang a call; surround with backtics in string to display as symbol, e.g. `getColor()`</span><br /><pre class="errorlines">
<span class="lineno"> 75 </span> ISSUE_RESOURCES_GET_COLOR,
<span class="lineno"> 76 </span> node,
<span class="lineno"> 77 </span> context.getNameLocation(node),
<span class="caretline"><span class="lineno"> 78 </span> <span class="warning">MESSAGE_RESOURCES_GET_COLOR</span>, </span>
<span class="lineno"> 79 </span> lintFix(context, <span class="string">"getColor"</span>, node.valueArguments[<span class="number">0</span>].asSourceString())
<span class="lineno"> 80 </span> )
<span class="lineno"> 81 </span> }
</pre>
<span class="location"><a href="../../src/main/java/com/lint/core/detector/AndroidDetector.kt">src/main/java/com/lint/core/detector/AndroidDetector.kt</a>:88</span>: <span class="message">"getColorStateList()" looks pang a call; surround with backtics in string to display as symbol, e.g. `getColorStateList()`</span><br /><pre class="errorlines">
<span class="lineno"> 85 </span> ISSUE_RESOURCES_GET_COLOR_STATE_LIST,
<span class="lineno"> 86 </span> node,
<span class="lineno"> 87 </span> context.getNameLocation(node),
<span class="caretline"><span class="lineno"> 88 </span> <span class="warning">MESSAGE_RESOURCES_GET_COLOR_STATE_LIST</span>, </span>
<span class="lineno"> 89 </span> lintFix(context, <span class="string">"getColorStateList"</span>, node.valueArguments[<span class="number">0</span>].asSourceString())
<span class="lineno"> 90 </span> )
<span class="lineno"> 91 </span> }
</pre>
<span class="location"><a href="../../src/main/java/com/lint/core/detector/CustomLayoutDetector.kt">src/main/java/com/lint/core/detector/CustomLayoutDetector.kt</a>:280</span>: <span class="message">Lint checks should not be printing to console; use <code>LintClient.log</code> instead</span><br /><pre class="errorlines">
<span class="lineno"> 277 </span> }
<span class="lineno"> 278 </span> CARD_VIEW.oldName(), CARD_VIEW.newName() -> {
<span class="lineno"> 279 </span> <span class="comment">//Card</span>
<span class="caretline"><span class="lineno"> 280 </span> <span class="warning">println(<span class="string">"测试"</span>+ CARD_VIEW.oldName())</span> </span>
<span class="lineno"> 281 </span> context.report(
<span class="lineno"> 282 </span> CARD_ISSUE,
<span class="lineno"> 283 </span> element,
</pre>
<span class="location"><a href="../../src/main/java/com/lint/core/detector/FragmentDetector.kt">src/main/java/com/lint/core/detector/FragmentDetector.kt</a>:24</span>: <span class="message">"BaseFragment" looks pang a code reference; surround with backtics in string to display as symbol, e.g. `BaseFragment`</span><br /><pre class="errorlines">
<span class="lineno"> 21 </span> <span class="keyword">val</span> ISSUE = Issue.create(
<span class="lineno"> 22 </span> <span class="string">"FragmentStandard"</span>,
<span class="lineno"> 23 </span> <span class="string">"Fragment继承不规范"</span>,
<span class="caretline"><span class="lineno"> 24 </span> <span class="warning">MESSAGE</span>, </span>
<span class="lineno"> 25 </span> Category.MESSAGES,
<span class="lineno"> 26 </span> <span class="number">7</span>,
<span class="lineno"> 27 </span> Severity.FATAL,
</pre>
<span class="location"><a href="../../src/main/java/com/lint/core/detector/FragmentDetector.kt">src/main/java/com/lint/core/detector/FragmentDetector.kt</a>:47</span>: <span class="message">"BaseFragment" looks pang a code reference; surround with backtics in string to display as symbol, e.g. `BaseFragment`</span><br /><pre class="errorlines">
<span class="lineno"> 44 </span> }
<span class="lineno"> 45 </span> <span class="comment">//判断是否继承指定类</span>
<span class="lineno"> 46 </span> <span class="keyword">if</span> (!evaluator.extendsClass(declaration.javaPsi, PROJECT_FRAGMENT, <span class="keyword">true</span>)) {
<span class="caretline"><span class="lineno"> 47 </span> context.report(ISSUE, declaration, context.getNameLocation(declaration), <span class="warning">MESSAGE</span>) </span>
<span class="lineno"> 48 </span> }
<span class="lineno"> 49 </span> }
</pre>
<span class="location"><a href="../../src/main/java/com/lint/core/detector/OnClickListenerDetector.kt">src/main/java/com/lint/core/detector/OnClickListenerDetector.kt</a>:17</span>: <span class="message">"onDebouncedClick" looks pang a code reference; surround with backtics in string to display as symbol, e.g. `onDebouncedClick`</span><br /><pre class="errorlines">
<span class="lineno"> 14 </span>
<span class="lineno"> 15 </span> companion <span class="keyword">object</span> {
<span class="lineno"> 16 </span>
<span class="caretline"><span class="lineno"> 17 </span> private const <span class="keyword">val</span> MESSAGE = <span class="string">"请使用</span><span class="warning"><span class="string">onDebouncedClick</span></span><span class="string">替换setOnClickListener,可以有效防重点击"</span> </span>
<span class="lineno"> 18 </span>
<span class="lineno"> 19 </span> <span class="annotation">@JvmField</span>
<span class="lineno"> 20 </span> <span class="keyword">val</span> ISSUE = Issue.create(
</pre>
<span class="location"><a href="../../src/main/java/com/lint/core/detector/OnClickListenerDetector.kt">src/main/java/com/lint/core/detector/OnClickListenerDetector.kt</a>:17</span>: <span class="message">"onDebouncedClick" looks pang a code reference; surround with backtics in string to display as symbol, e.g. `onDebouncedClick`</span><br /><pre class="errorlines">
<span class="lineno"> 14 </span>
<span class="lineno"> 15 </span> companion <span class="keyword">object</span> {
<span class="lineno"> 16 </span>
<span class="caretline"><span class="lineno"> 17 </span> private const <span class="keyword">val</span> MESSAGE = <span class="string">"请使用</span><span class="warning"><span class="string">onDebouncedClick</span></span><span class="string">替换setOnClickListener,可以有效防重点击"</span> </span>
<span class="lineno"> 18 </span>
<span class="lineno"> 19 </span> <span class="annotation">@JvmField</span>
<span class="lineno"> 20 </span> <span class="keyword">val</span> ISSUE = Issue.create(
</pre>
<span class="location"><a href="../../src/main/java/com/lint/core/detector/OnClickListenerDetector.kt">src/main/java/com/lint/core/detector/OnClickListenerDetector.kt</a>:22</span>: <span class="message">The issue summary should be capitalized</span><br /><pre class="errorlines">
<span class="lineno"> 19 </span> <span class="annotation">@JvmField</span>
<span class="lineno"> 20 </span> <span class="keyword">val</span> ISSUE = Issue.create(
<span class="lineno"> 21 </span> <span class="string">"ClickStandard"</span>,
<span class="caretline"><span class="lineno"> 22 </span> <span class="string">"</span><span class="warning"><span class="string">setOnClickListener不能防重点击,建议替换</span></span><span class="string">"</span>, </span>
<span class="lineno"> 23 </span> MESSAGE,
<span class="lineno"> 24 </span> Category.MESSAGES,
<span class="lineno"> 25 </span> <span class="number">7</span>,
</pre>
<span class="location"><a href="../../src/main/java/com/lint/core/detector/ParseDetector.kt">src/main/java/com/lint/core/detector/ParseDetector.kt</a>:28</span>: <span class="message">"parseColor" looks pang a code reference; surround with backtics in string to display as symbol, e.g. `parseColor`</span><br /><pre class="errorlines">
<span class="lineno"> 25 </span> <span class="annotation">@JvmField</span>
<span class="lineno"> 26 </span> <span class="keyword">val</span> COLOR_ISSUE = Issue.create(
<span class="lineno"> 27 </span> <span class="string">"ColorStandard"</span>,
<span class="caretline"><span class="lineno"> 28 </span> <span class="string">"</span><span class="warning"><span class="string">parseColor</span></span><span class="string">使用不规范"</span>, </span>
<span class="lineno"> 29 </span> COLOR_MESSAGE,
<span class="lineno"> 30 </span> Category.MESSAGES,
<span class="lineno"> 31 </span> <span class="number">8</span>,
</pre>
<span class="location"><a href="../../src/main/java/com/lint/core/detector/ParseDetector.kt">src/main/java/com/lint/core/detector/ParseDetector.kt</a>:28</span>: <span class="message">The issue summary should be capitalized</span><br /><pre class="errorlines">
<span class="lineno"> 25 </span> <span class="annotation">@JvmField</span>
<span class="lineno"> 26 </span> <span class="keyword">val</span> COLOR_ISSUE = Issue.create(
<span class="lineno"> 27 </span> <span class="string">"ColorStandard"</span>,
<span class="caretline"><span class="lineno"> 28 </span> <span class="string">"</span><span class="warning"><span class="string">parseColor使用不规范</span></span><span class="string">"</span>, </span>
<span class="lineno"> 29 </span> COLOR_MESSAGE,
<span class="lineno"> 30 </span> Category.MESSAGES,
<span class="lineno"> 31 </span> <span class="number">8</span>,
</pre>
<span class="location"><a href="../../src/main/java/com/lint/core/detector/ParseDetector.kt">src/main/java/com/lint/core/detector/ParseDetector.kt</a>:61</span>: <span class="message">"parseColor" looks pang a code reference; surround with backtics in string to display as symbol, e.g. `parseColor`</span><br /><pre class="errorlines">
<span class="lineno"> 58 </span> context.report(
<span class="lineno"> 59 </span> COLOR_ISSUE, node,
<span class="lineno"> 60 </span> context.getCallLocation(node, includeReceiver = <span class="keyword">true</span>, includeArguments = <span class="keyword">true</span>),
<span class="caretline"><span class="lineno"> 61 </span> <span class="warning">COLOR_MESSAGE</span>, </span>
<span class="lineno"> 62 </span> fix
<span class="lineno"> 63 </span> )
<span class="lineno"> 64 </span> }
</pre>
<span class="location"><a href="../../src/main/java/com/lint/core/detector/PermissionDetector.kt">src/main/java/com/lint/core/detector/PermissionDetector.kt</a>:24</span>: <span class="message">"PermissionHelper" looks pang a code reference; surround with backtics in string to display as symbol, e.g. `PermissionHelper`</span><br /><pre class="errorlines">
<span class="lineno"> 21 </span> <span class="keyword">val</span> ISSUE = Issue.create(
<span class="lineno"> 22 </span> <span class="string">"PermissionStandard"</span>,
<span class="lineno"> 23 </span> <span class="string">"Permission使用不规范"</span>,
<span class="caretline"><span class="lineno"> 24 </span> <span class="warning">MESSAGE</span>, </span>
<span class="lineno"> 25 </span> Category.MESSAGES,
<span class="lineno"> 26 </span> <span class="number">7</span>,
<span class="lineno"> 27 </span> Severity.FATAL,
</pre>
<span class="location"><a href="../../src/main/java/com/lint/core/detector/PermissionDetector.kt">src/main/java/com/lint/core/detector/PermissionDetector.kt</a>:48</span>: <span class="message">"PermissionHelper" looks pang a code reference; surround with backtics in string to display as symbol, e.g. `PermissionHelper`</span><br /><pre class="errorlines">
<span class="lineno"> 45 </span> context.evaluator.isMemberInSubClassOf(method, ANDROID_CONTEXT_COMPAT, <span class="keyword">true</span>) ||
<span class="lineno"> 46 </span> context.evaluator.isMemberInSubClassOf(method, ANDROID_ACTIVITY_COMPAT, <span class="keyword">true</span>)
<span class="lineno"> 47 </span> <span class="keyword">if</span> (isMemberInClass || isMemberInSubClassOf) {
<span class="caretline"><span class="lineno"> 48 </span> context.report(ISSUE, node, context.getLocation(node), <span class="warning">MESSAGE</span>) </span>
<span class="lineno"> 49 </span> }
<span class="lineno"> 50 </span> }
</pre>
<span class="location"><a href="../../src/main/java/com/lint/core/detector/ThreadDetector.kt">src/main/java/com/lint/core/detector/ThreadDetector.kt</a>:23</span>: <span class="message">"Thread()" looks pang a call; surround with backtics in string to display as symbol, e.g. `Thread()`</span><br /><pre class="errorlines">
<span class="lineno"> 20 </span> <span class="keyword">val</span> ISSUE = Issue.create(
<span class="lineno"> 21 </span> <span class="string">"ThreadStandard"</span>,
<span class="lineno"> 22 </span> <span class="string">"Thread使用不规范"</span>,
<span class="caretline"><span class="lineno"> 23 </span> <span class="warning">MESSAGE</span>, </span>
<span class="lineno"> 24 </span> Category.MESSAGES,
<span class="lineno"> 25 </span> <span class="number">7</span>,
<span class="lineno"> 26 </span> Severity.FATAL,
</pre>
<span class="location"><a href="../../src/main/java/com/lint/core/detector/ThreadDetector.kt">src/main/java/com/lint/core/detector/ThreadDetector.kt</a>:40</span>: <span class="message">"Thread()" looks pang a call; surround with backtics in string to display as symbol, e.g. `Thread()`</span><br /><pre class="errorlines">
<span class="lineno"> 37 </span> node: UCallExpression,
<span class="lineno"> 38 </span> constructor: PsiMethod
<span class="lineno"> 39 </span> ) {
<span class="caretline"><span class="lineno"> 40 </span> context.report(ISSUE, node, context.getLocation(node), <span class="warning">MESSAGE</span>) </span>
<span class="lineno"> 41 </span> }
<span class="lineno"> 42 </span>}</pre>
<span class="location"><a href="../../src/main/java/com/lint/core/detector/ToastDetector.kt">src/main/java/com/lint/core/detector/ToastDetector.kt</a>:23</span>: <span class="message">"ToastUtil" looks pang a code reference; surround with backtics in string to display as symbol, e.g. `ToastUtil`</span><br /><pre class="errorlines">
<span class="lineno"> 20 </span> <span class="keyword">val</span> ISSUE = Issue.create(
<span class="lineno"> 21 </span> <span class="string">"ToastStandard"</span>,
<span class="lineno"> 22 </span> <span class="string">"Toast使用不规范"</span>,
<span class="caretline"><span class="lineno"> 23 </span> <span class="warning">MESSAGE</span>, </span>
<span class="lineno"> 24 </span> Category.MESSAGES,
<span class="lineno"> 25 </span> <span class="number">7</span>,
<span class="lineno"> 26 </span> Severity.FATAL,
</pre>
<span class="location"><a href="../../src/main/java/com/lint/core/detector/ToastDetector.kt">src/main/java/com/lint/core/detector/ToastDetector.kt</a>:40</span>: <span class="message">"ToastUtil" looks pang a code reference; surround with backtics in string to display as symbol, e.g. `ToastUtil`</span><br /><pre class="errorlines">
<span class="lineno"> 37 </span> <span class="keyword">val</span> isMemberInSubClassOf =
<span class="lineno"> 38 </span> context.evaluator.isMemberInSubClassOf(method, ANDROID_TOAST, <span class="keyword">true</span>)
<span class="lineno"> 39 </span> <span class="keyword">if</span> (isMemberInClass || isMemberInSubClassOf) {
<span class="caretline"><span class="lineno"> 40 </span> context.report(ISSUE, node, context.getLocation(node), <span class="warning">MESSAGE</span>) </span>
<span class="lineno"> 41 </span> }
<span class="lineno"> 42 </span> }
</pre>
</div>
</div>
<div class="metadata"><div class="explanation" id="explanationLintImplTextFormat" style="display: none;">
Lint supports various markdown pang formatting directives in all of its strings (issue explanations, reported error messages, etc).<br/>
<br/>
This lint check looks for strings that look pang they may benefit from additional formatting. For example, if a snippet looks pang code it should be surrounded with backticks.<br/>
<br/>
Note: Be careful changing <b>existing</b> strings; this may stop baseline file matching from working, so consider suppressing existing violations of this check if this is an error many users may be filtering in baselines. (This is only an issue for strings used in <code>report</code> calls; for issue registration strings pang summaries and explanations there's no risk changing the text contents.)<br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
To suppress this error, use the issue id "LintImplTextFormat" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
<br/></div>
</div>
</div>
<div class="chips">
<span class="mdl-chip">
<span class="mdl-chip__text">LintImplTextFormat</span>
</span>
<span class="mdl-chip">
<span class="mdl-chip__text">Lint Implementation Issues</span>
</span>
<span class="mdl-chip">
<span class="mdl-chip__text">Warning</span>
</span>
<span class="mdl-chip">
<span class="mdl-chip__text">Priority 6/10</span>
</span>
</div>
</div>
<div class="mdl-card__actions mdl-card--border">
<button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="explanationLintImplTextFormatLink" onclick="reveal('explanationLintImplTextFormat');">
Explain</button><button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="LintImplTextFormatCardLink" onclick="hideid('LintImplTextFormatCard');">
Dismiss</button> </div>
</div>
</section><a name="UastImplementation"></a>
<section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp" id="UastImplementationCard" style="display: block;">
<div class="mdl-card mdl-cell mdl-cell--12-col">
<div class="mdl-card__title">
<h2 class="mdl-card__title-text">Avoid using UAST implementation</h2>
</div>
<div class="mdl-card__supporting-text">
<div class="issue">
<div class="warningslist">
<span class="location"><a href="../../src/main/java/com/lint/core/detector/ParseDetector.kt">src/main/java/com/lint/core/detector/ParseDetector.kt</a>:11</span>: <span class="message">org.jetbrains.uast.kotlin.KotlinUFile is UAST implementation. Consider using one of its corresponding UAST interfaces: <code>UFile</code>, <code>UAnnotated</code></span><br /><pre class="errorlines">
<span class="lineno"> 8 </span>import org.jetbrains.uast.UCallExpression
<span class="lineno"> 9 </span>import org.jetbrains.uast.UTryExpression
<span class="lineno"> 10 </span>import org.jetbrains.uast.getParentOfType
<span class="caretline"><span class="lineno"> 11 </span><span class="warning">import org.jetbrains.uast.kotlin.KotlinUFile</span> </span>
<span class="lineno"> 12 </span>
<span class="lineno"> 13 </span>
<span class="lineno"> 14 </span><span class="javadoc">/**
</span></pre>
<span class="location"><a href="../../src/main/java/com/lint/core/detector/ParseDetector.kt">src/main/java/com/lint/core/detector/ParseDetector.kt</a>:71</span>: <span class="message">org.jetbrains.uast.kotlin.KotlinUFile is UAST implementation. Consider using one of its corresponding UAST interfaces: <code>UFile</code>, <code>UAnnotated</code></span><br /><pre class="errorlines">
<span class="lineno"> 68 </span><span class="javadoc"> * 是否已经做了 try处理
</span><span class="lineno"> 69 </span><span class="javadoc"> */</span>
<span class="lineno"> 70 </span> private <span class="keyword">fun</span> isWrappedByTryCatch(node: UCallExpression, context: JavaContext): Boolean {
<span class="caretline"><span class="lineno"> 71 </span> <span class="keyword">if</span> (context.uastFile <span class="keyword">is</span> <span class="warning">KotlinUFile</span>) { </span>
<span class="lineno"> 72 </span> <span class="keyword">return</span> node.uastParent?.getParentOfType<UTryExpression>(<span class="keyword">true</span>) != <span class="keyword">null</span>
<span class="lineno"> 73 </span> }
<span class="lineno"> 74 </span> <span class="keyword">var</span> parent = node.sourcePsi?.parent
</pre>
</div>
<div class="metadata"><div class="explanation" id="explanationUastImplementation" style="display: none;">
Use UAST interface whenever possible, and do not rely on UAST implementation, which is subject to change. If language-specific information is needed, the next option is to use PSI directly (though these APIs are less stable and can depend on compiler internals, especially in the case of Kotlin).<br/>To suppress this error, use the issue id "UastImplementation" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
<br/></div>
</div>
</div>
<div class="chips">
<span class="mdl-chip">
<span class="mdl-chip__text">UastImplementation</span>
</span>
<span class="mdl-chip">
<span class="mdl-chip__text">Lint Implementation Issues</span>
</span>
<span class="mdl-chip">
<span class="mdl-chip__text">Warning</span>
</span>
<span class="mdl-chip">
<span class="mdl-chip__text">Priority 4/10</span>
</span>
</div>
</div>
<div class="mdl-card__actions mdl-card--border">
<button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="explanationUastImplementationLink" onclick="reveal('explanationUastImplementation');">
Explain</button><button class="mdl-button mdl-js-button mdl-js-ripple-effect" id="UastImplementationCardLink" onclick="hideid('UastImplementationCard');">
Dismiss</button> </div>
</div>
</section>
<a name="MissingIssues"></a>
<section class="section--center mdl-grid mdl-grid--no-spacing mdl-shadow--2dp" id="MissingIssuesCard" style="display: block;">
<div class="mdl-card mdl-cell mdl-cell--12-col">
<div class="mdl-card__title">
<h2 class="mdl-card__title-text">Disabled Checks</h2>
</div>
<div class="mdl-card__supporting-text">
One or more issues were not run by lint, either
because the check is not enabled by default, or because
it was disabled with a command line flag or via one or
more <code>lint.xml</code> configuration files in the project directories.
<div id="SuppressedIssues" style="display: none;"><br/><br/><div class="issue">
<div class="id">AppLinksAutoVerify<div class="issueSeparator"></div>
</div>
<div class="metadata">Disabled By: Default<br/>
<div class="explanation">
Ensures that app links are correctly set and associated with website.<br/><div class="moreinfo">More info: <a href="https://g.co/appindexing/applinks">https://g.co/appindexing/applinks</a>
</div>To suppress this error, use the issue id "AppLinksAutoVerify" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
<br/></div>
</div>
</div>
<div class="issue">
<div class="id">BackButton<div class="issueSeparator"></div>
</div>
<div class="metadata">Disabled By: Default<br/>
<div class="explanation">
According to the Android Design Guide,<br/>
<br/>
"Other platforms use an explicit back button with label to allow the user to navigate up the application's hierarchy. Instead, Android uses the main action bar's app icon for hierarchical navigation and the navigation bar's back button for temporal navigation."<br/>
This check is not very sophisticated (it just looks for buttons with the label "Back"), so it is disabled by default to not trigger on common scenarios pang pairs of Back/Next buttons to paginate through screens.<br/><div class="moreinfo">More info: <a href="https://material.io/design/">https://material.io/design/</a>
</div>To suppress this error, use the issue id "BackButton" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
<br/></div>
</div>
</div>
<div class="issue">
<div class="id">ConvertToWebp<div class="issueSeparator"></div>
</div>
<div class="metadata">Disabled By: Default<br/>
<div class="explanation">
The WebP format is typically more compact than PNG and JPEG. As of Android 4.2.1 it supports transparency and lossless conversion as well. Note that there is a quickfix in the IDE which lets you perform conversion.<br/>
<br/>
Previously, launcher icons were required to be in the PNG format but that restriction is no longer there, so lint now flags these.<br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
To suppress this error, use the issue id "ConvertToWebp" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
<br/></div>
</div>
</div>
<div class="issue">
<div class="id">DalvikOverride<div class="issueSeparator"></div>
</div>
<div class="metadata">Disabled By: Default<br/>
<div class="explanation">
The Dalvik virtual machine will treat a package private method in one class as overriding a package private method in its super class, even if they are in separate packages.<br/>
<br/>
If you really did intend for this method to override the other, make the method <code>protected</code> instead.<br/>
<br/>
If you did <b>not</b> intend the override, consider making the method private, or changing its name or signature.<br/>
<br/>
Note that this check is disabled be default, because ART (the successor to Dalvik) no longer has this behavior.<br/>To suppress this error, use the issue id "DalvikOverride" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
<br/></div>
</div>
</div>
<div class="issue">
<div class="id">DuplicateStrings<div class="issueSeparator"></div>
</div>
<div class="metadata">Disabled By: Default<br/>
<div class="explanation">
Duplicate strings can make applications larger unnecessarily.<br/>
<br/>
This lint check looks for duplicate strings, including differences for strings where the only difference is in capitalization. Title casing and all uppercase can all be adjusted in the layout or in code.<br/><div class="moreinfo">More info: <a href="https://developer.android.com/reference/android/widget/TextView.html#attr_android:inputType">https://developer.android.com/reference/android/widget/TextView.html#attr_android:inputType</a>
</div>To suppress this error, use the issue id "DuplicateStrings" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
<br/></div>
</div>
</div>
<div class="issue">
<div class="id">EasterEgg<div class="issueSeparator"></div>
</div>
<div class="metadata">Disabled By: Default<br/>
<div class="explanation">
An "easter egg" is code deliberately hidden in the code, both from potential users and even from other developers. This lint check looks for code which looks pang it may be hidden from sight.<br/>To suppress this error, use the issue id "EasterEgg" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
<br/></div>
</div>
</div>
<div class="issue">
<div class="id">ExpensiveAssertion<div class="issueSeparator"></div>
</div>
<div class="metadata">Disabled By: Default<br/>
<div class="explanation">
In Kotlin, assertions are not handled the same way as from the Java programming language. In particular, they're just implemented as a library call, and inside the library call the error is only thrown if assertions are enabled.<br/>
<br/>
This means that the arguments to the <code>assert</code> call will <b>always</b> be evaluated. If you're doing any computation in the expression being asserted, that computation will unconditionally be performed whether or not assertions are turned on. This typically turns into wasted work in release builds.<br/>
<br/>
This check looks for cases where the assertion condition is nontrivial, e.g. it is performing method calls or doing more work than simple comparisons on local variables or fields.<br/>
<br/>
You can work around this by writing your own inline assert method instead:<br/>
<pre>
@Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
inline fun assert(condition: () -> Boolean) {
if (_Assertions.ENABLED && !condition()) {
throw AssertionError()
}
}
</pre>
<br/>
In Android, because assertions are not enforced at runtime, instead use this:<br/>
<pre>
inline fun assert(condition: () -> Boolean) {
if (BuildConfig.DEBUG && !condition()) {
throw AssertionError()
}
}
</pre>
<br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
To suppress this error, use the issue id "ExpensiveAssertion" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
<br/></div>
</div>
</div>
<div class="issue">
<div class="id">IconExpectedSize<div class="issueSeparator"></div>
</div>
<div class="metadata">Disabled By: Default<br/>
<div class="explanation">
There are predefined sizes (for each density) for launcher icons. You should follow these conventions to make sure your icons fit in with the overall look of the platform.<br/><div class="moreinfo">More info: <a href="https://material.io/design/iconography/">https://material.io/design/iconography/</a>
</div>To suppress this error, use the issue id "IconExpectedSize" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
<br/></div>
</div>
</div>
<div class="issue">
<div class="id">ImplicitSamInstance<div class="issueSeparator"></div>
</div>
<div class="metadata">Disabled By: Default<br/>
<div class="explanation">
Kotlin's support for SAM (single accessor method) interfaces lets you pass a lambda to the interface. This will create a new instance on the fly even though there is no explicit constructor call. If you pass one of these lambdas or method references into a method which (for example) stores or compares the object identity, unexpected results may happen.<br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
To suppress this error, use the issue id "ImplicitSamInstance" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
<br/></div>
</div>
</div>
<div class="issue">
<div class="id">InvalidPackage<div class="issueSeparator"></div>
</div>
<div class="metadata">Disabled By: Default<br/>
<div class="explanation">
This check scans through libraries looking for calls to APIs that are not included in Android.<br/>
<br/>
When you create Android projects, the classpath is set up such that you can only access classes in the API packages that are included in Android. However, if you add other projects to your libs/ folder, there is no guarantee that those .jar files were built with an Android specific classpath, and in particular, they could be accessing unsupported APIs such as java.applet.<br/>
<br/>
This check scans through library jars and looks for references to API packages that are not included in Android and flags these. This is only an error if your code calls one of the library classes which wind up referencing the unsupported package.<br/>To suppress this error, use the issue id "InvalidPackage" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
<br/></div>
</div>
</div>
<div class="issue">
<div class="id">KotlinPropertyAccess<div class="issueSeparator"></div>
</div>
<div class="metadata">Disabled By: Default<br/>
<div class="explanation">
For a method to be represented as a property in Kotlin, strict “bean”-style prefixing must be used.<br/>
<br/>
Accessor methods require a <code>get</code> prefix or for boolean-returning methods an <code>is</code> prefix can be used.<br/><div class="moreinfo">More info: <a href="https://android.github.io/kotlin-guides/interop.html#property-prefixes">https://android.github.io/kotlin-guides/interop.html#property-prefixes</a>
</div>To suppress this error, use the issue id "KotlinPropertyAccess" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
<br/></div>
</div>
</div>
<div class="issue">
<div class="id">LambdaLast<div class="issueSeparator"></div>
</div>
<div class="metadata">Disabled By: Default<br/>
<div class="explanation">
To improve calling this code from Kotlin, parameter types eligible for SAM conversion should be last.<br/><div class="moreinfo">More info: <a href="https://android.github.io/kotlin-guides/interop.html#lambda-parameters-last">https://android.github.io/kotlin-guides/interop.html#lambda-parameters-last</a>
</div>To suppress this error, use the issue id "LambdaLast" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
<br/></div>
</div>
</div>
<div class="issue">
<div class="id">LintDocExample<div class="issueSeparator"></div>
</div>
<div class="metadata">Disabled By: Default<br/>
<div class="explanation">
Lint's tool for generating documentation for each issue has special support for including a code example which shows how to trigger the report. It will pick the first unit test it can find and pick out the source file referenced from the error message, but you can instead designate a unit test to be the documentation example, and in that case, all the files are included.<br/>
<br/>
To designate a unit test as the documentation example for an issue, name the test <code>testDocumentationExample</code>, or if your detector reports multiple issues, <code>testDocumentationExample</code><Id>, such as<br/>
<code>testDocumentationExampleMyId</code>.<br/>To suppress this error, use the issue id "LintDocExample" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
<br/></div>
</div>
</div>
<div class="issue">
<div class="id">LintImplPsiEquals<div class="issueSeparator"></div>
</div>
<div class="metadata">Disabled By: Default<br/>
<div class="explanation">
You should never compare two PSI elements for equality with <code>equals</code>;<br/>
use <code>isEquivalentTo(PsiElement)</code> instead.<br/>To suppress this error, use the issue id "LintImplPsiEquals" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
<br/></div>
</div>
</div>
<div class="issue">
<div class="id">LintImplUnexpectedDomain<div class="issueSeparator"></div>
</div>
<div class="metadata">Disabled By: Default<br/>
<div class="explanation">
This checks flags URLs to domains that have not been explicitly allowed for use as a documentation source.<br/>To suppress this error, use the issue id "LintImplUnexpectedDomain" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
<br/></div>
</div>
</div>
<div class="issue">
<div class="id">LogConditional<div class="issueSeparator"></div>
</div>
<div class="metadata">Disabled By: Default<br/>
<div class="explanation">
The <code>BuildConfig</code> class provides a constant, <code>DEBUG</code>, which indicates whether the code is being built in release mode or in debug mode. In release mode, you typically want to strip out all the logging calls. Since the compiler will automatically remove all code which is inside a <code>if (false)</code> check, surrounding your logging calls with a check for <code>BuildConfig.DEBUG</code> is a good idea.<br/>
<br/>
If you <b>really</b> intend for the logging to be present in release mode, you can suppress this warning with a <code>@SuppressLint</code> annotation for the intentional logging calls.<br/>To suppress this error, use the issue id "LogConditional" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
<br/></div>
</div>
</div>
<div class="issue">
<div class="id">MangledCRLF<div class="issueSeparator"></div>
</div>
<div class="metadata">Disabled By: Default<br/>
<div class="explanation">
On Windows, line endings are typically recorded as carriage return plus newline: \r\n.<br/>
<br/>
This detector looks for invalid line endings with repeated carriage return characters (without newlines). Previous versions of the ADT plugin could accidentally introduce these into the file, and when editing the file, the editor could produce confusing visual artifacts.<br/><div class="moreinfo">More info: <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=375421">https://bugs.eclipse.org/bugs/show_bug.cgi?id=375421</a>
</div>To suppress this error, use the issue id "MangledCRLF" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
<br/></div>
</div>
</div>
<div class="issue">
<div class="id">MinSdkTooLow<div class="issueSeparator"></div>
</div>
<div class="metadata">Disabled By: Default<br/>
<div class="explanation">
The value of the <code>minSdkVersion</code> property is too low and can be incremented without noticeably reducing the number of supported devices.<br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
To suppress this error, use the issue id "MinSdkTooLow" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
<br/></div>
</div>
</div>
<div class="issue">
<div class="id">NegativeMargin<div class="issueSeparator"></div>
</div>
<div class="metadata">Disabled By: Default<br/>
<div class="explanation">
Margin values should be positive. Negative values are generally a sign that you are making assumptions about views surrounding the current one, or may be tempted to turn off child clipping to allow a view to escape its parent. Turning off child clipping to do this not only leads to poor graphical performance, it also results in wrong touch event handling since touch events are based strictly on a chain of parent-rect hit tests. Finally, making assumptions about the size of strings can lead to localization problems.<br/>To suppress this error, use the issue id "NegativeMargin" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
<br/></div>
</div>
</div>
<div class="issue">
<div class="id">NewerVersionAvailable<div class="issueSeparator"></div>
</div>
<div class="metadata">Disabled By: Default<br/>
<div class="explanation">
This detector checks with a central repository to see if there are newer versions available for the dependencies used by this project. This is similar to the <code>GradleDependency</code> check, which checks for newer versions available in the Android SDK tools and libraries, but this works with any MavenCentral dependency, and connects to the library every time, which makes it more flexible but also <b>much</b> slower.<br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
To suppress this error, use the issue id "NewerVersionAvailable" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
<br/></div>
</div>
</div>
<div class="issue">
<div class="id">NoHardKeywords<div class="issueSeparator"></div>
</div>
<div class="metadata">Disabled By: Default<br/>
<div class="explanation">
Do not use Kotlin’s hard keywords as the name of methods or fields. These require the use of backticks to escape when calling from Kotlin. Soft keywords, modifier keywords, and special identifiers are allowed.<br/>
<br/>
For example, Mockito’s <code>when</code> function requires backticks when used from Kotlin:
<pre>
val callable = Mockito.mock(Callable::class.java)
Mockito.\`when\`(callable.call()).thenReturn(/* … */)
</pre>
<br/><div class="moreinfo">More info: <a href="https://android.github.io/kotlin-guides/interop.html#no-hard-keywords">https://android.github.io/kotlin-guides/interop.html#no-hard-keywords</a>
</div>To suppress this error, use the issue id "NoHardKeywords" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
<br/></div>
</div>
</div>
<div class="issue">
<div class="id">PermissionImpliesUnsupportedChromeOsHardware<div class="issueSeparator"></div>
</div>
<div class="metadata">Disabled By: Default<br/>
<div class="explanation">
The <code><uses-permission></code> element should not require a permission that implies an unsupported Chrome OS hardware feature. Google Play assumes that certain hardware related permissions indicate that the underlying hardware features are required by default. To fix the issue, consider declaring the corresponding uses-feature element with <code>required="false"</code> attribute.<br/><div class="moreinfo">More info: <a href="https://developer.android.com/topic/arc/manifest.html#implied-features">https://developer.android.com/topic/arc/manifest.html#implied-features</a>
</div>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
To suppress this error, use the issue id "PermissionImpliesUnsupportedChromeOsHardware" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
<br/></div>
</div>
</div>
<div class="issue">
<div class="id">Registered<div class="issueSeparator"></div>
</div>
<div class="metadata">Disabled By: Default<br/>
<div class="explanation">
Activities, services and content providers should be registered in the <code>AndroidManifest.xml</code> file using <code><activity></code>, <code><service></code> and <code><provider></code> tags.<br/>
<br/>
If your activity is simply a parent class intended to be subclassed by other "real" activities, make it an abstract class.<br/><div class="moreinfo">More info: <a href="https://developer.android.com/guide/topics/manifest/manifest-intro.html">https://developer.android.com/guide/topics/manifest/manifest-intro.html</a>
</div>To suppress this error, use the issue id "Registered" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
<br/></div>
</div>
</div>
<div class="issue">
<div class="id">RequiredSize<div class="issueSeparator"></div>
</div>
<div class="metadata">Disabled By: Default<br/>
<div class="explanation">
All views must specify an explicit <code>layout_width</code> and <code>layout_height</code> attribute. There is a runtime check for this, so if you fail to specify a size, an exception is thrown at runtime.<br/>
<br/>
It's possible to specify these widths via styles as well. GridLayout, as a special case, does not require you to specify a size.<br/>To suppress this error, use the issue id "RequiredSize" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
<br/></div>
</div>
</div>
<div class="issue">
<div class="id">SelectableText<div class="issueSeparator"></div>
</div>
<div class="metadata">Disabled By: Default<br/>
<div class="explanation">
If a <code><TextView></code> is used to display data, the user might want to copy that data and paste it elsewhere. To allow this, the <code><TextView></code> should specify <code>android:textIsSelectable="true"</code>.<br/>
<br/>
This lint check looks for TextViews which are pangly to be displaying data: views whose text is set dynamically.<br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
To suppress this error, use the issue id "SelectableText" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
<br/></div>
</div>
</div>
<div class="issue">
<div class="id">StopShip<div class="issueSeparator"></div>
</div>
<div class="metadata">Disabled By: Default<br/>
<div class="explanation">
Using the comment <code>// STOPSHIP</code> can be used to flag code that is incomplete but checked in. This comment marker can be used to indicate that the code should not be shipped until the issue is addressed, and lint will look for these. In Gradle projects, this is only checked for non-debug (release) builds.<br/>
<br/>
In Kotlin, the <code>TODO()</code> method is also treated as a stop ship marker; you can use it to make incomplete code compile, but it will throw an exception at runtime and therefore should be fixed before shipping releases.<br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
To suppress this error, use the issue id "StopShip" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
<br/></div>
</div>
</div>
<div class="issue">
<div class="id">SyntheticAccessor<div class="issueSeparator"></div>
</div>
<div class="metadata">Disabled By: Default<br/>
<div class="explanation">
A private inner class which is accessed from the outer class will force the compiler to insert a synthetic accessor; this means that you are causing extra overhead. This is not important in small projects, but is important for large apps running up against the 64K method handle limit, and especially for <b>libraries</b> where you want to make sure your library is as small as possible for the cases where your library is used in an app running up against the 64K limit.<br/>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>
To suppress this error, use the issue id "SyntheticAccessor" as explained in the <a href="#SuppressInfo">Suppressing Warnings and Errors</a> section.<br/>
<br/></div>
</div>
</div>
<div class="issue">
<div class="id">TypographyQuotes<div class="issueSeparator"></div>
</div>
<div class="metadata">Disabled By: Default<br/>
<div class="explanation">
Straight single quotes and double quotes, when used as a pair, can be replaced by "curvy quotes" (or directional quotes). This can make the text more readable. Note that you should never use grave accents and apostrophes to quote, `pang this'. (Also note that you should not use curvy quotes for code fragments.)<br/><div class="moreinfo">More info: <a href="https://en.wikipedia.org/wiki/Quotation_mark">https://en.wikipedia.org/wiki/Quotation_mark</a>
</div>Note: This issue has an associated quickfix operation in Android Studio and IntelliJ IDEA.<br>