Skip to content

Commit 691bb4e

Browse files
authored
Merge pull request googlesamples#45 from tnorbye/snapshot3
Add better suppress info and update a few issue examples
2 parents e91ef15 + 3340438 commit 691bb4e

File tree

120 files changed

+382
-434
lines changed

Some content is hidden

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

120 files changed

+382
-434
lines changed

docs/checks/AddJavascriptInterface.md.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
// Kotlin
125125
@Suppress("AddJavascriptInterface")
126126
fun method() {
127-
problematicStatement()
127+
addJavascriptInterface(...)
128128
}
129129
```
130130

@@ -134,7 +134,7 @@
134134
// Java
135135
@SuppressWarnings("AddJavascriptInterface")
136136
void method() {
137-
problematicStatement();
137+
addJavascriptInterface(...);
138138
}
139139
```
140140

docs/checks/AllowAllHostnameVerifier.md.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
// Kotlin
113113
@Suppress("AllowAllHostnameVerifier")
114114
fun method() {
115-
problematicStatement()
115+
setHostnameVerifier(...)
116116
}
117117
```
118118

@@ -122,7 +122,7 @@
122122
// Java
123123
@SuppressWarnings("AllowAllHostnameVerifier")
124124
void method() {
125-
problematicStatement();
125+
setHostnameVerifier(...);
126126
}
127127
```
128128

docs/checks/AnimatorKeep.md.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@
177177
// Kotlin
178178
@Suppress("AnimatorKeep")
179179
fun method() {
180-
problematicStatement()
180+
ofInt(...)
181181
}
182182
```
183183

@@ -187,7 +187,7 @@
187187
// Java
188188
@SuppressWarnings("AnimatorKeep")
189189
void method() {
190-
problematicStatement();
190+
ofInt(...);
191191
}
192192
```
193193

docs/checks/AnnotateVersionCheck.md.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@
261261
// Kotlin
262262
@Suppress("AnnotateVersionCheck")
263263
fun method() {
264-
problematicStatement()
264+
getBuildSdkInt(...)
265265
}
266266
```
267267

@@ -271,7 +271,7 @@
271271
// Java
272272
@SuppressWarnings("AnnotateVersionCheck")
273273
void method() {
274-
problematicStatement();
274+
getBuildSdkInt(...);
275275
}
276276
```
277277

docs/checks/AppCompatMethod.md.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
// Kotlin
139139
@Suppress("AppCompatMethod")
140140
fun method() {
141-
problematicStatement()
141+
getActionBar(...)
142142
}
143143
```
144144

@@ -148,7 +148,7 @@
148148
// Java
149149
@SuppressWarnings("AppCompatMethod")
150150
void method() {
151-
problematicStatement();
151+
getActionBar(...);
152152
}
153153
```
154154

docs/checks/ApplySharedPref.md.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
// Kotlin
153153
@Suppress("ApplySharedPref")
154154
fun method() {
155-
problematicStatement()
155+
beginTransaction(...)
156156
}
157157
```
158158

@@ -162,7 +162,7 @@
162162
// Java
163163
@SuppressWarnings("ApplySharedPref")
164164
void method() {
165-
problematicStatement();
165+
beginTransaction(...);
166166
}
167167
```
168168

docs/checks/BadPeriodicWorkRequestEnqueue.md.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
// Kotlin
4747
@Suppress("BadPeriodicWorkRequestEnqueue")
4848
fun method() {
49-
problematicStatement()
49+
enqueue(...)
5050
}
5151
```
5252

@@ -56,7 +56,7 @@
5656
// Java
5757
@SuppressWarnings("BadPeriodicWorkRequestEnqueue")
5858
void method() {
59-
problematicStatement();
59+
enqueue(...);
6060
}
6161
```
6262

docs/checks/BlockedPrivateApi.md.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
// Kotlin
9999
@Suppress("BlockedPrivateApi")
100100
fun method() {
101-
problematicStatement()
101+
forName(...)
102102
}
103103
```
104104

@@ -108,7 +108,7 @@
108108
// Java
109109
@SuppressWarnings("BlockedPrivateApi")
110110
void method() {
111-
problematicStatement();
111+
forName(...);
112112
}
113113
```
114114

docs/checks/BrokenIterator.md.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174
// Kotlin
175175
@Suppress("BrokenIterator")
176176
fun method() {
177-
problematicStatement()
177+
add(...)
178178
}
179179
```
180180

@@ -184,7 +184,7 @@
184184
// Java
185185
@SuppressWarnings("BrokenIterator")
186186
void method() {
187-
problematicStatement();
187+
add(...);
188188
}
189189
```
190190

docs/checks/ClickableViewAccessibility.md.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
// Kotlin
9595
@Suppress("ClickableViewAccessibility")
9696
fun method() {
97-
problematicStatement()
97+
setOnTouchListener(...)
9898
}
9999
```
100100

@@ -104,7 +104,7 @@
104104
// Java
105105
@SuppressWarnings("ClickableViewAccessibility")
106106
void method() {
107-
problematicStatement();
107+
setOnTouchListener(...);
108108
}
109109
```
110110

docs/checks/CommitPrefEdits.md.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
// Kotlin
158158
@Suppress("CommitPrefEdits")
159159
fun method() {
160-
problematicStatement()
160+
beginTransaction(...)
161161
}
162162
```
163163

@@ -167,7 +167,7 @@
167167
// Java
168168
@SuppressWarnings("CommitPrefEdits")
169169
void method() {
170-
problematicStatement();
170+
beginTransaction(...);
171171
}
172172
```
173173

docs/checks/CommitTransaction.md.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@
227227
// Kotlin
228228
@Suppress("CommitTransaction")
229229
fun method() {
230-
problematicStatement()
230+
beginTransaction(...)
231231
}
232232
```
233233

@@ -237,7 +237,7 @@
237237
// Java
238238
@SuppressWarnings("CommitTransaction")
239239
void method() {
240-
problematicStatement();
240+
beginTransaction(...);
241241
}
242242
```
243243

docs/checks/ConstantLocale.md.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
// Kotlin
8686
@Suppress("ConstantLocale")
8787
fun method() {
88-
problematicStatement()
88+
toLowerCase(...)
8989
}
9090
```
9191

@@ -95,7 +95,7 @@
9595
// Java
9696
@SuppressWarnings("ConstantLocale")
9797
void method() {
98-
problematicStatement();
98+
toLowerCase(...);
9999
}
100100
```
101101

docs/checks/CoroutineCreationDuringComposition.md.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@
229229
// Kotlin
230230
@Suppress("CoroutineCreationDuringComposition")
231231
fun method() {
232-
problematicStatement()
232+
async(...)
233233
}
234234
```
235235

@@ -239,7 +239,7 @@
239239
// Java
240240
@SuppressWarnings("CoroutineCreationDuringComposition")
241241
void method() {
242-
problematicStatement();
242+
async(...);
243243
}
244244
```
245245

docs/checks/CustomViewStyleable.md.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173
// Kotlin
174174
@Suppress("CustomViewStyleable")
175175
fun method() {
176-
problematicStatement()
176+
obtainStyledAttributes(...)
177177
}
178178
```
179179

@@ -183,7 +183,7 @@
183183
// Java
184184
@SuppressWarnings("CustomViewStyleable")
185185
void method() {
186-
problematicStatement();
186+
obtainStyledAttributes(...);
187187
}
188188
```
189189

docs/checks/CutPasteId.md.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@
359359
// Kotlin
360360
@Suppress("CutPasteId")
361361
fun method() {
362-
problematicStatement()
362+
findViewById(...)
363363
}
364364
```
365365

@@ -369,7 +369,7 @@
369369
// Java
370370
@SuppressWarnings("CutPasteId")
371371
void method() {
372-
problematicStatement();
372+
findViewById(...);
373373
}
374374
```
375375

docs/checks/DefaultLocale.md.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@
187187
// Kotlin
188188
@Suppress("DefaultLocale")
189189
fun method() {
190-
problematicStatement()
190+
toLowerCase(...)
191191
}
192192
```
193193

@@ -197,7 +197,7 @@
197197
// Java
198198
@SuppressWarnings("DefaultLocale")
199199
void method() {
200-
problematicStatement();
200+
toLowerCase(...);
201201
}
202202
```
203203

docs/checks/DeletedProvider.md.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
// Kotlin
113113
@Suppress("DeletedProvider")
114114
fun method() {
115-
problematicStatement()
115+
getInstance(...)
116116
}
117117
```
118118

@@ -122,7 +122,7 @@
122122
// Java
123123
@SuppressWarnings("DeletedProvider")
124124
void method() {
125-
problematicStatement();
125+
getInstance(...);
126126
}
127127
```
128128

docs/checks/Deprecated.md.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
// Kotlin
176176
@Suppress("Deprecated")
177177
fun method() {
178-
problematicStatement()
178+
getInstance(...)
179179
}
180180
```
181181

@@ -185,7 +185,7 @@
185185
// Java
186186
@SuppressWarnings("Deprecated")
187187
void method() {
188-
problematicStatement();
188+
getInstance(...);
189189
}
190190
```
191191

docs/checks/DeprecatedProvider.md.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
// Kotlin
123123
@Suppress("DeprecatedProvider")
124124
fun method() {
125-
problematicStatement()
125+
getInstance(...)
126126
}
127127
```
128128

@@ -132,7 +132,7 @@
132132
// Java
133133
@SuppressWarnings("DeprecatedProvider")
134134
void method() {
135-
problematicStatement();
135+
getInstance(...);
136136
}
137137
```
138138

docs/checks/DiscouragedPrivateApi.md.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
// Kotlin
115115
@Suppress("DiscouragedPrivateApi")
116116
fun method() {
117-
problematicStatement()
117+
forName(...)
118118
}
119119
```
120120

@@ -124,7 +124,7 @@
124124
// Java
125125
@SuppressWarnings("DiscouragedPrivateApi")
126126
void method() {
127-
problematicStatement();
127+
forName(...);
128128
}
129129
```
130130

docs/checks/EasterEgg.md.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
// Kotlin
9696
@Suppress("EasterEgg")
9797
fun method() {
98-
problematicStatement()
98+
TODO(...)
9999
}
100100
```
101101

@@ -105,7 +105,7 @@
105105
// Java
106106
@SuppressWarnings("EasterEgg")
107107
void method() {
108-
problematicStatement();
108+
TODO(...);
109109
}
110110
```
111111

0 commit comments

Comments
 (0)