From 5aae1de83a36e1652eaf50851bd0987971c11477 Mon Sep 17 00:00:00 2001 From: Tor Norbye Date: Thu, 16 Jan 2025 13:24:24 -0800 Subject: [PATCH] A few more docs updates --- docs/api-guide/changes.md.html | 9 ++++++++- docs/api-guide/quickfixes.md.html | 11 +++++++++++ docs/usage/changes.md.html | 11 +++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/docs/api-guide/changes.md.html b/docs/api-guide/changes.md.html index 7ada037f..dc87c11e 100644 --- a/docs/api-guide/changes.md.html +++ b/docs/api-guide/changes.md.html @@ -5,6 +5,13 @@ information about user visible changes to lint, see the User Guide. +**8.9** + +* Lint's testing infrastructure support for testing quickfixes + (`expectFixDiffs()`) now also validates that the modified + source file is valid Kotlin, Java or XML. You can control + this using the `lint().verifyFixedFileSyntax()` option. + **8.8** * For the string-replacement quickfix, you can now specify @@ -371,7 +378,7 @@ Previously only `visitMethodCall()` was triggered. * Quickfixes can now create and delete new files; see - `LintFix#newFile` and `LintFix#deleteFile`.. + `LintFix#newFile` and `LintFix#deleteFile`. * For quickfixes, the `independent` property had inverted logic; this has now been reversed to follow the meaning of the name. diff --git a/docs/api-guide/quickfixes.md.html b/docs/api-guide/quickfixes.md.html index 1e1a7f98..68d77af2 100644 --- a/docs/api-guide/quickfixes.md.html +++ b/docs/api-guide/quickfixes.md.html @@ -297,6 +297,17 @@ ) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +## Verifying Quickfixes + +Lint's test support will also attempt to verify that your quickfixes +still produces a valid Kotlin, Java or XML source file. It does this +by parsing these files after testing the quickfixes using +`expectFixDiffs()`. It will only complain if the fixed source file didn't +already have parsing errors *before* applying the fix. + +You can control this behavior using the `.verifyFixedFileSyntax()` method +on the `lint()` task. + ## Emitting quick fix XML to apply on CI Note that the `lint` has an option (`--describe-suggestions`) to emit diff --git a/docs/usage/changes.md.html b/docs/usage/changes.md.html index 6c91e5bd..4280fa9c 100644 --- a/docs/usage/changes.md.html +++ b/docs/usage/changes.md.html @@ -4,6 +4,16 @@ For information about internal improvements and API changes affecting lint check authors, see the API Guide. +**8.10** + +* New built-in lint checks: + + Issue ID | Summary + ----------------------------|------------------------------------------- + `Aligned16KB` | Native library dependency not 16 KB aligned + `TrimLambda` | Unnecessary lambda with `trim()` + `UnnecessaryArrayInit` | Unnecessary array initialization + **8.9** * New built-in lint checks: @@ -14,6 +24,7 @@ `PrivacySandboxBlockedCall` | Call is blocked in the Privacy Sandbox `UseRequiresApi` | Use `@RequiresApi` instead of `@TargetApi` `WrongSdkInt` | Mismatched SDK_INT or SDK_INT_FULL + `UseKtx` | Use KTX extension function * The `ImplicitSamInstance` check is now turned on by default, and covers a broader set of scenarios.