We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
com.google.gson.Gson
Code: Modified avoid AvoidDateDetector.kt
override fun getApplicableConstructorTypes(): List<String> = listOf("com.google.gson.Gson") override fun visitConstructor( context: JavaContext, node: UCallExpression, constructor: PsiMethod, ) { context.report( ISSUE, node, context.getLocation(node), "Don't use `Gson`;", ) }
Test
fun testDocumentationExample() { lint() .files( kotlin( """ package test.pkg import com.google.gson.Gson fun test() { val gson = Gson() } """ ) .indented(), ) .allowCompilationErrors() .run() .expectErrorCount(1) }
Result
./gradlew lint
The text was updated successfully, but these errors were encountered:
It's likely this: https://googlesamples.github.io/android-custom-lint-rules/api-guide.md.html#frequentlyaskedquestions//mydetectorcallbacksaren'tinvoked
See https://googlesamples.github.io/android-custom-lint-rules/api-guide/unit-testing.md.html#lintcheckunittesting/librarydependenciesandstubs
Sorry, something went wrong.
No branches or pull requests
Code: Modified avoid AvoidDateDetector.kt
Test
Result
./gradlew lint
is detecting this but test can't and the above test failsThe text was updated successfully, but these errors were encountered: