From 5498dbcba23b4d2dd03f112ba186f1dff89c3134 Mon Sep 17 00:00:00 2001 From: Tor Norbye Date: Thu, 26 Feb 2026 09:41:17 -0800 Subject: [PATCH] Update issue documentation to latest versions Also fixed various issues in test example extraction (so many lint checks now include new examples), as well as updating to handle formatting in the latest Markdeep versions (thanks to Simon Marquis for the fixes!) --- docs/api-guide/annotations.md.html | 30 +- docs/api-guide/ast-analysis.md.html | 106 +++--- docs/api-guide/basics.md.html | 16 +- docs/api-guide/changes.md.html | 15 + docs/api-guide/dataflow-analyzer.md.html | 30 +- docs/api-guide/example.md.html | 10 +- docs/api-guide/faq.md.html | 10 +- docs/api-guide/options.md.html | 16 +- docs/api-guide/partial-analysis.md.html | 30 +- docs/api-guide/quickfixes.md.html | 12 +- docs/api-guide/test-modes.md.html | 50 +-- docs/api-guide/unit-testing.md.html | 4 +- docs/checks/AaptCrash.md.html | 4 +- docs/checks/AcceptsUserCertificates.md.html | 4 +- docs/checks/AccessibilityFocus.md.html | 4 +- docs/checks/AccessibilityPolicy.md.html | 228 ++++++++++++ .../checks/AccessibilityScrollActions.md.html | 4 +- ...cessibilityWindowStateChangedEvent.md.html | 4 +- docs/checks/AccidentalOctal.md.html | 55 +-- docs/checks/ActivityIconColor.md.html | 4 +- docs/checks/AdapterViewChildren.md.html | 4 +- docs/checks/AddJavascriptInterface.md.html | 4 +- docs/checks/AdvertisingIdPolicy.md.html | 208 +++++++++++ docs/checks/AlertDialogUsage.md.html | 4 +- docs/checks/Aligned16KB.md.html | 4 +- docs/checks/AllCaps.md.html | 6 +- docs/checks/AllFilesAccessPolicy.md.html | 188 ++++++++++ docs/checks/AllowAllHostnameVerifier.md.html | 4 +- docs/checks/AlwaysShowAction.md.html | 4 +- .../checks/AndroidGradlePluginVersion.md.html | 4 +- docs/checks/AnimatorKeep.md.html | 4 +- docs/checks/AnnotateVersionCheck.md.html | 4 +- .../AnnotationProcessorOnCompilePath.md.html | 4 +- docs/checks/AppBundleLocaleChanges.md.html | 4 +- docs/checks/AppCompatCustomView.md.html | 4 +- docs/checks/AppCompatMethod.md.html | 4 +- docs/checks/AppCompatResource.md.html | 5 +- docs/checks/AppIndexingService.md.html | 6 +- .../checks/AppLinkSplitToWebAndCustom.md.html | 6 +- ...AppLinkUriRelativeFilterGroupError.md.html | 4 +- docs/checks/AppLinkUrlError.md.html | 4 +- docs/checks/AppLinkWarning.md.html | 4 +- docs/checks/AppLinksAutoVerify.md.html | 4 +- docs/checks/ApplySharedPref.md.html | 4 +- docs/checks/ArcAnimationSpecTypeIssue.md.html | 22 +- .../ArgInFormattedQuantityStringRes.md.html | 4 +- docs/checks/AssertionSideEffect.md.html | 6 +- docs/checks/AuthLeak.md.html | 4 +- docs/checks/AutoDispose.md.html | 42 +-- docs/checks/AutoboxingStateCreation.md.html | 16 +- .../AutoboxingStateValueProperty.md.html | 14 +- docs/checks/Autofill.md.html | 4 +- docs/checks/AvoidUsingNotNullOperator.md.html | 4 +- docs/checks/BackButton.md.html | 6 +- docs/checks/BackgroundLocationPolicy.md.html | 184 ++++++++++ docs/checks/BadConfigurationProvider.md.html | 14 +- docs/checks/BadHostnameVerifier.md.html | 5 +- .../BadPeriodicWorkRequestEnqueue.md.html | 8 +- docs/checks/BatteryLife.md.html | 6 +- docs/checks/BidiSpoofing.md.html | 8 +- docs/checks/BinaryOperationInTimber.md.html | 6 +- .../BinderGetCallingInMainThread.md.html | 4 +- docs/checks/BindingReceiverParameter.md.html | 4 +- docs/checks/BindingReturnType.md.html | 4 +- docs/checks/BindsMustBeAbstract.md.html | 4 +- docs/checks/BindsTypeMismatch.md.html | 4 +- docs/checks/BindsWrongParameterCount.md.html | 4 +- docs/checks/BlockedPrivateApi.md.html | 8 +- docs/checks/BomWithoutPlatform.md.html | 6 +- docs/checks/BottomAppBar.md.html | 8 +- docs/checks/BrokenIterator.md.html | 6 +- docs/checks/BuildListAdds.md.html | 4 +- docs/checks/ButtonCase.md.html | 6 +- docs/checks/ButtonOrder.md.html | 6 +- docs/checks/ButtonStyle.md.html | 10 +- docs/checks/ByteOrderMark.md.html | 16 +- docs/checks/CanvasSize.md.html | 10 +- docs/checks/CheckResult.md.html | 8 +- docs/checks/ChildInNonViewGroup.md.html | 4 +- docs/checks/ChromeOsAbiSupport.md.html | 4 +- .../ChromeOsOnConfigurationChanged.md.html | 4 +- .../checks/ClickableViewAccessibility.md.html | 4 +- docs/checks/CoarseFineLocation.md.html | 4 +- docs/checks/ColorCasing.md.html | 4 +- docs/checks/CommitPrefEdits.md.html | 4 +- docs/checks/CommitTransaction.md.html | 4 +- ...omposableDestinationInComposeScope.md.html | 12 +- .../ComposableLambdaParameterNaming.md.html | 14 +- .../ComposableLambdaParameterPosition.md.html | 14 +- docs/checks/ComposableNaming.md.html | 14 +- .../ComposableNavGraphInComposeScope.md.html | 12 +- .../ComposeCompositionLocalGetter.md.html | 6 +- .../ComposeCompositionLocalUsage.md.html | 6 +- ...mposeContentEmitterReturningValues.md.html | 59 +++- docs/checks/ComposeM2Api.md.html | 8 +- docs/checks/ComposeModifierComposed.md.html | 6 +- docs/checks/ComposeModifierMissing.md.html | 8 +- docs/checks/ComposeModifierReused.md.html | 6 +- .../ComposeModifierWithoutDefault.md.html | 49 +-- .../ComposeMultipleContentEmitters.md.html | 6 +- docs/checks/ComposeMutableParameters.md.html | 4 +- docs/checks/ComposeNamingLowercase.md.html | 6 +- docs/checks/ComposeNamingUppercase.md.html | 6 +- docs/checks/ComposeParameterOrder.md.html | 19 +- docs/checks/ComposePreviewNaming.md.html | 4 +- docs/checks/ComposePreviewPublic.md.html | 6 +- docs/checks/ComposeRememberMissing.md.html | 4 +- .../checks/ComposeUnstableCollections.md.html | 4 +- docs/checks/ComposeUnstableReceiver.md.html | 30 +- .../checks/ComposeViewModelForwarding.md.html | 4 +- docs/checks/ComposeViewModelInjection.md.html | 6 +- docs/checks/CompositionLocalNaming.md.html | 14 +- .../ConfigurationScreenWidthHeight.md.html | 14 +- docs/checks/ConflictingOnColor.md.html | 14 +- ...ConstantContentStateKeyInItemsCall.md.html | 14 +- docs/checks/ConstantLocale.md.html | 8 +- ...nstraintLayoutToolsEditorAttribute.md.html | 4 +- docs/checks/ContentDescription.md.html | 9 +- docs/checks/ContextCastToActivity.md.html | 12 +- docs/checks/CoreLibDesugaringV1.md.html | 4 +- ...CoroutineCreationDuringComposition.md.html | 14 +- docs/checks/CredManMissingDal.md.html | 6 +- docs/checks/CredentialDependency.md.html | 4 +- docs/checks/CredentialManagerMisuse.md.html | 4 +- .../CredentialManagerSignInWithGoogle.md.html | 4 +- docs/checks/CustomPermissionTypo.md.html | 22 +- docs/checks/CustomSplashScreen.md.html | 4 +- docs/checks/CustomViewStyleable.md.html | 15 +- docs/checks/CustomX509TrustManager.md.html | 4 +- docs/checks/CutPasteId.md.html | 10 +- docs/checks/DalvikOverride.md.html | 6 +- docs/checks/DataBindingWithoutKapt.md.html | 4 +- docs/checks/DataExtractionRules.md.html | 7 +- .../DeepLinkInActivityDestination.md.html | 12 +- docs/checks/DefaultCleartextTraffic.md.html | 14 +- docs/checks/DefaultEncoding.md.html | 4 +- docs/checks/DefaultLayoutAttribute.md.html | 4 +- docs/checks/DefaultLocale.md.html | 4 +- docs/checks/DefaultTrustedUserCerts.md.html | 14 +- ...DefaultUncaughtExceptionDelegation.md.html | 6 +- docs/checks/DeletedProvider.md.html | 4 +- docs/checks/DenyListedApi.md.html | 4 +- docs/checks/DenyListedBlockingApi.md.html | 4 +- docs/checks/Deprecated.md.html | 4 +- docs/checks/DeprecatedCall.md.html | 6 +- docs/checks/DeprecatedProvider.md.html | 4 +- docs/checks/DeprecatedSinceApi.md.html | 5 +- docs/checks/DeprecatedSqlUsage.md.html | 4 +- .../DetachAndAttachSameFragment.md.html | 8 +- docs/checks/DevModeObsolete.md.html | 4 +- docs/checks/DeviceAdmin.md.html | 12 +- .../DialogFragmentCallbacksDetector.md.html | 16 +- docs/checks/DiffUtilEquals.md.html | 8 +- docs/checks/DisableBaselineAlignment.md.html | 4 +- docs/checks/DisabledAllSafeBrowsing.md.html | 14 +- ...allowLookaheadAnimationVisualDebug.md.html | 213 +++++++++++ docs/checks/DiscouragedApi.md.html | 4 +- docs/checks/DiscouragedPrivateApi.md.html | 6 +- docs/checks/DoNotCallProviders.md.html | 4 +- ...DoNotExposeEitherNetInRepositories.md.html | 8 +- docs/checks/DoNotMock.md.html | 12 +- docs/checks/DoNotMockAnything.md.html | 6 +- docs/checks/DoNotMockAutoValue.md.html | 6 +- docs/checks/DoNotMockDataClass.md.html | 129 ++++++- docs/checks/DoNotMockObjectClass.md.html | 129 ++++++- docs/checks/DoNotMockPlatformTypes.md.html | 113 +++++- docs/checks/DoNotMockRecordClass.md.html | 6 +- docs/checks/DoNotMockSealedClass.md.html | 137 +++++++- ...ontUseAccessibilityNodeInfoGetText.md.html | 149 ++++++++ docs/checks/DotPathAttribute.md.html | 160 +++++++++ docs/checks/DrawAllocation.md.html | 4 +- docs/checks/DuplicateActivity.md.html | 7 +- docs/checks/DuplicateDefinition.md.html | 21 +- docs/checks/DuplicateDivider.md.html | 4 +- docs/checks/DuplicateIds.md.html | 9 +- docs/checks/DuplicateIncludedIds.md.html | 14 +- docs/checks/DuplicatePlatformClasses.md.html | 4 +- docs/checks/DuplicateStrings.md.html | 4 +- docs/checks/DuplicateUsesFeature.md.html | 7 +- docs/checks/EagerGradleConfiguration.md.html | 8 +- docs/checks/EasterEgg.md.html | 4 +- docs/checks/EditedTargetSdkVersion.md.html | 30 +- docs/checks/EllipsizeMaxLines.md.html | 4 +- docs/checks/EmptyNavDeepLink.md.html | 14 +- docs/checks/EmptySuperCall.md.html | 4 +- docs/checks/EnforceUTF8.md.html | 4 +- docs/checks/EnqueueWork.md.html | 4 +- .../EnsureInitializerNoArgConstr.md.html | 4 +- docs/checks/ErroneousLayoutAttribute.md.html | 4 +- docs/checks/ErrorProneDoNotMockUsage.md.html | 4 +- docs/checks/ExactAlarm.md.html | 4 +- docs/checks/ExactAlarmPolicy.md.html | 183 ++++++++++ docs/checks/ExceptionMessage.md.html | 8 +- docs/checks/ExifInterface.md.html | 4 +- docs/checks/ExpensiveAssertion.md.html | 8 +- .../ExperimentalAnnotationRetention.md.html | 8 +- docs/checks/ExpiredTargetSdkVersion.md.html | 10 +- docs/checks/ExpiringTargetSdkVersion.md.html | 8 +- docs/checks/ExportedContentProvider.md.html | 7 +- .../checks/ExportedPreferenceActivity.md.html | 4 +- docs/checks/ExportedReceiver.md.html | 8 +- docs/checks/ExportedService.md.html | 8 +- docs/checks/ExposedRootPath.md.html | 14 +- ...ExtendedBluetoothDiscoveryDuration.md.html | 182 ++++++++++ docs/checks/ExtraText.md.html | 10 +- docs/checks/ExtraTranslation.md.html | 28 +- ...eldSiteTargetOnQualifierAnnotation.md.html | 140 -------- docs/checks/FileEndsWithExt.md.html | 4 +- docs/checks/FilePropertyDetector.md.html | 8 +- docs/checks/FindViewByIdCast.md.html | 6 +- .../FlowOperatorInvokedInComposition.md.html | 14 +- docs/checks/FontValidation.md.html | 8 +- .../ForegroundServicePermission.md.html | 8 +- docs/checks/ForegroundServiceType.md.html | 7 +- docs/checks/ForegroundServicesPolicy.md.html | 180 ++++++++++ docs/checks/FormalGerman.md.html | 14 +- docs/checks/FragmentAddMenuProvider.md.html | 12 +- .../FragmentBackPressedCallback.md.html | 12 +- .../FragmentConstructorInjection.md.html | 4 +- docs/checks/FragmentFieldInjection.md.html | 4 +- .../FragmentGradleConfiguration-2.md.html | 16 +- .../FragmentGradleConfiguration.md.html | 16 +- docs/checks/FragmentLiveDataObserve.md.html | 12 +- docs/checks/FragmentTagUsage.md.html | 16 +- docs/checks/FrequentlyChangingValue.md.html | 16 +- docs/checks/FullBackupContent.md.html | 14 +- docs/checks/FullScreenIntentPolicy.md.html | 210 +++++++++++ docs/checks/FullyQualifiedResource.md.html | 6 +- docs/checks/GestureBackNavigation.md.html | 6 +- .../GetContentDescriptionOverride.md.html | 4 +- docs/checks/GetInstance.md.html | 4 +- docs/checks/GetLocales.md.html | 10 +- .../GlobalOptionInConsumerRules.md.html | 134 +++++++ docs/checks/GradleCompatible.md.html | 8 +- docs/checks/GradleDependency.md.html | 10 +- docs/checks/GradleDeprecated.md.html | 6 +- .../GradleDeprecatedConfiguration.md.html | 4 +- docs/checks/GradleDynamicVersion.md.html | 6 +- docs/checks/GradleGetter.md.html | 4 +- docs/checks/GradleLikelyBug.md.html | 8 +- docs/checks/GradleOverrides.md.html | 6 +- docs/checks/GradlePath.md.html | 4 +- docs/checks/GradlePluginVersion.md.html | 8 +- docs/checks/GradleProjectIsolation.md.html | 8 +- docs/checks/GrantAllUris.md.html | 7 +- docs/checks/GridLayout.md.html | 6 +- docs/checks/GuavaChecksUsed.md.html | 4 +- .../GuavaPreconditionsUsedInKotlin.md.html | 4 +- docs/checks/HalfFloat.md.html | 4 +- docs/checks/HandlerLeak.md.html | 4 +- docs/checks/HardcodedAbsolutePath.md.html | 161 +++++++++ docs/checks/HardcodedDebugMode.md.html | 4 +- docs/checks/HardcodedText.md.html | 8 +- docs/checks/HardwareIds.md.html | 4 +- docs/checks/HealthConnectPolicy.md.html | 193 ++++++++++ docs/checks/HighAppVersionCode.md.html | 4 +- docs/checks/HighSamplingRate.md.html | 4 +- docs/checks/IconDipSize.md.html | 2 +- docs/checks/IconExtension.md.html | 2 +- docs/checks/IconMissingDensityFolder.md.html | 8 +- docs/checks/IconXmlAndPng.md.html | 4 +- .../IdleBatteryChargingConstraints.md.html | 12 +- docs/checks/IgnoreWithoutReason.md.html | 6 +- docs/checks/IllegalResourceRef.md.html | 7 +- docs/checks/ImplicitSamInstance.md.html | 10 +- docs/checks/ImplicitStringPlaceholder.md.html | 6 +- docs/checks/ImpliedQuantity.md.html | 10 +- .../checks/ImpliedTouchscreenHardware.md.html | 4 +- docs/checks/InOrMmUsage.md.html | 4 +- docs/checks/IncludeLayoutParam.md.html | 4 +- docs/checks/InclusiveNaming.md.html | 56 ++- ...leMediaBrowserServiceCompatVersion.md.html | 6 +- docs/checks/InconsistentArrays.md.html | 14 +- docs/checks/InconsistentLayout.md.html | 8 +- .../IncorrectReferencesDeclaration.md.html | 4 +- docs/checks/InefficientWeight.md.html | 4 +- docs/checks/InflateParams.md.html | 8 +- docs/checks/InjectInJava.md.html | 5 +- docs/checks/InlinedApi.md.html | 11 +- docs/checks/InnerclassSeparator.md.html | 6 +- docs/checks/InsecureBaseConfiguration.md.html | 4 +- docs/checks/InsecureDnsSdkLevel.md.html | 14 +- .../InsecureLegacyExternalStorage.md.html | 172 +++++++++ .../InsecurePermissionProtectionLevel.md.html | 18 +- .../InsecureStickyBroadcastsMethod.md.html | 12 +- ...InsecureStickyBroadcastsPermission.md.html | 12 +- docs/checks/InstantAppCall.md.html | 131 +++++++ docs/checks/InstantAppDeprecation.md.html | 110 ++++++ docs/checks/Instantiatable.md.html | 8 +- .../IntentFilterExportedReceiver.md.html | 4 +- .../IntentFilterUniqueDataAttributes.md.html | 4 +- docs/checks/IntentReset.md.html | 4 +- .../checks/IntentWithNullActionLaunch.md.html | 4 +- docs/checks/InternalAgpApiUsage.md.html | 34 +- docs/checks/InternalGradleApiUsage.md.html | 16 +- docs/checks/InternalInsetResource.md.html | 4 +- docs/checks/InternalKgpApiUsage.md.html | 147 ++++++++ docs/checks/InvalidAccessibility.md.html | 4 +- docs/checks/InvalidAnalyticsName.md.html | 4 +- docs/checks/InvalidColorHexValue.md.html | 14 +- ...idFragmentVersionForActivityResult.md.html | 16 +- docs/checks/InvalidId.md.html | 4 +- docs/checks/InvalidImeActionId.md.html | 4 +- docs/checks/InvalidImport.md.html | 4 +- .../InvalidLanguageTagDelimiter.md.html | 14 +- docs/checks/InvalidManifestAttribute.md.html | 172 +++++++++ docs/checks/InvalidNavigation.md.html | 6 +- docs/checks/InvalidPackage.md.html | 8 +- ...InvalidPeriodicWorkRequestInterval.md.html | 14 +- docs/checks/InvalidPermission.md.html | 5 +- docs/checks/InvalidPurposeString.md.html | 120 +++++++ docs/checks/InvalidResourceFolder.md.html | 10 +- docs/checks/InvalidSetHasFixedSize.md.html | 8 +- docs/checks/InvalidSingleLineComment.md.html | 4 +- docs/checks/InvalidString.md.html | 4 +- docs/checks/InvalidUseOfOnBackPressed.md.html | 12 +- docs/checks/InvalidUsesTagAttribute.md.html | 6 +- docs/checks/InvalidVectorPath.md.html | 4 +- docs/checks/InvalidWakeLockTag.md.html | 4 +- .../InvalidWearFeatureAttribute.md.html | 4 +- docs/checks/JCenter.md.html | 4 +- docs/checks/JavaOnlyDetector.md.html | 4 +- docs/checks/JavaPluginLanguageLevel.md.html | 4 +- docs/checks/JavascriptInterface.md.html | 10 +- docs/checks/JcenterRepositoryObsolete.md.html | 4 +- docs/checks/JobSchedulerService.md.html | 10 +- .../JvmStaticProvidesInObjectDetector.md.html | 148 -------- docs/checks/KaptUsageInsteadOfKsp.md.html | 4 +- .../checks/KeyboardInaccessibleWidget.md.html | 4 +- docs/checks/KnownPermissionError.md.html | 34 +- docs/checks/KotlinNullnessAnnotation.md.html | 4 +- docs/checks/KotlinPairNotCreated.md.html | 4 +- docs/checks/KotlinPropertyAccess.md.html | 4 +- .../KotlinRequireNotNullUseMessage.md.html | 4 +- docs/checks/KotlincFE10.md.html | 4 +- docs/checks/KtxExtensionAvailable.md.html | 4 +- docs/checks/LabelFor.md.html | 4 +- docs/checks/LambdaLast.md.html | 10 +- .../LaunchActivityFromNotification.md.html | 6 +- docs/checks/LaunchDuringComposition.md.html | 12 +- .../checks/LayoutFileNameMatchesClass.md.html | 8 +- docs/checks/LeanbackUsesWifi.md.html | 4 +- docs/checks/LibraryCustomView.md.html | 4 +- ...ecycleAnnotationProcessorWithJava8.md.html | 4 +- ...LifecycleCurrentStateInComposition.md.html | 14 +- docs/checks/LintDocExample.md.html | 14 +- docs/checks/LintImplBadUrl.md.html | 14 +- docs/checks/LintImplDollarEscapes.md.html | 14 +- docs/checks/LintImplIdFormat.md.html | 14 +- docs/checks/LintImplPsiEquals.md.html | 14 +- docs/checks/LintImplTextFormat.md.html | 14 +- docs/checks/LintImplTrimIndent.md.html | 14 +- docs/checks/LintImplUnexpectedDomain.md.html | 14 +- docs/checks/LintImplUseKotlin.md.html | 14 +- docs/checks/LintImplUseUast.md.html | 14 +- .../LocalContextConfigurationRead.md.html | 20 +- .../LocalContextGetResourceValueCall.md.html | 217 ++++++++++++ docs/checks/LocalContextResourcesRead.md.html | 24 +- docs/checks/LocalSuppress.md.html | 4 +- docs/checks/LocaleFolder.md.html | 12 +- docs/checks/LockedOrientationActivity.md.html | 4 +- docs/checks/LogConditional.md.html | 4 +- docs/checks/LogInfoDisclosure.md.html | 186 ++++++++++ docs/checks/LogNotTimber.md.html | 6 +- docs/checks/LogTagMismatch.md.html | 4 +- docs/checks/LongLogTag.md.html | 8 +- docs/checks/MainScopeUsage.md.html | 4 +- docs/checks/MangledCRLF.md.html | 2 +- docs/checks/ManifestOrder.md.html | 12 +- docs/checks/ManifestResource.md.html | 16 +- docs/checks/ManifestTypo.md.html | 7 +- docs/checks/MatchingMenuId.md.html | 4 +- docs/checks/MatchingViewId.md.html | 4 +- docs/checks/MemberExtensionConflict.md.html | 10 +- docs/checks/MenuTitle.md.html | 4 +- docs/checks/MergeMarker.md.html | 4 +- docs/checks/MergeRootFrame.md.html | 6 +- docs/checks/MinSdkTooLow.md.html | 6 +- docs/checks/MipmapIcons.md.html | 7 +- docs/checks/MissingApplicationIcon.md.html | 11 +- .../checks/MissingAutoVerifyAttribute.md.html | 54 +-- docs/checks/MissingBackupPin.md.html | 4 +- docs/checks/MissingClass.md.html | 12 +- docs/checks/MissingColorAlphaChannel.md.html | 14 +- docs/checks/MissingConstraints.md.html | 4 +- docs/checks/MissingDefaultResource.md.html | 18 +- ...issingFirebaseInstanceTokenRefresh.md.html | 4 +- docs/checks/MissingId.md.html | 4 +- docs/checks/MissingInflatedId.md.html | 10 +- .../MissingIntentFilterForMediaSearch.md.html | 6 +- docs/checks/MissingKeepAnnotation-2.md.html | 56 ++- docs/checks/MissingKeepAnnotation-3.md.html | 56 ++- docs/checks/MissingKeepAnnotation.md.html | 56 ++- docs/checks/MissingLeanbackLauncher.md.html | 4 +- docs/checks/MissingLeanbackSupport.md.html | 4 +- ...ingMediaBrowserServiceIntentFilter.md.html | 6 +- docs/checks/MissingOnPlayFromSearch.md.html | 8 +- docs/checks/MissingPermission.md.html | 4 +- docs/checks/MissingPrefix.md.html | 4 +- docs/checks/MissingPurpose.md.html | 123 +++++++ docs/checks/MissingQuantity.md.html | 8 +- .../checks/MissingResourceImportAlias.md.html | 6 +- .../checks/MissingResourcesProperties.md.html | 4 +- docs/checks/MissingScrollbars.md.html | 4 +- .../MissingSerializableAnnotation-2.md.html | 57 ++- .../MissingSerializableAnnotation-3.md.html | 57 ++- .../MissingSerializableAnnotation.md.html | 57 ++- docs/checks/MissingSuperCall.md.html | 8 +- docs/checks/MissingTranslation.md.html | 28 +- docs/checks/MissingTvBanner.md.html | 4 +- docs/checks/MissingVersion.md.html | 8 +- docs/checks/MissingXmlHeader.md.html | 4 +- docs/checks/MockLocation.md.html | 12 +- .../ModifierFactoryExtensionFunction.md.html | 14 +- docs/checks/ModifierFactoryReturnType.md.html | 14 +- ...odifierFactoryUnreferencedReceiver.md.html | 14 +- .../ModifierNodeInspectableProperties.md.html | 16 +- docs/checks/ModifierParameter.md.html | 14 +- docs/checks/ModuleCompanionObjects.md.html | 148 -------- ...eCompanionObjectsNotInModuleParent.md.html | 6 - docs/checks/MonochromeLauncherIcon.md.html | 25 +- ...MoshiUsageAdaptedByRequiresAdapter.md.html | 8 +- .../MoshiUsageAdaptedByRequiresKeep.md.html | 8 +- docs/checks/MoshiUsageArray.md.html | 8 +- docs/checks/MoshiUsageBlankGenerator.md.html | 4 +- docs/checks/MoshiUsageBlankJsonName.md.html | 4 +- docs/checks/MoshiUsageBlankTypeLabel.md.html | 6 +- docs/checks/MoshiUsageClassVisibility.md.html | 4 +- .../MoshiUsageDoubleClassAnnotation.md.html | 4 +- docs/checks/MoshiUsageDoubleTypeLabel.md.html | 4 +- .../MoshiUsageDuplicateJsonName.md.html | 4 +- ...MoshiUsageEnumPropertyCouldBeMoshi.md.html | 4 +- ...shiUsageEnumPropertyDefaultUnknown.md.html | 4 +- ...hiUsageGenerateAdapterShouldBeTrue.md.html | 4 +- .../MoshiUsageGenericSealedSubtype.md.html | 4 +- .../MoshiUsageInappropriateTypeLabel.md.html | 4 +- docs/checks/MoshiUsageMissingPrimary.md.html | 4 +- .../checks/MoshiUsageMissingTypeLabel.md.html | 4 +- .../MoshiUsageMutableCollections.md.html | 8 +- .../MoshiUsageNonMoshiClassCollection.md.html | 18 +- .../MoshiUsageNonMoshiClassExternal.md.html | 8 +- .../MoshiUsageNonMoshiClassInternal.md.html | 10 +- .../checks/MoshiUsageNonMoshiClassMap.md.html | 12 +- .../MoshiUsageNonMoshiClassPlatform.md.html | 8 +- docs/checks/MoshiUsageObject.md.html | 4 +- docs/checks/MoshiUsageParamNeedsInit.md.html | 4 +- .../MoshiUsagePrivateConstructor.md.html | 4 +- ...shiUsagePrivateConstructorProperty.md.html | 4 +- .../MoshiUsageQualifierRetention.md.html | 4 +- docs/checks/MoshiUsageQualifierTarget.md.html | 4 +- .../MoshiUsageRedundantJsonName.md.html | 6 +- .../MoshiUsageRedundantSiteTarget.md.html | 4 +- .../MoshiUsageSealedMustBeSealed.md.html | 4 +- docs/checks/MoshiUsageSerializedName.md.html | 4 +- docs/checks/MoshiUsageSnakeCase.md.html | 4 +- .../MoshiUsageTransientNeedsInit.md.html | 4 +- docs/checks/MoshiUsageUnsupportedType.md.html | 7 +- docs/checks/MoshiUsageUseData.md.html | 4 +- docs/checks/MoshiUsageVarProperty.md.html | 4 +- ...ionLayoutInvalidSceneFileReference.md.html | 4 +- docs/checks/MotionLayoutMissingId.md.html | 6 +- .../MotionSceneFileValidationError.md.html | 4 +- .../MultipleAwaitPointerEventScopes.md.html | 10 +- docs/checks/MultipleUsesSdk.md.html | 11 +- docs/checks/MustBeInModule.md.html | 4 +- docs/checks/MustUseNamedParams.md.html | 4 +- .../MutableCollectionMutableState.md.html | 14 +- .../MutableImplicitPendingIntent.md.html | 6 +- docs/checks/MutatingSharedPrefs.md.html | 4 +- docs/checks/NamespaceTypo.md.html | 8 +- docs/checks/NamingPattern.md.html | 4 +- docs/checks/NegativeMargin.md.html | 4 +- docs/checks/NestedScrolling.md.html | 4 +- docs/checks/NestedWeights.md.html | 4 +- docs/checks/NetworkSecurityConfig.md.html | 4 +- docs/checks/NewApi.md.html | 18 +- docs/checks/NewerVersionAvailable.md.html | 4 +- docs/checks/NfcTechWhitespace.md.html | 8 +- docs/checks/NoCollectCallFound.md.html | 12 +- docs/checks/NoHardKeywords.md.html | 6 +- docs/checks/NoOp.md.html | 6 +- docs/checks/NonConstantResourceId.md.html | 4 +- docs/checks/NonObservableLocale.md.html | 194 ++++++++++ docs/checks/NonResizeableActivity.md.html | 4 +- docs/checks/NotConstructor.md.html | 4 +- docs/checks/NotInterpolated.md.html | 4 +- docs/checks/NotSibling.md.html | 8 +- .../NotificationIconCompatibility.md.html | 6 +- docs/checks/NotificationId0.md.html | 4 +- docs/checks/NotificationPermission.md.html | 6 +- docs/checks/NotificationTrampoline.md.html | 6 +- docs/checks/NotifyDataSetChanged.md.html | 4 +- docs/checks/NullSafeMutableLiveData-2.md.html | 2 +- docs/checks/NullSafeMutableLiveData.md.html | 10 +- docs/checks/NullableConcurrentHashMap.md.html | 4 +- docs/checks/ObjectAnimatorBinding.md.html | 4 +- docs/checks/ObsoleteLayoutParam.md.html | 5 +- docs/checks/ObsoleteSdkInt.md.html | 12 +- docs/checks/OldTargetApi.md.html | 26 +- docs/checks/OnClick.md.html | 6 +- docs/checks/OpaqueUnitKey.md.html | 14 +- docs/checks/OpenForTesting.md.html | 10 +- docs/checks/Orientation.md.html | 4 +- docs/checks/OutdatedLibrary.md.html | 4 +- docs/checks/Overdraw.md.html | 33 +- docs/checks/OverrideAbstract.md.html | 4 +- docs/checks/PackageVisibilityPolicy.md.html | 187 ++++++++++ docs/checks/PackagedPrivateKey.md.html | 4 +- docs/checks/ParcelClassLoader.md.html | 4 +- docs/checks/ParcelCreator.md.html | 16 +- docs/checks/ParcelizeFunctionProperty.md.html | 4 +- docs/checks/PendingBindings.md.html | 4 +- ...ImpliesUnsupportedChromeOsHardware.md.html | 9 +- ...rmissionImpliesUnsupportedHardware.md.html | 4 +- .../checks/PermissionNamingConvention.md.html | 4 +- docs/checks/PhotoAndVideoPolicy.md.html | 191 ++++++++++ docs/checks/PictureInPictureIssue.md.html | 6 +- docs/checks/PinSetExpiry.md.html | 4 +- docs/checks/PlaySdkIndexDeprecated.md.html | 4 +- docs/checks/PlaySdkIndexNonCompliant.md.html | 20 +- docs/checks/PlaySdkIndexVulnerability.md.html | 4 +- docs/checks/PluralsCandidate.md.html | 4 +- docs/checks/PrivateApi.md.html | 4 +- docs/checks/PrivateResource.md.html | 10 +- .../ProduceStateDoesNotAssignValue.md.html | 14 +- docs/checks/Proguard.md.html | 8 +- docs/checks/ProguardAndroidTxtUsage.md.html | 118 +++++++ docs/checks/ProguardSplit.md.html | 7 +- docs/checks/PropertyEscape.md.html | 4 +- docs/checks/ProtectedPermissions.md.html | 4 +- ...ayoutEdgeContentLayoutResponsive-2.md.html | 330 ++++++++++++++++++ ...oLayoutEdgeContentLayoutResponsive.md.html | 202 ++++++++++- docs/checks/ProtoLayoutMinSchema-2.md.html | 249 +++++++++++++ docs/checks/ProtoLayoutMinSchema.md.html | 43 +-- ...otoLayoutPrimaryLayoutResponsive-2.md.html | 271 ++++++++++++++ ...ProtoLayoutPrimaryLayoutResponsive.md.html | 41 ++- .../checks/ProviderReadPermissionOnly.md.html | 8 +- docs/checks/ProvidesMustNotBeAbstract.md.html | 4 +- docs/checks/ProxyPassword.md.html | 4 +- docs/checks/PublicKeyCredential.md.html | 6 +- docs/checks/PxUsage.md.html | 4 +- .../checks/QueryAllPackagesPermission.md.html | 6 +- docs/checks/QueryPermissionsNeeded.md.html | 4 +- docs/checks/R8GradualApi.md.html | 125 +++++++ docs/checks/Range.md.html | 4 +- docs/checks/RawColor.md.html | 4 +- docs/checks/RawDimen.md.html | 4 +- docs/checks/RawDispatchersUse.md.html | 4 +- docs/checks/Recycle.md.html | 4 +- docs/checks/RecyclerView.md.html | 4 +- docs/checks/RedactedInJavaUsage.md.html | 8 +- docs/checks/RedundantBinds.md.html | 4 +- docs/checks/RedundantLabel.md.html | 4 +- docs/checks/RedundantNamespace.md.html | 4 +- docs/checks/ReferenceType.md.html | 4 +- docs/checks/ReflectionAnnotation.md.html | 156 +++++++++ docs/checks/Registered.md.html | 8 +- docs/checks/RelativeOverlap.md.html | 4 +- docs/checks/RememberInComposition.md.html | 20 +- docs/checks/RememberReturnType.md.html | 14 +- .../RememberSaveableSaverParameter.md.html | 14 +- docs/checks/RemoteViewLayout.md.html | 8 +- .../RemoveWorkManagerInitializer.md.html | 14 +- .../RepeatOnLifecycleWrongUsage-2.md.html | 2 +- .../RepeatOnLifecycleWrongUsage.md.html | 10 +- docs/checks/ReportShortcutUsage.md.html | 4 +- .../RequestInstallPackagesPolicy.md.html | 222 ++++++++++++ docs/checks/RequiredSize.md.html | 4 +- docs/checks/RequiresFeature.md.html | 11 +- docs/checks/RequiresWindowSdk.md.html | 4 +- docs/checks/ResAuto.md.html | 4 +- docs/checks/ReservedSystemPermission.md.html | 6 +- docs/checks/ResourceAsColor.md.html | 6 +- docs/checks/ResourceCycle.md.html | 5 +- docs/checks/ResourceName.md.html | 8 +- docs/checks/ResourceType.md.html | 4 +- docs/checks/ResourcesGetColorCall.md.html | 4 +- .../ResourcesGetColorStateListCall.md.html | 4 +- docs/checks/ResourcesGetDrawableCall.md.html | 4 +- docs/checks/RestrictCallsTo.md.html | 6 +- docs/checks/RestrictedApi.md.html | 4 +- docs/checks/RetainLeaksContext.md.html | 197 +++++++++++ docs/checks/RetainRememberObserver.md.html | 204 +++++++++++ docs/checks/RetainUnitType.md.html | 198 +++++++++++ docs/checks/RetainingDoNotRetainType.md.html | 216 ++++++++++++ docs/checks/RetrofitUsage.md.html | 4 +- .../ReturnFromAwaitPointerEventScope.md.html | 52 ++- docs/checks/ReturnThis.md.html | 4 +- docs/checks/RiskyLibrary.md.html | 4 +- docs/checks/RtlCompat.md.html | 4 +- docs/checks/RtlEnabled.md.html | 10 +- docs/checks/RtlHardcoded.md.html | 6 +- docs/checks/RtlSymmetry.md.html | 4 +- docs/checks/RxJava2DefaultScheduler.md.html | 4 +- .../RxJava2DisposableAddAllCall.md.html | 4 +- .../RxJava2DisposableDisposeCall.md.html | 4 +- ...Java2MethodMissingCheckReturnValue.md.html | 4 +- ...va2MissingCompositeDisposableClear.md.html | 4 +- .../RxJava2SchedulersFactoryCall.md.html | 4 +- .../RxJava2SubscribeMissingOnError.md.html | 4 +- docs/checks/SQLiteString.md.html | 6 +- ...rtificateSocketFactoryCreateSocket.md.html | 4 +- ...ertificateSocketFactoryGetInsecure.md.html | 4 +- docs/checks/ScheduleExactAlarm.md.html | 6 +- docs/checks/ScopedStorage.md.html | 4 +- docs/checks/ScrollViewCount.md.html | 4 +- docs/checks/ScrollViewSize.md.html | 4 +- docs/checks/SdCardPath.md.html | 16 +- docs/checks/SecretInSource.md.html | 4 +- docs/checks/SecureRandom.md.html | 4 +- docs/checks/SelectableText.md.html | 4 +- docs/checks/SelectedPhotoAccess.md.html | 5 +- docs/checks/SensitiveExternalPath.md.html | 14 +- docs/checks/SerializableUsage.md.html | 4 +- docs/checks/ServiceCast.md.html | 4 +- .../SetAndClearCommunicationDevice.md.html | 4 +- docs/checks/SetJavaScriptEnabled.md.html | 4 +- docs/checks/SetTextI18n.md.html | 4 +- docs/checks/SetWorldReadable.md.html | 4 +- docs/checks/SetWorldWritable.md.html | 4 +- docs/checks/ShiftFlags.md.html | 4 +- docs/checks/ShortAlarm.md.html | 10 +- docs/checks/ShouldUseStaticImport.md.html | 4 +- docs/checks/ShowToast.md.html | 8 +- .../SignatureOrSystemPermissions.md.html | 4 +- docs/checks/SimilarGradleDependency.md.html | 4 +- docs/checks/SimpleDateFormat.md.html | 4 +- docs/checks/SlashPathAttribute.md.html | 160 +++++++++ docs/checks/Slices.md.html | 4 +- docs/checks/SlotReused.md.html | 4 +- docs/checks/SmallSp.md.html | 4 +- docs/checks/SmsAndCallLogPolicy.md.html | 229 ++++++++++++ docs/checks/SoonBlockedPrivateApi.md.html | 8 +- .../SourceLockedOrientationActivity.md.html | 4 +- docs/checks/SpUsage.md.html | 4 +- docs/checks/SpanMarkPointMissingMask.md.html | 4 +- .../SpecifyForegroundServiceType.md.html | 12 +- .../checks/SpecifyJobSchedulerIdRange.md.html | 12 +- .../checks/SquareAndRoundTilePreviews.md.html | 4 +- ...StartActivityAndCollapseDeprecated.md.html | 4 +- .../StateFlowValueCalledInComposition.md.html | 48 +-- docs/checks/StateListReachable.md.html | 4 +- docs/checks/StaticFieldLeak.md.html | 4 +- docs/checks/StopShip.md.html | 9 +- docs/checks/StrandhoggVulnerable.md.html | 14 +- docs/checks/StringEscaping.md.html | 14 +- docs/checks/StringFormatCount.md.html | 6 +- docs/checks/StringFormatInTimber.md.html | 6 +- docs/checks/StringFormatInvalid.md.html | 6 +- docs/checks/StringFormatMatches.md.html | 10 +- docs/checks/StringFormatTrivial.md.html | 7 +- docs/checks/StringNotCapitalized.md.html | 6 +- docs/checks/StringShouldBeInt.md.html | 41 +-- docs/checks/SubscribeOnMain.md.html | 6 +- .../SuperfluousMarginDeclaration.md.html | 4 +- docs/checks/SuperfluousNameSpace.md.html | 4 +- .../SuperfluousPaddingDeclaration.md.html | 4 +- docs/checks/SupportAnnotationUsage.md.html | 8 +- docs/checks/Suspicious0dp.md.html | 4 +- ...iciousCompositionLocalModifierRead.md.html | 14 +- docs/checks/SuspiciousImport.md.html | 4 +- docs/checks/SuspiciousIndentation.md.html | 6 +- docs/checks/SuspiciousModifierThen.md.html | 14 +- docs/checks/SwitchIntDef.md.html | 47 ++- docs/checks/SyntheticAccessor.md.html | 4 +- docs/checks/SystemPermissionTypo.md.html | 38 +- docs/checks/TapjackingVulnerable.md.html | 16 +- docs/checks/TestAppLink.md.html | 4 +- .../TestLifecycleOwnerInCoroutine.md.html | 12 +- .../TestManifestGradleConfiguration.md.html | 14 +- docs/checks/TestParameterSiteTarget.md.html | 4 +- docs/checks/TextConcatSpace.md.html | 163 +++++++++ docs/checks/TextFields.md.html | 4 +- docs/checks/TextViewEdits.md.html | 4 +- docs/checks/ThreadConstraint.md.html | 148 ++++++++ docs/checks/ThrowableNotAtBeginning.md.html | 6 +- docs/checks/TilePreviewImageFormat.md.html | 4 +- docs/checks/TileProviderPermissions.md.html | 4 +- docs/checks/TimberArgCount.md.html | 6 +- docs/checks/TimberArgTypes.md.html | 6 +- docs/checks/TimberExceptionLogging.md.html | 6 +- docs/checks/TimberTagLength.md.html | 6 +- docs/checks/Todo.md.html | 4 +- docs/checks/TooDeepLayout.md.html | 4 +- docs/checks/TooManyViews.md.html | 4 +- docs/checks/TranslucentOrientation.md.html | 6 +- docs/checks/TrimLambda.md.html | 4 +- docs/checks/TrulyRandom.md.html | 8 +- docs/checks/TrustAllX509TrustManager.md.html | 4 +- docs/checks/TypographyDashes.md.html | 5 +- docs/checks/TypographyEllipsis.md.html | 5 +- docs/checks/TypographyFractions.md.html | 5 +- docs/checks/TypographyOther.md.html | 5 +- docs/checks/TypographyQuotes.md.html | 5 +- docs/checks/Typos.md.html | 16 +- docs/checks/UElementAsPsi.md.html | 6 +- docs/checks/UastImplementation.md.html | 35 +- docs/checks/UnclosedTrace.md.html | 6 +- docs/checks/UnintendedExposedUrl.md.html | 14 +- .../checks/UnintendedPrivateIpAddress.md.html | 14 +- docs/checks/UniqueConstants.md.html | 4 +- docs/checks/UniquePermission.md.html | 11 +- docs/checks/UnknownId.md.html | 8 +- docs/checks/UnknownIdInLayout.md.html | 8 +- docs/checks/UnknownNullness.md.html | 10 +- docs/checks/UnlocalizedSms.md.html | 4 +- docs/checks/UnnecessaryArrayInit.md.html | 4 +- .../UnnecessaryComposedModifier.md.html | 14 +- .../checks/UnnecessaryRequiredFeature.md.html | 4 +- .../UnprotectedSMSBroadcastReceiver.md.html | 5 +- .../UnrememberedGetBackStackEntry.md.html | 12 +- docs/checks/UnrememberedMutableState.md.html | 14 +- .../checks/UnsafeCryptoAlgorithmUsage.md.html | 14 +- .../UnsafeDynamicallyLoadedCode.md.html | 4 +- .../checks/UnsafeImplicitIntentLaunch.md.html | 6 +- docs/checks/UnsafeIntentLaunch.md.html | 10 +- .../checks/UnsafeLifecycleWhenUsage-2.md.html | 4 +- docs/checks/UnsafeLifecycleWhenUsage.md.html | 12 +- docs/checks/UnsafeOptInUsageError.md.html | 8 +- docs/checks/UnsafeOptInUsageWarning.md.html | 8 +- .../UnsafeProtectedBroadcastReceiver.md.html | 7 +- .../UnsafeRepeatOnLifecycleDetector.md.html | 8 +- ...nitizedFilenameFromContentProvider.md.html | 6 +- docs/checks/UnspecifiedImmutableFlag.md.html | 5 +- .../UnspecifiedRegisterReceiverFlag.md.html | 4 +- ...pportedChromeOsCameraSystemFeature.md.html | 4 +- .../UnsupportedChromeOsHardware.md.html | 4 +- .../checks/UnsupportedLayoutAttribute.md.html | 4 +- docs/checks/UnsupportedTvHardware.md.html | 4 +- docs/checks/Untranslatable.md.html | 7 +- docs/checks/UnusedAttribute.md.html | 10 +- .../UnusedBoxWithConstraintsScope.md.html | 14 +- ...dContentLambdaTargetStateParameter.md.html | 42 +-- ...nusedCrossfadeTargetStateParameter.md.html | 30 +- docs/checks/UnusedIds.md.html | 12 +- ...dMaterial3ScaffoldPaddingParameter.md.html | 32 +- ...edMaterialScaffoldPaddingParameter.md.html | 32 +- docs/checks/UnusedMergeAttributes.md.html | 4 +- docs/checks/UnusedNamespace.md.html | 8 +- docs/checks/UnusedQuantity.md.html | 8 +- docs/checks/UnusedResources.md.html | 17 +- ...dSharedTransitionModifierParameter.md.html | 14 +- ...nusedTargetStateInContentKeyLambda.md.html | 42 +-- ...usedTransitionTargetStateParameter.md.html | 30 +- docs/checks/UnusedTranslation.md.html | 16 +- docs/checks/UsableSpace.md.html | 7 +- docs/checks/UseAlpha2.md.html | 12 +- docs/checks/UseAndroidAlpha.md.html | 8 +- docs/checks/UseAppTint.md.html | 16 +- docs/checks/UseCheckPermission.md.html | 6 +- ...UseCompatLoadingForColorStateLists.md.html | 12 +- .../UseCompatLoadingForDrawables.md.html | 12 +- .../UseCompatTextViewDrawableApis.md.html | 12 +- .../UseCompatTextViewDrawableXml.md.html | 12 +- docs/checks/UseCompoundDrawables.md.html | 4 +- docs/checks/UseGetLayoutInflater.md.html | 16 +- docs/checks/UseKtx.md.html | 8 +- .../UseOfBundledGooglePlayServices.md.html | 4 +- .../UseOfNonLambdaOffsetOverload.md.html | 57 ++- docs/checks/UseRequireInsteadOfGet.md.html | 18 +- docs/checks/UseRequiresApi.md.html | 6 +- docs/checks/UseRxSetProgress2.md.html | 12 +- docs/checks/UseSdkSuppress.md.html | 6 +- docs/checks/UseSparseArrays.md.html | 4 +- docs/checks/UseSupportActionBar.md.html | 12 +- .../UseSwitchCompatOrMaterialCode.md.html | 12 +- .../UseSwitchCompatOrMaterialXml.md.html | 12 +- docs/checks/UseTomlInstead.md.html | 6 +- docs/checks/UseValueOf.md.html | 8 +- docs/checks/UselessLeaf.md.html | 4 +- docs/checks/UselessParent.md.html | 4 +- docs/checks/UsingC2DM.md.html | 4 +- docs/checks/UsingHttp.md.html | 4 +- ...UsingMaterialAndMaterial3Libraries.md.html | 14 +- docs/checks/UsingOnClickInXml.md.html | 8 +- docs/checks/ValidActionsXml.md.html | 6 +- docs/checks/ValidFragment.md.html | 4 +- docs/checks/ValidRestrictions.md.html | 8 +- docs/checks/VectorDrawableCompat.md.html | 8 +- docs/checks/VectorPath.md.html | 16 +- docs/checks/VectorRaster.md.html | 6 +- docs/checks/ViewBindingType.md.html | 8 +- docs/checks/ViewConstructor.md.html | 8 +- docs/checks/ViewHolder.md.html | 4 +- .../ViewModelConstructorInComposable.md.html | 54 ++- docs/checks/VisibleForTests.md.html | 10 +- docs/checks/VpnServicePolicy.md.html | 221 ++++++++++++ docs/checks/VulnerableCordovaVersion.md.html | 4 +- docs/checks/VulnerableCryptoAlgorithm.md.html | 14 +- docs/checks/Wakelock.md.html | 8 +- docs/checks/WakelockTimeout.md.html | 4 +- docs/checks/WatchFaceEditor.md.html | 4 +- docs/checks/WatchFaceForAndroidX.md.html | 6 +- .../WatchFaceFormatDeclaresHasNoCode.md.html | 2 +- .../WatchFaceFormatInvalidVersion.md.html | 90 +++++ .../WatchFaceFormatMissingVersion.md.html | 2 +- docs/checks/WeakPrng.md.html | 14 +- docs/checks/WearBackNavigation.md.html | 6 +- docs/checks/WearMaterialTheme.md.html | 4 +- docs/checks/WearPasswordInput.md.html | 6 +- docs/checks/WearRecents.md.html | 4 +- docs/checks/WearSplashScreen.md.html | 12 +- docs/checks/WearStandaloneAppFlag.md.html | 4 +- docs/checks/WearableActionDuplicate.md.html | 6 +- docs/checks/WearableBindListener.md.html | 6 +- .../WearableConfigurationAction.md.html | 6 +- docs/checks/WebViewApiAvailability.md.html | 4 +- .../WebViewClientOnReceivedSslError.md.html | 4 +- docs/checks/WebViewLayout.md.html | 4 +- docs/checks/WebpUnsupported.md.html | 2 +- docs/checks/WeekBasedYear.md.html | 4 +- docs/checks/WifiManagerLeak.md.html | 4 +- docs/checks/WifiManagerPotentialLeak.md.html | 4 +- docs/checks/WithPluginClasspathUsage.md.html | 8 +- .../WithTypeWithoutConfigureEach.md.html | 8 +- docs/checks/WorkerHasAPublicModifier.md.html | 12 +- docs/checks/WorldReadableFiles.md.html | 4 +- docs/checks/WorldWriteableFiles.md.html | 4 +- docs/checks/WrongAnnotationOrder.md.html | 8 +- docs/checks/WrongCall.md.html | 6 +- docs/checks/WrongCase.md.html | 4 +- docs/checks/WrongCommentType.md.html | 6 +- docs/checks/WrongConstant.md.html | 9 +- .../checks/WrongConstraintLayoutUsage.md.html | 4 +- docs/checks/WrongDrawableName.md.html | 4 +- docs/checks/WrongFolder.md.html | 5 +- docs/checks/WrongGlobalIconColor.md.html | 4 +- docs/checks/WrongGradleMethod.md.html | 4 +- docs/checks/WrongLayoutName.md.html | 4 +- docs/checks/WrongManifestParent.md.html | 10 +- docs/checks/WrongMenuIdFormat.md.html | 4 +- docs/checks/WrongNavigateRouteType.md.html | 109 ++++-- docs/checks/WrongRegion.md.html | 18 +- docs/checks/WrongRequiresOptIn.md.html | 8 +- docs/checks/WrongResourceImportAlias.md.html | 6 +- docs/checks/WrongSdkInt.md.html | 4 +- .../WrongStartDestinationType-2.md.html | 21 +- .../WrongStartDestinationType-3.md.html | 21 +- docs/checks/WrongStartDestinationType.md.html | 21 +- docs/checks/WrongTestMethodName.md.html | 4 +- docs/checks/WrongThread.md.html | 10 +- .../checks/WrongThreadInterprocedural.md.html | 4 +- docs/checks/WrongViewCast.md.html | 6 +- docs/checks/WrongViewIdFormat.md.html | 4 +- docs/checks/XmlEscapeNeeded.md.html | 5 +- docs/checks/XmlSpacing.md.html | 4 +- .../ZeroBluetoothDiscoveryDuration.md.html | 180 ++++++++++ ...androidx_activity_activity-compose.md.html | 22 +- .../checks/androidx_activity_activity.md.html | 22 +- ...annotation_annotation-experimental.md.html | 17 +- .../androidx_appcompat_appcompat.md.html | 11 +- ...ompose_animation_animation-android.md.html | 49 ++- ...e_animation_animation-core-android.md.html | 35 +- ...pose_foundation_foundation-android.md.html | 35 +- ...ompose_material3_material3-android.md.html | 40 ++- ..._compose_material_material-android.md.html | 33 +- ...dx_compose_runtime_runtime-android.md.html | 35 +- ...ose_runtime_runtime-retain-android.md.html | 92 +++++ ...e_runtime_runtime-saveable-android.md.html | 33 +- .../androidx_compose_ui_ui-android.md.html | 39 ++- ...idx_compose_ui_ui-graphics-android.md.html | 32 +- ...droidx_compose_ui_ui-test-manifest.md.html | 33 +- ...ndroidx_compose_ui_ui-text-android.md.html | 33 +- ...fragment_fragment-testing-manifest.md.html | 13 +- ...androidx_fragment_fragment-testing.md.html | 13 +- .../checks/androidx_fragment_fragment.md.html | 13 +- ..._lifecycle_lifecycle-livedata-core.md.html | 51 ++- ...ifecycle_lifecycle-runtime-android.md.html | 32 +- ..._lifecycle-runtime-compose-android.md.html | 26 +- ...ifecycle_lifecycle-runtime-testing.md.html | 32 +- ...ifecycle-viewmodel-compose-android.md.html | 35 +- docs/checks/androidx_lint_lint-gradle.md.html | 13 +- ...roidx_navigation_navigation-common.md.html | 29 +- ...oidx_navigation_navigation-compose.md.html | 27 +- ...oidx_navigation_navigation-runtime.md.html | 29 +- ...roidx_test_uiautomator_uiautomator.md.html | 80 +++++ ...protolayout_protolayout-expression.md.html | 87 +++++ ...roidx_wear_protolayout_protolayout.md.html | 11 +- .../checks/androidx_work_work-runtime.md.html | 16 +- docs/checks/categories.md.html | 56 ++- .../com_android_security_lint_lint.md.html | 65 ++-- ...play_policy_insights_insights-lint.md.html | 81 +++++ docs/checks/index.md.html | 53 ++- docs/checks/libraries.md.html | 12 +- docs/checks/severity.md.html | 57 ++- docs/checks/vendors.md.html | 68 +++- docs/checks/year.md.html | 70 +++- docs/internal/guidelines.md.html | 3 +- docs/usage/agp-dsl.md.html | 4 +- docs/usage/changes.md.html | 33 ++ docs/usage/lintxml.md.html | 26 ++ docs/usage/newer-lint.md.html | 4 +- gradle/wrapper/gradle-wrapper.jar | Bin 59821 -> 43705 bytes gradle/wrapper/gradle-wrapper.properties | 4 +- gradlew | 43 ++- gradlew.bat | 37 +- 896 files changed, 13852 insertions(+), 4223 deletions(-) create mode 100644 docs/checks/AccessibilityPolicy.md.html create mode 100644 docs/checks/AdvertisingIdPolicy.md.html create mode 100644 docs/checks/AllFilesAccessPolicy.md.html create mode 100644 docs/checks/BackgroundLocationPolicy.md.html create mode 100644 docs/checks/DisallowLookaheadAnimationVisualDebug.md.html create mode 100644 docs/checks/DontUseAccessibilityNodeInfoGetText.md.html create mode 100644 docs/checks/DotPathAttribute.md.html create mode 100644 docs/checks/ExactAlarmPolicy.md.html create mode 100644 docs/checks/ExtendedBluetoothDiscoveryDuration.md.html create mode 100644 docs/checks/ForegroundServicesPolicy.md.html create mode 100644 docs/checks/FullScreenIntentPolicy.md.html create mode 100644 docs/checks/GlobalOptionInConsumerRules.md.html create mode 100644 docs/checks/HardcodedAbsolutePath.md.html create mode 100644 docs/checks/HealthConnectPolicy.md.html create mode 100644 docs/checks/InsecureLegacyExternalStorage.md.html create mode 100644 docs/checks/InstantAppCall.md.html create mode 100644 docs/checks/InstantAppDeprecation.md.html create mode 100644 docs/checks/InternalKgpApiUsage.md.html create mode 100644 docs/checks/InvalidManifestAttribute.md.html create mode 100644 docs/checks/InvalidPurposeString.md.html create mode 100644 docs/checks/LocalContextGetResourceValueCall.md.html create mode 100644 docs/checks/LogInfoDisclosure.md.html create mode 100644 docs/checks/MissingPurpose.md.html create mode 100644 docs/checks/NonObservableLocale.md.html create mode 100644 docs/checks/PackageVisibilityPolicy.md.html create mode 100644 docs/checks/PhotoAndVideoPolicy.md.html create mode 100644 docs/checks/ProguardAndroidTxtUsage.md.html create mode 100644 docs/checks/ProtoLayoutEdgeContentLayoutResponsive-2.md.html create mode 100644 docs/checks/ProtoLayoutMinSchema-2.md.html create mode 100644 docs/checks/ProtoLayoutPrimaryLayoutResponsive-2.md.html create mode 100644 docs/checks/R8GradualApi.md.html create mode 100644 docs/checks/ReflectionAnnotation.md.html create mode 100644 docs/checks/RequestInstallPackagesPolicy.md.html create mode 100644 docs/checks/RetainLeaksContext.md.html create mode 100644 docs/checks/RetainRememberObserver.md.html create mode 100644 docs/checks/RetainUnitType.md.html create mode 100644 docs/checks/RetainingDoNotRetainType.md.html create mode 100644 docs/checks/SlashPathAttribute.md.html create mode 100644 docs/checks/SmsAndCallLogPolicy.md.html create mode 100644 docs/checks/TextConcatSpace.md.html create mode 100644 docs/checks/ThreadConstraint.md.html create mode 100644 docs/checks/VpnServicePolicy.md.html create mode 100644 docs/checks/WatchFaceFormatInvalidVersion.md.html create mode 100644 docs/checks/ZeroBluetoothDiscoveryDuration.md.html create mode 100644 docs/checks/androidx_compose_runtime_runtime-retain-android.md.html create mode 100644 docs/checks/androidx_test_uiautomator_uiautomator.md.html create mode 100644 docs/checks/androidx_wear_protolayout_protolayout-expression.md.html create mode 100644 docs/checks/com_google_play_policy_insights_insights-lint.md.html diff --git a/docs/api-guide/annotations.md.html b/docs/api-guide/annotations.md.html index 6422dfe2..0d134279 100644 --- a/docs/api-guide/annotations.md.html +++ b/docs/api-guide/annotations.md.html @@ -58,7 +58,7 @@ val location = context.getLocation(element) context.report(TEST_ISSUE, element, location, message) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ All this simple detector does is flag any usage associated with the given annotation, including some information about the usage. @@ -73,7 +73,7 @@ @MyAnnotation fun close() = TODO() } operator fun Book.get(@MyAnnotation index: Int): Int = TODO() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...and we then run the above detector on the following test case: @@ -83,7 +83,7 @@ val firstWord = book[0] book.close() } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ we get the following output: @@ -97,7 +97,7 @@ src/book.kt:16: Error: METHOD_CALL usage associated with @MyAnnotation on METHOD book.close() ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In the first case, the infix operator “in” will call `contains` under the hood, and here we've annotated the parameter, so lint visits the @@ -150,7 +150,7 @@ open class Paperback : Book() { override fun close() { } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ then the detector will emit the following incident since the new method overrides another method that was annotated: @@ -160,7 +160,7 @@ override fun close() { } ----- 1 errors, 0 warnings -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Overriding an annotated element is how the `@CallSuper` detector is implemented, which makes sure that any method which overrides a method @@ -184,7 +184,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here, lint will flag the various exit points from the method associated with the annotation: @@ -197,7 +197,7 @@ return getDefaultCaption() ------------------- 2 errors, 0 warnings -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Note also that this would have worked if the annotation had been inherited from a super method instead of being explicitly set here. @@ -231,7 +231,7 @@ return type != AnnotationUsageType.METHOD_OVERRIDE && super.isApplicableAnnotationUsage(type) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! Tip Notice how we are also calling `super` here and combining the result @@ -249,7 +249,7 @@ return type != AnnotationUsageType.BINARY && type != AnnotationUsageType.EQUALITY } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ These usage types apply to cases where annotated elements are compared for equality or using other binary operators. Initially @@ -277,7 +277,7 @@ src/test/pkg/HalfFloatTest.java:50: Error: Half-float type in expression widened to int [HalfFloat] Math.round(float1); // Error: should use Half.round ------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ### Scopes @@ -303,7 +303,7 @@ abstract override fun pop(): String } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ And the following test case: @@ -314,7 +314,7 @@ fileStack.push("Hello") fileStack.pop() } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here, `stack.push` call on line 2 resolves to the API method on line 7. That method is not annotated, but it's inside a class that is annotated @@ -367,7 +367,7 @@ // outer @CheckReturnValue annotation we're analyzing here return } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! Tip You only have to worry about this when there are different @@ -418,7 +418,7 @@ // Require restriction annotations to be annotated everywhere return false } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (Note that the API passes in the fully qualified name of the annotation in question so you can control this behavior individually for each diff --git a/docs/api-guide/ast-analysis.md.html b/docs/api-guide/ast-analysis.md.html index d2e27c6b..8ecce102 100644 --- a/docs/api-guide/ast-analysis.md.html +++ b/docs/api-guide/ast-analysis.md.html @@ -29,7 +29,7 @@ public class MyTest { String s = "hello"; } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here's the AST for the above program, the way it's represented internally in IntelliJ. @@ -54,7 +54,7 @@ class MyTest { val s: String = "hello" } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ And here's the corresponding AST in IntelliJ: @@ -103,7 +103,7 @@ var id: String, var name: String ) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This is a Kotlin data class with two properties. So you might expect that UAST would have a way to represent these concepts. This should @@ -122,7 +122,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin var property = 0 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here's the UAST representation: @@ -154,7 +154,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin if (s.length > 3) 0 else s.count { it.isUpperCase() } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This maps to the following UAST tree: @@ -184,7 +184,7 @@ val warn1 = Date() val ok = Date(0L) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ here's the corresponding UAST `asRecursiveLogString` output: @@ -203,7 +203,7 @@ UCallExpression (kind = UastCallKind(name='constructor_call'), … USimpleNameReferenceExpression (identifier = Date) ULiteralExpression (value = 0) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ## Visiting @@ -224,7 +224,7 @@ return super.visitSimpleNameReferenceExpression(node) } }) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In a visitor, you generally want to call `super` as shown above. You can also `return true` if you've “seen enough” and can stop visiting the @@ -274,7 +274,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin val resolved = call.resolve() ?: return val uDeclaration = resolve.toUElement() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Note however that `toUElement` may return null. For example, if you've resolved to a method call that is compiled (which you can check using @@ -320,7 +320,7 @@ object Companion { // Named "Companion" but not a companion object! } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The right way to do this is using Kotlin PSI, via the `UElement.sourcePsi` property: @@ -331,7 +331,7 @@ if (source is KtObjectDeclaration && source.isCompanion()) { return } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (To figure out how to write the above code, use a debugger on a test case and look at the `UClass.sourcePsi` property; you'll discover that @@ -377,7 +377,7 @@ } val actionBar = getActionBar() // OK - SDK_INT must be >= 11 ! } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here we have a scenario where we know that the TODO call will never return, and lint can take advantage of that when analyzing the control @@ -391,7 +391,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin @kotlin.internal.InlineOnly public inline fun TODO(): Nothing = throw NotImplementedError() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The `Nothing` return type means it will never return. @@ -406,7 +406,7 @@ if (methodName == "fail" || methodName == "error" || methodName == "TODO") { return true } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ However, with the Kotlin analysis API, this is easy: @@ -419,7 +419,7 @@ return returnType != null && returnType.isNothingType } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Older APIs (pre-8.7.0-alpha04): @@ -436,7 +436,7 @@ return returnType != null && returnType.isNothing } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The entry point to all Kotlin Analysis API usages is to call the `analyze` method (see line 7) and pass in a Kotlin PSI element. This @@ -505,13 +505,13 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin symbol is KaClassSymbol && symbol.classKind == KaClassKind.COMPANION_OBJECT -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Older APIs (pre-8.7.0-alpha04): ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin symbol is KtClassOrObjectSymbol && symbol.classKind == KtClassKind.COMPANION_OBJECT -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #### Kotlin Analysis API Howto @@ -524,7 +524,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin thisReference.toUElement()?.tryResolve() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can now use a debugger to step into the `tryResolve` call, and you'll eventually wind up in code using the Kotlin Analysis API to look @@ -537,7 +537,7 @@ val psi = reference.resolveToSymbol()?.psi … } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ### Configuring lint to use K2 @@ -547,7 +547,7 @@ override fun lint(): TestLintTask { return super.lint().configureOptions { flags -> flags.setUseK2Uast(true) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Outside of tests, you can also set the `-Dlint.use.fir.uast=true` system property in your run configurations. @@ -588,7 +588,7 @@ ?: callInfo.singleCallOrNull()?.symbol … } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Older APIs (pre-8.7.0-alpha04): @@ -603,7 +603,7 @@ ?: callInfo.singleCallOrNull()?.symbol … } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ### Resolve a variable reference @@ -615,7 +615,7 @@ analyze(expression) { val symbol: KaVariableSymbol? = expression.resolveToCall()?.singleVariableAccessCall()?.symbol } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Older APIs (pre-8.7.0-alpha04): @@ -625,7 +625,7 @@ analyze(expression) { val symbol: KtVariableLikeSymbol = expression.resolveCall()?.singleVariableAccessCall()?.symbol } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ### Get the containing class of a symbol @@ -634,7 +634,7 @@ if (containingSymbol is KaNamedClassSymbol) { … } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Older APIs (pre-8.7.0-alpha04): @@ -643,7 +643,7 @@ if (containingSymbol is KtNamedClassOrObjectSymbol) { … } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ### Get the fully qualified name of a class @@ -653,7 +653,7 @@ val fqn = containing.classId?.asSingleFqName() … } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Older APIs (pre-8.7.0-alpha04): @@ -663,7 +663,7 @@ val fqn = containing.classIdIfNonLocal?.asSingleFqName() … } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ### Look up the deprecation status of a symbol @@ -671,7 +671,7 @@ if (symbol is KaDeclarationSymbol) { symbol.deprecationStatus?.let { … } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Older APIs (pre-8.7.0-alpha04): @@ -679,7 +679,7 @@ if (symbol is KtDeclarationSymbol) { symbol.deprecationStatus?.let { … } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ### Look up visibility @@ -689,7 +689,7 @@ … } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Older APIs (pre-8.7.0-alpha04): @@ -700,7 +700,7 @@ … } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ### Get the KtType of a class symbol @@ -708,13 +708,13 @@ if (symbol is KaNamedClassSymbol) { val type = symbol.defaultType } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Older APIs (pre-8.7.0-alpha04): ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin containingSymbol.buildSelfClassType() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ### Resolve a KtType into a class @@ -732,7 +732,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Older APIs (pre-8.7.0-alpha04): @@ -747,7 +747,7 @@ … } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ### See if two types refer to the same raw class (erasure): @@ -757,7 +757,7 @@ ) { … } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Older APIs (pre-8.7.0-alpha04): @@ -766,7 +766,7 @@ type1.classId == type2.classId) { … } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ### For an extension method, get the receiver type: @@ -774,14 +774,14 @@ if (declarationSymbol is KaNamedFunctionSymbol) { val declarationReceiverType = declarationSymbol.receiverParameter?.type } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Older APIs (pre-8.7.0-alpha04): ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin if (declarationSymbol is KtFunctionSymbol) { val declarationReceiverType = declarationSymbol.receiverParameter?.type -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ### Get the PsiFile containing a symbol declaration @@ -793,7 +793,7 @@ … } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Older APIs (pre-8.7.0-alpha04): @@ -804,6 +804,26 @@ if (psi is PsiFile) { … } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +## Display a type as a string + +If you have a `KaType` and want to include it in for example an error +message, rather than calling `toString()` on it, do something like this: + +If it's a class type (`KaClassType`) and you just want the fully +qualified name, use + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin +classTypeType.classId.asSingleFqName().asString() +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Otherwise, use + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin +val type = … +val fullyQualified = type.render(position = Variance.IN_VARIANCE) +val shortOnly = type.render(KaDeclarationRendererForSource.WITH_SHORT_NAMES, Variance.IN_VARIANCE) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/api-guide/basics.md.html b/docs/api-guide/basics.md.html index e61e03c4..5a0c1e61 100644 --- a/docs/api-guide/basics.md.html +++ b/docs/api-guide/basics.md.html @@ -100,7 +100,7 @@ ) { // ... } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ As of 7.0, there is more Kotlin code in lint than remaining Java code: @@ -315,7 +315,7 @@ ) } ... -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ There are a number of things to note here. @@ -546,7 +546,7 @@ contact = "author@com.example.lint" ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ On line 8, we're returning our issue. It's a list, so an `IssueRegistry` can provide multiple issues. @@ -608,7 +608,7 @@ "I complain a lot") } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This will just complain in every single file. Obviously, no real lint detector does this; we want to do some analysis and **conditionally** report @@ -789,7 +789,7 @@ context.report(incident) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The above is using the new `Incident` API from Lint 7.0 and on; in older versions you can use the following API, which still works in 7.0: @@ -803,7 +803,7 @@ "Use `` instead of ``") } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The second (older) form may seem simpler, but the new API allows a lot more metadata to be attached to the report, such as an override @@ -813,7 +813,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers context.report(Incident(ISSUE, context.getLocation(element), "Use `` instead of ``")) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ## Analyzing Kotlin and Java Code @@ -948,7 +948,7 @@ return java.lang.Long.MAX_VALUE } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ### Looking up UAST diff --git a/docs/api-guide/changes.md.html b/docs/api-guide/changes.md.html index dc87c11e..6208fa4f 100644 --- a/docs/api-guide/changes.md.html +++ b/docs/api-guide/changes.md.html @@ -5,6 +5,21 @@ information about user visible changes to lint, see the User Guide. +**9.1** + +* The manifest merger that runs during lint tests could previously fail, without causing the test to + fail. The manifest merger will now throw an exception in this scenario, unless the test calls + `.allowManifestMergerErrors(true)` on the `lint()` test task. + +**8.10** + +* Lint might now call `Detector.visitAnnotationUsage` in a few additional cases, + with `usageInfo.type` set to `VARIABLE_REFERENCE`, `FIELD_REFERENCE`, + `ASSIGNMENT_RHS`, or `ASSIGNMENT_LHS`. We believe the additional cases were + previously (incorrectly) not triggering, so most `Detector`s should continue + to work without changes. However, some `Detector`s may have inadvertently been + relying on these cases not triggering, and so may need minor changes. + **8.9** * Lint's testing infrastructure support for testing quickfixes diff --git a/docs/api-guide/dataflow-analyzer.md.html b/docs/api-guide/dataflow-analyzer.md.html index 1af02645..b6fd5928 100644 --- a/docs/api-guide/dataflow-analyzer.md.html +++ b/docs/api-guide/dataflow-analyzer.md.html @@ -26,7 +26,7 @@ val t1 = getFragmentManager().beginTransaction() // NEVER COMMITTED val t2 = getFragmentManager().beginTransaction() // OK t2.commit() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here we are creating 3 transactions. The first one is committed immediately. The second one is never committed. And the third one @@ -81,7 +81,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ As you can see, the `DataFlowAnalyzer` is a visitor, so when we find a call we're interested in, we construct a `DataFlowAnalyzer` and @@ -101,7 +101,7 @@ val t2 = t val t3 = t2 t3.commit() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ However, there's a lot that can go wrong, which we'll need to deal with. This is explained in the following sections @@ -123,7 +123,7 @@ public abstract FragmentTransaction addToBackStack(String name); ... } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The reason all these methods return a `FragmentTransaction` is to make it easy to chain calls; e.g. @@ -132,7 +132,7 @@ .add(new Fragment(), null) .addToBackStack(null) .commit(); -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In order to correctly analyze this, we'd need to know what the implementation of `add` and `addToBackStack` return. If we know that they simply return “this”, then it's easy; we can transfer the instance through the call. @@ -158,7 +158,7 @@ return super.returnsSelf(call) || call.methodName == "copy" } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ## Kotlin Scoping Functions @@ -187,7 +187,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ## Limitations @@ -201,7 +201,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers fun createTransaction(): FragmentTransaction = getFragmentManager().beginTransaction().add(new Fragment(), null) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here, we're not calling `commit`, so our lint check would issue a warning. However, it's quite possible and likely that elsewhere, @@ -211,7 +211,7 @@ val transaction = createTransaction() ... transaction.commit() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Ideally, we'd perform global analysis to handle this, but that's not currently possible. However, we *can* analyze some additional non-local @@ -245,7 +245,7 @@ if (!escapes && !foundCommit) { context.report(Incident(...)) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ### Parameters @@ -258,7 +258,7 @@ val transaction = getFragmentManager().beginTransaction() process(transaction) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here, it's possible that the `process` method will proceed to actually commit the transaction. @@ -276,7 +276,7 @@ } ... } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (By default, the analyzer will ignore calls that look like logging calls since those are probably safe and not true escapes; you can customize this by overriding `ignoreArgument()`.) @@ -290,7 +290,7 @@ fun initialize() { this.transaction = createTransaction() } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ As with returns and method calls, the analyzer has a callback to make it easy to handle when this is the case: @@ -304,7 +304,7 @@ } ... } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ As you can see, it's passing in the field that is being stored to, in case you want to perform additional analysis to track field values; see @@ -387,7 +387,7 @@ if (method.isMissingTarget(analyzer)) { context.report(...) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can subclass `TargetMethodDataFlowAnalyzer` directly and override the `getTargetMethod` methods and any other UAST visitor methods if you want diff --git a/docs/api-guide/example.md.html b/docs/api-guide/example.md.html index 51c93d7c..d8798505 100644 --- a/docs/api-guide/example.md.html +++ b/docs/api-guide/example.md.html @@ -55,7 +55,7 @@ compileOnly "com.android.tools.lint:lint-checks:$lintVersion" testImplementation "com.android.tools.lint:lint-tests:$lintVersion" } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The second dependency is usually not necessary; you just need to depend on the Lint API. However, the built-in checks define a lot of @@ -91,7 +91,7 @@ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The `$lintVersion` variable is defined on line 11. We don't technically need to define the `$gradlePluginVersion` here or add it to the classpath on line 19, but that's done so that we can add the `lint` @@ -244,7 +244,7 @@ ) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The `Issue` registration is pretty self-explanatory, and the details about issue registration are covered in the [basics](basics.md.html) @@ -291,7 +291,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This lint check is very simple; for Kotlin and Java files, it visits all the literal strings, and if the string contains the word “lint”, @@ -344,7 +344,7 @@ ) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ As you can see, writing a lint unit test is very simple, because lint ships with a dedicated testing library; this is what the diff --git a/docs/api-guide/faq.md.html b/docs/api-guide/faq.md.html index d0a9ac87..0e5e631d 100644 --- a/docs/api-guide/faq.md.html +++ b/docs/api-guide/faq.md.html @@ -98,7 +98,7 @@ /** Returns true if the given language is Java. */ fun isJava(language: Language?): Boolean { /* ... */ } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If you have a `UElement` and need a `PsiElement` for the above method, see the next question. @@ -171,7 +171,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin abstract fun getClassType(psiClass: PsiClass?): PsiClassType? abstract fun getTypeClass(psiType: PsiType?): PsiClass? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ### How do I look up hierarchy annotations for an element? @@ -192,7 +192,7 @@ owner: PsiModifierListOwner, inHierarchy: Boolean ): Array -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ### How do I look up if a class is a subclass of another? @@ -201,7 +201,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin fun isMemberInClass(member: PsiMember?, className: String): Boolean { } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To see if a method is a member in any *subclass* of a named class, use @@ -212,7 +212,7 @@ strict: Boolean = false ): Boolean { /* ... */ } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here, use `strict = true` if you don't want to include members in the named class itself as a match. diff --git a/docs/api-guide/options.md.html b/docs/api-guide/options.md.html index f40d49b2..8f81d297 100644 --- a/docs/api-guide/options.md.html +++ b/docs/api-guide/options.md.html @@ -45,7 +45,7 @@ val MAX_COUNT = IntOption("maxCount", "Max number of views allowed", 80) val MY_ISSUE = Issue.create("MyId", ...) .setOptions(listOf(MAX_COUNT)) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ An option has a few pieces of metadata: @@ -93,7 +93,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin val maxCount = MAX_COUNT.getValue(context) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This will return the `Int` value configured for this option by the user, or if not set, our original default value, in this case 80. @@ -122,7 +122,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin val maxCount = MAX_COUNT.getValue(context.configuration) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If you want to find the most applicable configuration for a given source file, use @@ -130,7 +130,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin val configuration = context.findConfiguration(context.file) val maxCount = MAX_COUNT.getValue(configuration) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ## Files @@ -160,7 +160,7 @@ min = 0f, max = 15f ) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It will also be checked at runtime, and if the configured value is outside of the range, lint will report an error and pinpoint the @@ -189,7 +189,7 @@ .configureOption(MAX_COUNT, 150) .run() .expectClean() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ## Supporting Lint 4.2, 7.0 and 7.1 @@ -203,7 +203,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin val option: String? = configuration.getOption(ISSUE, "maxCount") -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The `getOption` method returns a `String`. For numbers and booleans, the coniguration also provides lookups which will convert the value to @@ -216,6 +216,6 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin val option = configuration.getOptionAsInt(ISSUE, "maxCount", 100) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/api-guide/partial-analysis.md.html b/docs/api-guide/partial-analysis.md.html index a004774b..c50aaa26 100644 --- a/docs/api-guide/partial-analysis.md.html +++ b/docs/api-guide/partial-analysis.md.html @@ -240,7 +240,7 @@ xml( "res/layout/linear.xml", "" + ... -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The second `manifest()` call here on line 3 does all the heavy lifting: the fact that you're referencing `../app` means it will create another @@ -285,7 +285,7 @@ context.getNameLocation(element), "Missing `contentDescription` attribute on image" ) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ At some point, we added support for quickfixes, so the report method took an additional parameter, line 6: @@ -298,7 +298,7 @@ "Missing `contentDescription` attribute on image", fix().set().todo(ANDROID_URI, ATTR_CONTENT_DESCRIPTION).build() ) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Now that we need to attach various additional data (like constraints and maps), we don't really want to just add more parameters. @@ -318,7 +318,7 @@ context.getNameLocation(element), "Missing `contentDescription` attribute on image" )) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ and then reformatting the source code: @@ -331,7 +331,7 @@ "Missing `contentDescription` attribute on image" ) ) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `Incident` has a number of overloaded constructors to make it easy to construct it from existing report calls. @@ -345,7 +345,7 @@ .scope(node) .location(context.getLocation(node)) .message("Do not hardcode \"/sdcard/\"").report() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ That are additional methods you can fall too, like `fix()`, and conveniently, `at()` which specifies not only the scope node but @@ -357,7 +357,7 @@ .issue(ISSUE) .at(node) .message("Do not hardcode \"/sdcard/\"").report() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ So step one to partial analysis is to convert your code to report incidents instead of the passing in all the individual properties of an @@ -400,7 +400,7 @@ + "even for lossless conversion"; Incident incident = new Incident(WEBP_ELIGIBLE, location, message); context.report(incident, minSdkAtLeast(18)); -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Finally, note that you can combine constraints; there are both “and” and “or” operators defined for the `Constraint` class, so the following @@ -409,7 +409,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin val constraint = targetSdkAtLeast(23) and notLibraryProject() context.report(incident, constraint) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ That's all you have to do. Lint will record this provisional incident, and when it is performing reporting, it will evaluate these constraints @@ -437,7 +437,7 @@ .put(KEY_OVERRIDES, overrides) .put(KEY_IMPLICIT, implicitlyExportedPreS) ) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here, `map()` is a method defined by `Detector` to create a new `LintMap`, similar to how `fix()` constructs a new `LintFix`. @@ -455,7 +455,7 @@ * customizing the error message further. */ open fun filterIncident(context: Context, incident: Incident, map: LintMap): Boolean { } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ For example, for the above report call, the corresponding implementation of `filterIncident` looks like this: @@ -466,7 +466,7 @@ if (map.getBoolean(KEY_IMPLICIT, false) == true && context.mainProject.targetSdk >= 31) return true return map.getBoolean(KEY_OVERRIDES, false) == false } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Note also that you are allowed to modify incidents here before reporting them. The most common reason scenario for this is changing @@ -590,7 +590,7 @@ * yourself, via the various [LintDriver.isSuppressed] methods. */ fun getPartialResults(issue: Issue): PartialResult { ... } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Then you put whatever data you want, such as the resource usage model encoded as a string. @@ -611,7 +611,7 @@ * (via [Context.report]) to lint. */ open fun checkPartialResults(context: Context, partialResults: PartialResult) { ... } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ## Optimizations @@ -628,6 +628,6 @@ } else { // partial analysis code path } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/api-guide/quickfixes.md.html b/docs/api-guide/quickfixes.md.html index 68d77af2..85e62c19 100644 --- a/docs/api-guide/quickfixes.md.html +++ b/docs/api-guide/quickfixes.md.html @@ -56,7 +56,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin LintFix fix = fix().set(null, "singleLine", "true").build() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here the `fix()` method is provided by the `Detector` super class, but that's just a utility method for `LintFix.fix()` (or in older versions, @@ -187,7 +187,7 @@ val fix = fix() .url("https://developer.android.com/topic/libraries/architecture/workmanager/migrating-gcm") .build() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ## Combining Fixes @@ -224,7 +224,7 @@ fix().set(ANDROID_URI, "singleLine", "true").build(), fix().unset(namespace, oldAttributeName).build() ) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ And here's an example of how to create an alternatives fix, which are offered to the user as separate options; this is from our earlier @@ -237,7 +237,7 @@ fix().set().todo(ANDROID_URI, "text").build(), fix().set().todo(ANDROID_URI, "contentDescription") .build()) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ## Refactoring Java and Kotlin code @@ -278,7 +278,7 @@ .with("if (javaClass.desiredAssertionStatus()) { \\k<1> }") .reformat(true) .build() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The replacement string's back reference above, on line 5, is \k<1>. If there were multiple regular expression groups in the replacement @@ -295,7 +295,7 @@ + if (javaClass.desiredAssertionStatus()) { assert(expensive()) } // WARN """ ) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ## Verifying Quickfixes diff --git a/docs/api-guide/test-modes.md.html b/docs/api-guide/test-modes.md.html index 18749ed4..6bfa908e 100644 --- a/docs/api-guide/test-modes.md.html +++ b/docs/api-guide/test-modes.md.html @@ -57,7 +57,7 @@ override fun lint(): TestLintTask { return super.lint().testModes(TestMode.PARENTHESIZED) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Now when you run your test, it will run *only* this test mode, so you can set breakpoints and start debugging through the scenario without @@ -91,7 +91,7 @@ .skipTestModes(TestMode.PARTIAL) .run() .expectClean() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ## Source-Modifying Test Modes @@ -138,7 +138,7 @@ val rv = RemoteViews(packageName, R.layout.test) val ov = other as RemoteViews } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ to @@ -149,7 +149,7 @@ val rv = android.widget.RemoteViews(packageName, R.layout.test) val ov = other as android.widget.RemoteViews } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This makes sure that your detector handles not only the case where a symbol appears in its normal imported state, but also when it is fully @@ -170,7 +170,7 @@ if (receiver is USimpleNameReferenceExpression && receiver.identifier == "EnumSet" ) { -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ which will work for code such as `EnumSet.of()` but not `java.util.EnumSet.of()`. @@ -182,7 +182,7 @@ val targetClass = node.resolve()?.containingClass?.qualifiedName ?: return if (targetClass == "java.util.EnumSet") { -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ As with all the source transforming test modes, there are cases where it doesn't apply. For example, lint had a built-in check for camera @@ -212,7 +212,7 @@ // does not apply: return super.lint().skipTestModes(TestMode.FULLY_QUALIFIED); } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! Tip In Kotlin code, you may have code that checks to see if a node is a @@ -240,7 +240,7 @@ val rv = RemoteViews(packageName, R.layout.test) val ov = other as RemoteViews } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ to @@ -251,7 +251,7 @@ val rv = IMPORT_ALIAS_1_REMOTEVIEWS(packageName, R.layout.test) val ov = other as IMPORT_ALIAS_1_REMOTEVIEWS } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ### Type Aliasing @@ -279,7 +279,7 @@ val rv = RemoteViews(packageName, R.layout.test) val ov = other as RemoteViews } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ to @@ -293,7 +293,7 @@ typealias TYPE_ALIAS_1 = String typealias TYPE_ALIAS_2 = Any typealias TYPE_ALIAS_3 = RemoteViews -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ### Parenthesis Mode @@ -347,14 +347,14 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin (t as? String)?.plus("other")?.get(0)?.dec()?.inc() "foo".chars().allMatch { it.dec() > 0 }.toString() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ to ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin (((((t as? String))?.plus("other"))?.get(0))?.dec())?.inc() (("foo".chars()).allMatch { (it.dec() > 0) }).toString() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ By default the parenthesis mode limits itself to “likely” unnecessary parentheses; in particular, it won't put extra parenthesis around @@ -383,13 +383,13 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin test("test", 5, true) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ to ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin test(n = 5, z = true, s = "test") -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ### Body Removal @@ -399,13 +399,13 @@ fun test(): List { return if (true) listOf("hello") else emptyList() } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ with ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin fun test(): List = if (true) listOf("hello") else emptyList() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Note that these two ASTs do not look the same; we'll only have an `UReturnExpression` node in the first case. Therefore, you have to be @@ -421,13 +421,13 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin if (x < y) { test(x+1) } else test(x+2) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ to ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin if (x < y) test(x+1) else { test(x+2) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (Here it has removed the braces around the if-then body since they are optional, and it has added braces around the if-else body since it did @@ -478,7 +478,7 @@ + .pattern("acquire\\s*\\(()\\s*\\)") .with("10*60*1000L /*10 minutes*/") .build(); -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ### CDATA Mode @@ -490,7 +490,7 @@ <resources> <string name="app_name">Application Name</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ you can equivalently use @@ -499,7 +499,7 @@ <resources> <string name="app_name"><![CDATA[Application Name]]></string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (where you can place newlines and other unescaped text inside the bracketed span.) @@ -536,7 +536,7 @@ fun test(parameter: Int = 0) { implementation() } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ it will “inline” these two methods in the AST, such that we see the whole method body twice: @@ -549,7 +549,7 @@ fun test(parameter: Int) { implementation() } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If there were additional default parameters, there would be additional repetitions. @@ -573,7 +573,7 @@ test(var0) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Again, UAST will instead just repeat the method body. And this means lint detectors may trigger repeatedly on the same code. In most cases diff --git a/docs/api-guide/unit-testing.md.html b/docs/api-guide/unit-testing.md.html index a31d56c8..b6a6d445 100644 --- a/docs/api-guide/unit-testing.md.html +++ b/docs/api-guide/unit-testing.md.html @@ -55,7 +55,7 @@ ) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lint's testing API is a “fluent API”; you chain method calls together, and the return objects determine what is allowed next. @@ -486,6 +486,6 @@ .javaLanguageLevel("17") .run() .expect(...) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/checks/AaptCrash.md.html b/docs/checks/AaptCrash.md.html index 2ab15322..53e556bd 100644 --- a/docs/checks/AaptCrash.md.html +++ b/docs/checks/AaptCrash.md.html @@ -48,7 +48,7 @@ [AaptCrash] <item name="android:id">@+id/titlebar</item> -------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -64,7 +64,7 @@ <item name="android:layout_height">@dimen/titlebar_height</item> </style> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ResourceCycleDetectorTest.java) diff --git a/docs/checks/AcceptsUserCertificates.md.html b/docs/checks/AcceptsUserCertificates.md.html index 6ec51869..be6fd81a 100644 --- a/docs/checks/AcceptsUserCertificates.md.html +++ b/docs/checks/AcceptsUserCertificates.md.html @@ -48,7 +48,7 @@ [AcceptsUserCertificates] <certificates src="user"/> -------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -63,7 +63,7 @@ </trust-anchors> </base-config> </network-security-config> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/NetworkSecurityConfigDetectorTest.java) diff --git a/docs/checks/AccessibilityFocus.md.html b/docs/checks/AccessibilityFocus.md.html index aa7207d4..fad9ce32 100644 --- a/docs/checks/AccessibilityFocus.md.html +++ b/docs/checks/AccessibilityFocus.md.html @@ -41,7 +41,7 @@ experience, especially across apps [AccessibilityFocus] performAccessibilityAction(AccessibilityNodeInfo.ACTION_ACCESSIBILITY_FOCUS, null) ---------------------------------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -61,7 +61,7 @@ performAccessibilityAction(AccessibilityNodeInfo.ACTION_ACCESSIBILITY_FOCUS, null) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AccessibilityForceFocusDetectorTest.kt) diff --git a/docs/checks/AccessibilityPolicy.md.html b/docs/checks/AccessibilityPolicy.md.html new file mode 100644 index 00000000..34e9cae3 --- /dev/null +++ b/docs/checks/AccessibilityPolicy.md.html @@ -0,0 +1,228 @@ + +(#) Accessibility Insights + +!!! WARNING: Accessibility Insights + This is a warning. + +Id +: `AccessibilityPolicy` +Summary +: Accessibility Insights +Severity +: Warning +Category +: Play Policy +Platform +: Android +Vendor +: Play policy insights beta +Min +: Lint 8.2 to 8.6 +Compiled +: Lint 8.7+ +Artifact +: [com.google.play.policy.insights:insights-lint](com_google_play_policy_insights_insights-lint.md.html) +Since +: 0.1.3 +Affects +: Kotlin and Java files, manifest files and resource files +Editing +: This check runs on the fly in the IDE editor + +Google Play permits the use of the AccessibilityService API across a +wide range of applications. However, only services designed to help +people with disabilities access their devices or overcome challenges due +to their disabilities are eligible to declare themselves as +accessibility tools by setting `isAccessibilityTool=true` in their +metadata. These apps are exempt from the prominent disclosure and +consent requirements. For all other uses, or if not declaring your app +as an accessibility tool, you will be required to complete an +accessibility declaration in Play Console and must implement a clear +in-app disclosure explaining data access and use, and obtain affirmative +user consent. + +**Dos:** + +- Declare `isAccessibilityTool=true` accurately if your app’s main goal + is disability support in your service’s metadata file. +- Provide a clear Play Console declaration and demo video if using + AccessibilityService API. +- Implement clear in-app disclosure and obtain user consent if not a + designated accessibility tool. +- Complete an accessibility declaration when you submit a declaration + form in your Play Console if you have not declared your app to be an + accessibility tool but use the AccessibilityService API +- Limit data collection and use strictly to the disclosed and declared + purposes. +- Use more narrowly scoped APIs and permissions in lieu of the + Accessibility API when possible to achieve the desired + functionality. + +**Don'ts:** + +- Misuse the Accessibility API to bypass privacy settings or alter UI + without consent. +- Claim `isAccessibilityTool=true` if your app's core purpose is not + supporting people with disabilities. +- Neglect the Play Console declaration, video, or necessary in-app + disclosures. +- Collect data beyond what's essential for the declared accessibility + features. +- Rely only on app descriptions or privacy policies for required user + disclosures. + +**Helpful Links:** + +See Policy page: https://goo.gle/play-policy-accessibility +See Help Center article: https://goo.gle/play-help-accessibility +See Declaration form: https://goo.gle/play-permission-decl-form + +Always review the full policy in the Policy Center to ensure +compliance. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +res/xml/accessibility.xml:3:Warning: AccessibilityService API usage must +align with the API policy guidelines. It must not be used to bypass +privacy controls or change settings without consent. +[AccessibilityPolicy] + android:isAccessibilityTool="true"/> + ---------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`res/xml/accessibility.xml`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<?xml version="1.0" encoding="utf-8"?> + <accessibility-service xmlns:android="http://schemas.android.com/apk/res/android" + android:isAccessibilityTool="true"/> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](/policyinsights/src/test/java/com/google/play/policy/insights/AccessibilityServicePolicyDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `AccessibilityServicePolicyDetector.testFlagsIsAccessibilityTool`. +To report a problem with this extracted sample, contact +Play policy insights beta. + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("com.google.play.policy.insights:insights-lint:0.1.4") + +// build.gradle +implementation 'com.google.play.policy.insights:insights-lint:0.1.4' + +// build.gradle.kts with version catalogs: +implementation(libs.insights.lint) + +# libs.versions.toml +[versions] +insights-lint = "0.1.4" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +insights-lint = { + module = "com.google.play.policy.insights:insights-lint", + version.ref = "insights-lint" +} +``` + +0.1.4 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.google.play.policy.insights:insights-lint](com_google_play_policy_insights_insights-lint.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Adding the suppression attribute + `tools:ignore="AccessibilityPolicy"` on the problematic XML element + (or one of its enclosing elements). You may also need to add the + following namespace declaration on the root element in the XML file + if it's not already there: + `xmlns:tools="http://schemas.android.com/tools"`. + + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <manifest xmlns:tools="http://schemas.android.com/tools"> + ... + <accessibility-service tools:ignore="AccessibilityPolicy" .../> + ... + </manifest> + ``` + +* Using a suppression annotation like this on the enclosing + element: + + ```kt + // Kotlin + @Suppress("AccessibilityPolicy") + fun method() { + problematicStatement() + } + ``` + + or + + ```java + // Java + @SuppressWarnings("AccessibilityPolicy") + void method() { + problematicStatement(); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection AccessibilityPolicy + problematicStatement() + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="AccessibilityPolicy" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'AccessibilityPolicy' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore AccessibilityPolicy ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/AccessibilityScrollActions.md.html b/docs/checks/AccessibilityScrollActions.md.html index 7be95129..15311add 100644 --- a/docs/checks/AccessibilityScrollActions.md.html +++ b/docs/checks/AccessibilityScrollActions.md.html @@ -43,7 +43,7 @@ [AccessibilityScrollActions] override fun onInitializeAccessibilityNodeInfo(info: AccessibilityNodeInfo) { ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -69,7 +69,7 @@ return ScrollView::class.java.name } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AccessibilityViewScrollActionsDetectorTest.kt) diff --git a/docs/checks/AccessibilityWindowStateChangedEvent.md.html b/docs/checks/AccessibilityWindowStateChangedEvent.md.html index 6d49e46b..e45a3a1e 100644 --- a/docs/checks/AccessibilityWindowStateChangedEvent.md.html +++ b/docs/checks/AccessibilityWindowStateChangedEvent.md.html @@ -75,7 +75,7 @@ changes to the UI. [AccessibilityWindowStateChangedEvent] if (event.eventType == AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED) { ------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -109,7 +109,7 @@ super.onPopulateAccessibilityEvent(event) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AccessibilityWindowStateChangedDetectorTest.kt) diff --git a/docs/checks/AccidentalOctal.md.html b/docs/checks/AccidentalOctal.md.html index 994c972a..85000170 100644 --- a/docs/checks/AccidentalOctal.md.html +++ b/docs/checks/AccidentalOctal.md.html @@ -40,42 +40,57 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -build.gradle:13:Error: The leading 0 turns this number into octal which +build.gradle:7:Error: The leading 0 turns this number into octal which is probably not what was intended (interpreted as 8) [AccidentalOctal] - versionCode 010 - --- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + version = release(010) + ------------ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: `build.gradle`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~groovy linenumbers -apply plugin: 'com.android.application' +plugins { + id("com.android.application") +} android { - defaultConfig { - // Ok: not octal - versionCode 1 - versionCode 10 - versionCode 100 - // ok: octal == decimal - versionCode 01 - - // Errors - versionCode 010 - - // Lint Groovy Bug: - versionCode 01 // line suffix comments are not handled correctly + compileSdk { + version = release(010) + + version = release() + version = release( 20) + version = release( "20") + version = release( "S") + + version = release( // 1 + "S", + ) { + sdkExtension = 12 } + + version = preview( // 2 + "S", + ) + + // Different syntax. + version(release(35)) + version(release 35) + version release(35) + version = release 35 + + // Invalid. Lint will not see it, and project will not build: + // version release 35 + } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test -found for this lint check, `GradleDetector.testAccidentalOctal`. +found for this lint check, `GradleDetector.testCompileSdkVersionNewDslGroovy`. To report a problem with this extracted sample, visit https://issuetracker.google.com/issues/new?component=192708. diff --git a/docs/checks/ActivityIconColor.md.html b/docs/checks/ActivityIconColor.md.html index 3d720775..018d5bdb 100644 --- a/docs/checks/ActivityIconColor.md.html +++ b/docs/checks/ActivityIconColor.md.html @@ -49,7 +49,7 @@ background [ActivityIconColor] .setStaticIcon(R.drawable.ic_walk) ------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -68,7 +68,7 @@ .build() } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ActivityIconColorDetectorTest.kt) diff --git a/docs/checks/AdapterViewChildren.md.html b/docs/checks/AdapterViewChildren.md.html index 5d3e4727..28222f60 100644 --- a/docs/checks/AdapterViewChildren.md.html +++ b/docs/checks/AdapterViewChildren.md.html @@ -44,7 +44,7 @@ children declared in XML [AdapterViewChildren] <ListView -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -61,7 +61,7 @@ android:layout_height="match_parent" /> </ListView> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ChildCountDetectorTest.kt) diff --git a/docs/checks/AddJavascriptInterface.md.html b/docs/checks/AddJavascriptInterface.md.html index 88102616..4f869e36 100644 --- a/docs/checks/AddJavascriptInterface.md.html +++ b/docs/checks/AddJavascriptInterface.md.html @@ -59,7 +59,7 @@ application [AddJavascriptInterface] webView.addJavascriptInterface(object, string); ---------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -102,7 +102,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AddJavascriptInterfaceDetectorTest.kt) diff --git a/docs/checks/AdvertisingIdPolicy.md.html b/docs/checks/AdvertisingIdPolicy.md.html new file mode 100644 index 00000000..ca7ebfdb --- /dev/null +++ b/docs/checks/AdvertisingIdPolicy.md.html @@ -0,0 +1,208 @@ + +(#) Advertising Id Insights + +!!! WARNING: Advertising Id Insights + This is a warning. + +Id +: `AdvertisingIdPolicy` +Summary +: Advertising Id Insights +Severity +: Warning +Category +: Play Policy +Platform +: Android +Vendor +: Play policy insights beta +Min +: Lint 8.2 to 8.6 +Compiled +: Lint 8.7+ +Artifact +: [com.google.play.policy.insights:insights-lint](com_google_play_policy_insights_insights-lint.md.html) +Since +: 0.1.3 +Affects +: Kotlin and Java files and manifest files +Editing +: This check runs on the fly in the IDE editor + +The Android advertising identifier (AAID) must only be used for +advertising and user analytics; although we urge you to instead +transition to App Set ID for analytics. You must respect users' opt-out +selections and acquire explicit user consent if you link the AAID to +personally identifiable information (PII). It is crucial to be +transparent, so disclose any AAID collection and use in a legally +adequate privacy policy. + +**Dos:** + +- Submit a declaration form in your Play Console for Google Play + services permission. +- Use App Set ID for non-ads use cases (analytics, fraud). + +**Don'ts:** + +- Use persistent identifiers for advertising instead of AAID. +- Link AAID to PII for any analytics purposes -even with consent. +- Allow third-party code in your app to violate this policy. + +**Helpful Links:** + +See Policy page: https://goo.gle/play-policy-advertising-id +See Help Center article: +https://goo.gle/play-help-advertising-identifier +See Declaration form: https://goo.gle/play-permission-decl-form + +Always review the full policy in the Policy Center to ensure +compliance. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +AndroidManifest.xml:3:Warning: Use Advertising Identifier only for +advertising or user analytics. Respect user choices (opt-outs), get +consent for PII links, and disclose use clearly. [AdvertisingIdPolicy] + <uses-permission android:name="com.google.android.gms.permission.AD_ID"/> + ------------------------------------------------------ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`AndroidManifest.xml`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android"> + <uses-permission android:name="com.google.android.gms.permission.AD_ID"/> + <uses-sdk android:targetSdkVersion="34"/> +</manifest> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](/policyinsights/src/test/java/com/google/play/policy/insights/AdvertisingIdPolicyDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `AdvertisingIdPolicyDetector.testFlagsAdIdPermission`. +To report a problem with this extracted sample, contact +Play policy insights beta. + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("com.google.play.policy.insights:insights-lint:0.1.4") + +// build.gradle +implementation 'com.google.play.policy.insights:insights-lint:0.1.4' + +// build.gradle.kts with version catalogs: +implementation(libs.insights.lint) + +# libs.versions.toml +[versions] +insights-lint = "0.1.4" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +insights-lint = { + module = "com.google.play.policy.insights:insights-lint", + version.ref = "insights-lint" +} +``` + +0.1.4 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.google.play.policy.insights:insights-lint](com_google_play_policy_insights_insights-lint.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Adding the suppression attribute + `tools:ignore="AdvertisingIdPolicy"` on the problematic XML element + (or one of its enclosing elements). You may also need to add the + following namespace declaration on the root element in the XML file + if it's not already there: + `xmlns:tools="http://schemas.android.com/tools"`. + + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <manifest xmlns:tools="http://schemas.android.com/tools"> + ... + <uses-permission tools:ignore="AdvertisingIdPolicy" .../> + ... + </manifest> + ``` + +* Using a suppression annotation like this on the enclosing + element: + + ```kt + // Kotlin + @Suppress("AdvertisingIdPolicy") + fun method() { + getId(...) + } + ``` + + or + + ```java + // Java + @SuppressWarnings("AdvertisingIdPolicy") + void method() { + getId(...); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection AdvertisingIdPolicy + problematicStatement() + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="AdvertisingIdPolicy" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'AdvertisingIdPolicy' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore AdvertisingIdPolicy ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/AlertDialogUsage.md.html b/docs/checks/AlertDialogUsage.md.html index e47e94a6..110f544a 100644 --- a/docs/checks/AlertDialogUsage.md.html +++ b/docs/checks/AlertDialogUsage.md.html @@ -47,7 +47,7 @@ [AlertDialogUsage] public Test(AlertDialog dialog) { } ------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -58,7 +58,7 @@ class Test { public Test(AlertDialog dialog) { } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/AlertDialogUsageDetectorTest.kt) diff --git a/docs/checks/Aligned16KB.md.html b/docs/checks/Aligned16KB.md.html index cfc35294..fef8923c 100644 --- a/docs/checks/Aligned16KB.md.html +++ b/docs/checks/Aligned16KB.md.html @@ -65,7 +65,7 @@ [Aligned16KB] implementation("org.tensorflow:tensorflow-lite:2.16.1") --------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant test files: @@ -74,7 +74,7 @@ dependencies { implementation("org.tensorflow:tensorflow-lite:2.16.1") } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [build/intermediates/exploded-aar/org.tensorflow/tensorflow-lite/2.16.1/jni/arm64-v8a/libtensorflowlite_jni.so](examples/arm64-v8a/libtensorflowlite_jni.so) diff --git a/docs/checks/AllCaps.md.html b/docs/checks/AllCaps.md.html index e5b4b5b0..fc53dec0 100644 --- a/docs/checks/AllCaps.md.html +++ b/docs/checks/AllCaps.md.html @@ -43,7 +43,7 @@ caps conversion [AllCaps] android:textAllCaps="true" -------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -75,7 +75,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" /> </merge> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -83,7 +83,7 @@ <string name="plain">Home Sample</string> <string name="has_markup">This is <b>bold</b></string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AllCapsDetectorTest.kt) diff --git a/docs/checks/AllFilesAccessPolicy.md.html b/docs/checks/AllFilesAccessPolicy.md.html new file mode 100644 index 00000000..edb914d4 --- /dev/null +++ b/docs/checks/AllFilesAccessPolicy.md.html @@ -0,0 +1,188 @@ + +(#) All Files Access Insights + +!!! WARNING: All Files Access Insights + This is a warning. + +Id +: `AllFilesAccessPolicy` +Summary +: All Files Access Insights +Severity +: Warning +Category +: Play Policy +Platform +: Android +Vendor +: Play policy insights beta +Min +: Lint 8.2 to 8.6 +Compiled +: Lint 8.7+ +Artifact +: [com.google.play.policy.insights:insights-lint](com_google_play_policy_insights_insights-lint.md.html) +Since +: 0.1.3 +Affects +: Manifest files +Editing +: This check runs on the fly in the IDE editor + +Google Play policy treats access to user files and directories as +sensitive and high risk access, so we restrict use of the +`MANAGE_EXTERNAL_STORAGE` permission on Android 11+. You must have +essential core app functionality that requires broad access to this +permission for a user-facing purpose, and never for third parties. This +helps prevent unnecessary data collection and protects users' privacy. +Apps requesting this permission must clearly prompt users so they can +make an informed privacy decision, and get approval through Play’s app +review. + +**Dos:** + +- Prioritize using privacy-friendly alternatives instead, like Storage + Access Framework or MediaStore API. +- Declare this permissions when you submit a declaration form in your + Play Console. +- Clearly define and document your app's core functionality in your app + review. +- Clearly prompt users to enable “All files access” for your app under + “Special app access” settings. + +**Don'ts:** + +- Request the `MANAGE_EXTERNAL_STORAGE` permission for non-permitted + use-cases like Media Files access or any File selection activity + where the user manually selects individual files. +- Misrepresent the core functionality of your app. +- Store or share data beyond essential and disclosed needs. + +**Helpful Links:** + +See Policy page: https://goo.gle/play-policy-all-files-access +See Help Center article: https://goo.gle/play-help-all-files-access +See Declaration form: https://goo.gle/play-permission-decl-form + +Always review the full policy in the Policy Center to ensure +compliance. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +AndroidManifest.xml:4:Warning: To protect user data, +MANAGE_EXTERNAL_STORAGE requires essential core functionality and Google +Play’s approval. [AllFilesAccessPolicy] + <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/> + --------------------------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`AndroidManifest.xml`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android"> + <uses-sdk android:targetSdkVersion="30" /> + <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/> +</manifest> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](/policyinsights/src/test/java/com/google/play/policy/insights/AllFilesAccessPolicyDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `AllFilesAccessPolicyDetector.testFlagsManageExternalStorage`. +To report a problem with this extracted sample, contact +Play policy insights beta. + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("com.google.play.policy.insights:insights-lint:0.1.4") + +// build.gradle +implementation 'com.google.play.policy.insights:insights-lint:0.1.4' + +// build.gradle.kts with version catalogs: +implementation(libs.insights.lint) + +# libs.versions.toml +[versions] +insights-lint = "0.1.4" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +insights-lint = { + module = "com.google.play.policy.insights:insights-lint", + version.ref = "insights-lint" +} +``` + +0.1.4 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.google.play.policy.insights:insights-lint](com_google_play_policy_insights_insights-lint.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Adding the suppression attribute + `tools:ignore="AllFilesAccessPolicy"` on the problematic XML element + (or one of its enclosing elements). You may also need to add the + following namespace declaration on the root element in the XML file + if it's not already there: + `xmlns:tools="http://schemas.android.com/tools"`. + + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <manifest xmlns:tools="http://schemas.android.com/tools"> + ... + <uses-permission tools:ignore="AllFilesAccessPolicy" .../> + ... + </manifest> + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="AllFilesAccessPolicy" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'AllFilesAccessPolicy' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore AllFilesAccessPolicy ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/AllowAllHostnameVerifier.md.html b/docs/checks/AllowAllHostnameVerifier.md.html index e1673ca6..f55bf914 100644 --- a/docs/checks/AllowAllHostnameVerifier.md.html +++ b/docs/checks/AllowAllHostnameVerifier.md.html @@ -54,7 +54,7 @@ [AllowAllHostnameVerifier] connection.setHostnameVerifier(SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER); -------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -88,7 +88,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AllowAllHostnameVerifierDetectorTest.java) diff --git a/docs/checks/AlwaysShowAction.md.html b/docs/checks/AlwaysShowAction.md.html index c5a368ad..16dadc96 100644 --- a/docs/checks/AlwaysShowAction.md.html +++ b/docs/checks/AlwaysShowAction.md.html @@ -58,7 +58,7 @@ [AlwaysShowAction] android:showAsAction="always|collapseActionView" ------------------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -126,7 +126,7 @@ </group> </menu> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AlwaysShowActionDetectorTest.java) diff --git a/docs/checks/AndroidGradlePluginVersion.md.html b/docs/checks/AndroidGradlePluginVersion.md.html index d1e2c93b..c968aaca 100644 --- a/docs/checks/AndroidGradlePluginVersion.md.html +++ b/docs/checks/AndroidGradlePluginVersion.md.html @@ -55,7 +55,7 @@ [AndroidGradlePluginVersion] gradlePlugins-agp-alpha = "8.1.0-alpha01" --------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -92,7 +92,7 @@ android-application3 = { id = "com.android.application", version.ref = "gradlePlugins-agp-dev" } crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "gradlePlugins-crashlytics" } dependency-analysis = { id = "com.autonomousapps.dependency-analysis", version.ref = "gradlePlugins-dependency-analysis" } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/AnimatorKeep.md.html b/docs/checks/AnimatorKeep.md.html index 9eb86c4b..cda089fa 100644 --- a/docs/checks/AnimatorKeep.md.html +++ b/docs/checks/AnimatorKeep.md.html @@ -50,7 +50,7 @@ that it is not discarded or renamed in release builds [AnimatorKeep] public void setProp1(int x) { --------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -78,7 +78,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ObjectAnimatorDetectorTest.kt) diff --git a/docs/checks/AnnotateVersionCheck.md.html b/docs/checks/AnnotateVersionCheck.md.html index 2718ab45..9c1073f6 100644 --- a/docs/checks/AnnotateVersionCheck.md.html +++ b/docs/checks/AnnotateVersionCheck.md.html @@ -56,7 +56,7 @@ [AnnotateVersionCheck] inline fun <T> T.applyForOreoOrAbove(block: T.() -> Unit): T { ------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -83,7 +83,7 @@ } return this } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/SdkIntDetectorTest.kt) diff --git a/docs/checks/AnnotationProcessorOnCompilePath.md.html b/docs/checks/AnnotationProcessorOnCompilePath.md.html index 86b7f2e9..dd67d892 100644 --- a/docs/checks/AnnotationProcessorOnCompilePath.md.html +++ b/docs/checks/AnnotationProcessorOnCompilePath.md.html @@ -69,7 +69,7 @@ [AnnotationProcessorOnCompilePath] debugCompile "android.arch.persistence.room:compiler:1.1.1" ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -85,7 +85,7 @@ debugCompile "android.arch.persistence.room:compiler:1.1.1" implementation "com.jakewharton:butterknife:10.1.0" } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/AppBundleLocaleChanges.md.html b/docs/checks/AppBundleLocaleChanges.md.html index 57f3728a..130cc32c 100644 --- a/docs/checks/AppBundleLocaleChanges.md.html +++ b/docs/checks/AppBundleLocaleChanges.md.html @@ -46,7 +46,7 @@ [AppBundleLocaleChanges] configuration.locale = locale ------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -58,7 +58,7 @@ fun example(configuration: Configuration, locale: Locale) { configuration.locale = locale } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AppBundleLocaleChangesDetectorTest.kt) diff --git a/docs/checks/AppCompatCustomView.md.html b/docs/checks/AppCompatCustomView.md.html index 6949ebd0..13cbb910 100644 --- a/docs/checks/AppCompatCustomView.md.html +++ b/docs/checks/AppCompatCustomView.md.html @@ -115,7 +115,7 @@ [AppCompatCustomView] public class MySpinner extends Spinner { // ERROR ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -225,7 +225,7 @@ public MyChronometer(Context context) { super(context); } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AppCompatCustomViewDetectorTest.kt) diff --git a/docs/checks/AppCompatMethod.md.html b/docs/checks/AppCompatMethod.md.html index 931cfc47..c62f6d2a 100644 --- a/docs/checks/AppCompatMethod.md.html +++ b/docs/checks/AppCompatMethod.md.html @@ -76,7 +76,7 @@ setProgressBarIndeterminateVisibility name [AppCompatMethod] setProgressBarIndeterminateVisibility(true); // ERROR ------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -104,7 +104,7 @@ setSupportProgressBarIndeterminateVisibility(true); // OK } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AppCompatCallDetectorTest.java) diff --git a/docs/checks/AppCompatResource.md.html b/docs/checks/AppCompatResource.md.html index 72f40689..3bbe827e 100644 --- a/docs/checks/AppCompatResource.md.html +++ b/docs/checks/AppCompatResource.md.html @@ -50,7 +50,7 @@ not using the appcompat library [AppCompatResource] app:showAsAction="never" /> ------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -63,8 +63,7 @@ android:orderInCategory="100" app:showAsAction="never" /> </menu> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AppCompatResourceDetectorTest.java) diff --git a/docs/checks/AppIndexingService.md.html b/docs/checks/AppIndexingService.md.html index 794f06cb..b96f3dcf 100644 --- a/docs/checks/AppIndexingService.md.html +++ b/docs/checks/AppIndexingService.md.html @@ -45,7 +45,7 @@ you're targeting. Use a BroadcastReceiver instead. [AppIndexingService] <action android:name="com.google.firebase.appindexing.UPDATE_INDEX" /> ----------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -66,7 +66,7 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `build.gradle`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~groovy linenumbers @@ -75,7 +75,7 @@ dependencies { compile 'com.google.firebase:firebase-appindexing:11.0.4' } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ManifestDetectorTest.kt) diff --git a/docs/checks/AppLinkSplitToWebAndCustom.md.html b/docs/checks/AppLinkSplitToWebAndCustom.md.html index 87b5dbcd..7639ca73 100644 --- a/docs/checks/AppLinkSplitToWebAndCustom.md.html +++ b/docs/checks/AppLinkSplitToWebAndCustom.md.html @@ -49,7 +49,7 @@ separate intent filters [AppLinkSplitToWebAndCustom] <intent-filter android:autoVerify="true" android:order="-1" android:priority="-1"> ------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -86,14 +86,14 @@ </activity> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> <string name="path">/path</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AppLinksValidDetectorTest.kt) diff --git a/docs/checks/AppLinkUriRelativeFilterGroupError.md.html b/docs/checks/AppLinkUriRelativeFilterGroupError.md.html index 8f988d95..0137d06c 100644 --- a/docs/checks/AppLinkUriRelativeFilterGroupError.md.html +++ b/docs/checks/AppLinkUriRelativeFilterGroupError.md.html @@ -52,7 +52,7 @@ matching [AppLinkUriRelativeFilterGroupError] <data android:host='example.com' android:mimeType="application/json" android:pathPrefix='/gizmos' /> ---------------------------------------------------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -113,7 +113,7 @@ </activity> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AppLinksValidDetectorTest.kt) diff --git a/docs/checks/AppLinkUrlError.md.html b/docs/checks/AppLinkUrlError.md.html index 605bd8e8..cc99b671 100644 --- a/docs/checks/AppLinkUrlError.md.html +++ b/docs/checks/AppLinkUrlError.md.html @@ -47,7 +47,7 @@ [AppLinkUrlError] <tools:validation /> -------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -72,7 +72,7 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AppLinksValidDetectorTest.kt) diff --git a/docs/checks/AppLinkWarning.md.html b/docs/checks/AppLinkWarning.md.html index 289de85a..a00c6be2 100644 --- a/docs/checks/AppLinkWarning.md.html +++ b/docs/checks/AppLinkWarning.md.html @@ -60,7 +60,7 @@ an Android App Link. [AppLinkWarning] <intent-filter> <!-- We expect a warning here --> ------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -159,7 +159,7 @@ </activity> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AppLinksValidDetectorTest.kt) diff --git a/docs/checks/AppLinksAutoVerify.md.html b/docs/checks/AppLinksAutoVerify.md.html index 7b585412..6d605b51 100644 --- a/docs/checks/AppLinksAutoVerify.md.html +++ b/docs/checks/AppLinksAutoVerify.md.html @@ -44,7 +44,7 @@ http://example.com/.well-known/assetlinks.json [AppLinksAutoVerify] android:host="example.com" -------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -70,7 +70,7 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AppLinksAutoVerifyDetectorTest.kt) diff --git a/docs/checks/ApplySharedPref.md.html b/docs/checks/ApplySharedPref.md.html index b58f8529..94f715a4 100644 --- a/docs/checks/ApplySharedPref.md.html +++ b/docs/checks/ApplySharedPref.md.html @@ -45,7 +45,7 @@ whereas apply will handle it in the background [ApplySharedPref] editor.commit(); -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -128,7 +128,7 @@ } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/CleanupDetectorTest.kt) diff --git a/docs/checks/ArcAnimationSpecTypeIssue.md.html b/docs/checks/ArcAnimationSpecTypeIssue.md.html index a5179501..c1b459b4 100644 --- a/docs/checks/ArcAnimationSpecTypeIssue.md.html +++ b/docs/checks/ArcAnimationSpecTypeIssue.md.html @@ -48,19 +48,19 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/foo/test.kt:14:Information: Arc animation is intended for 2D values -such as Offset, IntOffset or DpOffset. +src/foo/test.kt:14:Hint: Arc animation is intended for 2D values such as +Offset, IntOffset or DpOffset. Otherwise, the animation might not be what you expect. [ArcAnimationSpecTypeIssue] ArcAnimationSpec<Float>(ArcAbove) ---------------- -src/foo/test.kt:15:Information: Arc animation is intended for 2D values -such as Offset, IntOffset or DpOffset. +src/foo/test.kt:15:Hint: Arc animation is intended for 2D values such as +Offset, IntOffset or DpOffset. Otherwise, the animation might not be what you expect. [ArcAnimationSpecTypeIssue] ArcAnimationSpec<String>(ArcAbove) ---------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -81,7 +81,7 @@ ArcAnimationSpec(ArcAbove) ArcAnimationSpec(ArcAbove) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/animation/animation-core-lint/src/test/java/androidx/compose/animation/core/lint/ArcAnimationSpecTypeDetectorTest.kt) @@ -100,17 +100,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.animation:animation-core-android:1.9.0-alpha01") +implementation("androidx.compose.animation:animation-core-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.animation:animation-core-android:1.9.0-alpha01' +implementation 'androidx.compose.animation:animation-core-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.animation.core.android) # libs.versions.toml [versions] -animation-core-android = "1.9.0-alpha01" +animation-core-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -122,11 +122,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.animation:animation-core-lint:1.9.0-alpha01`. +You can also use `androidx.compose.animation:animation-core-lint:1.11.0-alpha06`. [Additional details about androidx.compose.animation:animation-core-android](androidx_compose_animation_animation-core-android.md.html). diff --git a/docs/checks/ArgInFormattedQuantityStringRes.md.html b/docs/checks/ArgInFormattedQuantityStringRes.md.html index ccb50c3d..21930b88 100644 --- a/docs/checks/ArgInFormattedQuantityStringRes.md.html +++ b/docs/checks/ArgInFormattedQuantityStringRes.md.html @@ -57,7 +57,7 @@ [ArgInFormattedQuantityStringRes] String s = res.getQuantityString(0, 3, 3, "asdf"); ------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -72,7 +72,7 @@ String s = res.getQuantityString(0, 3, 3, "asdf"); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/ArgInFormattedQuantityStringResDetectorTest.kt) diff --git a/docs/checks/AssertionSideEffect.md.html b/docs/checks/AssertionSideEffect.md.html index 8aabf500..36cc6c72 100644 --- a/docs/checks/AssertionSideEffect.md.html +++ b/docs/checks/AssertionSideEffect.md.html @@ -50,7 +50,7 @@ 2024 [AssertionSideEffect] assert(2024 != (f.of = 2024)) // WARN 2 ----------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -63,7 +63,7 @@ assert(42 != f.setOf(42)) // WARN 1 assert(2024 != (f.of = 2024)) // WARN 2 } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/Foo.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -79,7 +79,7 @@ return prev; } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AssertDetectorTest.kt) diff --git a/docs/checks/AuthLeak.md.html b/docs/checks/AuthLeak.md.html index 183dfd55..107c4622 100644 --- a/docs/checks/AuthLeak.md.html +++ b/docs/checks/AuthLeak.md.html @@ -45,7 +45,7 @@ src/AuthDemo.java:4:Warning: Possible credential leak [AuthLeak] private static final String LEAK = "http://someuser:%restofmypass@example.com"; // WARN 2 ----------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -57,7 +57,7 @@ private static final String LEAK = "http://someuser:%restofmypass@example.com"; // WARN 2 private static final String URL = "http://%-05s@example.com"; // OK 2 } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/StringAuthLeakDetectorTest.kt) diff --git a/docs/checks/AutoDispose.md.html b/docs/checks/AutoDispose.md.html index 43c50b7a..89bdbde8 100644 --- a/docs/checks/AutoDispose.md.html +++ b/docs/checks/AutoDispose.md.html @@ -49,41 +49,35 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/foo/MyActivity.kt:10:Error: [AutoDispose] - Observable.just(1).subscribe() - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -src/foo/MyActivity.kt:12: Error: [AutoDispose] - Observable.just(2).subscribe() - ------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src/foo/ExampleClass.java:8:Error: Missing Disposable handling: Apply +AutoDispose or cache the Disposable instance manually and enable lenient +mode. [AutoDispose] + obs.subscribe(); + --------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: -`src/foo/MyActivity.kt`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers -package foo -import androidx.appcompat.app.AppCompatActivity -import io.reactivex.rxjava3.core.Observable -import io.reactivex.rxjava3.disposables.CompositeDisposable - -class MyActivity: AppCompatActivity { - private val disposables = CompositeDisposable() - fun doSomething(flag: Boolean) { - if (flag) { - Observable.just(1).subscribe() - } else { - Observable.just(2).subscribe() - } +`src/foo/ExampleClass.java`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers +package foo; +import io.reactivex.rxjava3.core.Observable; +import androidx.fragment.app.Fragment; + +class ExampleClass extends Fragment { + void names() { + Observable obs = Observable.just(1, 2, 3, 4); + obs.subscribe(); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/uber/AutoDispose/tree/main/static-analysis/autodispose-lint/src/test/kotlin/autodispose2/lint/AutoDisposeDetectorTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test -found for this lint check, `AutoDisposeDetector.checkLenientLintInIfExpression`. +found for this lint check, `AutoDisposeDetector.observableErrorsOutOnOmittingAutoDispose`. To report a problem with this extracted sample, visit https://github.com/uber/AutoDispose/issues. diff --git a/docs/checks/AutoboxingStateCreation.md.html b/docs/checks/AutoboxingStateCreation.md.html index 2095efc3..19395dd8 100644 --- a/docs/checks/AutoboxingStateCreation.md.html +++ b/docs/checks/AutoboxingStateCreation.md.html @@ -57,11 +57,11 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/androidx/compose/runtime/lint/test/test.kt:8:Information: Prefer +src/androidx/compose/runtime/lint/test/test.kt:8:Hint: Prefer mutableStateOf instead of mutableStateOf [AutoboxingStateCreation] val state = mutableStateOf<>() -------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -76,7 +76,7 @@ val state = mutableStateOf<>() state.value = } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/AutoboxingStateCreationDetectorTest.kt) @@ -95,17 +95,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime-android:1.9.0-alpha01") +implementation("androidx.compose.runtime:runtime-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.runtime:runtime-android:1.9.0-alpha01' +implementation 'androidx.compose.runtime:runtime-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.runtime.android) # libs.versions.toml [versions] -runtime-android = "1.9.0-alpha01" +runtime-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -117,11 +117,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.runtime:runtime-lint:1.9.0-alpha01`. +You can also use `androidx.compose.runtime:runtime-lint:1.11.0-alpha06`. [Additional details about androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html). diff --git a/docs/checks/AutoboxingStateValueProperty.md.html b/docs/checks/AutoboxingStateValueProperty.md.html index 530d2ce0..0b049542 100644 --- a/docs/checks/AutoboxingStateValueProperty.md.html +++ b/docs/checks/AutoboxingStateValueProperty.md.html @@ -57,7 +57,7 @@ allocations. [AutoboxingStateValueProperty] val value = state.value ----- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -71,7 +71,7 @@ val state = mutableIntStateOf(4) val value = state.value } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/AutoboxingStateValuePropertyDetectorTest.kt) @@ -90,17 +90,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime-android:1.9.0-alpha01") +implementation("androidx.compose.runtime:runtime-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.runtime:runtime-android:1.9.0-alpha01' +implementation 'androidx.compose.runtime:runtime-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.runtime.android) # libs.versions.toml [versions] -runtime-android = "1.9.0-alpha01" +runtime-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -112,11 +112,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.runtime:runtime-lint:1.9.0-alpha01`. +You can also use `androidx.compose.runtime:runtime-lint:1.11.0-alpha06`. [Additional details about androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html). diff --git a/docs/checks/Autofill.md.html b/docs/checks/Autofill.md.html index 84586a89..628f7e1e 100644 --- a/docs/checks/Autofill.md.html +++ b/docs/checks/Autofill.md.html @@ -59,7 +59,7 @@ [Autofill] <EditText -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -80,7 +80,7 @@ </EditText> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AutofillDetectorTest.java) diff --git a/docs/checks/AvoidUsingNotNullOperator.md.html b/docs/checks/AvoidUsingNotNullOperator.md.html index ab6d0af1..2f87e660 100644 --- a/docs/checks/AvoidUsingNotNullOperator.md.html +++ b/docs/checks/AvoidUsingNotNullOperator.md.html @@ -57,7 +57,7 @@ [AvoidUsingNotNullOperator] return t!!.length == 1 -- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -71,7 +71,7 @@ return t!!.length == 1 } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/NotNullOperatorDetectorTest.kt) diff --git a/docs/checks/BackButton.md.html b/docs/checks/BackButton.md.html index 0d2af11d..44d0258c 100644 --- a/docs/checks/BackButton.md.html +++ b/docs/checks/BackButton.md.html @@ -54,7 +54,7 @@ Android; see design guide's navigation section [BackButton] <Button ------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -248,7 +248,7 @@ android:text="@string/goback" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/buttonbar-values.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -267,7 +267,7 @@ <string name="goback">'Back'</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ButtonDetectorTest.java) diff --git a/docs/checks/BackgroundLocationPolicy.md.html b/docs/checks/BackgroundLocationPolicy.md.html new file mode 100644 index 00000000..a883ee68 --- /dev/null +++ b/docs/checks/BackgroundLocationPolicy.md.html @@ -0,0 +1,184 @@ + +(#) Background Location Insights + +!!! WARNING: Background Location Insights + This is a warning. + +Id +: `BackgroundLocationPolicy` +Summary +: Background Location Insights +Severity +: Warning +Category +: Play Policy +Platform +: Android +Vendor +: Play policy insights beta +Min +: Lint 8.2 to 8.6 +Compiled +: Lint 8.7+ +Artifact +: [com.google.play.policy.insights:insights-lint](com_google_play_policy_insights_insights-lint.md.html) +Since +: 0.1.3 +Affects +: Manifest files +Editing +: This check runs on the fly in the IDE editor + +To protect user privacy, the background location policy requires apps to +provide a strong justification and obtain explicit user consent for +access. Device location data is limited to essential functions that +directly benefit the user and are central to the app's core purpose; it +is never permitted solely for advertising or analytics. Minimize your +requests, choosing lesser sensitive options like coarse location and +foreground access whenever possible. Foreground Services access of +device location must be user-initiated and temporary, while background +is only for critical features. + +**Dos:** + +- Comply with the Designed for Families policy for apps targeting + children. +- Review additional key considerations and requirements to submit your + app for access to location in the background permissions. +- Complete the Console declaration for background location. + +**Don'ts:** + +- Use device location solely for advertising or analytics purposes. +- Access data after it's no longer needed. +- Request device location for apps directed at children. +- Sell device location. + +**Helpful Links:** + +See Policy page: https://goo.gle/play-policy-background-location +See Help Center article: https://goo.gle/play-help-background-location +See Declaration form: https://goo.gle/play-permission-decl-form + +Always review the full policy in the Policy Center to ensure +compliance. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +AndroidManifest.xml:3:Warning: Background location access requires a +strong justification demonstrating it is critical for your app's core +functionality and provides a clear user benefit. +[BackgroundLocationPolicy] + <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/> + ------------------------------------------------------------ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`AndroidManifest.xml`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android"> + <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/> +</manifest> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](/policyinsights/src/test/java/com/google/play/policy/insights/LocationPolicyDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `LocationPolicyDetector.testFlagsAccessBackgroundLocationPermission`. +To report a problem with this extracted sample, contact +Play policy insights beta. + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("com.google.play.policy.insights:insights-lint:0.1.4") + +// build.gradle +implementation 'com.google.play.policy.insights:insights-lint:0.1.4' + +// build.gradle.kts with version catalogs: +implementation(libs.insights.lint) + +# libs.versions.toml +[versions] +insights-lint = "0.1.4" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +insights-lint = { + module = "com.google.play.policy.insights:insights-lint", + version.ref = "insights-lint" +} +``` + +0.1.4 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.google.play.policy.insights:insights-lint](com_google_play_policy_insights_insights-lint.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Adding the suppression attribute + `tools:ignore="BackgroundLocationPolicy"` on the problematic XML + element (or one of its enclosing elements). You may also need to add + the following namespace declaration on the root element in the XML + file if it's not already there: + `xmlns:tools="http://schemas.android.com/tools"`. + + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <manifest xmlns:tools="http://schemas.android.com/tools"> + ... + <uses-permission tools:ignore="BackgroundLocationPolicy" .../> + ... + </manifest> + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="BackgroundLocationPolicy" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'BackgroundLocationPolicy' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore BackgroundLocationPolicy ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/BadConfigurationProvider.md.html b/docs/checks/BadConfigurationProvider.md.html index 0cce2370..9b8ff450 100644 --- a/docs/checks/BadConfigurationProvider.md.html +++ b/docs/checks/BadConfigurationProvider.md.html @@ -52,7 +52,7 @@ com/example/App.kt:Error: Expected Application subtype to implement Configuration.Provider [BadConfigurationProvider] 1 errors, 0 warnings -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -67,7 +67,7 @@ } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `com/example/CustomProvider.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -78,7 +78,7 @@ class Provider: Configuration.Provider { override fun getWorkManagerConfiguration(): Configuration = TODO() } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/work/work-lint/src/test/java/androidx/work/lint/BadConfigurationProviderTest.kt) @@ -97,17 +97,17 @@ ``` // build.gradle.kts -implementation("androidx.work:work-runtime:2.10.1") +implementation("androidx.work:work-runtime:2.11.1") // build.gradle -implementation 'androidx.work:work-runtime:2.10.1' +implementation 'androidx.work:work-runtime:2.11.1' // build.gradle.kts with version catalogs: implementation(libs.work.runtime) # libs.versions.toml [versions] -work-runtime = "2.10.1" +work-runtime = "2.11.1" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -119,7 +119,7 @@ } ``` -2.10.1 is the version this documentation was generated from; +2.11.1 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.work:work-runtime](androidx_work_work-runtime.md.html). diff --git a/docs/checks/BadHostnameVerifier.md.html b/docs/checks/BadHostnameVerifier.md.html index 66263d7d..8ae2db2d 100644 --- a/docs/checks/BadHostnameVerifier.md.html +++ b/docs/checks/BadHostnameVerifier.md.html @@ -45,7 +45,7 @@ TLS/SSL server certificates for wrong hostnames [BadHostnameVerifier] public boolean verify(String hostname, SSLSession session) { ------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -89,8 +89,7 @@ } }; } - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/BadHostnameVerifierDetectorTest.java) diff --git a/docs/checks/BadPeriodicWorkRequestEnqueue.md.html b/docs/checks/BadPeriodicWorkRequestEnqueue.md.html index 6d8740b0..63cb6d77 100644 --- a/docs/checks/BadPeriodicWorkRequestEnqueue.md.html +++ b/docs/checks/BadPeriodicWorkRequestEnqueue.md.html @@ -53,17 +53,17 @@ ``` // build.gradle.kts -implementation("androidx.work:work-runtime:2.10.1") +implementation("androidx.work:work-runtime:2.11.1") // build.gradle -implementation 'androidx.work:work-runtime:2.10.1' +implementation 'androidx.work:work-runtime:2.11.1' // build.gradle.kts with version catalogs: implementation(libs.work.runtime) # libs.versions.toml [versions] -work-runtime = "2.10.1" +work-runtime = "2.11.1" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -75,7 +75,7 @@ } ``` -2.10.1 is the version this documentation was generated from; +2.11.1 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.work:work-runtime](androidx_work_work-runtime.md.html). diff --git a/docs/checks/BatteryLife.md.html b/docs/checks/BatteryLife.md.html index 9b898249..20452d1a 100644 --- a/docs/checks/BatteryLife.md.html +++ b/docs/checks/BatteryLife.md.html @@ -77,7 +77,7 @@ [BatteryLife] Intent intent = new Intent(Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS); ------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -99,7 +99,7 @@ </receiver> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/BatteryTest.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -122,7 +122,7 @@ startActivity(intent); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/BatteryDetectorTest.java) diff --git a/docs/checks/BidiSpoofing.md.html b/docs/checks/BidiSpoofing.md.html index 40335a3b..a0b561e2 100644 --- a/docs/checks/BidiSpoofing.md.html +++ b/docs/checks/BidiSpoofing.md.html @@ -55,7 +55,7 @@ bidirectional text [BidiSpoofing] /* end admins only ‮ { ⁦*/ -------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -70,7 +70,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/CommentingOut.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -83,7 +83,7 @@ /* end admins only ‮ { ⁦*/ } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -92,7 +92,7 @@ */ val valid1 = "Left‮Right‬Left" // OK val valid2 = "Left‮Right⁦Nested Left⁩‬Left" // OK -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/BidirectionalTextDetectorTest.kt) diff --git a/docs/checks/BinaryOperationInTimber.md.html b/docs/checks/BinaryOperationInTimber.md.html index 134ea1d8..f3a7cadc 100644 --- a/docs/checks/BinaryOperationInTimber.md.html +++ b/docs/checks/BinaryOperationInTimber.md.html @@ -51,7 +51,7 @@ Timber's string formatting [BinaryOperationInTimber] Timber.d(foo + "bar"); ----------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -65,7 +65,7 @@ Timber.d(foo + "bar"); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/foo/Example.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -77,7 +77,7 @@ Timber.d("${foo}bar") } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/JakeWharton/timber/tree/trunk/timber-lint/src/test/java/timber/lint/WrongTimberUsageDetectorTest.kt) diff --git a/docs/checks/BinderGetCallingInMainThread.md.html b/docs/checks/BinderGetCallingInMainThread.md.html index 85ed1516..b3ccb4ed 100644 --- a/docs/checks/BinderGetCallingInMainThread.md.html +++ b/docs/checks/BinderGetCallingInMainThread.md.html @@ -47,7 +47,7 @@ used inside onBind() [BinderGetCallingInMainThread] Binder.getCallingPid() ---------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -66,7 +66,7 @@ Binder.getCallingPid() } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/BinderGetCallingInMainThreadDetectorTest.kt) diff --git a/docs/checks/BindingReceiverParameter.md.html b/docs/checks/BindingReceiverParameter.md.html index 3afe4d93..fed4357d 100644 --- a/docs/checks/BindingReceiverParameter.md.html +++ b/docs/checks/BindingReceiverParameter.md.html @@ -85,7 +85,7 @@ extensions [BindingReceiverParameter] @Binds fun @receiver:MyQualifier Boolean.bind(): Comparable<Boolean> ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -125,7 +125,7 @@ @Provides fun String.bind(): Comparable = this@bind @Provides fun @receiver:MyQualifier Boolean.bind(): Comparable = this@bind } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/DaggerIssuesDetectorTest.kt) diff --git a/docs/checks/BindingReturnType.md.html b/docs/checks/BindingReturnType.md.html index 46b6b524..e89524a8 100644 --- a/docs/checks/BindingReturnType.md.html +++ b/docs/checks/BindingReturnType.md.html @@ -56,7 +56,7 @@ type [BindingReturnType] @Provides fun invalidBind4(): Unit { ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -82,7 +82,7 @@ return Unit } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/DaggerIssuesDetectorTest.kt) diff --git a/docs/checks/BindsMustBeAbstract.md.html b/docs/checks/BindsMustBeAbstract.md.html index 7570d5df..a36a797a 100644 --- a/docs/checks/BindsMustBeAbstract.md.html +++ b/docs/checks/BindsMustBeAbstract.md.html @@ -55,7 +55,7 @@ [BindsMustBeAbstract] @Binds fun invalidBind2(@MyQualifier real: Unit): Unit ------------------------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -81,7 +81,7 @@ return Unit } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/DaggerIssuesDetectorTest.kt) diff --git a/docs/checks/BindsTypeMismatch.md.html b/docs/checks/BindsTypeMismatch.md.html index 99f27e88..e3c9307c 100644 --- a/docs/checks/BindsTypeMismatch.md.html +++ b/docs/checks/BindsTypeMismatch.md.html @@ -60,7 +60,7 @@ type-assignable [BindsTypeMismatch] @Binds fun invalidComplexBinding(real: DetailTypeAItemMapper): ItemMapper<ItemDetail> ------------------------------------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -90,7 +90,7 @@ @Binds fun validComplexBinding2(real: DetailTypeAItemMapper): ItemMapper<*> @Binds fun invalidComplexBinding(real: DetailTypeAItemMapper): ItemMapper } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/DaggerIssuesDetectorTest.kt) diff --git a/docs/checks/BindsWrongParameterCount.md.html b/docs/checks/BindsWrongParameterCount.md.html index 37973a76..a48f52d7 100644 --- a/docs/checks/BindsWrongParameterCount.md.html +++ b/docs/checks/BindsWrongParameterCount.md.html @@ -55,7 +55,7 @@ [BindsWrongParameterCount] @Binds fun invalidBind(): Number -------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -71,7 +71,7 @@ @Binds fun invalidBind(real: Int, second: Int): Number @Binds fun invalidBind(): Number } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/DaggerIssuesDetectorTest.kt) diff --git a/docs/checks/BlockedPrivateApi.md.html b/docs/checks/BlockedPrivateApi.md.html index 83203fc1..759b6fc1 100644 --- a/docs/checks/BlockedPrivateApi.md.html +++ b/docs/checks/BlockedPrivateApi.md.html @@ -47,7 +47,7 @@ [BlockedPrivateApi] Field deniedField = TelephonyManager.class.getDeclaredField("NETWORK_TYPES"); // ERROR 1 -------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -75,10 +75,10 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PrivateApiDetectorTest.kt) +You can also visit the source code ([PrivateApiDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PrivateApiDetectorTest.kt) +[SuppressibleTestModeTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/infrastructure/SuppressibleTestModeTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/BomWithoutPlatform.md.html b/docs/checks/BomWithoutPlatform.md.html index 08ec003a..c8d8074d 100644 --- a/docs/checks/BomWithoutPlatform.md.html +++ b/docs/checks/BomWithoutPlatform.md.html @@ -57,7 +57,7 @@ [BomWithoutPlatform] api("androidx.compose:compose-bom:2023.01.00") ----------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -67,7 +67,7 @@ composeBom = "2023.01.00" [libraries] compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `build.gradle`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~groovy linenumbers @@ -83,7 +83,7 @@ // Make sure we don't complain about existing platforms implementation platform("androidx.compose:compose-bom:2023.01.00") } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/BottomAppBar.md.html b/docs/checks/BottomAppBar.md.html index a12e329a..7fe1f781 100644 --- a/docs/checks/BottomAppBar.md.html +++ b/docs/checks/BottomAppBar.md.html @@ -40,7 +40,7 @@ [BottomAppBar] <android.support.design.bottomappbar.BottomAppBar ------------------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -71,7 +71,7 @@ app:srcCompat="@drawable/ic_add_black_24dp" tools:ignore="RtlHardcoded"/> </androidx.coordinatorlayout.widget.CoordinatorLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout/wrong1.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -92,7 +92,7 @@ app:navigationIcon="@drawable/ic_menu_black_24dp"/> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout/wrong2.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -105,7 +105,7 @@ android:layout_height="wrap_content" android:layout_gravity="bottom" app:navigationIcon="@drawable/ic_menu_black_24dp"/> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/BottomAppBarDetectorTest.kt) diff --git a/docs/checks/BrokenIterator.md.html b/docs/checks/BrokenIterator.md.html index 2f49c1ac..77e49090 100644 --- a/docs/checks/BrokenIterator.md.html +++ b/docs/checks/BrokenIterator.md.html @@ -87,7 +87,7 @@ c2a.spliterator().characteristics()) [BrokenIterator] StreamSupport.stream(c2a.spliterator(), false); // Warn ----------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -138,7 +138,7 @@ StreamSupport.stream(keys2, false); // OK } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/kt/LinkedHashmapTest.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -178,7 +178,7 @@ StreamSupport.stream(keys2, false) // OK } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/IteratorDetectorTest.kt) diff --git a/docs/checks/BuildListAdds.md.html b/docs/checks/BuildListAdds.md.html index d6c87220..ed9b8ac6 100644 --- a/docs/checks/BuildListAdds.md.html +++ b/docs/checks/BuildListAdds.md.html @@ -40,7 +40,7 @@ usually a mistake [BuildListAdds] return buildList { // ERROR --------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -55,7 +55,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/BuildListDetectorTest.kt) diff --git a/docs/checks/ButtonCase.md.html b/docs/checks/ButtonCase.md.html index 6c03916a..df0c29f7 100644 --- a/docs/checks/ButtonCase.md.html +++ b/docs/checks/ButtonCase.md.html @@ -49,7 +49,7 @@ [ButtonCase] <string name="giveup2">"CANCEL"</string> -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -243,7 +243,7 @@ android:text="@string/goback" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/buttonbar-values.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -262,7 +262,7 @@ <string name="goback">'Back'</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ButtonDetectorTest.java) diff --git a/docs/checks/ButtonOrder.md.html b/docs/checks/ButtonOrder.md.html index 30b185f7..06c72ada 100644 --- a/docs/checks/ButtonOrder.md.html +++ b/docs/checks/ButtonOrder.md.html @@ -78,7 +78,7 @@ left (was "Send | Cancel", should be "Cancel | Send") [ButtonOrder] <Button ------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -272,7 +272,7 @@ android:text="@string/goback" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/buttonbar-values.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -291,7 +291,7 @@ <string name="goback">'Back'</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ButtonDetectorTest.java) diff --git a/docs/checks/ButtonStyle.md.html b/docs/checks/ButtonStyle.md.html index 30819617..da1c7e38 100644 --- a/docs/checks/ButtonStyle.md.html +++ b/docs/checks/ButtonStyle.md.html @@ -145,7 +145,7 @@ ?android:attr/buttonBarStyle on the parent) [ButtonStyle] <Button ------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -339,7 +339,7 @@ android:text="@string/goback" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout/buttonbar2.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -395,7 +395,7 @@ android:src="@drawable/menu_list_divider" /> </RelativeLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout/buttonbar3.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -434,7 +434,7 @@ </RelativeLayout> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/buttonbar-values.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -453,7 +453,7 @@ <string name="goback">'Back'</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ButtonDetectorTest.java) diff --git a/docs/checks/ByteOrderMark.md.html b/docs/checks/ByteOrderMark.md.html index c795ba6f..321a033e 100644 --- a/docs/checks/ByteOrderMark.md.html +++ b/docs/checks/ByteOrderMark.md.html @@ -52,7 +52,7 @@ file [ByteOrderMark] <manifest package='foo.bar'> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -60,7 +60,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <manifest package='foo.bar'> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-zh-rCN/bom.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -69,7 +69,7 @@ <string name="hanping_chinese_lite_app_name">(Translated name)</string> <string tools:ignore='ByteOrderMark' name="something">testtest2</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/raw/bom_allowed.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -78,7 +78,7 @@ <string name="hanping_chinese_lite_app_name">(Translated name)</string> <string tools:ignore='ByteOrderMark' name="something">testtest2</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyTest.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -94,7 +94,7 @@ String s = ""; //OK/suppressed } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `proguard.cfg`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~proguard linenumbers @@ -103,10 +103,10 @@ -dontskipnonpubliclibraryclasses -dontpreverify -verbose -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ByteOrderMarkDetectorTest.java) +You can also visit the source code ([ByteOrderMarkDetectorTest.java](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ByteOrderMarkDetectorTest.java) +[ProjectInitializerTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/ProjectInitializerTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/CanvasSize.md.html b/docs/checks/CanvasSize.md.html index 6a6ce5c8..705b22ff 100644 --- a/docs/checks/CanvasSize.md.html +++ b/docs/checks/CanvasSize.md.html @@ -72,7 +72,7 @@ [CanvasSize] int height4 = canvas.getHeight(); // WARN ------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -120,7 +120,7 @@ int height4 = canvas.getHeight(); // OK } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyCustomView2.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -146,7 +146,7 @@ val height5 = canvas.getHeight() // WARN } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyDrawable.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -164,7 +164,7 @@ int height2 = canvas.getHeight(); // WARN } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyDrawableKotlin.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -180,7 +180,7 @@ val height2 = canvas.height // WARN } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/CanvasSizeDetectorTest.kt) diff --git a/docs/checks/CheckResult.md.html b/docs/checks/CheckResult.md.html index 70d6cab3..d183c5dc 100644 --- a/docs/checks/CheckResult.md.html +++ b/docs/checks/CheckResult.md.html @@ -43,7 +43,7 @@ [CheckResult] score.double() -------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -61,10 +61,10 @@ score.double() return score } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/CheckResultDetectorTest.kt) +You can also visit the source code ([CheckResultDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/CheckResultDetectorTest.kt) +[SourceTransformationTestMode.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/main/java/com/android/tools/lint/checks/infrastructure/SourceTransformationTestMode.kt) for the unit tests for this check to see additional scenarios. (##) Suppressing diff --git a/docs/checks/ChildInNonViewGroup.md.html b/docs/checks/ChildInNonViewGroup.md.html index 0000e8fe..486dac46 100644 --- a/docs/checks/ChildInNonViewGroup.md.html +++ b/docs/checks/ChildInNonViewGroup.md.html @@ -39,7 +39,7 @@ declared in XML [ChildInNonViewGroup] <TextView /> -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -57,7 +57,7 @@ </ImageView> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ChildInNonViewGroupDetectorTest.kt) diff --git a/docs/checks/ChromeOsAbiSupport.md.html b/docs/checks/ChromeOsAbiSupport.md.html index 6b9e14c0..a20444a6 100644 --- a/docs/checks/ChromeOsAbiSupport.md.html +++ b/docs/checks/ChromeOsAbiSupport.md.html @@ -49,7 +49,7 @@ [ChromeOsAbiSupport] abiFilters 'arm64-v8a' ----------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -68,7 +68,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/ChromeOsOnConfigurationChanged.md.html b/docs/checks/ChromeOsOnConfigurationChanged.md.html index 6fd2225b..aeeb5554 100644 --- a/docs/checks/ChromeOsOnConfigurationChanged.md.html +++ b/docs/checks/ChromeOsOnConfigurationChanged.md.html @@ -48,7 +48,7 @@ [ChromeOsOnConfigurationChanged] finish(); // ERROR 1 -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -75,7 +75,7 @@ finish(); // ERROR 1 } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ChromeOsSourceDetectorTest.kt) diff --git a/docs/checks/ClickableViewAccessibility.md.html b/docs/checks/ClickableViewAccessibility.md.html index 00d5f51f..abba4c9d 100644 --- a/docs/checks/ClickableViewAccessibility.md.html +++ b/docs/checks/ClickableViewAccessibility.md.html @@ -47,7 +47,7 @@ not performClick [ClickableViewAccessibility] public boolean onTouchEvent(MotionEvent event) { ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -73,7 +73,7 @@ } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ClickableViewAccessibilityDetectorTest.java) diff --git a/docs/checks/CoarseFineLocation.md.html b/docs/checks/CoarseFineLocation.md.html index fe66739d..442c1583 100644 --- a/docs/checks/CoarseFineLocation.md.html +++ b/docs/checks/CoarseFineLocation.md.html @@ -43,7 +43,7 @@ [CoarseFineLocation] <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> ------------------------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -58,7 +58,7 @@ android:label="@string/app_name" > </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/FineLocationDetectorTest.kt) diff --git a/docs/checks/ColorCasing.md.html b/docs/checks/ColorCasing.md.html index 1be861d7..7f498a7b 100644 --- a/docs/checks/ColorCasing.md.html +++ b/docs/checks/ColorCasing.md.html @@ -49,7 +49,7 @@ [ColorCasing] tools:textColor="#fff"/> ---- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -57,7 +57,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <TextView xmlns:tools="http://schemas.android.com/tools" tools:textColor="#fff"/> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/ColorCasingDetectorTest.kt) diff --git a/docs/checks/CommitPrefEdits.md.html b/docs/checks/CommitPrefEdits.md.html index 205f76c5..b038d8b7 100644 --- a/docs/checks/CommitPrefEdits.md.html +++ b/docs/checks/CommitPrefEdits.md.html @@ -47,7 +47,7 @@ without a corresponding commit() or apply() call [CommitPrefEdits] SharedPreferences.Editor editor = preferences.edit(); ------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -130,7 +130,7 @@ } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/CleanupDetectorTest.kt) diff --git a/docs/checks/CommitTransaction.md.html b/docs/checks/CommitTransaction.md.html index 5f0912c2..4035ee54 100644 --- a/docs/checks/CommitTransaction.md.html +++ b/docs/checks/CommitTransaction.md.html @@ -62,7 +62,7 @@ completed with a commit() call [CommitTransaction] transaction = getFragmentManager().beginTransaction(); // ERROR 6 ---------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -205,7 +205,7 @@ transaction2.commit(); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/CleanupDetectorTest.kt) diff --git a/docs/checks/ComposableDestinationInComposeScope.md.html b/docs/checks/ComposableDestinationInComposeScope.md.html index 66433fc6..e7181d86 100644 --- a/docs/checks/ComposableDestinationInComposeScope.md.html +++ b/docs/checks/ComposableDestinationInComposeScope.md.html @@ -49,7 +49,7 @@ scope [ComposableDestinationInComposeScope] composable("wrong") { } ---------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -70,7 +70,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/ComposableDestinationInComposeScopeDetectorTest.kt) @@ -89,17 +89,17 @@ ``` // build.gradle.kts -implementation("androidx.navigation:navigation-compose:2.9.0-rc01") +implementation("androidx.navigation:navigation-compose:2.9.7") // build.gradle -implementation 'androidx.navigation:navigation-compose:2.9.0-rc01' +implementation 'androidx.navigation:navigation-compose:2.9.7' // build.gradle.kts with version catalogs: implementation(libs.navigation.compose) # libs.versions.toml [versions] -navigation-compose = "2.9.0-rc01" +navigation-compose = "2.9.7" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -111,7 +111,7 @@ } ``` -2.9.0-rc01 is the version this documentation was generated from; +2.9.7 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.navigation:navigation-compose](androidx_navigation_navigation-compose.md.html). diff --git a/docs/checks/ComposableLambdaParameterNaming.md.html b/docs/checks/ComposableLambdaParameterNaming.md.html index 7c9466f2..d69b1d09 100644 --- a/docs/checks/ComposableLambdaParameterNaming.md.html +++ b/docs/checks/ComposableLambdaParameterNaming.md.html @@ -55,7 +55,7 @@ parameter should be named content [ComposableLambdaParameterNaming] fun Button(foo: Int, text: @Composable () -> Unit) { ---- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -69,7 +69,7 @@ fun Button(foo: Int, text: @Composable () -> Unit) { } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ComposableLambdaParameterDetectorTest.kt) @@ -88,17 +88,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime-android:1.9.0-alpha01") +implementation("androidx.compose.runtime:runtime-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.runtime:runtime-android:1.9.0-alpha01' +implementation 'androidx.compose.runtime:runtime-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.runtime.android) # libs.versions.toml [versions] -runtime-android = "1.9.0-alpha01" +runtime-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -110,11 +110,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.runtime:runtime-lint:1.9.0-alpha01`. +You can also use `androidx.compose.runtime:runtime-lint:1.11.0-alpha06`. [Additional details about androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html). diff --git a/docs/checks/ComposableLambdaParameterPosition.md.html b/docs/checks/ComposableLambdaParameterPosition.md.html index 67dda703..3686b8c7 100644 --- a/docs/checks/ComposableLambdaParameterPosition.md.html +++ b/docs/checks/ComposableLambdaParameterPosition.md.html @@ -54,7 +54,7 @@ lambda [ComposableLambdaParameterPosition] fun Button(content: @Composable () -> Unit, foo: Int) { ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -68,7 +68,7 @@ fun Button(content: @Composable () -> Unit, foo: Int) { } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ComposableLambdaParameterDetectorTest.kt) @@ -87,17 +87,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime-android:1.9.0-alpha01") +implementation("androidx.compose.runtime:runtime-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.runtime:runtime-android:1.9.0-alpha01' +implementation 'androidx.compose.runtime:runtime-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.runtime.android) # libs.versions.toml [versions] -runtime-android = "1.9.0-alpha01" +runtime-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -109,11 +109,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.runtime:runtime-lint:1.9.0-alpha01`. +You can also use `androidx.compose.runtime:runtime-lint:1.11.0-alpha06`. [Additional details about androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html). diff --git a/docs/checks/ComposableNaming.md.html b/docs/checks/ComposableNaming.md.html index be81428a..9919a4a5 100644 --- a/docs/checks/ComposableNaming.md.html +++ b/docs/checks/ComposableNaming.md.html @@ -56,7 +56,7 @@ [ComposableNaming] fun button() {} ------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -68,7 +68,7 @@ @Composable fun button() {} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ComposableNamingDetectorTest.kt) @@ -87,17 +87,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime-android:1.9.0-alpha01") +implementation("androidx.compose.runtime:runtime-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.runtime:runtime-android:1.9.0-alpha01' +implementation 'androidx.compose.runtime:runtime-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.runtime.android) # libs.versions.toml [versions] -runtime-android = "1.9.0-alpha01" +runtime-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -109,11 +109,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.runtime:runtime-lint:1.9.0-alpha01`. +You can also use `androidx.compose.runtime:runtime-lint:1.11.0-alpha06`. [Additional details about androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html). diff --git a/docs/checks/ComposableNavGraphInComposeScope.md.html b/docs/checks/ComposableNavGraphInComposeScope.md.html index 4e405014..88ece6f5 100644 --- a/docs/checks/ComposableNavGraphInComposeScope.md.html +++ b/docs/checks/ComposableNavGraphInComposeScope.md.html @@ -48,7 +48,7 @@ scope [ComposableNavGraphInComposeScope] navigation("wrong") { } ---------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -70,7 +70,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/ComposableDestinationInComposeScopeDetectorTest.kt) @@ -89,17 +89,17 @@ ``` // build.gradle.kts -implementation("androidx.navigation:navigation-compose:2.9.0-rc01") +implementation("androidx.navigation:navigation-compose:2.9.7") // build.gradle -implementation 'androidx.navigation:navigation-compose:2.9.0-rc01' +implementation 'androidx.navigation:navigation-compose:2.9.7' // build.gradle.kts with version catalogs: implementation(libs.navigation.compose) # libs.versions.toml [versions] -navigation-compose = "2.9.0-rc01" +navigation-compose = "2.9.7" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -111,7 +111,7 @@ } ``` -2.9.0-rc01 is the version this documentation was generated from; +2.9.7 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.navigation:navigation-compose](androidx_navigation_navigation-compose.md.html). diff --git a/docs/checks/ComposeCompositionLocalGetter.md.html b/docs/checks/ComposeCompositionLocalGetter.md.html index 826b7afc..d40efa7e 100644 --- a/docs/checks/ComposeCompositionLocalGetter.md.html +++ b/docs/checks/ComposeCompositionLocalGetter.md.html @@ -60,7 +60,7 @@ <option name="allowed-composition-locals" value="some string" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (##) Example @@ -76,7 +76,7 @@ [ComposeCompositionLocalGetter] val LocalPotato get() { --- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -86,7 +86,7 @@ val LocalPotato get() { return compositionLocalOf { "Prune" } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/compose-lints/tree/main/compose-lint-checks/src/test/java/slack/lint/compose/CompositionLocalUsageDetectorTest.kt) diff --git a/docs/checks/ComposeCompositionLocalUsage.md.html b/docs/checks/ComposeCompositionLocalUsage.md.html index 931c81a0..c0a48ae9 100644 --- a/docs/checks/ComposeCompositionLocalUsage.md.html +++ b/docs/checks/ComposeCompositionLocalUsage.md.html @@ -62,7 +62,7 @@ <option name="allowed-composition-locals" value="some string" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (##) Example @@ -92,7 +92,7 @@ more information. [ComposeCompositionLocalUsage] private val LocalKiwi: String = compositionLocalOf { "Kiwi" } ------------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -102,7 +102,7 @@ internal val LocalPlum: String = staticCompositionLocalOf { "Plum" } val LocalPrune = compositionLocalOf { "Prune" } private val LocalKiwi: String = compositionLocalOf { "Kiwi" } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/compose-lints/tree/main/compose-lint-checks/src/test/java/slack/lint/compose/CompositionLocalUsageDetectorTest.kt) diff --git a/docs/checks/ComposeContentEmitterReturningValues.md.html b/docs/checks/ComposeContentEmitterReturningValues.md.html index ba05633f..ee120859 100644 --- a/docs/checks/ComposeContentEmitterReturningValues.md.html +++ b/docs/checks/ComposeContentEmitterReturningValues.md.html @@ -65,56 +65,77 @@ <option name="content-emitters" value="some string" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (##) Example Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/test.kt:3:Error: Composable functions should either emit content -into the composition or return a value, but not both.If a composable +src/test.kt:9:Error: Composable functions should either emit content +into the composition or return a value, but not both. If a composable should offer additional control surfaces to its caller, those control surfaces or callbacks should be provided as parameters to the composable -function by the caller.See +function by the caller. See https://slackhq.github.io/compose-lints/rules/#do-not-emit-content-and-return-a-result for more information. [ComposeContentEmitterReturningValues] -@Composable -^ -src/test.kt:8:Error: Composable functions should either emit content -into the composition or return a value, but not both.If a composable +fun Something2(): String { + ---------- +src/test.kt:22:Error: Composable functions should either emit content +into the composition or return a value, but not both. If a composable should offer additional control surfaces to its caller, those control surfaces or callbacks should be provided as parameters to the composable -function by the caller.See +function by the caller. See https://slackhq.github.io/compose-lints/rules/#do-not-emit-content-and-return-a-result for more information. [ComposeContentEmitterReturningValues] -@Composable -^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +fun Something5(): String { + ---------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: `src/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers import androidx.compose.runtime.Composable +import androidx.compose.ui.Text @Composable -fun Something() { - Text("Hi") - Text("Hola") +fun Something1() { + Something2() } @Composable -fun Something() { - Spacer16() +fun Something2(): String { Text("Hola") + Something3() +} +@Composable +fun Something3() { + Potato() +} +@Composable +fun Something4() { + Banana() +} +@Composable +fun Something5(): String { + Something3() + Something4() +} +@Composable +fun Potato() { + Text("Potato") +} +@Composable +fun Banana() { + Text("Banana") } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/compose-lints/tree/main/compose-lint-checks/src/test/java/slack/lint/compose/ContentEmitterReturningValuesDetectorTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test -found for this lint check, `ContentEmitterReturningValuesDetector.errors when a Composable function has more than one UI emitter at the top level`. +found for this lint check, `ContentEmitterReturningValuesDetector.errors when a Composable function has more than one indirect UI emitter at the top level`. To report a problem with this extracted sample, visit https://github.com/slackhq/compose-lints/issues. diff --git a/docs/checks/ComposeM2Api.md.html b/docs/checks/ComposeM2Api.md.html index 217ad926..feda884e 100644 --- a/docs/checks/ComposeM2Api.md.html +++ b/docs/checks/ComposeM2Api.md.html @@ -63,7 +63,7 @@ <option name="allowed-m2-apis" value="some string" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (###) enable-mangling-workaround @@ -80,7 +80,7 @@ <option name="enable-mangling-workaround" value="false" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (##) Example @@ -110,7 +110,7 @@ information. [ComposeM2Api] val drawerValue = BottomDrawerValue.Closed ------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -143,7 +143,7 @@ val drawerValue = BottomDrawerValue.Closed } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/compose-lints/tree/main/compose-lint-checks/src/test/java/slack/lint/compose/M2ApiDetectorTest.kt) diff --git a/docs/checks/ComposeModifierComposed.md.html b/docs/checks/ComposeModifierComposed.md.html index b5ab8e41..1a602cc8 100644 --- a/docs/checks/ComposeModifierComposed.md.html +++ b/docs/checks/ComposeModifierComposed.md.html @@ -71,7 +71,7 @@ for more information. [ComposeModifierComposed] fun Modifier.something2() = composed { } ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -85,7 +85,7 @@ ): Modifier { TODO() } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -97,7 +97,7 @@ fun Modifier.something1() = Modifier.composed { } fun Modifier.something2() = composed { } fun Modifier.something3() = somethingElse() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/compose-lints/tree/main/compose-lint-checks/src/test/java/slack/lint/compose/ModifierComposedDetectorTest.kt) diff --git a/docs/checks/ComposeModifierMissing.md.html b/docs/checks/ComposeModifierMissing.md.html index 85b47e92..b1fb5ee8 100644 --- a/docs/checks/ComposeModifierMissing.md.html +++ b/docs/checks/ComposeModifierMissing.md.html @@ -62,7 +62,7 @@ <option name="content-emitters" value="some string" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (###) visibility-threshold @@ -79,7 +79,7 @@ <option name="visibility-threshold" value=""only_public"" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (##) Example @@ -103,7 +103,7 @@ for more information. [ComposeModifierMissing] fun Something3(): Unit { ---------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -135,7 +135,7 @@ Text("Hi!") } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/compose-lints/tree/main/compose-lint-checks/src/test/java/slack/lint/compose/ModifierMissingDetectorTest.kt) diff --git a/docs/checks/ComposeModifierReused.md.html b/docs/checks/ComposeModifierReused.md.html index 0ddce124..4541592a 100644 --- a/docs/checks/ComposeModifierReused.md.html +++ b/docs/checks/ComposeModifierReused.md.html @@ -64,7 +64,7 @@ <option name="content-emitters" value="some string" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (##) Example @@ -169,7 +169,7 @@ more information. [ComposeModifierReused] Box( ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -219,7 +219,7 @@ ) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/compose-lints/tree/main/compose-lint-checks/src/test/java/slack/lint/compose/ModifierReusedDetectorTest.kt) diff --git a/docs/checks/ComposeModifierWithoutDefault.md.html b/docs/checks/ComposeModifierWithoutDefault.md.html index dfadcba6..a180f8e3 100644 --- a/docs/checks/ComposeModifierWithoutDefault.md.html +++ b/docs/checks/ComposeModifierWithoutDefault.md.html @@ -32,61 +32,14 @@ : Kotlin and Java files and test sources Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/slackhq/compose-lints/tree/main/compose-lint-checks/src/main/java/slack/lint/compose/ModifierWithoutDefaultDetector.kt) Tests -: [Source Code](https://github.com/slackhq/compose-lints/tree/main/compose-lint-checks/src/test/java/slack/lint/compose/ModifierWithoutDefaultDetectorTest.kt) -Copyright Year -: 2023 +: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/LintIssueDocGeneratorTest.kt) This @Composable function has a modifier parameter but it doesn't have a default value.See https://slackhq.github.io/compose-lints/rules/#modifiers-should-have-default-parameters for more information. -!!! Tip - This lint check has an associated quickfix available in the IDE. - -(##) Example - -Here is an example of lint warnings produced by this check: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/test.kt:5:Error: This @Composable function has a modifier parameter -but it doesn't have a default value.See -https://slackhq.github.io/compose-lints/rules/#modifiers-should-have-default-parameters -for more information. [ComposeModifierWithoutDefault] -fun Something(modifier: Modifier) { } - ------------------ -src/test.kt:7:Error: This @Composable function has a modifier parameter -but it doesn't have a default value.See -https://slackhq.github.io/compose-lints/rules/#modifiers-should-have-default-parameters -for more information. [ComposeModifierWithoutDefault] -fun Something(modifier: Modifier = Modifier, modifier2: Modifier) { } - ------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`src/test.kt`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers -import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier - -@Composable -fun Something(modifier: Modifier) { } -@Composable -fun Something(modifier: Modifier = Modifier, modifier2: Modifier) { } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can also visit the -[source code](https://github.com/slackhq/compose-lints/tree/main/compose-lint-checks/src/test/java/slack/lint/compose/ModifierWithoutDefaultDetectorTest.kt) -for the unit tests for this check to see additional scenarios. - -The above example was automatically extracted from the first unit test -found for this lint check, `ModifierWithoutDefaultDetector.errors when a Composable has modifiers but without default values`. -To report a problem with this extracted sample, visit -https://github.com/slackhq/compose-lints/issues. - (##) Including !!! diff --git a/docs/checks/ComposeMultipleContentEmitters.md.html b/docs/checks/ComposeMultipleContentEmitters.md.html index bdeb1562..c2f1f447 100644 --- a/docs/checks/ComposeMultipleContentEmitters.md.html +++ b/docs/checks/ComposeMultipleContentEmitters.md.html @@ -64,7 +64,7 @@ <option name="content-emitters" value="some string" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (##) Example @@ -84,7 +84,7 @@ for more information. [ComposeMultipleContentEmitters] @Composable ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -102,7 +102,7 @@ Spacer16() Text("Hola") } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/compose-lints/tree/main/compose-lint-checks/src/test/java/slack/lint/compose/MultipleContentEmittersDetectorTest.kt) diff --git a/docs/checks/ComposeMutableParameters.md.html b/docs/checks/ComposeMutableParameters.md.html index 5eddecb9..9dbbc6a4 100644 --- a/docs/checks/ComposeMutableParameters.md.html +++ b/docs/checks/ComposeMutableParameters.md.html @@ -86,7 +86,7 @@ for more information. [ComposeMutableParameters] fun Something(a: MutableMap<String, String>) {} -------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -103,7 +103,7 @@ fun Something(a: HashSet) {} @Composable fun Something(a: MutableMap) {} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/compose-lints/tree/main/compose-lint-checks/src/test/java/slack/lint/compose/MutableParametersDetectorTest.kt) diff --git a/docs/checks/ComposeNamingLowercase.md.html b/docs/checks/ComposeNamingLowercase.md.html index d22bb2c3..0b80719c 100644 --- a/docs/checks/ComposeNamingLowercase.md.html +++ b/docs/checks/ComposeNamingLowercase.md.html @@ -64,7 +64,7 @@ <option name="allowed-composable-function-names" value="some string" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (##) Example @@ -79,7 +79,7 @@ for more information. [ComposeNamingLowercase] fun MyComposable(): Something { } ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -89,7 +89,7 @@ @Composable fun MyComposable(): Something { } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/compose-lints/tree/main/compose-lint-checks/src/test/java/slack/lint/compose/ComposableFunctionNamingDetectorTest.kt) diff --git a/docs/checks/ComposeNamingUppercase.md.html b/docs/checks/ComposeNamingUppercase.md.html index a480bcd7..a7204410 100644 --- a/docs/checks/ComposeNamingUppercase.md.html +++ b/docs/checks/ComposeNamingUppercase.md.html @@ -64,7 +64,7 @@ <option name="allowed-composable-function-names" value="some string" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (##) Example @@ -86,7 +86,7 @@ for more information. [ComposeNamingUppercase] fun myComposable(): Unit { } ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -99,7 +99,7 @@ @Composable fun myComposable(): Unit { } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/compose-lints/tree/main/compose-lint-checks/src/test/java/slack/lint/compose/ComposableFunctionNamingDetectorTest.kt) diff --git a/docs/checks/ComposeParameterOrder.md.html b/docs/checks/ComposeParameterOrder.md.html index 13f0543d..185d232d 100644 --- a/docs/checks/ComposeParameterOrder.md.html +++ b/docs/checks/ComposeParameterOrder.md.html @@ -109,7 +109,19 @@ for more information. [ComposeParameterOrder] fun MyComposable(text1: String, m2: Modifier = Modifier, modifier: Modifier = Modifier, trailing: () -> Unit) { } --------------------------------------------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src/test.kt:20:Error: Parameters in a composable function should be +ordered following this pattern: params without defaults, modifiers, +params with defaults and optionally, a trailing function that might not +have a default param. +Current params are: [text: String = "123", modifier: Modifier = +Modifier, lambda: () -> Unit] but should be [modifier: Modifier = +Modifier, text: String = "123", lambda: () -> Unit]. +See +https://slackhq.github.io/compose-lints/rules/#ordering-composable-parameters-properly +for more information. [ComposeParameterOrder] +inline fun <reified T> MyComposable(text: String = "123", modifier: Modifier = Modifier, lambda: () -> Unit) : T { } + ------------------------------------------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -132,7 +144,10 @@ @Composable fun MyComposable(text1: String, m2: Modifier = Modifier, modifier: Modifier = Modifier, trailing: () -> Unit) { } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +@Composable +inline fun MyComposable(text: String = "123", modifier: Modifier = Modifier, lambda: () -> Unit) : T { } +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/compose-lints/tree/main/compose-lint-checks/src/test/java/slack/lint/compose/ParameterOrderDetectorTest.kt) diff --git a/docs/checks/ComposePreviewNaming.md.html b/docs/checks/ComposePreviewNaming.md.html index ca95961b..5d120a4c 100644 --- a/docs/checks/ComposePreviewNaming.md.html +++ b/docs/checks/ComposePreviewNaming.md.html @@ -66,7 +66,7 @@ for more information. [ComposePreviewNaming] @BananaPreviews ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -80,7 +80,7 @@ annotation class BananaPreviews @BananaPreviews annotation class WithBananaPreviews -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/compose-lints/tree/main/compose-lint-checks/src/test/java/slack/lint/compose/PreviewNamingDetectorTest.kt) diff --git a/docs/checks/ComposePreviewPublic.md.html b/docs/checks/ComposePreviewPublic.md.html index 652e1c9c..cf3c4d9d 100644 --- a/docs/checks/ComposePreviewPublic.md.html +++ b/docs/checks/ComposePreviewPublic.md.html @@ -63,7 +63,7 @@ for more information. [ComposePreviewPublic] @CombinedPreviews ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -77,7 +77,7 @@ class User class UserProvider : PreviewParameterProvider -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -90,7 +90,7 @@ @CombinedPreviews @Composable fun MyComposable() { } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/compose-lints/tree/main/compose-lint-checks/src/test/java/slack/lint/compose/PreviewPublicDetectorTest.kt) diff --git a/docs/checks/ComposeRememberMissing.md.html b/docs/checks/ComposeRememberMissing.md.html index 2cf0d849..7172be54 100644 --- a/docs/checks/ComposeRememberMissing.md.html +++ b/docs/checks/ComposeRememberMissing.md.html @@ -63,7 +63,7 @@ for more information. [ComposeRememberMissing] fun MyComposable(something: State<String> = mutableStateOf("X")) { ------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -80,7 +80,7 @@ @Composable fun MyComposable(something: State = mutableStateOf("X")) { } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/compose-lints/tree/main/compose-lint-checks/src/test/java/slack/lint/compose/RememberMissingDetectorTest.kt) diff --git a/docs/checks/ComposeUnstableCollections.md.html b/docs/checks/ComposeUnstableCollections.md.html index 53cd766b..0a8804ac 100644 --- a/docs/checks/ComposeUnstableCollections.md.html +++ b/docs/checks/ComposeUnstableCollections.md.html @@ -89,7 +89,7 @@ for more information. [ComposeUnstableCollections] fun Something(a: Map<String, Int>) {} ---------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -105,7 +105,7 @@ fun Something(a: Set) {} @Composable fun Something(a: Map) {} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/compose-lints/tree/main/compose-lint-checks/src/test/java/slack/lint/compose/UnstableCollectionsDetectorTest.kt) diff --git a/docs/checks/ComposeUnstableReceiver.md.html b/docs/checks/ComposeUnstableReceiver.md.html index ec2ea845..d6753000 100644 --- a/docs/checks/ComposeUnstableReceiver.md.html +++ b/docs/checks/ComposeUnstableReceiver.md.html @@ -70,28 +70,21 @@ for more information. [ComposeUnstableReceiver] fun Example.OtherContent() {} ------- -src/ExampleInterface.kt:15:Warning: Instance composable functions on +src/ExampleInterface.kt:16:Warning: Instance composable functions on non-stable classes will always be recomposed. If possible, make the receiver type stable or refactor this function if that isn't possible. See https://slackhq.github.io/compose-lints/rules/#unstable-receivers for more information. [ComposeUnstableReceiver] -val Example.OtherContentProperty get() {} - ------- -src/ExampleInterface.kt:19:Warning: Instance composable functions on -non-stable classes will always be recomposed. If possible, make the -receiver type stable or refactor this function if that isn't possible. -See https://slackhq.github.io/compose-lints/rules/#unstable-receivers -for more information. [ComposeUnstableReceiver] - @Composable fun present(): T + @Composable fun present() ------- -src/ExampleInterface.kt:23:Warning: Instance composable functions on +src/ExampleInterface.kt:20:Warning: Instance composable functions on non-stable classes will always be recomposed. If possible, make the receiver type stable or refactor this function if that isn't possible. See https://slackhq.github.io/compose-lints/rules/#unstable-receivers for more information. [ComposeUnstableReceiver] - @Composable override fun present(): String { return "hi" } + @Composable override fun present() { println("hi") } ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -110,18 +103,15 @@ @Composable fun Example.OtherContent() {} -@get:Composable -val Example.OtherContentProperty get() {} - // Supertypes -interface Presenter { - @Composable fun present(): T +interface Presenter { + @Composable fun present() } -class HomePresenter : Presenter { - @Composable override fun present(): String { return "hi" } +class HomePresenter : Presenter { + @Composable override fun present() { println("hi") } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/compose-lints/tree/main/compose-lint-checks/src/test/java/slack/lint/compose/UnstableReceiverDetectorTest.kt) diff --git a/docs/checks/ComposeViewModelForwarding.md.html b/docs/checks/ComposeViewModelForwarding.md.html index 0d416b33..e1d2e81d 100644 --- a/docs/checks/ComposeViewModelForwarding.md.html +++ b/docs/checks/ComposeViewModelForwarding.md.html @@ -55,7 +55,7 @@ more information. [ComposeViewModelForwarding] AnotherComposable(viewModel) ---------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -69,7 +69,7 @@ fun MyComposable(viewModel: MyViewModel) { AnotherComposable(viewModel) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/compose-lints/tree/main/compose-lint-checks/src/test/java/slack/lint/compose/ViewModelForwardingDetectorTest.kt) diff --git a/docs/checks/ComposeViewModelInjection.md.html b/docs/checks/ComposeViewModelInjection.md.html index 86b2a058..cd75695b 100644 --- a/docs/checks/ComposeViewModelInjection.md.html +++ b/docs/checks/ComposeViewModelInjection.md.html @@ -59,7 +59,7 @@ <option name="viewmodel-factories" value="some string" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (##) Example @@ -89,7 +89,7 @@ information. [ComposeViewModelInjection] val viewModel: MyVM = () ------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -112,7 +112,7 @@ fun MyComposableTrailingLambda(block: () -> Unit) { val viewModel: MyVM = () } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/compose-lints/tree/main/compose-lint-checks/src/test/java/slack/lint/compose/ViewModelInjectionDetectorTest.kt) diff --git a/docs/checks/CompositionLocalNaming.md.html b/docs/checks/CompositionLocalNaming.md.html index d2b3eb17..3a6dd4f0 100644 --- a/docs/checks/CompositionLocalNaming.md.html +++ b/docs/checks/CompositionLocalNaming.md.html @@ -61,7 +61,7 @@ properties should be prefixed with Local [CompositionLocalNaming] val BazCompositionLocal: ProvidableCompositionLocal<Int> = ------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -85,7 +85,7 @@ compositionLocalOf() } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/CompositionLocalNamingDetectorTest.kt) @@ -104,17 +104,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime-android:1.9.0-alpha01") +implementation("androidx.compose.runtime:runtime-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.runtime:runtime-android:1.9.0-alpha01' +implementation 'androidx.compose.runtime:runtime-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.runtime.android) # libs.versions.toml [versions] -runtime-android = "1.9.0-alpha01" +runtime-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -126,11 +126,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.runtime:runtime-lint:1.9.0-alpha01`. +You can also use `androidx.compose.runtime:runtime-lint:1.11.0-alpha06`. [Additional details about androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html). diff --git a/docs/checks/ConfigurationScreenWidthHeight.md.html b/docs/checks/ConfigurationScreenWidthHeight.md.html index d7a81a0c..b8b4e202 100644 --- a/docs/checks/ConfigurationScreenWidthHeight.md.html +++ b/docs/checks/ConfigurationScreenWidthHeight.md.html @@ -91,7 +91,7 @@ [ConfigurationScreenWidthHeight] val height = configuration.screenHeightDp.dp ---------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -126,7 +126,7 @@ val width = configuration.screenWidthDp.dp val height = configuration.screenHeightDp.dp } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/ConfigurationScreenWidthHeightDetectorTest.kt) @@ -145,17 +145,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui-android:1.9.0-alpha01") +implementation("androidx.compose.ui:ui-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.ui:ui-android:1.9.0-alpha01' +implementation 'androidx.compose.ui:ui-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.ui.android) # libs.versions.toml [versions] -ui-android = "1.9.0-alpha01" +ui-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -167,11 +167,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.ui:ui-lint:1.9.0-alpha01`. +You can also use `androidx.compose.ui:ui-lint:1.11.0-alpha06`. [Additional details about androidx.compose.ui:ui-android](androidx_compose_ui_ui-android.md.html). diff --git a/docs/checks/ConflictingOnColor.md.html b/docs/checks/ConflictingOnColor.md.html index ebd284c1..89005b7a 100644 --- a/docs/checks/ConflictingOnColor.md.html +++ b/docs/checks/ConflictingOnColor.md.html @@ -100,7 +100,7 @@ color for a given background [ConflictingOnColor] yellow500, --------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -162,7 +162,7 @@ yellow500, false ) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/material/material-lint/src/test/java/androidx/compose/material/lint/ColorsDetectorTest.kt) @@ -181,17 +181,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.material:material-android:1.9.0-alpha01") +implementation("androidx.compose.material:material-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.material:material-android:1.9.0-alpha01' +implementation 'androidx.compose.material:material-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.material.android) # libs.versions.toml [versions] -material-android = "1.9.0-alpha01" +material-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -203,11 +203,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.material:material-lint:1.9.0-alpha01`. +You can also use `androidx.compose.material:material-lint:1.11.0-alpha06`. [Additional details about androidx.compose.material:material-android](androidx_compose_material_material-android.md.html). diff --git a/docs/checks/ConstantContentStateKeyInItemsCall.md.html b/docs/checks/ConstantContentStateKeyInItemsCall.md.html index 146ebb73..2fc7dd81 100644 --- a/docs/checks/ConstantContentStateKeyInItemsCall.md.html +++ b/docs/checks/ConstantContentStateKeyInItemsCall.md.html @@ -103,7 +103,7 @@ to the key. [ConstantContentStateKeyInItemsCall] state = rememberSharedContentState(0), ----------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -203,7 +203,7 @@ fun MyLayoutComposable(modifier: Modifier = Modifier) { // Do Nothing } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/animation/animation-lint/src/test/java/androidx/compose/animation/lint/SharedTransitionScopeDetectorTest.kt) @@ -222,17 +222,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.animation:animation-android:1.9.0-alpha01") +implementation("androidx.compose.animation:animation-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.animation:animation-android:1.9.0-alpha01' +implementation 'androidx.compose.animation:animation-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.animation.android) # libs.versions.toml [versions] -animation-android = "1.9.0-alpha01" +animation-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -244,11 +244,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.animation:animation-lint:1.9.0-alpha01`. +You can also use `androidx.compose.animation:animation-lint:1.11.0-alpha06`. [Additional details about androidx.compose.animation:animation-android](androidx_compose_animation_animation-android.md.html). diff --git a/docs/checks/ConstantLocale.md.html b/docs/checks/ConstantLocale.md.html index 4a791888..c52df886 100644 --- a/docs/checks/ConstantLocale.md.html +++ b/docs/checks/ConstantLocale.md.html @@ -42,7 +42,7 @@ running [ConstantLocale] static final Locale errorLocale = Locale.getDefault(); ------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -62,7 +62,7 @@ } static final Locale errorLocale = Locale.getDefault(); } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/TestLocaleKotlin.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -86,7 +86,7 @@ okLocale5 = Locale.getDefault() } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MainActivity.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -113,7 +113,7 @@ Log.d("AppLog", "safe:" + SAFE_DESCRIPTION_DATE_FORMAT.format(today)) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/LocaleDetectorTest.kt) diff --git a/docs/checks/ConstraintLayoutToolsEditorAttribute.md.html b/docs/checks/ConstraintLayoutToolsEditorAttribute.md.html index f53d0059..4e613aba 100644 --- a/docs/checks/ConstraintLayoutToolsEditorAttribute.md.html +++ b/docs/checks/ConstraintLayoutToolsEditorAttribute.md.html @@ -50,7 +50,7 @@ [ConstraintLayoutToolsEditorAttribute] tools:layout_editor_absoluteX="4dp"/> ----------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -59,7 +59,7 @@ <TextView xmlns:tools="http://schemas.android.com/tools" tools:layout_editor_absoluteX="4dp"/> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/ConstraintLayoutToolsEditorAttributeDetectorTest.kt) diff --git a/docs/checks/ContentDescription.md.html b/docs/checks/ContentDescription.md.html index 015c158b..4f47b23b 100644 --- a/docs/checks/ContentDescription.md.html +++ b/docs/checks/ContentDescription.md.html @@ -81,7 +81,7 @@ attribute on image [ContentDescription] <ImageButton android:id="@+id/summary3" android:contentDescription="TODO" /> --------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -102,10 +102,11 @@ <ImageButton android:id="@+id/summary2" android:contentDescription="" /> <ImageButton android:id="@+id/summary3" android:contentDescription="TODO" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AccessibilityDetectorTest.java) +You can also visit the source code ([AccessibilityDetectorTest.java](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AccessibilityDetectorTest.java) +[MainTest.java](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/MainTest.java) +[LintBaselineTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/client/api/LintBaselineTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/ContextCastToActivity.md.html b/docs/checks/ContextCastToActivity.md.html index 523d3bdd..879e14b5 100644 --- a/docs/checks/ContextCastToActivity.md.html +++ b/docs/checks/ContextCastToActivity.md.html @@ -58,7 +58,7 @@ to Activity, use LocalActivity instead [ContextCastToActivity] val activity3 = LocalContext.current as? MyActivity ----------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -78,7 +78,7 @@ val activity2 = LocalContext.current as? Activity val activity3 = LocalContext.current as? MyActivity } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/activity/activity-compose-lint/src/test/java/androidx/activity/compose/lint/LocalContextCastIssueDetectorTest.kt) @@ -97,17 +97,17 @@ ``` // build.gradle.kts -implementation("androidx.activity:activity-compose:1.11.0-rc01") +implementation("androidx.activity:activity-compose:1.13.0-rc01") // build.gradle -implementation 'androidx.activity:activity-compose:1.11.0-rc01' +implementation 'androidx.activity:activity-compose:1.13.0-rc01' // build.gradle.kts with version catalogs: implementation(libs.activity.compose) # libs.versions.toml [versions] -activity-compose = "1.11.0-rc01" +activity-compose = "1.13.0-rc01" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -119,7 +119,7 @@ } ``` -1.11.0-rc01 is the version this documentation was generated from; +1.13.0-rc01 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.activity:activity-compose](androidx_activity_activity-compose.md.html). diff --git a/docs/checks/CoreLibDesugaringV1.md.html b/docs/checks/CoreLibDesugaringV1.md.html index 36d97929..b7d6e063 100644 --- a/docs/checks/CoreLibDesugaringV1.md.html +++ b/docs/checks/CoreLibDesugaringV1.md.html @@ -45,7 +45,7 @@ version 2.1.4 [CoreLibDesugaringV1] coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.2.3") // ERROR ------------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -61,7 +61,7 @@ coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.4") // OK coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.2.3") // ERROR } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/CoroutineCreationDuringComposition.md.html b/docs/checks/CoroutineCreationDuringComposition.md.html index 79349e41..0dd2fba3 100644 --- a/docs/checks/CoroutineCreationDuringComposition.md.html +++ b/docs/checks/CoroutineCreationDuringComposition.md.html @@ -157,7 +157,7 @@ [CoroutineCreationDuringComposition] flowOf(Unit).launchIn(CoroutineScope) -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -218,7 +218,7 @@ flowOf(Unit).launchIn(CoroutineScope) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ComposableCoroutineCreationDetectorTest.kt) @@ -237,17 +237,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime-android:1.9.0-alpha01") +implementation("androidx.compose.runtime:runtime-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.runtime:runtime-android:1.9.0-alpha01' +implementation 'androidx.compose.runtime:runtime-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.runtime.android) # libs.versions.toml [versions] -runtime-android = "1.9.0-alpha01" +runtime-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -259,11 +259,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.runtime:runtime-lint:1.9.0-alpha01`. +You can also use `androidx.compose.runtime:runtime-lint:1.11.0-alpha06`. [Additional details about androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html). diff --git a/docs/checks/CredManMissingDal.md.html b/docs/checks/CredManMissingDal.md.html index 0563b165..70745cb8 100644 --- a/docs/checks/CredManMissingDal.md.html +++ b/docs/checks/CredManMissingDal.md.html @@ -44,7 +44,7 @@ statements for Credential Manager [CredManMissingDal] <application> ----------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -61,7 +61,7 @@ </activity> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/com/example/app/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -72,7 +72,7 @@ fun foo() { val createPasswordRequest = CreatePasswordRequest("user", "pass") } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/CredentialManagerDigitalAssetLinkDetectorTest.kt) diff --git a/docs/checks/CredentialDependency.md.html b/docs/checks/CredentialDependency.md.html index b14224c3..5e331308 100644 --- a/docs/checks/CredentialDependency.md.html +++ b/docs/checks/CredentialDependency.md.html @@ -42,7 +42,7 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -51,7 +51,7 @@ dependencies { implementation 'androidx.credentials:credentials:+' } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/CredentialManagerDependencyDetectorTest.kt) diff --git a/docs/checks/CredentialManagerMisuse.md.html b/docs/checks/CredentialManagerMisuse.md.html index f74af78c..b15bd91f 100644 --- a/docs/checks/CredentialManagerMisuse.md.html +++ b/docs/checks/CredentialManagerMisuse.md.html @@ -59,7 +59,7 @@ [CredentialManagerMisuse] credentialManager.getCredentialAsync(context, prepareGetCredentialResponse.pendingGetCredentialHandle!!, cancellationSignal, executor, callback) ------------------------------------------------------------------------------------------------------------------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -103,7 +103,7 @@ TODO() } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/CredentialManagerMisuseDetectorTest.kt) diff --git a/docs/checks/CredentialManagerSignInWithGoogle.md.html b/docs/checks/CredentialManagerSignInWithGoogle.md.html index 3fd01180..f9bd0bf9 100644 --- a/docs/checks/CredentialManagerSignInWithGoogle.md.html +++ b/docs/checks/CredentialManagerSignInWithGoogle.md.html @@ -47,7 +47,7 @@ [CredentialManagerSignInWithGoogle] val googleIdOption = GetGoogleIdOption.Builder().build() ----------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -75,7 +75,7 @@ fun bar() { TODO() } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/CredentialManagerSignInWithGoogleDetectorTest.kt) diff --git a/docs/checks/CustomPermissionTypo.md.html b/docs/checks/CustomPermissionTypo.md.html index a9f1dff2..bedeabbe 100644 --- a/docs/checks/CustomPermissionTypo.md.html +++ b/docs/checks/CustomPermissionTypo.md.html @@ -45,13 +45,13 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text AndroidManifest.xml:9:Warning: Did you mean my.custom.permission.FOOBAR? [CustomPermissionTypo] - <service android:permission="my.custom.permission.FOOBOB" /> - ------------------------------------------------------------ + <service android:name="service1" android:permission="my.custom.permission.FOOBOB" /> + ------------------------------------------------------------------------------------ AndroidManifest.xml:11:Warning: Did you mean my.custom.permission.BAZQUXX? [CustomPermissionTypo] - <activity android:permission="my.custom.permission.BAZQXX" /> - ------------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + <activity android:name="activity1" android:permission="my.custom.permission.BAZQXX" /> + -------------------------------------------------------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -65,14 +65,14 @@ <permission android:name="my.custom.permission.BAZQUXX" /> <permission android:name="my.custom.permission.BAZQUZZ" /> <application> - <service android:permission="my.custom.permission.FOOBOB" /> - <service android:permission="my.custom.permission.FOOBAB" /> - <activity android:permission="my.custom.permission.BAZQXX" /> - <activity android:permission="my.custom.permission.BAZQUZZ" /> - <activity android:permission="my.custom.permission.WAKE_LOCK" /> + <service android:name="service1" android:permission="my.custom.permission.FOOBOB" /> + <service android:name="service2" android:permission="my.custom.permission.FOOBAB" /> + <activity android:name="activity1" android:permission="my.custom.permission.BAZQXX" /> + <activity android:name="activity2" android:permission="my.custom.permission.BAZQUZZ" /> + <activity android:name="activity3" android:permission="my.custom.permission.WAKE_LOCK" /> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PermissionErrorDetectorTest.kt) diff --git a/docs/checks/CustomSplashScreen.md.html b/docs/checks/CustomSplashScreen.md.html index ec284d4d..841f53c0 100644 --- a/docs/checks/CustomSplashScreen.md.html +++ b/docs/checks/CustomSplashScreen.md.html @@ -45,7 +45,7 @@ provide its own launch screen [CustomSplashScreen] class SplashActivity : AppCompatActivity() { -------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -59,7 +59,7 @@ class SplashActivity : AppCompatActivity() { override fun onCreate(savedState: Bundle?) { } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/SplashScreenDetectorTest.kt) diff --git a/docs/checks/CustomViewStyleable.md.html b/docs/checks/CustomViewStyleable.md.html index 4d1fc2b5..41b1d0ab 100644 --- a/docs/checks/CustomViewStyleable.md.html +++ b/docs/checks/CustomViewStyleable.md.html @@ -25,9 +25,9 @@ Editing : This check runs on the fly in the IDE editor Implementation -: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/CustomViewDetector.java) +: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/CustomViewDetector.kt) Tests -: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/CustomViewDetectorTest.java) +: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/CustomViewDetectorTest.kt) The convention for custom views is to use a `declare-styleable` whose name matches the custom view class name. The IDE relies on this @@ -78,7 +78,7 @@ convention.) [CustomViewStyleable] context.obtainStyledAttributes(R.styleable.MyDeclareStyleable); // Wrong ------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -135,17 +135,12 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/CustomViewDetectorTest.java) +[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/CustomViewDetectorTest.kt) for the unit tests for this check to see additional scenarios. -The above example was automatically extracted from the first unit test -found for this lint check, `CustomViewDetector.test`. -To report a problem with this extracted sample, visit -https://issuetracker.google.com/issues/new?component=192708. - (##) Suppressing You can suppress false positives using one of the following mechanisms: diff --git a/docs/checks/CustomX509TrustManager.md.html b/docs/checks/CustomX509TrustManager.md.html index 805461b5..30bdce93 100644 --- a/docs/checks/CustomX509TrustManager.md.html +++ b/docs/checks/CustomX509TrustManager.md.html @@ -44,7 +44,7 @@ [CustomX509TrustManager] TrustManager[] trustAllCerts = new TrustManager[]{ new X509TrustManager() { ---------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -94,7 +94,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/X509TrustManagerDetectorTest.kt) diff --git a/docs/checks/CutPasteId.md.html b/docs/checks/CutPasteId.md.html index cc0547a8..c3974ff6 100644 --- a/docs/checks/CutPasteId.md.html +++ b/docs/checks/CutPasteId.md.html @@ -48,7 +48,7 @@ [CutPasteId] next = (Button) findViewById(R.id.previous); // TYPO, meant R.id.next --------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -66,15 +66,15 @@ next = (Button) findViewById(R.id.previous); // TYPO, meant R.id.next } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `test.pkg`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text linenumbers @id/next -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/CutPasteDetectorTest.java) +You can also visit the source code ([CutPasteDetectorTest.java](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/CutPasteDetectorTest.java) +[FullyQualifyNamesTestModeTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/infrastructure/FullyQualifyNamesTestModeTest.kt) for the unit tests for this check to see additional scenarios. (##) Suppressing diff --git a/docs/checks/DalvikOverride.md.html b/docs/checks/DalvikOverride.md.html index 035014cd..2c69f49b 100644 --- a/docs/checks/DalvikOverride.md.html +++ b/docs/checks/DalvikOverride.md.html @@ -54,7 +54,7 @@ unintentionally overriding method in pkg1.Class1 [DalvikOverride] void method() { // Flag this as an accidental override ------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -89,7 +89,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/pkg2/Class2.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -126,7 +126,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/OverrideDetectorTest.kt) diff --git a/docs/checks/DataBindingWithoutKapt.md.html b/docs/checks/DataBindingWithoutKapt.md.html index 452e0dec..5cfd83eb 100644 --- a/docs/checks/DataBindingWithoutKapt.md.html +++ b/docs/checks/DataBindingWithoutKapt.md.html @@ -43,7 +43,7 @@ [DataBindingWithoutKapt] enabled true ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -57,7 +57,7 @@ enabled true } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/DataExtractionRules.md.html b/docs/checks/DataExtractionRules.md.html index 0fa0ab95..2d1355d6 100644 --- a/docs/checks/DataExtractionRules.md.html +++ b/docs/checks/DataExtractionRules.md.html @@ -58,7 +58,7 @@ [DataExtractionRules] android:allowBackup="true" > ---- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -78,7 +78,7 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -111,8 +111,7 @@ <!-- Wallpaper --> <string name="wallpaper_instructions">Tap picture to set portrait wallpaper</string> </resources> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ManifestDetectorTest.kt) diff --git a/docs/checks/DeepLinkInActivityDestination.md.html b/docs/checks/DeepLinkInActivityDestination.md.html index dd797ed4..c5e1631e 100644 --- a/docs/checks/DeepLinkInActivityDestination.md.html +++ b/docs/checks/DeepLinkInActivityDestination.md.html @@ -58,7 +58,7 @@ instead. [DeepLinkInActivityDestination] <deepLink app:uri="www.example.com" /> -------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -83,7 +83,7 @@ </activity> </navigation> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/DeepLinkInActivityDestinationDetectorTest.kt) @@ -102,17 +102,17 @@ ``` // build.gradle.kts -implementation("androidx.navigation:navigation-runtime:2.9.0-rc01") +implementation("androidx.navigation:navigation-runtime:2.9.7") // build.gradle -implementation 'androidx.navigation:navigation-runtime:2.9.0-rc01' +implementation 'androidx.navigation:navigation-runtime:2.9.7' // build.gradle.kts with version catalogs: implementation(libs.navigation.runtime) # libs.versions.toml [versions] -navigation-runtime = "2.9.0-rc01" +navigation-runtime = "2.9.7" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -124,7 +124,7 @@ } ``` -2.9.0-rc01 is the version this documentation was generated from; +2.9.7 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.navigation:navigation-runtime](androidx_navigation_navigation-runtime.md.html). diff --git a/docs/checks/DefaultCleartextTraffic.md.html b/docs/checks/DefaultCleartextTraffic.md.html index 87c7c87b..2036fa2c 100644 --- a/docs/checks/DefaultCleartextTraffic.md.html +++ b/docs/checks/DefaultCleartextTraffic.md.html @@ -27,7 +27,7 @@ Artifact : [com.android.security.lint:lint](com_android_security_lint_lint.md.html) Since -: 1.0.1 +: 1.0.0 Affects : Manifest files Editing @@ -54,7 +54,7 @@ to opt out of these insecure connections. [DefaultCleartextTraffic] <application> ----------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -66,7 +66,7 @@ <activity android:name='com.example.MainActivity'></activity> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/MissingNetworkSecurityConfigDetectorTest.kt) @@ -86,17 +86,17 @@ ``` // build.gradle.kts -lintChecks("com.android.security.lint:lint:1.0.3") +lintChecks("com.android.security.lint:lint:1.0.4") // build.gradle -lintChecks 'com.android.security.lint:lint:1.0.3' +lintChecks 'com.android.security.lint:lint:1.0.4' // build.gradle.kts with version catalogs: lintChecks(libs.com.android.security.lint.lint) # libs.versions.toml [versions] -com-android-security-lint-lint = "1.0.3" +com-android-security-lint-lint = "1.0.4" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -108,7 +108,7 @@ } ``` -1.0.3 is the version this documentation was generated from; +1.0.4 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.android.security.lint:lint](com_android_security_lint_lint.md.html). diff --git a/docs/checks/DefaultEncoding.md.html b/docs/checks/DefaultEncoding.md.html index aef44ccd..91263cea 100644 --- a/docs/checks/DefaultEncoding.md.html +++ b/docs/checks/DefaultEncoding.md.html @@ -103,7 +103,7 @@ [DefaultEncoding] new String(bytes); // ERROR 8 ----------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -150,7 +150,7 @@ new String(bytes, 0, 5, "UTF-8"); // OK 11 } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/DefaultEncodingDetectorTest.kt) diff --git a/docs/checks/DefaultLayoutAttribute.md.html b/docs/checks/DefaultLayoutAttribute.md.html index 4631f903..808d9fa6 100644 --- a/docs/checks/DefaultLayoutAttribute.md.html +++ b/docs/checks/DefaultLayoutAttribute.md.html @@ -49,7 +49,7 @@ need to specify it [DefaultLayoutAttribute] android:textStyle="normal"/> ------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -60,7 +60,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:textStyle="normal"/> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/DefaultLayoutAttributeDetectorTest.kt) diff --git a/docs/checks/DefaultLocale.md.html b/docs/checks/DefaultLocale.md.html index 4420b36b..29acb2f7 100644 --- a/docs/checks/DefaultLocale.md.html +++ b/docs/checks/DefaultLocale.md.html @@ -99,7 +99,7 @@ instead [DefaultLocale] String.format("WRONG: %1$tm %1$te,%1$tY", ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -142,7 +142,7 @@ new SimpleDateFormat("yyyy-MM-dd", Locale.US); // OK } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/LocaleDetectorTest.kt) diff --git a/docs/checks/DefaultTrustedUserCerts.md.html b/docs/checks/DefaultTrustedUserCerts.md.html index ab0551b7..6ef83fbe 100644 --- a/docs/checks/DefaultTrustedUserCerts.md.html +++ b/docs/checks/DefaultTrustedUserCerts.md.html @@ -27,7 +27,7 @@ Artifact : [com.android.security.lint:lint](com_android_security_lint_lint.md.html) Since -: 1.0.1 +: 1.0.0 Affects : Manifest files Editing @@ -56,7 +56,7 @@ [DefaultTrustedUserCerts] <application> ----------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -68,7 +68,7 @@ <activity android:name='com.example.MainActivity'></activity> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/MissingNetworkSecurityConfigDetectorTest.kt) @@ -88,17 +88,17 @@ ``` // build.gradle.kts -lintChecks("com.android.security.lint:lint:1.0.3") +lintChecks("com.android.security.lint:lint:1.0.4") // build.gradle -lintChecks 'com.android.security.lint:lint:1.0.3' +lintChecks 'com.android.security.lint:lint:1.0.4' // build.gradle.kts with version catalogs: lintChecks(libs.com.android.security.lint.lint) # libs.versions.toml [versions] -com-android-security-lint-lint = "1.0.3" +com-android-security-lint-lint = "1.0.4" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -110,7 +110,7 @@ } ``` -1.0.3 is the version this documentation was generated from; +1.0.4 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.android.security.lint:lint](com_android_security_lint_lint.md.html). diff --git a/docs/checks/DefaultUncaughtExceptionDelegation.md.html b/docs/checks/DefaultUncaughtExceptionDelegation.md.html index 00846ee0..5bfecc9c 100644 --- a/docs/checks/DefaultUncaughtExceptionDelegation.md.html +++ b/docs/checks/DefaultUncaughtExceptionDelegation.md.html @@ -19,7 +19,7 @@ Feedback : https://issuetracker.google.com/issues/new?component=192708 Since -: 8.11.0-alpha07 (April 2025) +: 8.11.0 (June 2025) Affects : Kotlin and Java files Editing @@ -49,7 +49,7 @@ handler [DefaultUncaughtExceptionDelegation] setDefaultUncaughtExceptionHandler { thread, throwable -> ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -65,7 +65,7 @@ Log.e("foo", "Uncaught exception") } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/UncaughtExceptionHandlerDetectorTest.kt) diff --git a/docs/checks/DeletedProvider.md.html b/docs/checks/DeletedProvider.md.html index 0eee685b..8498d326 100644 --- a/docs/checks/DeletedProvider.md.html +++ b/docs/checks/DeletedProvider.md.html @@ -48,7 +48,7 @@ will crash [DeletedProvider] SecureRandom instance2 = SecureRandom.getInstance("SHA1PRNG", "Crypto"); -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -91,7 +91,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/DeletedProviderDetectorTest.kt) diff --git a/docs/checks/DenyListedApi.md.html b/docs/checks/DenyListedApi.md.html index 4e4406e8..12ddc314 100644 --- a/docs/checks/DenyListedApi.md.html +++ b/docs/checks/DenyListedApi.md.html @@ -52,7 +52,7 @@ [DenyListedApi] ContextCompat.getDrawable(context, 42) ----------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -69,7 +69,7 @@ ContextCompat.getDrawable(context, 42) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/denylistedapis/DenyListedApiDetectorTest.kt) diff --git a/docs/checks/DenyListedBlockingApi.md.html b/docs/checks/DenyListedBlockingApi.md.html index 8be1224f..24f393ab 100644 --- a/docs/checks/DenyListedBlockingApi.md.html +++ b/docs/checks/DenyListedBlockingApi.md.html @@ -55,7 +55,7 @@ values. [DenyListedBlockingApi] val result = runBlocking {} ----------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -68,7 +68,7 @@ class SomeClass { val result = runBlocking {} } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/denylistedapis/DenyListedApiDetectorTest.kt) diff --git a/docs/checks/Deprecated.md.html b/docs/checks/Deprecated.md.html index fe9555ad..5e9b6c1d 100644 --- a/docs/checks/Deprecated.md.html +++ b/docs/checks/Deprecated.md.html @@ -81,7 +81,7 @@ Use inputType instead [Deprecated] <EditText android:editable="false" /> ------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -115,7 +115,7 @@ <EditText android:editable="false" /> </AbsoluteLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/DeprecationDetectorTest.kt) diff --git a/docs/checks/DeprecatedCall.md.html b/docs/checks/DeprecatedCall.md.html index 060e135a..fe93dac5 100644 --- a/docs/checks/DeprecatedCall.md.html +++ b/docs/checks/DeprecatedCall.md.html @@ -52,7 +52,7 @@ deprecated; consider using an alternative. [DeprecatedCall] new ThisIsDeprecated(); ---------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -64,7 +64,7 @@ class ThisIsDeprecated { } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/slack/test/TestClass.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -78,7 +78,7 @@ new ThisIsDeprecated(); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/DeprecatedAnnotationDetectorTest.kt) diff --git a/docs/checks/DeprecatedProvider.md.html b/docs/checks/DeprecatedProvider.md.html index 8ba987bf..d32550d9 100644 --- a/docs/checks/DeprecatedProvider.md.html +++ b/docs/checks/DeprecatedProvider.md.html @@ -64,7 +64,7 @@ a provider and use the default implementation [DeprecatedProvider] Cipher.getInstance("AES/CBC/PKCS7PADDING", Security.getProvider(BC_PROVIDER)); // Error --------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -92,7 +92,7 @@ Cipher.getInstance("AES/CBC/PKCS7PADDING", Security.getProvider(BC_PROVIDER)); // Error } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/CipherGetInstanceDetectorTest.kt) diff --git a/docs/checks/DeprecatedSinceApi.md.html b/docs/checks/DeprecatedSinceApi.md.html index 8feb3e94..33eed6e9 100644 --- a/docs/checks/DeprecatedSinceApi.md.html +++ b/docs/checks/DeprecatedSinceApi.md.html @@ -63,7 +63,7 @@ level 21 [DeprecatedSinceApi] val method2 = api2::someMethod2 // WARN 6 ----------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -116,8 +116,7 @@ @DeprecatedSinceApi(api = 21) fun someMethod2(arg: Int) { } } - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/DeprecatedSinceApiDetectorTest.kt) diff --git a/docs/checks/DeprecatedSqlUsage.md.html b/docs/checks/DeprecatedSqlUsage.md.html index 460a4236..a5764455 100644 --- a/docs/checks/DeprecatedSqlUsage.md.html +++ b/docs/checks/DeprecatedSqlUsage.md.html @@ -51,7 +51,7 @@ performed using SqlDelight [DeprecatedSqlUsage] db.execSQL("DROP TABLE IF EXISTS foo"); -------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -66,7 +66,7 @@ db.execSQL("DROP TABLE IF EXISTS foo"); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/DeprecatedSqlUsageDetectorTest.kt) diff --git a/docs/checks/DetachAndAttachSameFragment.md.html b/docs/checks/DetachAndAttachSameFragment.md.html index dc9a0348..a7cc79e5 100644 --- a/docs/checks/DetachAndAttachSameFragment.md.html +++ b/docs/checks/DetachAndAttachSameFragment.md.html @@ -56,17 +56,17 @@ ``` // build.gradle.kts -implementation("androidx.fragment:fragment:1.8.6") +implementation("androidx.fragment:fragment:1.8.9") // build.gradle -implementation 'androidx.fragment:fragment:1.8.6' +implementation 'androidx.fragment:fragment:1.8.9' // build.gradle.kts with version catalogs: implementation(libs.fragment) # libs.versions.toml [versions] -fragment = "1.8.6" +fragment = "1.8.9" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -78,7 +78,7 @@ } ``` -1.8.6 is the version this documentation was generated from; +1.8.9 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.fragment:fragment](androidx_fragment_fragment.md.html). diff --git a/docs/checks/DevModeObsolete.md.html b/docs/checks/DevModeObsolete.md.html index d2df2794..5d75fb60 100644 --- a/docs/checks/DevModeObsolete.md.html +++ b/docs/checks/DevModeObsolete.md.html @@ -57,7 +57,7 @@ [DevModeObsolete] minSdk = 21 ----------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -78,7 +78,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/DeviceAdmin.md.html b/docs/checks/DeviceAdmin.md.html index 66c08305..bf885f46 100644 --- a/docs/checks/DeviceAdmin.md.html +++ b/docs/checks/DeviceAdmin.md.html @@ -60,7 +60,7 @@ action android.app.action.DEVICE_ADMIN_ENABLED [DeviceAdmin] <meta-data android:name="android.app.device_admin" --------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -91,7 +91,7 @@ </receiver> <!-- Specifies data --> - <receiver android:name=".DeviceAdminTestReceiver" + <receiver android:name=".DeviceAdminTestReceiver2" android:label="@string/app_name" android:description="@string/app_name" android:permission="android.permission.BIND_DEVICE_ADMIN"> @@ -104,7 +104,7 @@ </receiver> <!-- Missing right intent-filter --> - <receiver android:name=".DeviceAdminTestReceiver" + <receiver android:name=".DeviceAdminTestReceiver3" android:label="@string/app_name" android:description="@string/app_name" android:permission="android.permission.BIND_DEVICE_ADMIN"> @@ -116,7 +116,7 @@ </receiver> <!-- Missing intent-filter --> - <receiver android:name=".DeviceAdminTestReceiver" + <receiver android:name=".DeviceAdminTestReceiver4" android:label="@string/app_name" android:description="@string/app_name" android:permission="android.permission.BIND_DEVICE_ADMIN"> @@ -125,7 +125,7 @@ </receiver> <!-- Suppressed --> - <receiver android:name=".DeviceAdminTestReceiver" + <receiver android:name=".DeviceAdminTestReceiver5" android:label="@string/app_name" android:description="@string/app_name" android:permission="android.permission.BIND_DEVICE_ADMIN" @@ -140,7 +140,7 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ManifestDetectorTest.kt) diff --git a/docs/checks/DialogFragmentCallbacksDetector.md.html b/docs/checks/DialogFragmentCallbacksDetector.md.html index c7499c4c..07383b7a 100644 --- a/docs/checks/DialogFragmentCallbacksDetector.md.html +++ b/docs/checks/DialogFragmentCallbacksDetector.md.html @@ -55,7 +55,7 @@ [DialogFragmentCallbacksDetector] dialog.setOnCancelListener({ }); ------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -75,10 +75,10 @@ return dialog.create(); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/fragment/fragment-lint/src/test/java/androidx/fragment/lint/OnCreateDialogIncorrectCallbackDetectorTest.kt) +You can also visit the source code ([OnCreateDialogIncorrectCallbackDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/fragment/fragment-lint/src/test/java/androidx/fragment/lint/OnCreateDialogIncorrectCallbackDetectorTest.kt) +[LintIssueDocGeneratorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/LintIssueDocGeneratorTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test @@ -94,17 +94,17 @@ ``` // build.gradle.kts -implementation("androidx.fragment:fragment:1.8.6") +implementation("androidx.fragment:fragment:1.8.9") // build.gradle -implementation 'androidx.fragment:fragment:1.8.6' +implementation 'androidx.fragment:fragment:1.8.9' // build.gradle.kts with version catalogs: implementation(libs.fragment) # libs.versions.toml [versions] -fragment = "1.8.6" +fragment = "1.8.9" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -116,7 +116,7 @@ } ``` -1.8.6 is the version this documentation was generated from; +1.8.9 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.fragment:fragment](androidx_fragment_fragment.md.html). diff --git a/docs/checks/DiffUtilEquals.md.html b/docs/checks/DiffUtilEquals.md.html index 78db3853..25ff7464 100644 --- a/docs/checks/DiffUtilEquals.md.html +++ b/docs/checks/DiffUtilEquals.md.html @@ -44,7 +44,7 @@ == instead of === ? [DiffUtilEquals] oldItem === newItem // ERROR --- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -61,7 +61,7 @@ override fun areContentsTheSame(oldItem: Cheese, newItem: Cheese): Boolean = oldItem === newItem // ERROR } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyCallback.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -80,7 +80,7 @@ return oldItem == newItem; } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/Cheese.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -89,7 +89,7 @@ public class Cheese { public String id; } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/DiffUtilDetectorTest.kt) diff --git a/docs/checks/DisableBaselineAlignment.md.html b/docs/checks/DisableBaselineAlignment.md.html index 1d7c1d91..04c7139d 100644 --- a/docs/checks/DisableBaselineAlignment.md.html +++ b/docs/checks/DisableBaselineAlignment.md.html @@ -47,7 +47,7 @@ [DisableBaselineAlignment] <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -94,7 +94,7 @@ </FrameLayout> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/InefficientWeightDetectorTest.java) diff --git a/docs/checks/DisabledAllSafeBrowsing.md.html b/docs/checks/DisabledAllSafeBrowsing.md.html index 9b41cfe4..e26f1e82 100644 --- a/docs/checks/DisabledAllSafeBrowsing.md.html +++ b/docs/checks/DisabledAllSafeBrowsing.md.html @@ -27,7 +27,7 @@ Artifact : [com.android.security.lint:lint](com_android_security_lint_lint.md.html) Since -: 1.0.1 +: 1.0.0 Affects : Manifest files Editing @@ -58,7 +58,7 @@ [DisabledAllSafeBrowsing] <meta-data android:name='android.webkit.WebView.EnableSafeBrowsing' android:value='false'/> ------------------------------------------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -70,7 +70,7 @@ <activity android:name='com.example.MainActivity'></activity> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/SafeBrowsingDetectorTest.kt) @@ -90,17 +90,17 @@ ``` // build.gradle.kts -lintChecks("com.android.security.lint:lint:1.0.3") +lintChecks("com.android.security.lint:lint:1.0.4") // build.gradle -lintChecks 'com.android.security.lint:lint:1.0.3' +lintChecks 'com.android.security.lint:lint:1.0.4' // build.gradle.kts with version catalogs: lintChecks(libs.com.android.security.lint.lint) # libs.versions.toml [versions] -com-android-security-lint-lint = "1.0.3" +com-android-security-lint-lint = "1.0.4" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -112,7 +112,7 @@ } ``` -1.0.3 is the version this documentation was generated from; +1.0.4 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.android.security.lint:lint](com_android_security_lint_lint.md.html). diff --git a/docs/checks/DisallowLookaheadAnimationVisualDebug.md.html b/docs/checks/DisallowLookaheadAnimationVisualDebug.md.html new file mode 100644 index 00000000..3113cfe0 --- /dev/null +++ b/docs/checks/DisallowLookaheadAnimationVisualDebug.md.html @@ -0,0 +1,213 @@ + +(#) LookaheadAnimationVisualDebugging and CustomizedLookaheadAnimationVisualDebugging are disallowed in production code + +!!! ERROR: LookaheadAnimationVisualDebugging and CustomizedLookaheadAnimationVisualDebugging are disallowed in production code + This is an error, and is also enforced at build time when + supported by the build system. For Android this means it will + run during release builds. + +Id +: `DisallowLookaheadAnimationVisualDebug` +Summary +: LookaheadAnimationVisualDebugging and CustomizedLookaheadAnimationVisualDebugging are disallowed in production code +Severity +: Fatal +Category +: Correctness +Platform +: Any +Vendor +: Jetpack Compose +Identifier +: androidx.compose.animation +Feedback +: https://issuetracker.google.com/issues/new?component=612128 +Min +: Lint 8.0 and 8.1 +Compiled +: Lint 8.7+ +Artifact +: [androidx.compose.animation:animation-android](androidx_compose_animation_animation-android.md.html) +Since +: 1.11.0-alpha03 +Affects +: Kotlin and Java files +Editing +: This check runs on the fly in the IDE editor +Tests +: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/animation/animation-lint/src/test/java/androidx/compose/animation/lint/LookaheadAnimationVisualDebugHelperDetectorTest.kt) + +Remove LookaheadAnimationVisualDebugging and +CustomizedLookaheadAnimationVisualDebugging. They are debugging tools +for shared element and animated bounds animations that can introduce +performance overhead. +They are not intended for use in release builds. + +!!! Tip + This lint check has an associated quickfix available in the IDE. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/foo/test.kt:9:Error: LookaheadAnimationVisualDebugging and +CustomizedLookaheadAnimationVisualDebugging are disallowed in production +code. [DisallowLookaheadAnimationVisualDebug] + LookaheadAnimationVisualDebugging { + ^ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here are the relevant source files: + +`src/foo/test.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package foo + +import androidx.compose.animation.* +import androidx.compose.runtime.* + +@Composable +fun MyScreen() { + LookaheadAnimationVisualDebugging { + MyComposableContent() + } +} + +@Composable +fun MyComposableContent() { + // Content goes here +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`src/androidx/compose/runtime/RuntimeStubs.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package androidx.compose.runtime + +annotation class Composable + +open class ProvidableCompositionLocal +fun compositionLocalOf(defaultFactory: () -> T): ProvidableCompositionLocal = + ProvidableCompositionLocal() + +@Composable +fun CompositionLocalProvider( + provides: ProvidableCompositionLocal, + content: @Composable () -> Unit +) { + content() +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/animation/animation-lint/src/test/java/androidx/compose/animation/lint/LookaheadAnimationVisualDebugHelperDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `LookaheadAnimationVisualDebuggingDetector.scopeUsageIsFlagged_withQuickFix`. +To report a problem with this extracted sample, visit +https://issuetracker.google.com/issues/new?component=612128. + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("androidx.compose.animation:animation-android:1.11.0-alpha06") + +// build.gradle +implementation 'androidx.compose.animation:animation-android:1.11.0-alpha06' + +// build.gradle.kts with version catalogs: +implementation(libs.animation.android) + +# libs.versions.toml +[versions] +animation-android = "1.11.0-alpha06" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +animation-android = { + module = "androidx.compose.animation:animation-android", + version.ref = "animation-android" +} +``` + +1.11.0-alpha06 is the version this documentation was generated from; +there may be newer versions available. + +NOTE: These lint checks are **also** made available separate from the main library. +You can also use `androidx.compose.animation:animation-lint:1.11.0-alpha06`. + + +[Additional details about androidx.compose.animation:animation-android](androidx_compose_animation_animation-android.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Using a suppression annotation like this on the enclosing + element: + + ```kt + // Kotlin + @Suppress("DisallowLookaheadAnimationVisualDebug") + fun method() { + LookaheadAnimationVisualDebugging(...) + } + ``` + + or + + ```java + // Java + @SuppressWarnings("DisallowLookaheadAnimationVisualDebug") + void method() { + LookaheadAnimationVisualDebugging(...); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection DisallowLookaheadAnimationVisualDebug + problematicStatement() + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="DisallowLookaheadAnimationVisualDebug" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'DisallowLookaheadAnimationVisualDebug' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore DisallowLookaheadAnimationVisualDebug ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/DiscouragedApi.md.html b/docs/checks/DiscouragedApi.md.html index a2454763..0579cb3e 100644 --- a/docs/checks/DiscouragedApi.md.html +++ b/docs/checks/DiscouragedApi.md.html @@ -45,7 +45,7 @@ [DiscouragedApi] Resources.getValue("name", testValue, false); -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -63,7 +63,7 @@ Resources.getValue(0, testValue, false); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/DiscouragedDetectorTest.kt) diff --git a/docs/checks/DiscouragedPrivateApi.md.html b/docs/checks/DiscouragedPrivateApi.md.html index 7526711d..b0f375ef 100644 --- a/docs/checks/DiscouragedPrivateApi.md.html +++ b/docs/checks/DiscouragedPrivateApi.md.html @@ -58,7 +58,7 @@ [DiscouragedPrivateApi] Method m3 = AssetManager.class.getDeclaredMethod("addAssetPath", path.getClass()); --------------------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -85,7 +85,7 @@ Method m7 = activityClass.getDeclaredMethod("dispatchActivityPostCreated", bundleClass); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/application/ReflectionTestKotlin.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -107,7 +107,7 @@ } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PrivateApiDetectorTest.kt) diff --git a/docs/checks/DoNotCallProviders.md.html b/docs/checks/DoNotCallProviders.md.html index 5f5a0bc3..b670d32e 100644 --- a/docs/checks/DoNotCallProviders.md.html +++ b/docs/checks/DoNotCallProviders.md.html @@ -65,7 +65,7 @@ called directly by user code. [DoNotCallProviders] producer() ---------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -113,7 +113,7 @@ abstract fun moduleInstance(): MyModule } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/DoNotCallProvidersDetectorTest.kt) diff --git a/docs/checks/DoNotExposeEitherNetInRepositories.md.html b/docs/checks/DoNotExposeEitherNetInRepositories.md.html index b56515df..e3a4b8c5 100644 --- a/docs/checks/DoNotExposeEitherNetInRepositories.md.html +++ b/docs/checks/DoNotExposeEitherNetInRepositories.md.html @@ -52,7 +52,7 @@ EitherNet types directly. [DoNotExposeEitherNetInRepositories] ApiResult<String, Exception> getResult(); ---------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -61,7 +61,7 @@ package com.slack.eithernet interface ApiResult -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/MyRepository.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -78,7 +78,7 @@ String getString(); } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/MyClassRepository.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -102,7 +102,7 @@ private ApiResult getResultProtected(); public abstract String getString(); } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/eithernet/DoNotExposeEitherNetInRepositoriesDetectorTest.kt) diff --git a/docs/checks/DoNotMock.md.html b/docs/checks/DoNotMock.md.html index 4278f74d..b30ca7bc 100644 --- a/docs/checks/DoNotMock.md.html +++ b/docs/checks/DoNotMock.md.html @@ -65,7 +65,7 @@ <option name="mock-annotations" value=""org.mockito.Mock,org.mockito.Spy"" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (###) mock-factories @@ -82,7 +82,7 @@ <option name="mock-factories" value=""org.mockito.Mockito#mock,org.mockito.Mockito#spy,slack.test.mockito.MockitoHelpers#mock,slack.test.mockito.MockitoHelpersKt#mock,org.mockito.kotlin.MockingKt#mock,org.mockito.kotlin.SpyingKt#spy"" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (###) mock-report @@ -99,7 +99,7 @@ <option name="mock-report" value=""none"" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (##) Example @@ -121,7 +121,7 @@ BECAUSE REASONS [DoNotMock] @Mock lateinit var mock4: TestClass4 ------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -148,7 +148,7 @@ interface TestClass4 { fun fake(): TestClass4? = null } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `test/test/slack/test/TestClass.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -162,7 +162,7 @@ @Mock lateinit var mock3: TestClass3 @Mock lateinit var mock4: TestClass4 } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/mocking/DoNotMockMockDetectorTest.kt) diff --git a/docs/checks/DoNotMockAnything.md.html b/docs/checks/DoNotMockAnything.md.html index 17e0d171..6f67c03a 100644 --- a/docs/checks/DoNotMockAnything.md.html +++ b/docs/checks/DoNotMockAnything.md.html @@ -67,7 +67,7 @@ <option name="mock-annotations" value=""org.mockito.Mock,org.mockito.Spy"" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (###) mock-factories @@ -84,7 +84,7 @@ <option name="mock-factories" value=""org.mockito.Mockito#mock,org.mockito.Mockito#spy,slack.test.mockito.MockitoHelpers#mock,slack.test.mockito.MockitoHelpersKt#mock,org.mockito.kotlin.MockingKt#mock,org.mockito.kotlin.SpyingKt#spy"" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (###) mock-report @@ -101,7 +101,7 @@ <option name="mock-report" value=""none"" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (##) Including diff --git a/docs/checks/DoNotMockAutoValue.md.html b/docs/checks/DoNotMockAutoValue.md.html index 31e97a83..90d7a466 100644 --- a/docs/checks/DoNotMockAutoValue.md.html +++ b/docs/checks/DoNotMockAutoValue.md.html @@ -63,7 +63,7 @@ <option name="mock-annotations" value=""org.mockito.Mock,org.mockito.Spy"" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (###) mock-factories @@ -80,7 +80,7 @@ <option name="mock-factories" value=""org.mockito.Mockito#mock,org.mockito.Mockito#spy,slack.test.mockito.MockitoHelpers#mock,slack.test.mockito.MockitoHelpersKt#mock,org.mockito.kotlin.MockingKt#mock,org.mockito.kotlin.SpyingKt#spy"" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (###) mock-report @@ -97,7 +97,7 @@ <option name="mock-report" value=""none"" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (##) Including diff --git a/docs/checks/DoNotMockDataClass.md.html b/docs/checks/DoNotMockDataClass.md.html index 61017640..1bf10610 100644 --- a/docs/checks/DoNotMockDataClass.md.html +++ b/docs/checks/DoNotMockDataClass.md.html @@ -37,7 +37,7 @@ Implementation : [Source Code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/main/java/slack/lint/mocking/MockDetector.kt) Tests -: [Source Code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/mocking/DoNotMockMockDetectorTest.kt) +: [Source Code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/mocking/MockDetectorOptionsTest.kt) Copyright Year : 2021 @@ -63,7 +63,7 @@ <option name="mock-annotations" value=""org.mockito.Mock,org.mockito.Spy"" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (###) mock-factories @@ -80,7 +80,7 @@ <option name="mock-factories" value=""org.mockito.Mockito#mock,org.mockito.Mockito#spy,slack.test.mockito.MockitoHelpers#mock,slack.test.mockito.MockitoHelpersKt#mock,org.mockito.kotlin.MockingKt#mock,org.mockito.kotlin.SpyingKt#spy"" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (###) mock-report @@ -97,7 +97,128 @@ <option name="mock-report" value=""none"" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +test/slack/test/MyTests.kt:11:Error: 'slack.test.DataClass' is a data +class, so mocking it should not be necessary [DoNotMockDataClass] + @MockK lateinit var fieldDataMock: DataClass + -------------------------------------------- +test/slack/test/MyTests.kt:12:Error: 'slack.test.DataClass' is a data +class, so mocking it should not be necessary [DoNotMockDataClass] + @SpyK lateinit var fieldDataSpy: DataClass + ------------------------------------------ +test/slack/test/MyTests.kt:15:Error: 'slack.test.DataClass' is a data +class, so mocking it should not be necessary [DoNotMockDataClass] + val localMock1: DataClass = mockk() + ------- +test/slack/test/MyTests.kt:16:Error: 'slack.test.DataClass' is a data +class, so mocking it should not be necessary [DoNotMockDataClass] + val localMock2 = mockk<DataClass>() + ------------------ +test/slack/test/MyTests.kt:18:Error: 'slack.test.DataClass' is a data +class, so mocking it should not be necessary [DoNotMockDataClass] + val localSpy1: DataClass = spyk() + ------ +test/slack/test/MyTests.kt:19:Error: 'slack.test.DataClass' is a data +class, so mocking it should not be necessary [DoNotMockDataClass] + val localSpy2 = spyk<DataClass>() + ----------------- +test/slack/test/MyTests.kt:20:Error: 'slack.test.DataClass' is a data +class, so mocking it should not be necessary [DoNotMockDataClass] + val localSpy3 = spyk(localMock1) + ---------------- +test/slack/test/MyTests.kt:23:Error: 'slack.test.DataClass' is a data +class, so mocking it should not be necessary [DoNotMockDataClass] + val localClassMock = mockkClass<DataClass>(DataClass::class) + --------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`test/slack/test/MyTests.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package slack.test + +import io.mockk.impl.annotations.MockK +import io.mockk.impl.annotations.SpyK +import io.mockk.mockk +import io.mockk.mockkClass +import io.mockk.mockkObject +import io.mockk.spyk + +class MyTests { + @MockK lateinit var fieldDataMock: DataClass + @SpyK lateinit var fieldDataSpy: DataClass + + fun dataClass() { + val localMock1: DataClass = mockk() + val localMock2 = mockk() + + val localSpy1: DataClass = spyk() + val localSpy2 = spyk() + val localSpy3 = spyk(localMock1) + + // KClass is not detected, explicit type needed! + val localClassMock = mockkClass(DataClass::class) + } + + @MockK lateinit var fieldSealedMock: SealedClass + @SpyK lateinit var fieldSealedSpy: SealedClass + + fun sealedClass() { + val localMock1: SealedClass = mockk() + val localMock2 = mockk() + + val localSpy1: SealedClass = spyk() + val localSpy2 = spyk() + val localSpy3 = spyk(localMock1) + + // KClass is not detected, explicit type needed! + val localClassMock = mockkClass(SealedClass::class) + } + + @MockK lateinit var fieldObjectMock: ObjectClass + @SpyK lateinit var fieldObjectSpy: ObjectClass + + fun objectClass() { + val localMock1: ObjectClass = mockk() + val localMock2 = mockk() + + val localSpy1: ObjectClass = spyk() + val localSpy2 = spyk() + val localSpy3 = spyk(localMock1) + + // KClass is not detected, explicit type needed! + val localClassMock = mockkClass(ObjectClass::class) + + // Wrong Error: 'kotlin.Unit' is an object, so mocking it should not be necessary [DoNotMockObjectClass] + // Wrong Warning: platform type 'kotlin.Unit' should not be mocked [DoNotMockPlatformTypes] + // mockkObject(ObjectClass) + } + + fun platformTypes() { + // java. + mockk>() + mockk() + // kotlin. + mockk() + mockk>() + } +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/mocking/MockDetectorOptionsTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `MockDetector.tests`. +To report a problem with this extracted sample, visit +https://github.com/slackhq/slack-lints. (##) Including diff --git a/docs/checks/DoNotMockObjectClass.md.html b/docs/checks/DoNotMockObjectClass.md.html index 2bac1692..73bfaa5c 100644 --- a/docs/checks/DoNotMockObjectClass.md.html +++ b/docs/checks/DoNotMockObjectClass.md.html @@ -37,7 +37,7 @@ Implementation : [Source Code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/main/java/slack/lint/mocking/MockDetector.kt) Tests -: [Source Code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/mocking/DoNotMockMockDetectorTest.kt) +: [Source Code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/mocking/MockDetectorOptionsTest.kt) Copyright Year : 2021 @@ -63,7 +63,7 @@ <option name="mock-annotations" value=""org.mockito.Mock,org.mockito.Spy"" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (###) mock-factories @@ -80,7 +80,7 @@ <option name="mock-factories" value=""org.mockito.Mockito#mock,org.mockito.Mockito#spy,slack.test.mockito.MockitoHelpers#mock,slack.test.mockito.MockitoHelpersKt#mock,org.mockito.kotlin.MockingKt#mock,org.mockito.kotlin.SpyingKt#spy"" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (###) mock-report @@ -97,7 +97,128 @@ <option name="mock-report" value=""none"" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +test/slack/test/MyTests.kt:41:Error: 'slack.test.ObjectClass' is an +object, so mocking it should not be necessary [DoNotMockObjectClass] + @MockK lateinit var fieldObjectMock: ObjectClass + ------------------------------------------------ +test/slack/test/MyTests.kt:42:Error: 'slack.test.ObjectClass' is an +object, so mocking it should not be necessary [DoNotMockObjectClass] + @SpyK lateinit var fieldObjectSpy: ObjectClass + ---------------------------------------------- +test/slack/test/MyTests.kt:45:Error: 'slack.test.ObjectClass' is an +object, so mocking it should not be necessary [DoNotMockObjectClass] + val localMock1: ObjectClass = mockk() + ------- +test/slack/test/MyTests.kt:46:Error: 'slack.test.ObjectClass' is an +object, so mocking it should not be necessary [DoNotMockObjectClass] + val localMock2 = mockk<ObjectClass>() + -------------------- +test/slack/test/MyTests.kt:48:Error: 'slack.test.ObjectClass' is an +object, so mocking it should not be necessary [DoNotMockObjectClass] + val localSpy1: ObjectClass = spyk() + ------ +test/slack/test/MyTests.kt:49:Error: 'slack.test.ObjectClass' is an +object, so mocking it should not be necessary [DoNotMockObjectClass] + val localSpy2 = spyk<ObjectClass>() + ------------------- +test/slack/test/MyTests.kt:50:Error: 'slack.test.ObjectClass' is an +object, so mocking it should not be necessary [DoNotMockObjectClass] + val localSpy3 = spyk(localMock1) + ---------------- +test/slack/test/MyTests.kt:53:Error: 'slack.test.ObjectClass' is an +object, so mocking it should not be necessary [DoNotMockObjectClass] + val localClassMock = mockkClass<ObjectClass>(ObjectClass::class) + ------------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`test/slack/test/MyTests.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package slack.test + +import io.mockk.impl.annotations.MockK +import io.mockk.impl.annotations.SpyK +import io.mockk.mockk +import io.mockk.mockkClass +import io.mockk.mockkObject +import io.mockk.spyk + +class MyTests { + @MockK lateinit var fieldDataMock: DataClass + @SpyK lateinit var fieldDataSpy: DataClass + + fun dataClass() { + val localMock1: DataClass = mockk() + val localMock2 = mockk() + + val localSpy1: DataClass = spyk() + val localSpy2 = spyk() + val localSpy3 = spyk(localMock1) + + // KClass is not detected, explicit type needed! + val localClassMock = mockkClass(DataClass::class) + } + + @MockK lateinit var fieldSealedMock: SealedClass + @SpyK lateinit var fieldSealedSpy: SealedClass + + fun sealedClass() { + val localMock1: SealedClass = mockk() + val localMock2 = mockk() + + val localSpy1: SealedClass = spyk() + val localSpy2 = spyk() + val localSpy3 = spyk(localMock1) + + // KClass is not detected, explicit type needed! + val localClassMock = mockkClass(SealedClass::class) + } + + @MockK lateinit var fieldObjectMock: ObjectClass + @SpyK lateinit var fieldObjectSpy: ObjectClass + + fun objectClass() { + val localMock1: ObjectClass = mockk() + val localMock2 = mockk() + + val localSpy1: ObjectClass = spyk() + val localSpy2 = spyk() + val localSpy3 = spyk(localMock1) + + // KClass is not detected, explicit type needed! + val localClassMock = mockkClass(ObjectClass::class) + + // Wrong Error: 'kotlin.Unit' is an object, so mocking it should not be necessary [DoNotMockObjectClass] + // Wrong Warning: platform type 'kotlin.Unit' should not be mocked [DoNotMockPlatformTypes] + // mockkObject(ObjectClass) + } + + fun platformTypes() { + // java. + mockk>() + mockk() + // kotlin. + mockk() + mockk>() + } +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/mocking/MockDetectorOptionsTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `MockDetector.tests`. +To report a problem with this extracted sample, visit +https://github.com/slackhq/slack-lints. (##) Including diff --git a/docs/checks/DoNotMockPlatformTypes.md.html b/docs/checks/DoNotMockPlatformTypes.md.html index 8120480b..465378e5 100644 --- a/docs/checks/DoNotMockPlatformTypes.md.html +++ b/docs/checks/DoNotMockPlatformTypes.md.html @@ -37,7 +37,7 @@ Implementation : [Source Code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/main/java/slack/lint/mocking/MockDetector.kt) Tests -: [Source Code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/mocking/DoNotMockMockDetectorTest.kt) +: [Source Code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/mocking/MockDetectorOptionsTest.kt) Copyright Year : 2021 @@ -67,7 +67,7 @@ <option name="mock-annotations" value=""org.mockito.Mock,org.mockito.Spy"" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (###) mock-factories @@ -84,7 +84,7 @@ <option name="mock-factories" value=""org.mockito.Mockito#mock,org.mockito.Mockito#spy,slack.test.mockito.MockitoHelpers#mock,slack.test.mockito.MockitoHelpersKt#mock,org.mockito.kotlin.MockingKt#mock,org.mockito.kotlin.SpyingKt#spy"" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (###) mock-report @@ -101,7 +101,112 @@ <option name="mock-report" value=""none"" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +test/slack/test/MyTests.kt:62:Error: platform type +'java.lang.Comparable' should not be mocked [DoNotMockPlatformTypes] + mockk<Comparable<String>>() + --------------------------- +test/slack/test/MyTests.kt:63:Error: platform type 'java.lang.Runnable' +should not be mocked [DoNotMockPlatformTypes] + mockk<Runnable>() + ----------------- +test/slack/test/MyTests.kt:65:Error: platform type +'kotlin.io.FileTreeWalk' should not be mocked [DoNotMockPlatformTypes] + mockk<FileTreeWalk>() + --------------------- +test/slack/test/MyTests.kt:66:Error: platform type 'kotlin.Lazy' should +not be mocked [DoNotMockPlatformTypes] + mockk<Lazy<String>>() + --------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`test/slack/test/MyTests.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package slack.test + +import io.mockk.impl.annotations.MockK +import io.mockk.impl.annotations.SpyK +import io.mockk.mockk +import io.mockk.mockkClass +import io.mockk.mockkObject +import io.mockk.spyk + +class MyTests { + @MockK lateinit var fieldDataMock: DataClass + @SpyK lateinit var fieldDataSpy: DataClass + + fun dataClass() { + val localMock1: DataClass = mockk() + val localMock2 = mockk() + + val localSpy1: DataClass = spyk() + val localSpy2 = spyk() + val localSpy3 = spyk(localMock1) + + // KClass is not detected, explicit type needed! + val localClassMock = mockkClass(DataClass::class) + } + + @MockK lateinit var fieldSealedMock: SealedClass + @SpyK lateinit var fieldSealedSpy: SealedClass + + fun sealedClass() { + val localMock1: SealedClass = mockk() + val localMock2 = mockk() + + val localSpy1: SealedClass = spyk() + val localSpy2 = spyk() + val localSpy3 = spyk(localMock1) + + // KClass is not detected, explicit type needed! + val localClassMock = mockkClass(SealedClass::class) + } + + @MockK lateinit var fieldObjectMock: ObjectClass + @SpyK lateinit var fieldObjectSpy: ObjectClass + + fun objectClass() { + val localMock1: ObjectClass = mockk() + val localMock2 = mockk() + + val localSpy1: ObjectClass = spyk() + val localSpy2 = spyk() + val localSpy3 = spyk(localMock1) + + // KClass is not detected, explicit type needed! + val localClassMock = mockkClass(ObjectClass::class) + + // Wrong Error: 'kotlin.Unit' is an object, so mocking it should not be necessary [DoNotMockObjectClass] + // Wrong Warning: platform type 'kotlin.Unit' should not be mocked [DoNotMockPlatformTypes] + // mockkObject(ObjectClass) + } + + fun platformTypes() { + // java. + mockk>() + mockk() + // kotlin. + mockk() + mockk>() + } +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/mocking/MockDetectorOptionsTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `MockDetector.tests`. +To report a problem with this extracted sample, visit +https://github.com/slackhq/slack-lints. (##) Including diff --git a/docs/checks/DoNotMockRecordClass.md.html b/docs/checks/DoNotMockRecordClass.md.html index dd681f34..7a07e7a9 100644 --- a/docs/checks/DoNotMockRecordClass.md.html +++ b/docs/checks/DoNotMockRecordClass.md.html @@ -63,7 +63,7 @@ <option name="mock-annotations" value=""org.mockito.Mock,org.mockito.Spy"" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (###) mock-factories @@ -80,7 +80,7 @@ <option name="mock-factories" value=""org.mockito.Mockito#mock,org.mockito.Mockito#spy,slack.test.mockito.MockitoHelpers#mock,slack.test.mockito.MockitoHelpersKt#mock,org.mockito.kotlin.MockingKt#mock,org.mockito.kotlin.SpyingKt#spy"" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (###) mock-report @@ -97,7 +97,7 @@ <option name="mock-report" value=""none"" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (##) Including diff --git a/docs/checks/DoNotMockSealedClass.md.html b/docs/checks/DoNotMockSealedClass.md.html index 606113c4..eec7e548 100644 --- a/docs/checks/DoNotMockSealedClass.md.html +++ b/docs/checks/DoNotMockSealedClass.md.html @@ -37,7 +37,7 @@ Implementation : [Source Code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/main/java/slack/lint/mocking/MockDetector.kt) Tests -: [Source Code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/mocking/DoNotMockMockDetectorTest.kt) +: [Source Code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/mocking/MockDetectorOptionsTest.kt) Copyright Year : 2021 @@ -64,7 +64,7 @@ <option name="mock-annotations" value=""org.mockito.Mock,org.mockito.Spy"" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (###) mock-factories @@ -81,7 +81,7 @@ <option name="mock-factories" value=""org.mockito.Mockito#mock,org.mockito.Mockito#spy,slack.test.mockito.MockitoHelpers#mock,slack.test.mockito.MockitoHelpersKt#mock,org.mockito.kotlin.MockingKt#mock,org.mockito.kotlin.SpyingKt#spy"" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (###) mock-report @@ -98,7 +98,136 @@ <option name="mock-report" value=""none"" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +test/slack/test/MyTests.kt:26:Error: 'slack.test.SealedClass' is a +sealed type and has a restricted type hierarchy, use a subtype instead. +[DoNotMockSealedClass] + @MockK lateinit var fieldSealedMock: SealedClass + ------------------------------------------------ +test/slack/test/MyTests.kt:27:Error: 'slack.test.SealedClass' is a +sealed type and has a restricted type hierarchy, use a subtype instead. +[DoNotMockSealedClass] + @SpyK lateinit var fieldSealedSpy: SealedClass + ---------------------------------------------- +test/slack/test/MyTests.kt:30:Error: 'slack.test.SealedClass' is a +sealed type and has a restricted type hierarchy, use a subtype instead. +[DoNotMockSealedClass] + val localMock1: SealedClass = mockk() + ------- +test/slack/test/MyTests.kt:31:Error: 'slack.test.SealedClass' is a +sealed type and has a restricted type hierarchy, use a subtype instead. +[DoNotMockSealedClass] + val localMock2 = mockk<SealedClass>() + -------------------- +test/slack/test/MyTests.kt:33:Error: 'slack.test.SealedClass' is a +sealed type and has a restricted type hierarchy, use a subtype instead. +[DoNotMockSealedClass] + val localSpy1: SealedClass = spyk() + ------ +test/slack/test/MyTests.kt:34:Error: 'slack.test.SealedClass' is a +sealed type and has a restricted type hierarchy, use a subtype instead. +[DoNotMockSealedClass] + val localSpy2 = spyk<SealedClass>() + ------------------- +test/slack/test/MyTests.kt:35:Error: 'slack.test.SealedClass' is a +sealed type and has a restricted type hierarchy, use a subtype instead. +[DoNotMockSealedClass] + val localSpy3 = spyk(localMock1) + ---------------- +test/slack/test/MyTests.kt:38:Error: 'slack.test.SealedClass' is a +sealed type and has a restricted type hierarchy, use a subtype instead. +[DoNotMockSealedClass] + val localClassMock = mockkClass<SealedClass>(SealedClass::class) + ------------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`test/slack/test/MyTests.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package slack.test + +import io.mockk.impl.annotations.MockK +import io.mockk.impl.annotations.SpyK +import io.mockk.mockk +import io.mockk.mockkClass +import io.mockk.mockkObject +import io.mockk.spyk + +class MyTests { + @MockK lateinit var fieldDataMock: DataClass + @SpyK lateinit var fieldDataSpy: DataClass + + fun dataClass() { + val localMock1: DataClass = mockk() + val localMock2 = mockk() + + val localSpy1: DataClass = spyk() + val localSpy2 = spyk() + val localSpy3 = spyk(localMock1) + + // KClass is not detected, explicit type needed! + val localClassMock = mockkClass(DataClass::class) + } + + @MockK lateinit var fieldSealedMock: SealedClass + @SpyK lateinit var fieldSealedSpy: SealedClass + + fun sealedClass() { + val localMock1: SealedClass = mockk() + val localMock2 = mockk() + + val localSpy1: SealedClass = spyk() + val localSpy2 = spyk() + val localSpy3 = spyk(localMock1) + + // KClass is not detected, explicit type needed! + val localClassMock = mockkClass(SealedClass::class) + } + + @MockK lateinit var fieldObjectMock: ObjectClass + @SpyK lateinit var fieldObjectSpy: ObjectClass + + fun objectClass() { + val localMock1: ObjectClass = mockk() + val localMock2 = mockk() + + val localSpy1: ObjectClass = spyk() + val localSpy2 = spyk() + val localSpy3 = spyk(localMock1) + + // KClass is not detected, explicit type needed! + val localClassMock = mockkClass(ObjectClass::class) + + // Wrong Error: 'kotlin.Unit' is an object, so mocking it should not be necessary [DoNotMockObjectClass] + // Wrong Warning: platform type 'kotlin.Unit' should not be mocked [DoNotMockPlatformTypes] + // mockkObject(ObjectClass) + } + + fun platformTypes() { + // java. + mockk>() + mockk() + // kotlin. + mockk() + mockk>() + } +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the source code ([MockDetectorOptionsTest.kt](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/mocking/MockDetectorOptionsTest.kt) +[SealedClassMockDetectorTest.kt](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/mocking/SealedClassMockDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `MockDetector.tests`. +To report a problem with this extracted sample, visit +https://github.com/slackhq/slack-lints. (##) Including diff --git a/docs/checks/DontUseAccessibilityNodeInfoGetText.md.html b/docs/checks/DontUseAccessibilityNodeInfoGetText.md.html new file mode 100644 index 00000000..359f88e6 --- /dev/null +++ b/docs/checks/DontUseAccessibilityNodeInfoGetText.md.html @@ -0,0 +1,149 @@ + +(#) Do not use AccessibilityNodeInfo#getText in a UiAutomatorTestScope + +!!! WARNING: Do not use AccessibilityNodeInfo#getText in a UiAutomatorTestScope + This is a warning. + +Id +: `DontUseAccessibilityNodeInfoGetText` +Summary +: Do not use AccessibilityNodeInfo#getText in a UiAutomatorTestScope +Severity +: Warning +Category +: Correctness +Platform +: Any +Vendor +: Android Open Source Project +Identifier +: androidx.test.uiautomator +Feedback +: https://issuetracker.google.com/issues/new?component=1237242 +Min +: Lint 8.0 and 8.1 +Compiled +: Lint 8.7+ +Artifact +: [androidx.test.uiautomator:uiautomator](androidx_test_uiautomator_uiautomator.md.html) +Since +: 2.4.0-alpha02 +Affects +: Kotlin and Java files +Editing +: This check runs on the fly in the IDE editor +Implementation +: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/test/uiautomator/uiautomator-lint/src/main/java/androidx/test/uiautomator/lint/AccessibilityNodeInfoGetTextDetector.kt) +Tests +: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/test/uiautomator/uiautomator-lint/src/test/java/androidx/test/uiautomator/lint/AccessibilityNodeInfoGetTextDetectorTest.kt) +Copyright Year +: 2025 + +You should not used AccessibilityNodeInfo#getText in a +UiAutomatorTestScope. +AccessibilityNodeInfo#getText returns a CharSequence rather than a +String. +This can also be a SpannableString that when compared with a String +always +returns false. Use AccessibilityNodeInfo#getTextAsString instead. + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("androidx.test.uiautomator:uiautomator:2.4.0-beta01") + +// build.gradle +implementation 'androidx.test.uiautomator:uiautomator:2.4.0-beta01' + +// build.gradle.kts with version catalogs: +implementation(libs.uiautomator) + +# libs.versions.toml +[versions] +uiautomator = "2.4.0-beta01" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +uiautomator = { + module = "androidx.test.uiautomator:uiautomator", + version.ref = "uiautomator" +} +``` + +2.4.0-beta01 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about androidx.test.uiautomator:uiautomator](androidx_test_uiautomator_uiautomator.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Using a suppression annotation like this on the enclosing + element: + + ```kt + // Kotlin + @Suppress("DontUseAccessibilityNodeInfoGetText") + fun method() { + onView(...) + } + ``` + + or + + ```java + // Java + @SuppressWarnings("DontUseAccessibilityNodeInfoGetText") + void method() { + onView(...); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection DontUseAccessibilityNodeInfoGetText + problematicStatement() + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="DontUseAccessibilityNodeInfoGetText" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'DontUseAccessibilityNodeInfoGetText' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore DontUseAccessibilityNodeInfoGetText ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/DotPathAttribute.md.html b/docs/checks/DotPathAttribute.md.html new file mode 100644 index 00000000..8b2f817e --- /dev/null +++ b/docs/checks/DotPathAttribute.md.html @@ -0,0 +1,160 @@ + +(#) The "path" attribute should not be set to "." as a path + +!!! WARNING: The "path" attribute should not be set to "." as a path + This is a warning. + +Id +: `DotPathAttribute` +Summary +: The "path" attribute should not be set to "." as a path +Severity +: Warning +Category +: Security +Platform +: Android +Vendor +: Google - Android 3P Vulnerability Research +Contact +: https://github.com/google/android-security-lints +Feedback +: https://github.com/google/android-security-lints/issues +Min +: Lint 4.1 +Compiled +: Lint 8.0 and 8.1 +Artifact +: [com.android.security.lint:lint](com_android_security_lint_lint.md.html) +Since +: 1.0.4 +Affects +: Resource files +Editing +: This check runs on the fly in the IDE editor +See +: https://goo.gle/DotPathAttribute +Implementation +: [Source Code](https://github.com/google/android-security-lints/tree/main/checks/src/main/java/com/example/lint/checks/MisconfiguredFileProviderDetector.kt) +Tests +: [Source Code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/MisconfiguredFileProviderDetectorTest.kt) +Copyright Year +: 2023 + +Using a broad path range like "." can lead to the accidental exposure of +sensitive files. Ensure that a specific, narrow and limited path is +shared to prevent mistakenly exposing sensitive data. + +!!! Tip + This lint check has an associated quickfix available in the IDE. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +res/xml/file_paths.xml:5:Warning: The "path" attribute should not be set +to "." [DotPathAttribute] + <files-path name="root" path="."/> + ---------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`res/xml/file_paths.xml`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<?xml version="1.0" encoding="utf-8"?> + <paths xmlns:android="http://schemas.android.com/apk/res/android"> + <files-path name="my_images" path="images/"/> + <files-path name="my_docs" path="docs/"/> + <files-path name="root" path="."/> + </paths> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/MisconfiguredFileProviderDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `MisconfiguredFileProviderDetector.testWhenDotPathUsedInConfig_showsWarningAndQuickFix`. +To report a problem with this extracted sample, visit +https://github.com/google/android-security-lints/issues. + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. This lint check is included in the lint documentation, + but the Android team may or may not agree with its recommendations. + +``` +// build.gradle.kts +lintChecks("com.android.security.lint:lint:1.0.4") + +// build.gradle +lintChecks 'com.android.security.lint:lint:1.0.4' + +// build.gradle.kts with version catalogs: +lintChecks(libs.com.android.security.lint.lint) + +# libs.versions.toml +[versions] +com-android-security-lint-lint = "1.0.4" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +com-android-security-lint-lint = { + module = "com.android.security.lint:lint", + version.ref = "com-android-security-lint-lint" +} +``` + +1.0.4 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.android.security.lint:lint](com_android_security_lint_lint.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Adding the suppression attribute `tools:ignore="DotPathAttribute"` + on the problematic XML element (or one of its enclosing elements). + You may also need to add the following namespace declaration on the + root element in the XML file if it's not already there: + `xmlns:tools="http://schemas.android.com/tools"`. + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="DotPathAttribute" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'DotPathAttribute' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore DotPathAttribute ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/DrawAllocation.md.html b/docs/checks/DrawAllocation.md.html index b93f25b3..96fbb5bb 100644 --- a/docs/checks/DrawAllocation.md.html +++ b/docs/checks/DrawAllocation.md.html @@ -50,7 +50,7 @@ draw/layout operations (preallocate and reuse instead) [DrawAllocation] bitmap = Bitmap.createBitmap(100, 100, null); ----------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -78,7 +78,7 @@ private Bitmap bitmap; } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/JavaPerformanceDetectorTest.java) diff --git a/docs/checks/DuplicateActivity.md.html b/docs/checks/DuplicateActivity.md.html index fda7075c..12a0cf3b 100644 --- a/docs/checks/DuplicateActivity.md.html +++ b/docs/checks/DuplicateActivity.md.html @@ -46,7 +46,7 @@ com.example.helloworld.HelloWorld [DuplicateActivity] <activity android:name="com.example.helloworld.HelloWorld" ------------------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -73,7 +73,7 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -106,8 +106,7 @@ <!-- Wallpaper --> <string name="wallpaper_instructions">Tap picture to set portrait wallpaper</string> </resources> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ManifestDetectorTest.kt) diff --git a/docs/checks/DuplicateDefinition.md.html b/docs/checks/DuplicateDefinition.md.html index b58c3f0e..b1c0e539 100644 --- a/docs/checks/DuplicateDefinition.md.html +++ b/docs/checks/DuplicateDefinition.md.html @@ -45,7 +45,7 @@ been defined in this folder [DuplicateDefinition] <string name="wallpaper_instructions">Tap image to set landscape wallpaper</string> ----------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -81,8 +81,7 @@ <!-- Wallpaper --> <string name="wallpaper_instructions">Tap picture to set portrait wallpaper</string> </resources> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/strings2.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -106,8 +105,7 @@ <!-- Wallpaper --> <string name="wallpaper_instructions">Tap image to set landscape wallpaper</string> </resources> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-cs/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -122,7 +120,7 @@ <skip /> <string name="wallpaper_instructions">"Klepnutím na obrázek nastavíte tapetu portrétu"</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/customattr.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -132,7 +130,7 @@ <attr name="contentId" format="reference" /> </declare-styleable> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/customattr2.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -142,10 +140,13 @@ <attr name="contentId" format="reference" /> </declare-styleable> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/DuplicateResourceDetectorTest.java) +You can also visit the source code ([DuplicateResourceDetectorTest.java](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/DuplicateResourceDetectorTest.java) +[SuppressibleTestModeTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/infrastructure/SuppressibleTestModeTest.kt) +[ProjectInitializerTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/ProjectInitializerTest.kt) +[MainTest.java](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/MainTest.java) +[TextReporterTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/TextReporterTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/DuplicateDivider.md.html b/docs/checks/DuplicateDivider.md.html index 948738b0..9f852033 100644 --- a/docs/checks/DuplicateDivider.md.html +++ b/docs/checks/DuplicateDivider.md.html @@ -46,7 +46,7 @@ [DuplicateDivider] public abstract class DividerItemDecoration extends RecyclerView.ItemDecoration { --------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -76,7 +76,7 @@ private int mOrientation; } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ItemDecoratorDetectorTest.kt) diff --git a/docs/checks/DuplicateIds.md.html b/docs/checks/DuplicateIds.md.html index 9bf2d504..8f8efd41 100644 --- a/docs/checks/DuplicateIds.md.html +++ b/docs/checks/DuplicateIds.md.html @@ -44,7 +44,7 @@ already defined earlier in this layout [DuplicateIds] <ImageButton android:id="@+id/android_logo" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/android_button" android:focusable="false" android:clickable="false" android:layout_weight="1.0" /> ------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -56,11 +56,10 @@ <ImageButton android:id="@+id/android_logo" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/android_button" android:focusable="false" android:clickable="false" android:layout_weight="1.0" /> <Button android:text="Button" android:id="@+id/button2" android:layout_width="wrap_content" android:layout_height="wrap_content"></Button> </LinearLayout> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/DuplicateIdDetectorTest.kt) +You can also visit the source code ([DuplicateIdDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/DuplicateIdDetectorTest.kt) +[MainTest.java](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/MainTest.java) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/DuplicateIncludedIds.md.html b/docs/checks/DuplicateIncludedIds.md.html index 347edfac..8acc6fb1 100644 --- a/docs/checks/DuplicateIncludedIds.md.html +++ b/docs/checks/DuplicateIncludedIds.md.html @@ -46,7 +46,7 @@ layout/layout4.xml defines @+id/button2] [DuplicateIncludedIds] <include ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -75,7 +75,7 @@ android:text="Button" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout/layout2.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -101,7 +101,7 @@ layout="@layout/layout4" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout/layout3.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -124,7 +124,7 @@ android:text="CheckBox" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout/layout4.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -146,10 +146,10 @@ android:text="Button" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/DuplicateIdDetectorTest.kt) +You can also visit the source code ([DuplicateIdDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/DuplicateIdDetectorTest.kt) +[LintIssueDocGeneratorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/LintIssueDocGeneratorTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/DuplicatePlatformClasses.md.html b/docs/checks/DuplicatePlatformClasses.md.html index 50748cbd..85605e3b 100644 --- a/docs/checks/DuplicatePlatformClasses.md.html +++ b/docs/checks/DuplicatePlatformClasses.md.html @@ -102,7 +102,7 @@ [DuplicatePlatformClasses] compile group: 'org.apache.httpcomponents', ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -120,7 +120,7 @@ name: 'httpclient', version: '4.5.3' } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/DuplicateStrings.md.html b/docs/checks/DuplicateStrings.md.html index 65b6a302..e15afe66 100644 --- a/docs/checks/DuplicateStrings.md.html +++ b/docs/checks/DuplicateStrings.md.html @@ -55,7 +55,7 @@ avoid string duplication. [DuplicateStrings] <string name="hello_world">hello world</string> ----------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -68,7 +68,7 @@ <string name="hello_world">hello world</string> <string name="title_casing_hello_world">Hello World</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/StringCasingDetectorTest.kt) diff --git a/docs/checks/DuplicateUsesFeature.md.html b/docs/checks/DuplicateUsesFeature.md.html index f9e0be48..6854b73a 100644 --- a/docs/checks/DuplicateUsesFeature.md.html +++ b/docs/checks/DuplicateUsesFeature.md.html @@ -41,7 +41,7 @@ android.hardware.camera [DuplicateUsesFeature] <uses-feature android:name="android.hardware.camera"/> -------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -63,7 +63,7 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -96,8 +96,7 @@ <!-- Wallpaper --> <string name="wallpaper_instructions">Tap picture to set portrait wallpaper</string> </resources> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ManifestDetectorTest.kt) diff --git a/docs/checks/EagerGradleConfiguration.md.html b/docs/checks/EagerGradleConfiguration.md.html index da544e11..1bf92e41 100644 --- a/docs/checks/EagerGradleConfiguration.md.html +++ b/docs/checks/EagerGradleConfiguration.md.html @@ -53,17 +53,17 @@ ``` // build.gradle.kts -implementation("androidx.lint:lint-gradle:1.0.0-alpha04") +implementation("androidx.lint:lint-gradle:1.0.0-alpha05") // build.gradle -implementation 'androidx.lint:lint-gradle:1.0.0-alpha04' +implementation 'androidx.lint:lint-gradle:1.0.0-alpha05' // build.gradle.kts with version catalogs: implementation(libs.lint.gradle) # libs.versions.toml [versions] -lint-gradle = "1.0.0-alpha04" +lint-gradle = "1.0.0-alpha05" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -75,7 +75,7 @@ } ``` -1.0.0-alpha04 is the version this documentation was generated from; +1.0.0-alpha05 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.lint:lint-gradle](androidx_lint_lint-gradle.md.html). diff --git a/docs/checks/EasterEgg.md.html b/docs/checks/EasterEgg.md.html index f8de6ffd..762302d0 100644 --- a/docs/checks/EasterEgg.md.html +++ b/docs/checks/EasterEgg.md.html @@ -51,7 +51,7 @@ code follows [EasterEgg] /* \u002A\U002F static { System.out.println("I'm executed on class load"); } \u002f\u002a */ ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -71,7 +71,7 @@ /* We must STOPSHIP! */ String x = "STOPSHIP"; // OK } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/CommentDetectorTest.java) diff --git a/docs/checks/EditedTargetSdkVersion.md.html b/docs/checks/EditedTargetSdkVersion.md.html index 494578e4..71193016 100644 --- a/docs/checks/EditedTargetSdkVersion.md.html +++ b/docs/checks/EditedTargetSdkVersion.md.html @@ -29,14 +29,13 @@ Tests : [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) -Updating the `targetSdkVersion` of an app is seemingly easy: just -increment the `targetSdkVersion` number in the manifest file! +Updating the `targetSdk` of an app is seemingly easy: just increment the +`targetSdk` number in the build script! -But that's not actually safe. The `targetSdkVersion` controls a wide -range of behaviors that change from release to release, and to update, -you should carefully consult the documentation to see what has changed, -how your app may need to adjust, and then of course, carefully test -everything. +But that's not actually safe. The `targetSdk` controls a wide range of +behaviors that change from release to release, and to update, you should +carefully consult the documentation to see what has changed, how your +app may need to adjust, and then of course, carefully test everything. In new versions of Android Studio, there is a special migration assistant, available from the tools menu (and as a quickfix from this @@ -44,15 +43,14 @@ applicable migration steps to those needed for your app. This lint check does something very simple: it just detects whether it -looks like you've manually edited the targetSdkVersion field in a -build.gradle file. Obviously, as part of doing the above careful steps, -you may end up editing the value, which would trigger the check -- and -it's safe to ignore it; this lint check *only* runs in the IDE, not from -the command line; it's sole purpose to bring *awareness* to the (many) -developers who haven't been aware of this issue and have just bumped the -targetSdkVersion, recompiled, and uploaded their updated app to the -Google Play Store, sometimes leading to crashes or other problems on -newer devices. +looks like you've manually edited the targetSdk field in a build script. +Obviously, as part of doing the above careful steps, you may end up +editing the value, which would trigger the check -- and it's safe to +ignore it; this lint check *only* runs in the IDE, not from the command +line; it's sole purpose to bring *awareness* to the (many) developers +who haven't been aware of this issue and have just bumped the targetSdk, +recompiled, and uploaded their updated app to the Google Play Store, +sometimes leading to crashes or other problems on newer devices. (##) Suppressing diff --git a/docs/checks/EllipsizeMaxLines.md.html b/docs/checks/EllipsizeMaxLines.md.html index 6de85fd2..7880e130 100644 --- a/docs/checks/EllipsizeMaxLines.md.html +++ b/docs/checks/EllipsizeMaxLines.md.html @@ -51,7 +51,7 @@ can lead to crashes. Use singleLine=true instead. [EllipsizeMaxLines] android:maxLines="1" -------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -83,7 +83,7 @@ android:text="long text" /> </RelativeLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/EllipsizeMaxLinesDetectorTest.java) diff --git a/docs/checks/EmptyNavDeepLink.md.html b/docs/checks/EmptyNavDeepLink.md.html index 542850ce..1c94bf70 100644 --- a/docs/checks/EmptyNavDeepLink.md.html +++ b/docs/checks/EmptyNavDeepLink.md.html @@ -51,7 +51,7 @@ [EmptyNavDeepLink] navDeepLink { } ----------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -64,14 +64,14 @@ fun createDeepLink() { navDeepLink { } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/androidx/navigation/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers package androidx.navigation public fun navDeepLink(deepLinkBuilder: NavDeepLinkDslBuilder.() -> Unit): NavDeepLink {} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-common-lint/src/test/java/androidx/navigation/common/lint/EmptyNavDeepLinkDetectorTest.kt) @@ -90,17 +90,17 @@ ``` // build.gradle.kts -implementation("androidx.navigation:navigation-common:2.9.0-rc01") +implementation("androidx.navigation:navigation-common:2.9.7") // build.gradle -implementation 'androidx.navigation:navigation-common:2.9.0-rc01' +implementation 'androidx.navigation:navigation-common:2.9.7' // build.gradle.kts with version catalogs: implementation(libs.navigation.common) # libs.versions.toml [versions] -navigation-common = "2.9.0-rc01" +navigation-common = "2.9.7" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -112,7 +112,7 @@ } ``` -2.9.0-rc01 is the version this documentation was generated from; +2.9.7 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.navigation:navigation-common](androidx_navigation_navigation-common.md.html). diff --git a/docs/checks/EmptySuperCall.md.html b/docs/checks/EmptySuperCall.md.html index 3dabc18d..38e292bf 100644 --- a/docs/checks/EmptySuperCall.md.html +++ b/docs/checks/EmptySuperCall.md.html @@ -42,7 +42,7 @@ the super method is defined to be empty [EmptySuperCall] super.someOtherMethod(arg) // ERROR --------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -72,7 +72,7 @@ super.someOtherMethod(arg) // ERROR } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/EmptySuperDetectorTest.kt) diff --git a/docs/checks/EnforceUTF8.md.html b/docs/checks/EnforceUTF8.md.html index 552311db..114c6be9 100644 --- a/docs/checks/EnforceUTF8.md.html +++ b/docs/checks/EnforceUTF8.md.html @@ -53,7 +53,7 @@ [EnforceUTF8] <?xml version="1.0" encoding="iso-latin-1"?> ----------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -66,7 +66,7 @@ android:orientation="vertical" > </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/Utf8DetectorTest.java) diff --git a/docs/checks/EnqueueWork.md.html b/docs/checks/EnqueueWork.md.html index 5c21c3fc..e6c19ac6 100644 --- a/docs/checks/EnqueueWork.md.html +++ b/docs/checks/EnqueueWork.md.html @@ -57,7 +57,7 @@ enqueued: did you forget to call enqueue()? [EnqueueWork] WorkContinuation cont4 = WorkContinuation.combine(workRequest6, cont2, cont3); // ERROR ---------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -176,7 +176,7 @@ private void doSomeOtherStuff() { } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WorkManagerDetectorTest.kt) diff --git a/docs/checks/EnsureInitializerNoArgConstr.md.html b/docs/checks/EnsureInitializerNoArgConstr.md.html index 6ee46b41..aeb97a3f 100644 --- a/docs/checks/EnsureInitializerNoArgConstr.md.html +++ b/docs/checks/EnsureInitializerNoArgConstr.md.html @@ -51,7 +51,7 @@ constructor [EnsureInitializerNoArgConstr] class TestInitializer(val int: Int): Initializer<Unit> { ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -64,7 +64,7 @@ class TestInitializer(val int: Int): Initializer { } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/startup/startup-runtime-lint/src/test/java/androidx/startup/lint/InitializerConstructorTest.kt) diff --git a/docs/checks/ErroneousLayoutAttribute.md.html b/docs/checks/ErroneousLayoutAttribute.md.html index 81d27d1d..74cb76d9 100644 --- a/docs/checks/ErroneousLayoutAttribute.md.html +++ b/docs/checks/ErroneousLayoutAttribute.md.html @@ -48,7 +48,7 @@ [ErroneousLayoutAttribute] android:orientation="horizontal" -------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -60,7 +60,7 @@ android:layout_height="wrap_content" android:orientation="horizontal" /> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/ErroneousLayoutAttributeDetectorTest.kt) diff --git a/docs/checks/ErrorProneDoNotMockUsage.md.html b/docs/checks/ErrorProneDoNotMockUsage.md.html index 37772d7c..c016db8a 100644 --- a/docs/checks/ErrorProneDoNotMockUsage.md.html +++ b/docs/checks/ErrorProneDoNotMockUsage.md.html @@ -60,7 +60,7 @@ annotation. [ErrorProneDoNotMockUsage] @DoNotMock ---------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -89,7 +89,7 @@ interface TestClass4 { fun fake(): TestClass4? = null } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/mocking/DoNotMockUsageDetectorTest.kt) diff --git a/docs/checks/ExactAlarm.md.html b/docs/checks/ExactAlarm.md.html index 08e37cdf..18f81932 100644 --- a/docs/checks/ExactAlarm.md.html +++ b/docs/checks/ExactAlarm.md.html @@ -44,7 +44,7 @@ targeting API level 33 or higher [ExactAlarm] <uses-permission android:name="android.permission.USE_EXACT_ALARM" /> ---------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -54,7 +54,7 @@ <uses-permission android:name="android.permission.USE_EXACT_ALARM" /> <uses-sdk android:targetSdkVersion="32" /> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AlarmDetectorTest.kt) diff --git a/docs/checks/ExactAlarmPolicy.md.html b/docs/checks/ExactAlarmPolicy.md.html new file mode 100644 index 00000000..4eb654a1 --- /dev/null +++ b/docs/checks/ExactAlarmPolicy.md.html @@ -0,0 +1,183 @@ + +(#) Exact Alarm Insights + +!!! WARNING: Exact Alarm Insights + This is a warning. + +Id +: `ExactAlarmPolicy` +Summary +: Exact Alarm Insights +Severity +: Warning +Category +: Play Policy +Platform +: Android +Vendor +: Play policy insights beta +Min +: Lint 8.2 to 8.6 +Compiled +: Lint 8.7+ +Artifact +: [com.google.play.policy.insights:insights-lint](com_google_play_policy_insights_insights-lint.md.html) +Since +: 0.1.3 +Affects +: Manifest files +Editing +: This check runs on the fly in the IDE editor + +`USE_EXACT_ALARM` permission on Android 13+ is a highly restricted +permission used only for apps whose core, user-facing functionality +genuinely requires precise timing, like dedicated alarm, timer, or +calendar applications with event notifications. If your app does not +have this specific core need, consider using `SCHEDULE_EXACT_ALARM` +permission instead. It provides the same functionality but access must +be granted by the user. This policy prevents misuse that impacts system +resources. + +**Dos:** + +- Request the auto granted version of the permission, `USE_EXACT_ALARM`, + only if your app’s core functionality is of alarm or calendar. +- Use `SCHEDULE_EXACT_ALARM` instead if the above criteria is not met. +- Complete Play Console declaration to indicate app functionality. + +**Don'ts:** + +- Use this permission for non-critical features that do not directly + contribute to the app's main purpose. + +**Helpful Links:** + +See Policy page: +https://support.google.com/googleplay/android-developer/answer/9888170 +See developer guidance: +https://developer.android.com/about/versions/13/features#use-exact-alarm-permission +See Declaration form: +https://support.google.com/googleplay/android-developer/answer/9214102 + +Always review the full policy in the Policy Center to ensure +compliance. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +AndroidManifest.xml:3:Warning: USE_EXACT_ALARM permission is restricted +and will be automatically granted to apps with core functions needing +precise timing (alarms, calendars). You’ll need to justify the need for +this API. [ExactAlarmPolicy] + <uses-permission android:name="android.permission.USE_EXACT_ALARM"/> + ------------------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`AndroidManifest.xml`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android"> + <uses-permission android:name="android.permission.USE_EXACT_ALARM"/> + <uses-sdk android:targetSdkVersion="33"/> +</manifest> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](/policyinsights/src/test/java/com/google/play/policy/insights/ExactAlarmPolicyDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `ExactAlarmPolicyDetector.testFlagsUseExactAlarmPermission`. +To report a problem with this extracted sample, contact +Play policy insights beta. + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("com.google.play.policy.insights:insights-lint:0.1.4") + +// build.gradle +implementation 'com.google.play.policy.insights:insights-lint:0.1.4' + +// build.gradle.kts with version catalogs: +implementation(libs.insights.lint) + +# libs.versions.toml +[versions] +insights-lint = "0.1.4" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +insights-lint = { + module = "com.google.play.policy.insights:insights-lint", + version.ref = "insights-lint" +} +``` + +0.1.4 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.google.play.policy.insights:insights-lint](com_google_play_policy_insights_insights-lint.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Adding the suppression attribute `tools:ignore="ExactAlarmPolicy"` + on the problematic XML element (or one of its enclosing elements). + You may also need to add the following namespace declaration on the + root element in the XML file if it's not already there: + `xmlns:tools="http://schemas.android.com/tools"`. + + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <manifest xmlns:tools="http://schemas.android.com/tools"> + ... + <uses-permission tools:ignore="ExactAlarmPolicy" .../> + ... + </manifest> + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="ExactAlarmPolicy" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'ExactAlarmPolicy' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore ExactAlarmPolicy ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/ExceptionMessage.md.html b/docs/checks/ExceptionMessage.md.html index 57435080..92b2dcb9 100644 --- a/docs/checks/ExceptionMessage.md.html +++ b/docs/checks/ExceptionMessage.md.html @@ -59,7 +59,7 @@ [ExceptionMessage] check(true) ----- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -70,10 +70,10 @@ fun content() { check(true) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/ExceptionMessageDetectorTest.kt) +You can also visit the source code ([ExceptionMessageDetectorTest.kt](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/ExceptionMessageDetectorTest.kt) +[ExceptionMessageDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/lint/internal-lint-checks/src/test/java/androidx/compose/lint/ExceptionMessageDetectorTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/ExifInterface.md.html b/docs/checks/ExifInterface.md.html index ac63734a..dec9a896 100644 --- a/docs/checks/ExifInterface.md.html +++ b/docs/checks/ExifInterface.md.html @@ -52,7 +52,7 @@ androidx.exifinterface.media.ExifInterface instead [ExifInterface] new android.media.ExifInterface(path); --------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -74,7 +74,7 @@ new android.media.ExifInterface(path); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ExifInterfaceDetectorTest.java) diff --git a/docs/checks/ExpensiveAssertion.md.html b/docs/checks/ExpensiveAssertion.md.html index de35e96c..95acebfa 100644 --- a/docs/checks/ExpensiveAssertion.md.html +++ b/docs/checks/ExpensiveAssertion.md.html @@ -82,7 +82,7 @@ [ExpensiveAssertion] assert(expensive()) // WARN ----------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -127,7 +127,7 @@ assert(x3 != null) // ERROR } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -152,7 +152,7 @@ fun castOkay(foo: Any) { assert(foo is String) // OK } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/Utils.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -163,7 +163,7 @@ return DIAGNOSE; } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AssertDetectorTest.kt) diff --git a/docs/checks/ExperimentalAnnotationRetention.md.html b/docs/checks/ExperimentalAnnotationRetention.md.html index c3b2097e..58a994d0 100644 --- a/docs/checks/ExperimentalAnnotationRetention.md.html +++ b/docs/checks/ExperimentalAnnotationRetention.md.html @@ -51,17 +51,17 @@ ``` // build.gradle.kts -implementation("androidx.annotation:annotation-experimental:1.5.0-rc01") +implementation("androidx.annotation:annotation-experimental:1.6.0-rc01") // build.gradle -implementation 'androidx.annotation:annotation-experimental:1.5.0-rc01' +implementation 'androidx.annotation:annotation-experimental:1.6.0-rc01' // build.gradle.kts with version catalogs: implementation(libs.annotation.experimental) # libs.versions.toml [versions] -annotation-experimental = "1.5.0-rc01" +annotation-experimental = "1.6.0-rc01" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -73,7 +73,7 @@ } ``` -1.5.0-rc01 is the version this documentation was generated from; +1.6.0-rc01 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.annotation:annotation-experimental](androidx_annotation_annotation-experimental.md.html). diff --git a/docs/checks/ExpiredTargetSdkVersion.md.html b/docs/checks/ExpiredTargetSdkVersion.md.html index 9d37833d..9e46d1f7 100644 --- a/docs/checks/ExpiredTargetSdkVersion.md.html +++ b/docs/checks/ExpiredTargetSdkVersion.md.html @@ -55,7 +55,7 @@ target API level 33 or higher. [ExpiredTargetSdkVersion] targetSdk = "30" # ERROR 1 ---- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -63,7 +63,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers android { } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `../gradle/libs.versions.toml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~toml linenumbers @@ -74,10 +74,10 @@ targetSdkVersion = "30" # OK 1 #noinspection ExpiringTargetSdkVersion target_sdk_version = "30" # OK 2 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) +You can also visit the source code ([GradleDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) +[ProjectInitializerTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/ProjectInitializerTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/ExpiringTargetSdkVersion.md.html b/docs/checks/ExpiringTargetSdkVersion.md.html index 74bbbe9d..019c9d9b 100644 --- a/docs/checks/ExpiringTargetSdkVersion.md.html +++ b/docs/checks/ExpiringTargetSdkVersion.md.html @@ -38,8 +38,8 @@ while still allowing your app or sdk to run on older Android versions (down to the `minSdkVersion`). -To update your `targetSdkVersion`, follow the steps from "Meeting Google -Play requirements for target API level", +To update your `targetSdk`, follow the steps from "Meeting Google Play +requirements for target API level", https://developer.android.com/distribute/best-practices/develop/target-sdk.html. !!! Tip @@ -54,7 +54,7 @@ starting on August 31, 2023. [ExpiringTargetSdkVersion] targetSdkVersion 31 ------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -70,7 +70,7 @@ targetSdkVersion 2024 // OK } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/ExportedContentProvider.md.html b/docs/checks/ExportedContentProvider.md.html index 85398661..54ba6127 100644 --- a/docs/checks/ExportedContentProvider.md.html +++ b/docs/checks/ExportedContentProvider.md.html @@ -54,7 +54,7 @@ access to potentially sensitive data [ExportedContentProvider] <provider -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -93,7 +93,7 @@ </provider> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -127,8 +127,7 @@ <!-- Wallpaper --> <string name="wallpaper_instructions">Tap picture to set portrait wallpaper</string> </resources> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/SecurityDetectorTest.java) diff --git a/docs/checks/ExportedPreferenceActivity.md.html b/docs/checks/ExportedPreferenceActivity.md.html index a0d127ae..c5501af2 100644 --- a/docs/checks/ExportedPreferenceActivity.md.html +++ b/docs/checks/ExportedPreferenceActivity.md.html @@ -47,7 +47,7 @@ exported [ExportedPreferenceActivity] <activity ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -91,7 +91,7 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PreferenceActivityDetectorTest.java) diff --git a/docs/checks/ExportedReceiver.md.html b/docs/checks/ExportedReceiver.md.html index 84fa79a8..eb90964f 100644 --- a/docs/checks/ExportedReceiver.md.html +++ b/docs/checks/ExportedReceiver.md.html @@ -50,7 +50,7 @@ permission [ExportedReceiver] <receiver -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -78,8 +78,7 @@ </application> </manifest> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -113,8 +112,7 @@ <!-- Wallpaper --> <string name="wallpaper_instructions">Tap picture to set portrait wallpaper</string> </resources> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/SecurityDetectorTest.java) diff --git a/docs/checks/ExportedService.md.html b/docs/checks/ExportedService.md.html index ab9b62d6..20917801 100644 --- a/docs/checks/ExportedService.md.html +++ b/docs/checks/ExportedService.md.html @@ -49,7 +49,7 @@ permission [ExportedService] <service ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -79,8 +79,7 @@ </application> </manifest> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -114,8 +113,7 @@ <!-- Wallpaper --> <string name="wallpaper_instructions">Tap picture to set portrait wallpaper</string> </resources> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/SecurityDetectorTest.java) diff --git a/docs/checks/ExposedRootPath.md.html b/docs/checks/ExposedRootPath.md.html index 265fef08..0525525f 100644 --- a/docs/checks/ExposedRootPath.md.html +++ b/docs/checks/ExposedRootPath.md.html @@ -27,7 +27,7 @@ Artifact : [com.android.security.lint:lint](com_android_security_lint_lint.md.html) Since -: 1.0.1 +: 1.0.0 Affects : Resource files Editing @@ -56,7 +56,7 @@ arbitrary access to device files and folders [ExposedRootPath] <root-path name="root" path="/"/> --------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -68,7 +68,7 @@ <files-path name="my_docs" path="docs/"/> <root-path name="root" path="/"/> </paths> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/MisconfiguredFileProviderDetectorTest.kt) @@ -88,17 +88,17 @@ ``` // build.gradle.kts -lintChecks("com.android.security.lint:lint:1.0.3") +lintChecks("com.android.security.lint:lint:1.0.4") // build.gradle -lintChecks 'com.android.security.lint:lint:1.0.3' +lintChecks 'com.android.security.lint:lint:1.0.4' // build.gradle.kts with version catalogs: lintChecks(libs.com.android.security.lint.lint) # libs.versions.toml [versions] -com-android-security-lint-lint = "1.0.3" +com-android-security-lint-lint = "1.0.4" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -110,7 +110,7 @@ } ``` -1.0.3 is the version this documentation was generated from; +1.0.4 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.android.security.lint:lint](com_android_security_lint_lint.md.html). diff --git a/docs/checks/ExtendedBluetoothDiscoveryDuration.md.html b/docs/checks/ExtendedBluetoothDiscoveryDuration.md.html new file mode 100644 index 00000000..77fc9b1a --- /dev/null +++ b/docs/checks/ExtendedBluetoothDiscoveryDuration.md.html @@ -0,0 +1,182 @@ + +(#) The EXTRA_DISCOVERABLE_DURATION parameter is unsafely high + +!!! WARNING: The EXTRA_DISCOVERABLE_DURATION parameter is unsafely high + This is a warning. + +Id +: `ExtendedBluetoothDiscoveryDuration` +Summary +: The EXTRA_DISCOVERABLE_DURATION parameter is unsafely high +Severity +: Warning +Category +: Security +Platform +: Any +Vendor +: Google - Android 3P Vulnerability Research +Contact +: https://github.com/google/android-security-lints +Feedback +: https://github.com/google/android-security-lints/issues +Min +: Lint 4.1 +Compiled +: Lint 8.0 and 8.1 +Artifact +: [com.android.security.lint:lint](com_android_security_lint_lint.md.html) +Since +: 1.0.4 +Affects +: Kotlin and Java files +Editing +: This check runs on the fly in the IDE editor +See +: https://goo.gle/ExtendedBluetoothDiscoveryDuration +Implementation +: [Source Code](https://github.com/google/android-security-lints/tree/main/checks/src/main/java/com/example/lint/checks/BluetoothAdapterDetector.kt) +Tests +: [Source Code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/BluetoothAdapterDetectorTest.kt) +Copyright Year +: 2024 + +Setting the EXTRA_DISCOVERABLE_DURATION parameter to more than + 120 seconds can cause the device to be discoverable for an +unsafe amount of time. This could increase the +timeframe in which attackers can conduct Bluetooth attacks. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/MainActivity.java:6:Warning: The EXTRA_DISCOVERABLE_DURATION time +should be set to a shorter amount of time +[ExtendedBluetoothDiscoveryDuration] + private Intent discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE).putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 121); + -------------------------------------------------------------------------------------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/MainActivity.java`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers +import android.app.Activity; + import android.bluetooth.BluetoothAdapter; + import android.content.Intent; + + public class MainActivity extends Activity { + private Intent discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE).putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 121); +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/BluetoothAdapterDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `BluetoothAdapterDetector.extraDiscoverableDurationMoreThan120Seconds_showsWarning`. +To report a problem with this extracted sample, visit +https://github.com/google/android-security-lints/issues. + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. This lint check is included in the lint documentation, + but the Android team may or may not agree with its recommendations. + +``` +// build.gradle.kts +lintChecks("com.android.security.lint:lint:1.0.4") + +// build.gradle +lintChecks 'com.android.security.lint:lint:1.0.4' + +// build.gradle.kts with version catalogs: +lintChecks(libs.com.android.security.lint.lint) + +# libs.versions.toml +[versions] +com-android-security-lint-lint = "1.0.4" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +com-android-security-lint-lint = { + module = "com.android.security.lint:lint", + version.ref = "com-android-security-lint-lint" +} +``` + +1.0.4 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.android.security.lint:lint](com_android_security_lint_lint.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Using a suppression annotation like this on the enclosing + element: + + ```kt + // Kotlin + @Suppress("ExtendedBluetoothDiscoveryDuration") + fun method() { + putExtra(...) + } + ``` + + or + + ```java + // Java + @SuppressWarnings("ExtendedBluetoothDiscoveryDuration") + void method() { + putExtra(...); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection ExtendedBluetoothDiscoveryDuration + problematicStatement() + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="ExtendedBluetoothDiscoveryDuration" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'ExtendedBluetoothDiscoveryDuration' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore ExtendedBluetoothDiscoveryDuration ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/ExtraText.md.html b/docs/checks/ExtraText.md.html index 522bba73..48ab974e 100644 --- a/docs/checks/ExtraText.md.html +++ b/docs/checks/ExtraText.md.html @@ -49,7 +49,7 @@ ">" [ExtraText] <shape>> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -67,28 +67,28 @@ </application> ` </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/drawable/icon.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <shape>> <item></item>> </shape> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> <string name="test">Test</string> <!-- Text is allowed in value resource files --> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/xml/myfile.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <foo> Test <!-- Text is allowed in xml and raw folder files --> </foo> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ExtraTextDetectorTest.kt) diff --git a/docs/checks/ExtraTranslation.md.html b/docs/checks/ExtraTranslation.md.html index 2eb9515d..2a76a702 100644 --- a/docs/checks/ExtraTranslation.md.html +++ b/docs/checks/ExtraTranslation.md.html @@ -54,7 +54,7 @@ translated here but not found in default locale [ExtraTranslation] <string name="continue_skip_label">"Weiter"</string> -------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -90,8 +90,7 @@ <!-- Wallpaper --> <string name="wallpaper_instructions">Tap picture to set portrait wallpaper</string> </resources> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-cs/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -106,7 +105,7 @@ <skip /> <string name="wallpaper_instructions">"Klepnutím na obrázek nastavíte tapetu portrétu"</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-de-rDE/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -122,7 +121,7 @@ <string name="wallpaper_instructions">"Tippen Sie auf Bild, um Porträt-Bildschirmhintergrund einzustellen"</string> <string name="continue_skip_label">"Weiter"</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-es/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -144,7 +143,7 @@ <item>"Nombre de tu colegio"</item> </string-array> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-es-rUS/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -153,7 +152,7 @@ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <string name="menu_search">"Búsqueda"</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-land/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -177,8 +176,7 @@ <!-- Wallpaper --> <string name="wallpaper_instructions">Tap image to set landscape wallpaper</string> </resources> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-cs/arrays.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -191,7 +189,7 @@ <item>"Název střední školy"</item> </string-array> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-es/donottranslate.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -199,7 +197,7 @@ <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <string name="full_wday_month_day_no_year">EEEE, d MMMM</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-nl-rNL/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -216,22 +214,22 @@ <skip /> <string name="wallpaper_instructions">"Tik op afbeelding om portretachtergrond in te stellen"</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/public.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources><public /></resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout/foo.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <LinearLayout/> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout-ja/foo.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <LinearLayout/> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/TranslationDetectorTest.kt) diff --git a/docs/checks/FieldSiteTargetOnQualifierAnnotation.md.html b/docs/checks/FieldSiteTargetOnQualifierAnnotation.md.html index 8fc95bda..be9e1f17 100644 --- a/docs/checks/FieldSiteTargetOnQualifierAnnotation.md.html +++ b/docs/checks/FieldSiteTargetOnQualifierAnnotation.md.html @@ -34,149 +34,9 @@ : Kotlin and Java files and test sources Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/google/dagger/tree/master/java/dagger/lint/DaggerKotlinIssueDetector.kt) -Tests -: [Source Code](https://github.com/google/dagger/tree/master/javatests/dagger/lint/DaggerKotlinIssueDetectorTest.kt) -Copyright Year -: 2020 It's redundant to use 'field:' site-targets for qualifier annotations. -(##) Example - -Here is an example of lint warnings produced by this check: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/foo/MyQualifier.kt:14:Warning: Redundant 'field:' used for Dagger -qualifier annotation. [FieldSiteTargetOnQualifierAnnotation] - @field:MyQualifier - ------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`src/foo/MyQualifier.kt`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers -package foo -import javax.inject.Inject -import javax.inject.Qualifier -import kotlin.jvm.JvmStatic -import dagger.Provides -import dagger.Module - -@Qualifier -annotation class MyQualifier - -class InjectedTest { - // This should fail because of `:field` - @Inject - @field:MyQualifier - lateinit var prop: String - - // This is fine! - @Inject - @MyQualifier - lateinit var prop2: String -} - -@Module -object ObjectModule { - // This should fail because it uses `@JvmStatic` - @JvmStatic - @Provides - fun provideFoo(): String { - - } - - // This is fine! - @Provides - fun provideBar(): String { - - } -} - -@Module -class ClassModule { - companion object { - // This should fail because the companion object is part of ClassModule, so this is unnecessary. - @JvmStatic - @Provides - fun provideBaz(): String { - - } - } -} - -@Module -class ClassModuleQualified { - companion object { - // This should fail because the companion object is part of ClassModule, so this is unnecessary. - // This specifically tests a fully qualified annotation - @kotlin.jvm.JvmStatic - @Provides - fun provideBaz(): String { - - } - } -} - -@Module -class ClassModule2 { - // This should fail because the companion object is part of ClassModule - @Module - companion object { - @Provides - fun provideBaz(): String { - - } - } -} - -@Module -class ClassModule2Qualified { - // This should fail because the companion object is part of ClassModule - // This specifically tests a fully qualified annotation - @dagger.Module - companion object { - @Provides - fun provideBaz(): String { - - } - } -} - -// This is correct as of Dagger 2.26! -@Module -class ClassModule3 { - companion object { - @Provides - fun provideBaz(): String { - - } - } -} - -class ClassModule4 { - // This is should fail because this should be extracted to a standalone object. - @Module - companion object { - @Provides - fun provideBaz(): String { - - } - } -} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can also visit the -[source code](https://github.com/google/dagger/tree/master/javatests/dagger/lint/DaggerKotlinIssueDetectorTest.kt) -for the unit tests for this check to see additional scenarios. - -The above example was automatically extracted from the first unit test -found for this lint check, `DaggerKotlinIssueDetector.simpleSmokeTestForQualifiersAndProviders`. -To report a problem with this extracted sample, visit -https://github.com/google/dagger/issues. - (##) Including !!! diff --git a/docs/checks/FileEndsWithExt.md.html b/docs/checks/FileEndsWithExt.md.html index ea48d515..d08c2aa6 100644 --- a/docs/checks/FileEndsWithExt.md.html +++ b/docs/checks/FileEndsWithExt.md.html @@ -51,7 +51,7 @@ did you mean "webp" ? [FileEndsWithExt] fun isWebp(path: File) = path.extension.startsWith(".webp") ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -68,7 +68,7 @@ fun File.isText() = path.endsWith(".txt") // OK fun File.isPng() = extension == "png" // OK -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/FileEndsWithDetectorTest.kt) diff --git a/docs/checks/FilePropertyDetector.md.html b/docs/checks/FilePropertyDetector.md.html index ddcbeeac..f2cd7299 100644 --- a/docs/checks/FilePropertyDetector.md.html +++ b/docs/checks/FilePropertyDetector.md.html @@ -50,17 +50,17 @@ ``` // build.gradle.kts -implementation("androidx.lint:lint-gradle:1.0.0-alpha04") +implementation("androidx.lint:lint-gradle:1.0.0-alpha05") // build.gradle -implementation 'androidx.lint:lint-gradle:1.0.0-alpha04' +implementation 'androidx.lint:lint-gradle:1.0.0-alpha05' // build.gradle.kts with version catalogs: implementation(libs.lint.gradle) # libs.versions.toml [versions] -lint-gradle = "1.0.0-alpha04" +lint-gradle = "1.0.0-alpha05" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -72,7 +72,7 @@ } ``` -1.0.0-alpha04 is the version this documentation was generated from; +1.0.0-alpha05 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.lint:lint-gradle](androidx_lint_lint-gradle.md.html). diff --git a/docs/checks/FindViewByIdCast.md.html b/docs/checks/FindViewByIdCast.md.html index cb9bde6b..809d344c 100644 --- a/docs/checks/FindViewByIdCast.md.html +++ b/docs/checks/FindViewByIdCast.md.html @@ -51,7 +51,7 @@ [FindViewByIdCast] checkNotNull1(findViewById(R.id.textView)).setAlpha(0.5f); // WARN --------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -104,7 +104,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `build.gradle`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~groovy linenumbers @@ -114,7 +114,7 @@ targetCompatibility JavaVersion.VERSION_1_8 } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ViewTypeDetectorTest.kt) diff --git a/docs/checks/FlowOperatorInvokedInComposition.md.html b/docs/checks/FlowOperatorInvokedInComposition.md.html index 330e385e..6f469168 100644 --- a/docs/checks/FlowOperatorInvokedInComposition.md.html +++ b/docs/checks/FlowOperatorInvokedInComposition.md.html @@ -149,7 +149,7 @@ [FlowOperatorInvokedInComposition] .drop(0) ---- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -220,7 +220,7 @@ .drop(0) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ComposableFlowOperatorDetectorTest.kt) @@ -239,17 +239,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime-android:1.9.0-alpha01") +implementation("androidx.compose.runtime:runtime-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.runtime:runtime-android:1.9.0-alpha01' +implementation 'androidx.compose.runtime:runtime-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.runtime.android) # libs.versions.toml [versions] -runtime-android = "1.9.0-alpha01" +runtime-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -261,11 +261,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.runtime:runtime-lint:1.9.0-alpha01`. +You can also use `androidx.compose.runtime:runtime-lint:1.11.0-alpha06`. [Additional details about androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html). diff --git a/docs/checks/FontValidation.md.html b/docs/checks/FontValidation.md.html index d93e4daa..522da162 100644 --- a/docs/checks/FontValidation.md.html +++ b/docs/checks/FontValidation.md.html @@ -44,7 +44,7 @@ tag [FontValidation] <font ---- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -58,10 +58,10 @@ android:fontWeight="400" android:font="@font/monserrat" /> </font-family> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/FontDetectorTest.java) +You can also visit the source code ([FontDetectorTest.java](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/FontDetectorTest.java) +[MainTest.java](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/MainTest.java) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/ForegroundServicePermission.md.html b/docs/checks/ForegroundServicePermission.md.html index 6398827f..87c1a129 100644 --- a/docs/checks/ForegroundServicePermission.md.html +++ b/docs/checks/ForegroundServicePermission.md.html @@ -45,7 +45,7 @@ android.permission.SYSTEM_CAMERA] [ForegroundServicePermission] <service ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -77,8 +77,7 @@ </application> </manifest> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -112,8 +111,7 @@ <!-- Wallpaper --> <string name="wallpaper_instructions">Tap picture to set portrait wallpaper</string> </resources> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ForegroundServicePermissionDetectorTest.kt) diff --git a/docs/checks/ForegroundServiceType.md.html b/docs/checks/ForegroundServiceType.md.html index 3eac4fb1..16577fca 100644 --- a/docs/checks/ForegroundServiceType.md.html +++ b/docs/checks/ForegroundServiceType.md.html @@ -42,7 +42,7 @@ foregroundServiceType attribute specified [ForegroundServiceType] startForeground(1, null); --------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -60,8 +60,7 @@ </service> </application> </manifest> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyService.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -80,7 +79,7 @@ return null; } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ForegroundServiceTypesDetectorTest.kt) diff --git a/docs/checks/ForegroundServicesPolicy.md.html b/docs/checks/ForegroundServicesPolicy.md.html new file mode 100644 index 00000000..9aeaf1a1 --- /dev/null +++ b/docs/checks/ForegroundServicesPolicy.md.html @@ -0,0 +1,180 @@ + +(#) Foreground Services Insights + +!!! WARNING: Foreground Services Insights + This is a warning. + +Id +: `ForegroundServicesPolicy` +Summary +: Foreground Services Insights +Severity +: Warning +Category +: Play Policy +Platform +: Android +Vendor +: Play policy insights beta +Min +: Lint 8.2 to 8.6 +Compiled +: Lint 8.7+ +Artifact +: [com.google.play.policy.insights:insights-lint](com_google_play_policy_insights_insights-lint.md.html) +Since +: 0.1.3 +Affects +: Manifest files +Editing +: This check runs on the fly in the IDE editor + +For apps targeting Android 14+ you must declare valid Foreground Service +(FGS) types in the manifest and Play Console, providing descriptions, +user impact, and a demo video justifying their use based on +user-initiated, perceptible actions. + +**Dos:** + +- Run FGS only for as long as necessary to complete the task. +- Ensure FGS provides a user-beneficial core app feature, is initiated + by the user, is visible in notifications or is user perceptible (for + example, audio from playing a song). +- Submit a declaration form in your Play Console if targeting Android + 14+ and describe the use case for each Foreground Services (FGS) + permission used. Ensure the appropriate FGS type is selected. + Examples listed here. + +**Don'ts:** + +- Use FGS if system management of your task doesn’t break the user + experience in your app. Consider alternatives like WorkManager +- Declare invalid or inaccurate FGS types in your app’s manifest. + +**Helpful Links:** + +See Policy page: https://goo.gle/play-policy-foreground-service +See Help Center article: https://goo.gle/play-help-foreground-service +See Declaration form: https://goo.gle/play-permission-decl-form + +Always review the full policy in the Policy Center to ensure +compliance. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +AndroidManifest.xml:3:Warning: Android 14+ requires Foreground Service +types declaration and justification. [ForegroundServicesPolicy] + <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/> + ---------------------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`AndroidManifest.xml`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android"> + <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/> + <uses-sdk android:targetSdkVersion="34"/> +</manifest> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](/policyinsights/src/test/java/com/google/play/policy/insights/ForegroundServicesPolicyDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `ForegroundServicesPolicyDetector.testFlagsForegroundServiceConnectedPermission`. +To report a problem with this extracted sample, contact +Play policy insights beta. + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("com.google.play.policy.insights:insights-lint:0.1.4") + +// build.gradle +implementation 'com.google.play.policy.insights:insights-lint:0.1.4' + +// build.gradle.kts with version catalogs: +implementation(libs.insights.lint) + +# libs.versions.toml +[versions] +insights-lint = "0.1.4" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +insights-lint = { + module = "com.google.play.policy.insights:insights-lint", + version.ref = "insights-lint" +} +``` + +0.1.4 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.google.play.policy.insights:insights-lint](com_google_play_policy_insights_insights-lint.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Adding the suppression attribute + `tools:ignore="ForegroundServicesPolicy"` on the problematic XML + element (or one of its enclosing elements). You may also need to add + the following namespace declaration on the root element in the XML + file if it's not already there: + `xmlns:tools="http://schemas.android.com/tools"`. + + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <manifest xmlns:tools="http://schemas.android.com/tools"> + ... + <uses-permission tools:ignore="ForegroundServicesPolicy" .../> + ... + </manifest> + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="ForegroundServicesPolicy" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'ForegroundServicesPolicy' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore ForegroundServicesPolicy ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/FormalGerman.md.html b/docs/checks/FormalGerman.md.html index d140bebe..2d8fe013 100644 --- a/docs/checks/FormalGerman.md.html +++ b/docs/checks/FormalGerman.md.html @@ -44,24 +44,24 @@ res/values/config.xml:2:Warning: Formal language "Ihr" detected [FormalGerman] <string name="my_string_1">Wie lautet Ihr Name?</string> - ^ + --- res/values/config.xml:3:Warning: Formal language "Sie?" detected [FormalGerman] <string name="my_string_2">Wie heissen Sie?</string> - ^ + --- res/values/config.xml:4:Warning: Formal language "Ihrem" detected [FormalGerman] <string name="my_string_3">Frag nach Ihrem Namen.</string> - ^ + ----- res/values/config.xml:5:Warning: Formal language "Sie" detected [FormalGerman] <string name="my_string_4">Wie Sie möchten</string> - ^ + --- res/values/config.xml:6:Warning: Formal language "Ihre" detected [FormalGerman] <string name="my_string_5">Ihre Historie</string> - ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ---- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -74,7 +74,7 @@ <string name="my_string_4">Wie Sie möchten</string> <string name="my_string_5">Ihre Historie</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/FormalGermanDetectorTest.kt) diff --git a/docs/checks/FragmentAddMenuProvider.md.html b/docs/checks/FragmentAddMenuProvider.md.html index 835a0cd0..df50ad48 100644 --- a/docs/checks/FragmentAddMenuProvider.md.html +++ b/docs/checks/FragmentAddMenuProvider.md.html @@ -35,7 +35,9 @@ Implementation : [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/fragment/fragment-lint/src/main/java/androidx/fragment/lint/UnsafeFragmentLifecycleObserverDetector.kt) Tests -: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/fragment/fragment-lint/src/test/java/androidx/fragment/lint/AddMenuProviderDetectorTest.kt) +: [LintIssueDocGeneratorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/LintIssueDocGeneratorTest.kt) +Tests +: [AddMenuProviderDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/fragment/fragment-lint/src/test/java/androidx/fragment/lint/AddMenuProviderDetectorTest.kt) Copyright Year : 2019 @@ -56,17 +58,17 @@ ``` // build.gradle.kts -implementation("androidx.fragment:fragment:1.8.6") +implementation("androidx.fragment:fragment:1.8.9") // build.gradle -implementation 'androidx.fragment:fragment:1.8.6' +implementation 'androidx.fragment:fragment:1.8.9' // build.gradle.kts with version catalogs: implementation(libs.fragment) # libs.versions.toml [versions] -fragment = "1.8.6" +fragment = "1.8.9" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -78,7 +80,7 @@ } ``` -1.8.6 is the version this documentation was generated from; +1.8.9 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.fragment:fragment](androidx_fragment_fragment.md.html). diff --git a/docs/checks/FragmentBackPressedCallback.md.html b/docs/checks/FragmentBackPressedCallback.md.html index 3360c695..91cb034f 100644 --- a/docs/checks/FragmentBackPressedCallback.md.html +++ b/docs/checks/FragmentBackPressedCallback.md.html @@ -35,7 +35,9 @@ Implementation : [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/fragment/fragment-lint/src/main/java/androidx/fragment/lint/UnsafeFragmentLifecycleObserverDetector.kt) Tests -: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/fragment/fragment-lint/src/test/java/androidx/fragment/lint/BackPressedDispatcherCallbackDetectorTest.kt) +: [LintIssueDocGeneratorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/LintIssueDocGeneratorTest.kt) +Tests +: [BackPressedDispatcherCallbackDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/fragment/fragment-lint/src/test/java/androidx/fragment/lint/BackPressedDispatcherCallbackDetectorTest.kt) Copyright Year : 2019 @@ -56,17 +58,17 @@ ``` // build.gradle.kts -implementation("androidx.fragment:fragment:1.8.6") +implementation("androidx.fragment:fragment:1.8.9") // build.gradle -implementation 'androidx.fragment:fragment:1.8.6' +implementation 'androidx.fragment:fragment:1.8.9' // build.gradle.kts with version catalogs: implementation(libs.fragment) # libs.versions.toml [versions] -fragment = "1.8.6" +fragment = "1.8.9" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -78,7 +80,7 @@ } ``` -1.8.6 is the version this documentation was generated from; +1.8.9 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.fragment:fragment](androidx_fragment_fragment.md.html). diff --git a/docs/checks/FragmentConstructorInjection.md.html b/docs/checks/FragmentConstructorInjection.md.html index fa7c557d..aca21b42 100644 --- a/docs/checks/FragmentConstructorInjection.md.html +++ b/docs/checks/FragmentConstructorInjection.md.html @@ -65,7 +65,7 @@ using constructor injections only. [FragmentConstructorInjection] @Inject ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -110,7 +110,7 @@ notAnnotated = "fast" } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/FragmentDaggerFieldInjectionDetectorTest.kt) diff --git a/docs/checks/FragmentFieldInjection.md.html b/docs/checks/FragmentFieldInjection.md.html index 20dedecf..fdf88e33 100644 --- a/docs/checks/FragmentFieldInjection.md.html +++ b/docs/checks/FragmentFieldInjection.md.html @@ -62,7 +62,7 @@ using the Fragment's constructor. [FragmentFieldInjection] @Inject ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -87,7 +87,7 @@ notAnnotated = "fast" } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/FragmentDaggerFieldInjectionDetectorTest.kt) diff --git a/docs/checks/FragmentGradleConfiguration-2.md.html b/docs/checks/FragmentGradleConfiguration-2.md.html index d48efc07..a36cc707 100644 --- a/docs/checks/FragmentGradleConfiguration-2.md.html +++ b/docs/checks/FragmentGradleConfiguration-2.md.html @@ -54,7 +54,7 @@ [FragmentGradleConfiguration] androidTestImplementation("androidx.fragment:fragment-testing-manifest:1.2.0-beta02") ------------------------------------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -63,10 +63,10 @@ dependencies { androidTestImplementation("androidx.fragment:fragment-testing-manifest:1.2.0-beta02") } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/fragment/fragment-testing-manifest-lint/src/test/java/androidx/fragment/testing/manifest/lint/GradleConfigurationDetectorTest.kt) +You can also visit the source code ([GradleConfigurationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/fragment/fragment-testing-manifest-lint/src/test/java/androidx/fragment/testing/manifest/lint/GradleConfigurationDetectorTest.kt) +[GradleConfigurationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/fragment/fragment-testing-lint/src/test/java/androidx/fragment/testing/lint/GradleConfigurationDetectorTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test @@ -82,17 +82,17 @@ ``` // build.gradle.kts -implementation("androidx.fragment:fragment-testing-manifest:1.8.6") +implementation("androidx.fragment:fragment-testing-manifest:1.8.9") // build.gradle -implementation 'androidx.fragment:fragment-testing-manifest:1.8.6' +implementation 'androidx.fragment:fragment-testing-manifest:1.8.9' // build.gradle.kts with version catalogs: implementation(libs.fragment.testing.manifest) # libs.versions.toml [versions] -fragment-testing-manifest = "1.8.6" +fragment-testing-manifest = "1.8.9" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -104,7 +104,7 @@ } ``` -1.8.6 is the version this documentation was generated from; +1.8.9 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.fragment:fragment-testing-manifest](androidx_fragment_fragment-testing-manifest.md.html). diff --git a/docs/checks/FragmentGradleConfiguration.md.html b/docs/checks/FragmentGradleConfiguration.md.html index 8f95f0f3..4e95d6aa 100644 --- a/docs/checks/FragmentGradleConfiguration.md.html +++ b/docs/checks/FragmentGradleConfiguration.md.html @@ -55,7 +55,7 @@ [FragmentGradleConfiguration] androidTestImplementation("androidx.fragment:fragment-testing-manifest:1.2.0-beta02") ------------------------------------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -64,10 +64,10 @@ dependencies { androidTestImplementation("androidx.fragment:fragment-testing-manifest:1.2.0-beta02") } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/fragment/fragment-testing-manifest-lint/src/test/java/androidx/fragment/testing/manifest/lint/GradleConfigurationDetectorTest.kt) +You can also visit the source code ([GradleConfigurationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/fragment/fragment-testing-manifest-lint/src/test/java/androidx/fragment/testing/manifest/lint/GradleConfigurationDetectorTest.kt) +[GradleConfigurationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/fragment/fragment-testing-lint/src/test/java/androidx/fragment/testing/lint/GradleConfigurationDetectorTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test @@ -83,17 +83,17 @@ ``` // build.gradle.kts -implementation("androidx.fragment:fragment-testing:1.8.6") +implementation("androidx.fragment:fragment-testing:1.8.9") // build.gradle -implementation 'androidx.fragment:fragment-testing:1.8.6' +implementation 'androidx.fragment:fragment-testing:1.8.9' // build.gradle.kts with version catalogs: implementation(libs.fragment.testing) # libs.versions.toml [versions] -fragment-testing = "1.8.6" +fragment-testing = "1.8.9" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -105,7 +105,7 @@ } ``` -1.8.6 is the version this documentation was generated from; +1.8.9 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.fragment:fragment-testing](androidx_fragment_fragment-testing.md.html). diff --git a/docs/checks/FragmentLiveDataObserve.md.html b/docs/checks/FragmentLiveDataObserve.md.html index f7fa7979..aa6dd8a3 100644 --- a/docs/checks/FragmentLiveDataObserve.md.html +++ b/docs/checks/FragmentLiveDataObserve.md.html @@ -35,7 +35,9 @@ Implementation : [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/fragment/fragment-lint/src/main/java/androidx/fragment/lint/UnsafeFragmentLifecycleObserverDetector.kt) Tests -: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/fragment/fragment-lint/src/test/java/androidx/fragment/lint/FragmentLiveDataObserveDetectorTest.kt) +: [LintIssueDocGeneratorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/LintIssueDocGeneratorTest.kt) +Tests +: [FragmentLiveDataObserveDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/fragment/fragment-lint/src/test/java/androidx/fragment/lint/FragmentLiveDataObserveDetectorTest.kt) Copyright Year : 2019 @@ -56,17 +58,17 @@ ``` // build.gradle.kts -implementation("androidx.fragment:fragment:1.8.6") +implementation("androidx.fragment:fragment:1.8.9") // build.gradle -implementation 'androidx.fragment:fragment:1.8.6' +implementation 'androidx.fragment:fragment:1.8.9' // build.gradle.kts with version catalogs: implementation(libs.fragment) # libs.versions.toml [versions] -fragment = "1.8.6" +fragment = "1.8.9" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -78,7 +80,7 @@ } ``` -1.8.6 is the version this documentation was generated from; +1.8.9 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.fragment:fragment](androidx_fragment_fragment.md.html). diff --git a/docs/checks/FragmentTagUsage.md.html b/docs/checks/FragmentTagUsage.md.html index 16e9a4c7..9d69ab57 100644 --- a/docs/checks/FragmentTagUsage.md.html +++ b/docs/checks/FragmentTagUsage.md.html @@ -57,7 +57,7 @@ FragmentContainerView. [FragmentTagUsage] <fragment android:name="androidx.fragment.app.Test'$'InflatedFragment" -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -71,10 +71,10 @@ android:layout_width="match_parent" android:layout_height="match_parent" /> </FrameLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/fragment/fragment-lint/src/test/java/androidx/fragment/lint/FragmentTagDetectorTest.kt) +You can also visit the source code ([FragmentTagDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/fragment/fragment-lint/src/test/java/androidx/fragment/lint/FragmentTagDetectorTest.kt) +[LintIssueDocGeneratorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/LintIssueDocGeneratorTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test @@ -90,17 +90,17 @@ ``` // build.gradle.kts -implementation("androidx.fragment:fragment:1.8.6") +implementation("androidx.fragment:fragment:1.8.9") // build.gradle -implementation 'androidx.fragment:fragment:1.8.6' +implementation 'androidx.fragment:fragment:1.8.9' // build.gradle.kts with version catalogs: implementation(libs.fragment) # libs.versions.toml [versions] -fragment = "1.8.6" +fragment = "1.8.9" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -112,7 +112,7 @@ } ``` -1.8.6 is the version this documentation was generated from; +1.8.9 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.fragment:fragment](androidx_fragment_fragment.md.html). diff --git a/docs/checks/FrequentlyChangingValue.md.html b/docs/checks/FrequentlyChangingValue.md.html index ed77dc9d..eae4814c 100644 --- a/docs/checks/FrequentlyChangingValue.md.html +++ b/docs/checks/FrequentlyChangingValue.md.html @@ -27,7 +27,7 @@ Artifact : [androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html) Since -: 1.9.0-alpha01 +: 1.9.0 Affects : Kotlin and Java files and test sources Editing @@ -286,7 +286,7 @@ [FrequentlyChangingValue] val barImplValue = barImpl.value ----- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -391,7 +391,7 @@ val barImplValue = barImpl.value } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/FrequentlyChangingValueDetectorTest.kt) @@ -410,17 +410,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime-android:1.9.0-alpha01") +implementation("androidx.compose.runtime:runtime-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.runtime:runtime-android:1.9.0-alpha01' +implementation 'androidx.compose.runtime:runtime-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.runtime.android) # libs.versions.toml [versions] -runtime-android = "1.9.0-alpha01" +runtime-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -432,11 +432,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.runtime:runtime-lint:1.9.0-alpha01`. +You can also use `androidx.compose.runtime:runtime-lint:1.11.0-alpha06`. [Additional details about androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html). diff --git a/docs/checks/FullBackupContent.md.html b/docs/checks/FullBackupContent.md.html index 328003d4..ee1e54dc 100644 --- a/docs/checks/FullBackupContent.md.html +++ b/docs/checks/FullBackupContent.md.html @@ -36,6 +36,9 @@ Ensures that ` and `` files, which configure backup options, are valid. +!!! Tip + This lint check has an associated quickfix available in the IDE. + (##) Example Here is an example of lint warnings produced by this check: @@ -48,7 +51,7 @@ path [FullBackupContent] <exclude domain="sharedpref" path="foo.xml"/> ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -56,13 +59,12 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="my.pkg" > <application - android:fullBackupContent="@xml/full_backup_content"> + android:fullBackupContent="@xml/full_backup_content" android:dataExtractionRules="@xml/data_extraction_rules" android:label="@string/app_name"> - ... </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/xml/data_extraction_rules.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -79,7 +81,7 @@ <include domain="sharedpref" path="something"/> </device-transfer> </data-extraction-rules> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/xml/full_backup_content.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -89,7 +91,7 @@ <exclude domain="file" path="dd/ss/foo.txt"/> <exclude domain="sharedpref" path="foo.xml"/> </full-backup-content> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/FullBackupContentDetectorTest.kt) diff --git a/docs/checks/FullScreenIntentPolicy.md.html b/docs/checks/FullScreenIntentPolicy.md.html new file mode 100644 index 00000000..93a13c45 --- /dev/null +++ b/docs/checks/FullScreenIntentPolicy.md.html @@ -0,0 +1,210 @@ + +(#) Full Screen Intent Insights + +!!! WARNING: Full Screen Intent Insights + This is a warning. + +Id +: `FullScreenIntentPolicy` +Summary +: Full Screen Intent Insights +Severity +: Warning +Category +: Play Policy +Platform +: Android +Vendor +: Play policy insights beta +Min +: Lint 8.2 to 8.6 +Compiled +: Lint 8.7+ +Artifact +: [com.google.play.policy.insights:insights-lint](com_google_play_policy_insights_insights-lint.md.html) +Since +: 0.1.3 +Affects +: Kotlin and Java files and manifest files +Editing +: This check runs on the fly in the IDE editor + +On Android 14+, the `USE_FULL_SCREEN_INTENT` permission is auto-granted +*only* for apps whose core function is setting alarms or handling calls. +For any other use case, you must obtain explicit user consent and +clearly explain your need. This policy prevents the misuse of +full-screen intents for non-critical purposes and requires that your use +does not interfere with or disrupt the user's device, other apps, or +overall usability. + +**Dos:** + +- Request user consent for the permission and provide a clear + explanation for the request if not auto-granted. +- Limit use to necessary high-priority notifications/alerts. +- Submit a declaration form in your Play Console to establish pre-grant + eligibility for the full-screen intent permission if targeting + Android 14+. + +**Don'ts:** + +- Use this permission for non-core or low-priority features. +- Use this permission to interfere with devices or other apps. +- Use this permission for disruptive ads or disruptive notifications. + +**Helpful Links:** + +See Policy page: https://goo.gle/play-policy-full-screen-intent +See Help Center article: https://goo.gle/play-help-full-screen-intent +See Declaration form: https://goo.gle/play-permission-decl-form + +Always review the full policy in the Policy Center to ensure +compliance. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +AndroidManifest.xml:3:Warning: USE_FULL_SCREEN_INTENT permission is +auto-granted to core alarm or call functions on Android 14+ but other +use cases require user consent. [FullScreenIntentPolicy] + <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT"/> + -------------------------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`AndroidManifest.xml`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android"> + <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT"/> + <uses-sdk android:targetSdkVersion="34"/> +</manifest> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](/policyinsights/src/test/java/com/google/play/policy/insights/FullScreenIntentPolicyDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `FullScreenIntentPolicyDetector.testFlagsUseFullScreenIntent`. +To report a problem with this extracted sample, contact +Play policy insights beta. + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("com.google.play.policy.insights:insights-lint:0.1.4") + +// build.gradle +implementation 'com.google.play.policy.insights:insights-lint:0.1.4' + +// build.gradle.kts with version catalogs: +implementation(libs.insights.lint) + +# libs.versions.toml +[versions] +insights-lint = "0.1.4" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +insights-lint = { + module = "com.google.play.policy.insights:insights-lint", + version.ref = "insights-lint" +} +``` + +0.1.4 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.google.play.policy.insights:insights-lint](com_google_play_policy_insights_insights-lint.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Adding the suppression attribute + `tools:ignore="FullScreenIntentPolicy"` on the problematic XML + element (or one of its enclosing elements). You may also need to add + the following namespace declaration on the root element in the XML + file if it's not already there: + `xmlns:tools="http://schemas.android.com/tools"`. + + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <manifest xmlns:tools="http://schemas.android.com/tools"> + ... + <uses-permission tools:ignore="FullScreenIntentPolicy" .../> + ... + </manifest> + ``` + +* Using a suppression annotation like this on the enclosing + element: + + ```kt + // Kotlin + @Suppress("FullScreenIntentPolicy") + fun method() { + setFullScreenIntent(...) + } + ``` + + or + + ```java + // Java + @SuppressWarnings("FullScreenIntentPolicy") + void method() { + setFullScreenIntent(...); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection FullScreenIntentPolicy + problematicStatement() + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="FullScreenIntentPolicy" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'FullScreenIntentPolicy' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore FullScreenIntentPolicy ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/FullyQualifiedResource.md.html b/docs/checks/FullyQualifiedResource.md.html index a5de0f0d..1d3e7eba 100644 --- a/docs/checks/FullyQualifiedResource.md.html +++ b/docs/checks/FullyQualifiedResource.md.html @@ -68,7 +68,7 @@ <option name="import-aliases" value="some string" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (##) Example @@ -78,7 +78,7 @@ alias instead [FullyQualifiedResource] val appName = getString(slack.l10n.R.string.app_name) ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -93,7 +93,7 @@ } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/resources/FullyQualifiedResourceDetectorTest.kt) diff --git a/docs/checks/GestureBackNavigation.md.html b/docs/checks/GestureBackNavigation.md.html index 775d3a0d..52217df0 100644 --- a/docs/checks/GestureBackNavigation.md.html +++ b/docs/checks/GestureBackNavigation.md.html @@ -52,7 +52,7 @@ compatible OnBackPressedDispatcher [GestureBackNavigation] public void onBackPressed() { ------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -79,7 +79,7 @@ </activity> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/KeyEventKeyCodeBackTest.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -103,7 +103,7 @@ // handle back } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GestureBackNavDetectorTest.kt) diff --git a/docs/checks/GetContentDescriptionOverride.md.html b/docs/checks/GetContentDescriptionOverride.md.html index 51630a32..61266b6c 100644 --- a/docs/checks/GetContentDescriptionOverride.md.html +++ b/docs/checks/GetContentDescriptionOverride.md.html @@ -42,7 +42,7 @@ a View is not recommended [GetContentDescriptionOverride] public CharSequence getContentDescription() { --------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -64,7 +64,7 @@ return ""; } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GetContentDescriptionOverrideDetectorTest.kt) diff --git a/docs/checks/GetInstance.md.html b/docs/checks/GetInstance.md.html index 900f198f..6392bfd4 100644 --- a/docs/checks/GetInstance.md.html +++ b/docs/checks/GetInstance.md.html @@ -46,7 +46,7 @@ [GetInstance] Cipher.getInstance("AES"); ----- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -62,7 +62,7 @@ Cipher.getInstance("AES"); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/CipherGetInstanceDetectorTest.kt) diff --git a/docs/checks/GetLocales.md.html b/docs/checks/GetLocales.md.html index 921679fc..17cdf3de 100644 --- a/docs/checks/GetLocales.md.html +++ b/docs/checks/GetLocales.md.html @@ -44,7 +44,7 @@ [GetLocales] String[] locales = assets.getLocales(); ------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -61,25 +61,25 @@ String[] locales = assets.getLocales(); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-no/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-fil/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-b+kok+IN/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/LocaleFolderDetectorTest.kt) diff --git a/docs/checks/GlobalOptionInConsumerRules.md.html b/docs/checks/GlobalOptionInConsumerRules.md.html new file mode 100644 index 00000000..a74fe61b --- /dev/null +++ b/docs/checks/GlobalOptionInConsumerRules.md.html @@ -0,0 +1,134 @@ + +(#) Library has global options in consumer rules + +!!! WARNING: Library has global options in consumer rules + This is a warning. + +Id +: `GlobalOptionInConsumerRules` +Summary +: Library has global options in consumer rules +Severity +: Warning +Category +: Correctness +Platform +: Android +Vendor +: Android Open Source Project +Feedback +: https://issuetracker.google.com/issues/new?component=192708 +Since +: 9.0.0 (January 2026) +Affects +: Gradle build files and TOML files +Editing +: This check runs on the fly in the IDE editor +See +: https://developer.android.com/topic/performance/app-optimization/choose-libraries-wisely +Implementation +: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/ProguardConsumerRulesDetector.kt) +Tests +: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ProguardConsumerRulesDetectorTest.kt) + +Libraries often include consumer keep rules to instruct R8 how to +optimize the library, especially if the library uses reflection. These +keep rules typically indicate to R8 of which classes, methods and fields +shouldn't be fully optimized so e.g. reflection continues to work. + +Global keep rules can be used by an application to disable significant +optimization features, debug R8 behavior, suppress warnings, etc. +However, these global options should not be included in library consumer +rules -- those distributed with a library. + +Starting in Android Gradle Plugin version 9.0, all such rules are not +supported in library builds, and ignored by application builds if +included in a library. Libraries should not rely on these global options +in consumer rules to function, and should remove them. + +If you see a flagged library, first try to update to a newer version +that doesn't have the embedded global rule. If an updated version +without these global options is not available, contact the library +vendor to ask about their plans to remove global options, and thus +support better R8 configuration. + +As an application developer using Android Gradle Plugin 9.0, verify that +Android Gradle Plugin removing these global options isn't causing issues +in your application. If they are, you can add them temporarily to a +local keep rule file. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +build.gradle:2:Warning: The consumer keep rules at 1.0.1/proguard.pro +(from com.example.badkeep:badkeep:1.0.1) contains a global option which +should not be specified in library consumer rules: -dontoptimize +[GlobalOptionInConsumerRules] + implementation("com.example.badkeep:badkeep:1.0.1") + ----------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here are the relevant source files: + +`build.gradle`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~groovy linenumbers +dependencies { + implementation("com.example.badkeep:badkeep:1.0.1") +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`build/intermediates/exploded-aar/com.example.badkeep/badkeep/1.0.1/proguard.pro`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text linenumbers +-dontoptimize +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ProguardConsumerRulesDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection GlobalOptionInConsumerRules + problematicStatement() + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="GlobalOptionInConsumerRules" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'GlobalOptionInConsumerRules' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore GlobalOptionInConsumerRules ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/GradleCompatible.md.html b/docs/checks/GradleCompatible.md.html index 9cbd894d..091654a9 100644 --- a/docs/checks/GradleCompatible.md.html +++ b/docs/checks/GradleCompatible.md.html @@ -37,7 +37,7 @@ are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your -`targetSdkVersion`). +`targetSdk`). !!! Tip This lint check has an associated quickfix available in the IDE. @@ -52,7 +52,7 @@ [GradleCompatible] compile 'com.google.android.support:wearable:1.2.0' ----------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -61,7 +61,7 @@ apply plugin: 'android' android { - compileSdkVersion 36 + compileSdkVersion buildToolsVersion "19.0.0" defaultConfig { @@ -88,7 +88,7 @@ androidTestCompile 'com.android.support.test:runner:0.3' } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/GradleDependency.md.html b/docs/checks/GradleDependency.md.html index fd50c613..155dd42e 100644 --- a/docs/checks/GradleDependency.md.html +++ b/docs/checks/GradleDependency.md.html @@ -67,7 +67,7 @@ [GradleDependency] androidTestCompile 'com.android.support.test:runner:0.3' ------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -76,7 +76,7 @@ apply plugin: 'android' android { - compileSdkVersion 36 + compileSdkVersion buildToolsVersion "19.0.0" defaultConfig { @@ -103,10 +103,10 @@ androidTestCompile 'com.android.support.test:runner:0.3' } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) +You can also visit the source code ([GradleDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) +[PropertyFileDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PropertyFileDetectorTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/GradleDeprecated.md.html b/docs/checks/GradleDeprecated.md.html index 07964fc0..df2340f7 100644 --- a/docs/checks/GradleDeprecated.md.html +++ b/docs/checks/GradleDeprecated.md.html @@ -45,7 +45,7 @@ 'com.android.application' instead [GradleDeprecated] apply plugin: 'android' ----------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -54,7 +54,7 @@ apply plugin: 'android' android { - compileSdkVersion 36 + compileSdkVersion buildToolsVersion "19.0.0" defaultConfig { @@ -81,7 +81,7 @@ androidTestCompile 'com.android.support.test:runner:0.3' } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/GradleDeprecatedConfiguration.md.html b/docs/checks/GradleDeprecatedConfiguration.md.html index 61a284c1..2a622360 100644 --- a/docs/checks/GradleDeprecatedConfiguration.md.html +++ b/docs/checks/GradleDeprecatedConfiguration.md.html @@ -54,7 +54,7 @@ [GradleDeprecatedConfiguration] debugCompile 'androidx.appcompat:appcompat:1.0.0' ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -71,7 +71,7 @@ compile 'androidx.appcompat:appcompat:1.0.0' debugCompile 'androidx.appcompat:appcompat:1.0.0' } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/GradleDynamicVersion.md.html b/docs/checks/GradleDynamicVersion.md.html index a590a600..6513b68f 100644 --- a/docs/checks/GradleDynamicVersion.md.html +++ b/docs/checks/GradleDynamicVersion.md.html @@ -50,7 +50,7 @@ (com.android.support:appcompat-v7:+) [GradleDynamicVersion] compile 'com.android.support:appcompat-v7:+' ------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -59,7 +59,7 @@ apply plugin: 'android' android { - compileSdkVersion 36 + compileSdkVersion buildToolsVersion "19.0.0" defaultConfig { @@ -86,7 +86,7 @@ androidTestCompile 'com.android.support.test:runner:0.3' } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/GradleGetter.md.html b/docs/checks/GradleGetter.md.html index e92002d4..89bfc924 100644 --- a/docs/checks/GradleGetter.md.html +++ b/docs/checks/GradleGetter.md.html @@ -60,7 +60,7 @@ [GradleGetter] versionName getVersionName -------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -87,7 +87,7 @@ versionName getVersionName } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/GradleLikelyBug.md.html b/docs/checks/GradleLikelyBug.md.html index ff33a816..d94f1f67 100644 --- a/docs/checks/GradleLikelyBug.md.html +++ b/docs/checks/GradleLikelyBug.md.html @@ -51,17 +51,17 @@ ``` // build.gradle.kts -implementation("androidx.lint:lint-gradle:1.0.0-alpha04") +implementation("androidx.lint:lint-gradle:1.0.0-alpha05") // build.gradle -implementation 'androidx.lint:lint-gradle:1.0.0-alpha04' +implementation 'androidx.lint:lint-gradle:1.0.0-alpha05' // build.gradle.kts with version catalogs: implementation(libs.lint.gradle) # libs.versions.toml [versions] -lint-gradle = "1.0.0-alpha04" +lint-gradle = "1.0.0-alpha05" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -73,7 +73,7 @@ } ``` -1.0.0-alpha04 is the version this documentation was generated from; +1.0.0-alpha05 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.lint:lint-gradle](androidx_lint_lint-gradle.md.html). diff --git a/docs/checks/GradleOverrides.md.html b/docs/checks/GradleOverrides.md.html index ae52b8e3..afdcad3a 100644 --- a/docs/checks/GradleOverrides.md.html +++ b/docs/checks/GradleOverrides.md.html @@ -45,7 +45,7 @@ [GradleOverrides] package="${packageName}" > ------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -59,13 +59,13 @@ android:label="@string/app_name" > </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `build.gradle`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~groovy linenumbers android { } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ManifestDetectorTest.kt) diff --git a/docs/checks/GradlePath.md.html b/docs/checks/GradlePath.md.html index c5e5b74c..2e95f297 100644 --- a/docs/checks/GradlePath.md.html +++ b/docs/checks/GradlePath.md.html @@ -53,7 +53,7 @@ [GradlePath] compile files('/libs/android-support-v4.jar') ------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -65,7 +65,7 @@ compile files('my\\libs\\http.jar') compile files('/libs/android-support-v4.jar') } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/GradlePluginVersion.md.html b/docs/checks/GradlePluginVersion.md.html index d7c50db1..797e25d8 100644 --- a/docs/checks/GradlePluginVersion.md.html +++ b/docs/checks/GradlePluginVersion.md.html @@ -42,11 +42,11 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text build.gradle:6:Error: You must use a newer version of the Android Gradle -plugin. The minimum supported version is 3.2.0 and the recommended -version is 7.0.3 [GradlePluginVersion] +plugin. The minimum supported version is and the recommended version is + [GradlePluginVersion] classpath 'com.android.tools.build:gradle:0.1.0' ------------------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -66,7 +66,7 @@ mavenCentral() } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/GradleProjectIsolation.md.html b/docs/checks/GradleProjectIsolation.md.html index 4f53dc67..48d6f3a8 100644 --- a/docs/checks/GradleProjectIsolation.md.html +++ b/docs/checks/GradleProjectIsolation.md.html @@ -52,17 +52,17 @@ ``` // build.gradle.kts -implementation("androidx.lint:lint-gradle:1.0.0-alpha04") +implementation("androidx.lint:lint-gradle:1.0.0-alpha05") // build.gradle -implementation 'androidx.lint:lint-gradle:1.0.0-alpha04' +implementation 'androidx.lint:lint-gradle:1.0.0-alpha05' // build.gradle.kts with version catalogs: implementation(libs.lint.gradle) # libs.versions.toml [versions] -lint-gradle = "1.0.0-alpha04" +lint-gradle = "1.0.0-alpha05" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -74,7 +74,7 @@ } ``` -1.0.0-alpha04 is the version this documentation was generated from; +1.0.0-alpha05 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.lint:lint-gradle](androidx_lint_lint-gradle.md.html). diff --git a/docs/checks/GrantAllUris.md.html b/docs/checks/GrantAllUris.md.html index c55febe5..9f51eb96 100644 --- a/docs/checks/GrantAllUris.md.html +++ b/docs/checks/GrantAllUris.md.html @@ -49,7 +49,7 @@ is potentially dangerous [GrantAllUris] <grant-uri-permission android:pathPrefix="/"/> ---------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -85,7 +85,7 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -119,8 +119,7 @@ <!-- Wallpaper --> <string name="wallpaper_instructions">Tap picture to set portrait wallpaper</string> </resources> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/SecurityDetectorTest.java) diff --git a/docs/checks/GridLayout.md.html b/docs/checks/GridLayout.md.html index 087eee4b..530caf77 100644 --- a/docs/checks/GridLayout.md.html +++ b/docs/checks/GridLayout.md.html @@ -48,7 +48,7 @@ declared grid column count (2) [GridLayout] android:layout_column="3" ------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -93,9 +93,7 @@ /> </GridLayout> - - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GridLayoutDetectorTest.java) diff --git a/docs/checks/GuavaChecksUsed.md.html b/docs/checks/GuavaChecksUsed.md.html index c081c084..92f95d5c 100644 --- a/docs/checks/GuavaChecksUsed.md.html +++ b/docs/checks/GuavaChecksUsed.md.html @@ -71,7 +71,7 @@ Guava's Preconditions checks [GuavaChecksUsed] Preconditions.checkElementIndex(0, 1); ----------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -92,7 +92,7 @@ Preconditions.checkElementIndex(0, 1); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/GuavaPreconditionsDetectorTest.kt) diff --git a/docs/checks/GuavaPreconditionsUsedInKotlin.md.html b/docs/checks/GuavaPreconditionsUsedInKotlin.md.html index 2d6b3981..1b204e9c 100644 --- a/docs/checks/GuavaPreconditionsUsedInKotlin.md.html +++ b/docs/checks/GuavaPreconditionsUsedInKotlin.md.html @@ -72,7 +72,7 @@ Kotlin standard library checks [GuavaPreconditionsUsedInKotlin] Preconditions.checkElementIndex(0, 1) ----------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -93,7 +93,7 @@ Preconditions.checkElementIndex(0, 1) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/GuavaPreconditionsDetectorTest.kt) diff --git a/docs/checks/HalfFloat.md.html b/docs/checks/HalfFloat.md.html index 71dd6cb7..937ed0c5 100644 --- a/docs/checks/HalfFloat.md.html +++ b/docs/checks/HalfFloat.md.html @@ -65,7 +65,7 @@ widened to int [HalfFloat] Math.round(float1); // Error: should use Half.round ------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -138,7 +138,7 @@ // TODO: Arrays // TODO: Add cast } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ResourceTypeDetectorTest.kt) diff --git a/docs/checks/HandlerLeak.md.html b/docs/checks/HandlerLeak.md.html index 190d1fd8..554c4e73 100644 --- a/docs/checks/HandlerLeak.md.html +++ b/docs/checks/HandlerLeak.md.html @@ -55,7 +55,7 @@ [HandlerLeak] Handler anonymous = new Handler() { // ERROR ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -102,7 +102,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/HandlerDetectorTest.java) diff --git a/docs/checks/HardcodedAbsolutePath.md.html b/docs/checks/HardcodedAbsolutePath.md.html new file mode 100644 index 00000000..4e4fb228 --- /dev/null +++ b/docs/checks/HardcodedAbsolutePath.md.html @@ -0,0 +1,161 @@ + +(#) The "path" attribute should not be an absolute path + +!!! WARNING: The "path" attribute should not be an absolute path + This is a warning. + +Id +: `HardcodedAbsolutePath` +Summary +: The "path" attribute should not be an absolute path +Severity +: Warning +Category +: Security +Platform +: Android +Vendor +: Google - Android 3P Vulnerability Research +Contact +: https://github.com/google/android-security-lints +Feedback +: https://github.com/google/android-security-lints/issues +Min +: Lint 4.1 +Compiled +: Lint 8.0 and 8.1 +Artifact +: [com.android.security.lint:lint](com_android_security_lint_lint.md.html) +Since +: 1.0.4 +Affects +: Resource files +Editing +: This check runs on the fly in the IDE editor +See +: https://goo.gle/HardcodedAbsolutePath +Implementation +: [Source Code](https://github.com/google/android-security-lints/tree/main/checks/src/main/java/com/example/lint/checks/MisconfiguredFileProviderDetector.kt) +Tests +: [Source Code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/MisconfiguredFileProviderDetectorTest.kt) +Copyright Year +: 2023 + +Avoid hardcoding absolute paths into your app. Ensure that a specific, +narrow and limited path is shared to prevent mistakenly exposing +sensitive data. + +!!! Tip + This lint check has an associated quickfix available in the IDE. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +res/xml/file_paths.xml:5:Warning: The "path" attribute should not be an +absolute path [HardcodedAbsolutePath] + <external-media-path name="files" path="/Documents"/> + ----------------------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`res/xml/file_paths.xml`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<?xml version="1.0" encoding="utf-8"?> + <paths xmlns:android="http://schemas.android.com/apk/res/android"> + <files-path name="my_images" path="images/"/> + <files-path name="my_docs" path="docs/"/> + <external-media-path name="files" path="/Documents"/> + </paths> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/MisconfiguredFileProviderDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `MisconfiguredFileProviderDetector.testWhenAbsolutePathUsedInConfig_showsWarningAndQuickFix`. +To report a problem with this extracted sample, visit +https://github.com/google/android-security-lints/issues. + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. This lint check is included in the lint documentation, + but the Android team may or may not agree with its recommendations. + +``` +// build.gradle.kts +lintChecks("com.android.security.lint:lint:1.0.4") + +// build.gradle +lintChecks 'com.android.security.lint:lint:1.0.4' + +// build.gradle.kts with version catalogs: +lintChecks(libs.com.android.security.lint.lint) + +# libs.versions.toml +[versions] +com-android-security-lint-lint = "1.0.4" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +com-android-security-lint-lint = { + module = "com.android.security.lint:lint", + version.ref = "com-android-security-lint-lint" +} +``` + +1.0.4 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.android.security.lint:lint](com_android_security_lint_lint.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Adding the suppression attribute + `tools:ignore="HardcodedAbsolutePath"` on the problematic XML + element (or one of its enclosing elements). You may also need to add + the following namespace declaration on the root element in the XML + file if it's not already there: + `xmlns:tools="http://schemas.android.com/tools"`. + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="HardcodedAbsolutePath" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'HardcodedAbsolutePath' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore HardcodedAbsolutePath ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/HardcodedDebugMode.md.html b/docs/checks/HardcodedDebugMode.md.html index 72ef6098..849fd73f 100644 --- a/docs/checks/HardcodedDebugMode.md.html +++ b/docs/checks/HardcodedDebugMode.md.html @@ -54,7 +54,7 @@ [HardcodedDebugMode] android:debuggable="true" ------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -84,7 +84,7 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/HardcodedDebugModeDetectorTest.kt) diff --git a/docs/checks/HardcodedText.md.html b/docs/checks/HardcodedText.md.html index 658156ff..ae04a475 100644 --- a/docs/checks/HardcodedText.md.html +++ b/docs/checks/HardcodedText.md.html @@ -56,7 +56,7 @@ should use @string resource [HardcodedText] <Button android:text="Button" android:id="@+id/button2" android:layout_width="wrap_content" android:layout_height="wrap_content"></Button> --------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -70,10 +70,10 @@ <Button android:id="@+android:id/summary" android:contentDescription="@string/label" /> <ImageButton android:importantForAccessibility="no" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/android_button" android:focusable="false" android:clickable="false" android:layout_weight="1.0" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/HardcodedValuesDetectorTest.kt) +You can also visit the source code ([HardcodedValuesDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/HardcodedValuesDetectorTest.kt) +[TextReporterTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/TextReporterTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/HardwareIds.md.html b/docs/checks/HardwareIds.md.html index 7afef299..ae0bfb1f 100644 --- a/docs/checks/HardwareIds.md.html +++ b/docs/checks/HardwareIds.md.html @@ -44,7 +44,7 @@ identifiers is not recommended [HardwareIds] return adapter.getAddress(); -------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -60,7 +60,7 @@ return adapter.getAddress(); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/HardwareIdDetectorTest.kt) diff --git a/docs/checks/HealthConnectPolicy.md.html b/docs/checks/HealthConnectPolicy.md.html new file mode 100644 index 00000000..09dc632b --- /dev/null +++ b/docs/checks/HealthConnectPolicy.md.html @@ -0,0 +1,193 @@ + +(#) Health Connect Insights + +!!! WARNING: Health Connect Insights + This is a warning. + +Id +: `HealthConnectPolicy` +Summary +: Health Connect Insights +Severity +: Warning +Category +: Play Policy +Platform +: Android +Vendor +: Play policy insights beta +Min +: Lint 8.2 to 8.6 +Compiled +: Lint 8.7+ +Artifact +: [com.google.play.policy.insights:insights-lint](com_google_play_policy_insights_insights-lint.md.html) +Since +: 0.1.3 +Affects +: Manifest files +Editing +: This check runs on the fly in the IDE editor + +Access to Health Connect data is restricted to apps with approved +health, fitness, medical care, or health research core use cases. You +must strictly limit data access to the minimum scope necessary for these +approved functions and obtain explicit user consent before sharing any +health data with third parties. Transparency is key, so provide clear +disclosures and a comprehensive privacy policy explaining data +collection, use, management, and deletion. Secure user data against +unauthorized access and comply with all applicable laws and regulations +(e.g., HIPAA, GDPR). + +**Dos:** + +- Your app must also comply with the Health apps policy if it qualifies + as a health app or has health-related features and accesses health + data including Health Connect data. +- See Health Connect policy requirement FAQs to request access to Health + Connect data types and other FAQs. +- Submit a declaration form in your Play Console. For each permission + requested, provide a clear and detailed justification explaining how + your app will use the data to benefit the user. +- Request only the minimum necessary data types. +- Securely handle user data (e.g., use modern cryptography). + +**Don'ts:** + +- Use Health Connect in high-risk apps (e.g., aviation, control of + life-critical systems such as pacemakers) or for children. +- Sell or transfer user data for advertising, creditworthiness, or data + brokers. +- Use with medical devices without required regulatory + compliance/clearances. +- Access Health Connect data for secondary or unapproved purposes. +- Request data permissions beyond your app's core functionality. + +**Helpful Links:** + +See Policy page: https://goo.gle/play-policy-health-connect +See Help Center article: https://goo.gle/play-help-health-connect +See Declaration form: https://goo.gle/play-permission-decl-form + +Always review the full policy in the Policy Center to ensure +compliance. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +AndroidManifest.xml:3:Warning: Health Connect permission is restricted +to approved core Health or Fitness functions use only and requires +strict data access and handling, user consent and transparency. +[HealthConnectPolicy] + <uses-permission android:name="android.permission.health.READ_ACTIVE_CALORIES_BURNED"/> + -------------------------------------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`AndroidManifest.xml`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android"> + <uses-permission android:name="android.permission.health.READ_ACTIVE_CALORIES_BURNED"/> +</manifest> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](/policyinsights/src/test/java/com/google/play/policy/insights/HealthConnectPolicyDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `HealthConnectPolicyDetector.testFlagsHealthPermission`. +To report a problem with this extracted sample, contact +Play policy insights beta. + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("com.google.play.policy.insights:insights-lint:0.1.4") + +// build.gradle +implementation 'com.google.play.policy.insights:insights-lint:0.1.4' + +// build.gradle.kts with version catalogs: +implementation(libs.insights.lint) + +# libs.versions.toml +[versions] +insights-lint = "0.1.4" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +insights-lint = { + module = "com.google.play.policy.insights:insights-lint", + version.ref = "insights-lint" +} +``` + +0.1.4 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.google.play.policy.insights:insights-lint](com_google_play_policy_insights_insights-lint.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Adding the suppression attribute + `tools:ignore="HealthConnectPolicy"` on the problematic XML element + (or one of its enclosing elements). You may also need to add the + following namespace declaration on the root element in the XML file + if it's not already there: + `xmlns:tools="http://schemas.android.com/tools"`. + + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <manifest xmlns:tools="http://schemas.android.com/tools"> + ... + <uses-permission tools:ignore="HealthConnectPolicy" .../> + ... + </manifest> + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="HealthConnectPolicy" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'HealthConnectPolicy' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore HealthConnectPolicy ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/HighAppVersionCode.md.html b/docs/checks/HighAppVersionCode.md.html index 6247c792..ca7f8e06 100644 --- a/docs/checks/HighAppVersionCode.md.html +++ b/docs/checks/HighAppVersionCode.md.html @@ -44,7 +44,7 @@ max allowed value [HighAppVersionCode] versionCode 2146435071 ---------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -57,7 +57,7 @@ versionCode 2146435071 } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/HighSamplingRate.md.html b/docs/checks/HighSamplingRate.md.html index da7c449f..9afd2f8e 100644 --- a/docs/checks/HighSamplingRate.md.html +++ b/docs/checks/HighSamplingRate.md.html @@ -43,7 +43,7 @@ sensor sampling rate. [HighSamplingRate] <uses-permission android:name="android.permission.HIGH_SAMPLING_RATE_SENSORS"/> --------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -63,7 +63,7 @@ </receiver> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/HighSensorSamplingRateDetectorTest.kt) diff --git a/docs/checks/IconDipSize.md.html b/docs/checks/IconDipSize.md.html index b890d181..8b5b17c4 100644 --- a/docs/checks/IconDipSize.md.html +++ b/docs/checks/IconDipSize.md.html @@ -45,7 +45,7 @@ size (pixel size 58×56 in a drawable-mdpi folder computes to 58×56 dp) [IconDipSize] 0 errors, 3 warnings -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant test files: diff --git a/docs/checks/IconExtension.md.html b/docs/checks/IconExtension.md.html index f8c8979e..3a844eca 100644 --- a/docs/checks/IconExtension.md.html +++ b/docs/checks/IconExtension.md.html @@ -42,7 +42,7 @@ res/drawable-mdpi/foo.png:Warning: Misleading file extension; named .png but the file format is webp [IconExtension] 0 errors, 1 warnings -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant test files: diff --git a/docs/checks/IconMissingDensityFolder.md.html b/docs/checks/IconMissingDensityFolder.md.html index b8ccb15c..17773b69 100644 --- a/docs/checks/IconMissingDensityFolder.md.html +++ b/docs/checks/IconMissingDensityFolder.md.html @@ -51,7 +51,7 @@ in res: drawable-hdpi, drawable-xhdpi, drawable-xxhdpi [IconMissingDensityFolder] 0 errors, 3 warnings -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -64,10 +64,10 @@ <item android:state_focused="true" android:color="#ff0000ff"/> <!-- focused --> </selector> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/IconDetectorTest.java) +You can also visit the source code ([IconDetectorTest.java](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/IconDetectorTest.java) +[LintBaselineTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/client/api/LintBaselineTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/IconXmlAndPng.md.html b/docs/checks/IconXmlAndPng.md.html index 915d2b60..dda43e77 100644 --- a/docs/checks/IconXmlAndPng.md.html +++ b/docs/checks/IconXmlAndPng.md.html @@ -46,14 +46,14 @@ [IconXmlAndPng] res/drawable-mdpi/background.png: <No location-specific message> 0 errors, 1 warnings -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: `res/drawable/background.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <tag/> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/IconDetectorTest.java) diff --git a/docs/checks/IdleBatteryChargingConstraints.md.html b/docs/checks/IdleBatteryChargingConstraints.md.html index 2551c222..1d3a008b 100644 --- a/docs/checks/IdleBatteryChargingConstraints.md.html +++ b/docs/checks/IdleBatteryChargingConstraints.md.html @@ -50,7 +50,7 @@ devices [IdleBatteryChargingConstraints] builder.setRequiresDeviceIdle(true) ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -67,7 +67,7 @@ .setRequiresCharging(true) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/work/work-lint/src/test/java/androidx/work/lint/IdleBatteryChargingConstraintsDetectorTest.kt) @@ -86,17 +86,17 @@ ``` // build.gradle.kts -implementation("androidx.work:work-runtime:2.10.1") +implementation("androidx.work:work-runtime:2.11.1") // build.gradle -implementation 'androidx.work:work-runtime:2.10.1' +implementation 'androidx.work:work-runtime:2.11.1' // build.gradle.kts with version catalogs: implementation(libs.work.runtime) # libs.versions.toml [versions] -work-runtime = "2.10.1" +work-runtime = "2.11.1" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -108,7 +108,7 @@ } ``` -2.10.1 is the version this documentation was generated from; +2.11.1 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.work:work-runtime](androidx_work_work-runtime.md.html). diff --git a/docs/checks/IgnoreWithoutReason.md.html b/docs/checks/IgnoreWithoutReason.md.html index 6df95a14..81f4abda 100644 --- a/docs/checks/IgnoreWithoutReason.md.html +++ b/docs/checks/IgnoreWithoutReason.md.html @@ -55,7 +55,7 @@ <option name="allow-comments" value="true" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (##) Example @@ -65,7 +65,7 @@ explanation [IgnoreWithoutReason] @Ignore class MyTest { ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -81,7 +81,7 @@ @Test public void something() { } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/IgnoreWithoutReasonDetectorTest.kt) diff --git a/docs/checks/IllegalResourceRef.md.html b/docs/checks/IllegalResourceRef.md.html index d194e5c8..7cc14edf 100644 --- a/docs/checks/IllegalResourceRef.md.html +++ b/docs/checks/IllegalResourceRef.md.html @@ -49,7 +49,7 @@ codename) [IllegalResourceRef] <uses-sdk android:minSdkVersion="@dimen/minSdkVersion" android:targetSdkVersion="@dimen/targetSdkVersion" /> -------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -67,7 +67,8 @@ android:label="@string/app_name" > <activity android:label="@string/app_name" - android:name=".Foo2Activity" > + android:name=".Foo2Activity" + android:exported="true"> <intent-filter > <action android:name="android.intent.action.MAIN" /> @@ -77,7 +78,7 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ManifestDetectorTest.kt) diff --git a/docs/checks/ImplicitSamInstance.md.html b/docs/checks/ImplicitSamInstance.md.html index 0f79ebb5..9ef17066 100644 --- a/docs/checks/ImplicitSamInstance.md.html +++ b/docs/checks/ImplicitSamInstance.md.html @@ -73,7 +73,7 @@ to subtle bugs [ImplicitSamInstance] handler.delete(lambda3) // ERROR 5 ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -124,7 +124,7 @@ fun viewpost(view: android.view.View) { view.postDelayed({ println ("Hello") }, 50) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/JavaTest.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -138,7 +138,7 @@ handler.stash(() -> System.out.println("hello"), list); // OK } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyInterface.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -147,7 +147,7 @@ public interface MyInterface { void act(); } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyHandler.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -215,7 +215,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/SamDetectorTest.kt) diff --git a/docs/checks/ImplicitStringPlaceholder.md.html b/docs/checks/ImplicitStringPlaceholder.md.html index 6f38a644..83f4a311 100644 --- a/docs/checks/ImplicitStringPlaceholder.md.html +++ b/docs/checks/ImplicitStringPlaceholder.md.html @@ -47,8 +47,8 @@ res/values/strings.xml:2:Warning: Implicit placeholder [ImplicitStringPlaceholder] <string name="my_string">Hello %s</string> - ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + -- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -57,7 +57,7 @@ <resources> <string name="my_string">Hello %s</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/ImplicitStringPlaceholderDetectorTest.kt) diff --git a/docs/checks/ImpliedQuantity.md.html b/docs/checks/ImpliedQuantity.md.html index 92e842e9..875c8e4b 100644 --- a/docs/checks/ImpliedQuantity.md.html +++ b/docs/checks/ImpliedQuantity.md.html @@ -55,7 +55,7 @@ issue explanation for more. [ImpliedQuantity] <item quantity="one">Znaleziono jedną piosenkę.</item> ------------------------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -69,7 +69,7 @@ <item quantity="other">@string/hello</item> </plurals> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/plurals2.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -80,7 +80,7 @@ <item quantity="other">%d songs found.</item> </plurals> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-pl/plurals2.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -92,7 +92,7 @@ <item quantity="other">Znaleziono %d piosenek.</item> </plurals> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-sl/plurals2.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -104,7 +104,7 @@ <item quantity="other">Znaleziono %d piosenek.</item> </plurals> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PluralsDetectorTest.java) diff --git a/docs/checks/ImpliedTouchscreenHardware.md.html b/docs/checks/ImpliedTouchscreenHardware.md.html index 462cd0fd..ce064a65 100644 --- a/docs/checks/ImpliedTouchscreenHardware.md.html +++ b/docs/checks/ImpliedTouchscreenHardware.md.html @@ -46,7 +46,7 @@ [ImpliedTouchscreenHardware] <manifest xmlns:android="http://schemas.android.com/apk/res/android" -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -58,7 +58,7 @@ <uses-feature android:name="android.software.leanback"/> <uses-feature android:name="android.hardware.telephony"/> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AndroidTvDetectorTest.java) diff --git a/docs/checks/InOrMmUsage.md.html b/docs/checks/InOrMmUsage.md.html index f2e28ef0..bfb9ffb8 100644 --- a/docs/checks/InOrMmUsage.md.html +++ b/docs/checks/InOrMmUsage.md.html @@ -53,7 +53,7 @@ [InOrMmUsage] android:layout_height="120in" ----------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -113,7 +113,7 @@ android:maxHeight="1px" android:scaleType="center" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PxUsageDetectorTest.java) diff --git a/docs/checks/IncludeLayoutParam.md.html b/docs/checks/IncludeLayoutParam.md.html index 216cbbcd..58595fa3 100644 --- a/docs/checks/IncludeLayoutParam.md.html +++ b/docs/checks/IncludeLayoutParam.md.html @@ -74,7 +74,7 @@ [IncludeLayoutParam] android:layout_height="fill_parent" ----------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -155,7 +155,7 @@ android:visibility="visible" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/IncludeDetectorTest.java) diff --git a/docs/checks/InclusiveNaming.md.html b/docs/checks/InclusiveNaming.md.html index a68e4494..43d91fe3 100644 --- a/docs/checks/InclusiveNaming.md.html +++ b/docs/checks/InclusiveNaming.md.html @@ -36,6 +36,8 @@ : This check runs on the fly in the IDE editor Implementation : [Source Code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/main/java/slack/lint/inclusive/InclusiveNamingResourceScanner.kt) +Tests +: [Source Code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/inclusive/InclusiveNamingDetectorTest.kt) Copyright Year : 2021 @@ -61,7 +63,59 @@ <option name="block-list" value="some string" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +test/ForkHandler.kt:1:Error: Use inclusive naming. Matched string is +'spork' in property name 'sporkBranch' [InclusiveNaming] +class Spork(val sporkBranch: String, sporkParam: String) { + ----------------------- +test/ForkHandler.kt:2:Error: Use inclusive naming. Matched string is +'knife' in property name 'knife' [InclusiveNaming] + val knife = "" + -------------- +test/ForkHandler.kt:4:Error: Use inclusive naming. Matched string is +'spoon' in parameter name 'spoonRef' [InclusiveNaming] + fun spoonBranch(val spoonRef: String) { + -------------------- +test/ForkHandler.kt:5:Error: Use inclusive naming. Matched string is +'fork' in local variable name 'localFork' [InclusiveNaming] + val localFork = "" + ------------------ +test/ForkHandler.kt:7:Error: Use inclusive naming. Matched string is +'spoon' in label name 'spoonRefs' [InclusiveNaming] + .forEach spoonRefs@ { + ^ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`test/ForkHandler.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +class Spork(val sporkBranch: String, sporkParam: String) { + val knife = "" + + fun spoonBranch(val spoonRef: String) { + val localFork = "" + emptyList() + .forEach spoonRefs@ { + + } + } +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/inclusive/InclusiveNamingDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `InclusiveNamingResourceScanner.kotlin`. +To report a problem with this extracted sample, visit +https://github.com/slackhq/slack-lints. (##) Conflicts diff --git a/docs/checks/IncompatibleMediaBrowserServiceCompatVersion.md.html b/docs/checks/IncompatibleMediaBrowserServiceCompatVersion.md.html index f9731305..5fe7b7d7 100644 --- a/docs/checks/IncompatibleMediaBrowserServiceCompatVersion.md.html +++ b/docs/checks/IncompatibleMediaBrowserServiceCompatVersion.md.html @@ -42,7 +42,7 @@ compatible [IncompatibleMediaBrowserServiceCompatVersion] compile 'com.android.support:support-v4:23.4.0' ------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -68,7 +68,7 @@ } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `build.gradle`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~groovy linenumbers @@ -77,7 +77,7 @@ dependencies { compile 'com.android.support:support-v4:23.4.0' } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/MediaBrowserServiceCompatVersionDetectorTest.kt) diff --git a/docs/checks/InconsistentArrays.md.html b/docs/checks/InconsistentArrays.md.html index f6af0927..23b1cfb1 100644 --- a/docs/checks/InconsistentArrays.md.html +++ b/docs/checks/InconsistentArrays.md.html @@ -59,7 +59,7 @@ values-land/arrays.xml) [InconsistentArrays] <array name="signal_strength"> ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -82,8 +82,7 @@ <item>@drawable/ic_setups_signal_4</item> </array> </resources> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-cs/arrays.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -96,7 +95,7 @@ <item>"Název střední školy"</item> </string-array> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-land/arrays.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -110,8 +109,7 @@ <item>@drawable/extra</item> </array> </resources> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-nl-rNL/arrays.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -123,7 +121,7 @@ <item>"Naam van middelbare school?"</item> </string-array> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-es/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -145,7 +143,7 @@ <item>"Nombre de tu colegio"</item> </string-array> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ArraySizeDetectorTest.kt) diff --git a/docs/checks/InconsistentLayout.md.html b/docs/checks/InconsistentLayout.md.html index 750ea37e..14fc0a47 100644 --- a/docs/checks/InconsistentLayout.md.html +++ b/docs/checks/InconsistentLayout.md.html @@ -59,7 +59,7 @@ (present in layout) [InconsistentLayout] android:id="@+id/button4" ------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -72,7 +72,7 @@ parent.foo(R.id.button4); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout/layout1.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -121,7 +121,7 @@ android:text="Button" /> </RelativeLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout-xlarge/layout1.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -138,7 +138,7 @@ android:text="Button" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/LayoutConsistencyDetectorTest.java) diff --git a/docs/checks/IncorrectReferencesDeclaration.md.html b/docs/checks/IncorrectReferencesDeclaration.md.html index 28ad1ced..ef50930b 100644 --- a/docs/checks/IncorrectReferencesDeclaration.md.html +++ b/docs/checks/IncorrectReferencesDeclaration.md.html @@ -65,7 +65,7 @@ match assigned variables (2) [IncorrectReferencesDeclaration] val (box2, text2) = createRefsFor("box", "text", "image") ------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -96,7 +96,7 @@ val (box3, text3, image3) = createRefsFor(*ids) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/constraintlayout/constraintlayout-compose-lint/src/test/java/androidx/constraintlayout/compose/lint/ConstraintLayoutDslDetectorTest.kt) diff --git a/docs/checks/InefficientWeight.md.html b/docs/checks/InefficientWeight.md.html index 2cbc8364..a478e662 100644 --- a/docs/checks/InefficientWeight.md.html +++ b/docs/checks/InefficientWeight.md.html @@ -51,7 +51,7 @@ instead of wrap_content for better performance [InefficientWeight] android:layout_height="wrap_content" ------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -117,7 +117,7 @@ </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/InefficientWeightDetectorTest.java) diff --git a/docs/checks/InflateParams.md.html b/docs/checks/InflateParams.md.html index 37eb24ce..cbc45318 100644 --- a/docs/checks/InflateParams.md.html +++ b/docs/checks/InflateParams.md.html @@ -51,7 +51,7 @@ layout's root element) [InflateParams] convertView = mInflater.inflate(R.layout.your_layout, null, true); ---- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -97,7 +97,7 @@ public static View inflate(View view, Object params) { return null; } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout/your_layout.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -107,14 +107,14 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" /> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout-port/your_layout.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@id/text1" style="?android:attr/listSeparatorTextViewStyle" /> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/LayoutInflationDetectorTest.java) diff --git a/docs/checks/InjectInJava.md.html b/docs/checks/InjectInJava.md.html index 3882a2ff..9529bd09 100644 --- a/docs/checks/InjectInJava.md.html +++ b/docs/checks/InjectInJava.md.html @@ -73,7 +73,7 @@ injected in order for Anvil to work. [InjectInJava] @Module static abstract class ExampleModule { ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -113,8 +113,7 @@ } } - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/InjectInJavaDetectorTest.kt) diff --git a/docs/checks/InlinedApi.md.html b/docs/checks/InlinedApi.md.html index 16ea1fc9..1d489cad 100644 --- a/docs/checks/InlinedApi.md.html +++ b/docs/checks/InlinedApi.md.html @@ -63,7 +63,7 @@ android.media.MediaFormat#MIMETYPE_AUDIO_AC4 [InlinedApi] val format: String = MediaFormat.MIMETYPE_AUDIO_AC4 ------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -74,7 +74,7 @@ android:minSdkVersion="21" android:targetSdkVersion="30" /> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -88,10 +88,11 @@ val format: String = MediaFormat.MIMETYPE_AUDIO_AC4 encode(format) // might crash! } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ApiDetectorTest.java) +You can also visit the source code ([ApiDetectorTest.java](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ApiDetectorTest.java) +[VersionChecksTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/detector/api/VersionChecksTest.kt) +[LintBaselineTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/client/api/LintBaselineTest.kt) for the unit tests for this check to see additional scenarios. (##) Suppressing diff --git a/docs/checks/InnerclassSeparator.md.html b/docs/checks/InnerclassSeparator.md.html index d08f1dcf..e6b9c992 100644 --- a/docs/checks/InnerclassSeparator.md.html +++ b/docs/checks/InnerclassSeparator.md.html @@ -50,7 +50,7 @@ replace ".Foo.Bar" with ".Foo$Bar" [InnerclassSeparator] android:name=".Foo.Bar" -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -65,7 +65,7 @@ </activity> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/Foo.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -77,7 +77,7 @@ public static class Bar extends Activity { } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/MissingClassDetectorTest.kt) diff --git a/docs/checks/InsecureBaseConfiguration.md.html b/docs/checks/InsecureBaseConfiguration.md.html index d1c84664..6676af19 100644 --- a/docs/checks/InsecureBaseConfiguration.md.html +++ b/docs/checks/InsecureBaseConfiguration.md.html @@ -49,7 +49,7 @@ [InsecureBaseConfiguration] <base-config cleartextTrafficPermitted="true"> ---- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -60,7 +60,7 @@ <base-config cleartextTrafficPermitted="true"> </base-config> </network-security-config> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/NetworkSecurityConfigDetectorTest.java) diff --git a/docs/checks/InsecureDnsSdkLevel.md.html b/docs/checks/InsecureDnsSdkLevel.md.html index 0ed54b40..3f1e3797 100644 --- a/docs/checks/InsecureDnsSdkLevel.md.html +++ b/docs/checks/InsecureDnsSdkLevel.md.html @@ -27,7 +27,7 @@ Artifact : [com.android.security.lint:lint](com_android_security_lint_lint.md.html) Since -: 1.0.1 +: 1.0.0 Affects : Manifest files Editing @@ -56,7 +56,7 @@ transport security features [InsecureDnsSdkLevel] <uses-sdk android:targetSdkVersion='27'/> -- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -68,7 +68,7 @@ <activity android:name='com.example.MainActivity'></activity> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/DnsConfigDetectorTest.kt) @@ -88,17 +88,17 @@ ``` // build.gradle.kts -lintChecks("com.android.security.lint:lint:1.0.3") +lintChecks("com.android.security.lint:lint:1.0.4") // build.gradle -lintChecks 'com.android.security.lint:lint:1.0.3' +lintChecks 'com.android.security.lint:lint:1.0.4' // build.gradle.kts with version catalogs: lintChecks(libs.com.android.security.lint.lint) # libs.versions.toml [versions] -com-android-security-lint-lint = "1.0.3" +com-android-security-lint-lint = "1.0.4" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -110,7 +110,7 @@ } ``` -1.0.3 is the version this documentation was generated from; +1.0.4 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.android.security.lint:lint](com_android_security_lint_lint.md.html). diff --git a/docs/checks/InsecureLegacyExternalStorage.md.html b/docs/checks/InsecureLegacyExternalStorage.md.html new file mode 100644 index 00000000..defacd72 --- /dev/null +++ b/docs/checks/InsecureLegacyExternalStorage.md.html @@ -0,0 +1,172 @@ + +(#) The `requestLegacyExternalStorage` attribute is set to true, opting the app out of scoped storage + +!!! WARNING: The `requestLegacyExternalStorage` attribute is set to true, opting the app out of scoped storage + This is a warning. + +Id +: `InsecureLegacyExternalStorage` +Summary +: The `requestLegacyExternalStorage` attribute is set to true, opting the app out of scoped storage +Severity +: Warning +Category +: Security +Platform +: Android +Vendor +: Google - Android 3P Vulnerability Research +Contact +: https://github.com/google/android-security-lints +Feedback +: https://github.com/google/android-security-lints/issues +Min +: Lint 4.1 +Compiled +: Lint 8.0 and 8.1 +Artifact +: [com.android.security.lint:lint](com_android_security_lint_lint.md.html) +Since +: 1.0.4 +Affects +: Manifest files +Editing +: This check runs on the fly in the IDE editor +See +: https://goo.gle/InsecureLegacyExternalStorage +Implementation +: [Source Code](https://github.com/google/android-security-lints/tree/main/checks/src/main/java/com/example/lint/checks/InsecureStorageDetector.kt) +Tests +: [Source Code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/InsecureStorageDetectorTest.kt) +Copyright Year +: 2024 + +Applications targeting Android 10 can set the +`requestLegacyExternalStorage` flag to `true`, but this configuration +opts the app out of Android Scoped Storage, making application-related +files in external storage accessible to other applications. + +!!! Tip + This lint check has an associated quickfix available in the IDE. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +AndroidManifest.xml:3:Warning: Setting requestLegacyExternalStorage to +true will disable Android Scoped Storage +[InsecureLegacyExternalStorage] +<application android:requestLegacyExternalStorage="true"> + ------------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`AndroidManifest.xml`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<manifest xmlns:android='http://schemas.android.com/apk/res/android' package='test.pkg'> +<uses-sdk android:targetSdkVersion="29"/> +<application android:requestLegacyExternalStorage="true"> + <activity android:name='com.example.MainActivity'></activity> +</application> +</manifest> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/InsecureStorageDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `InsecureStorageDetector.testWhenRequestLegacyExternalStorageDeclared_whenBelowPatchedSdkLevel_showsWarning`. +To report a problem with this extracted sample, visit +https://github.com/google/android-security-lints/issues. + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. This lint check is included in the lint documentation, + but the Android team may or may not agree with its recommendations. + +``` +// build.gradle.kts +lintChecks("com.android.security.lint:lint:1.0.4") + +// build.gradle +lintChecks 'com.android.security.lint:lint:1.0.4' + +// build.gradle.kts with version catalogs: +lintChecks(libs.com.android.security.lint.lint) + +# libs.versions.toml +[versions] +com-android-security-lint-lint = "1.0.4" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +com-android-security-lint-lint = { + module = "com.android.security.lint:lint", + version.ref = "com-android-security-lint-lint" +} +``` + +1.0.4 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.android.security.lint:lint](com_android_security_lint_lint.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Adding the suppression attribute + `tools:ignore="InsecureLegacyExternalStorage"` on the problematic + XML element (or one of its enclosing elements). You may also need to + add the following namespace declaration on the root element in the + XML file if it's not already there: + `xmlns:tools="http://schemas.android.com/tools"`. + + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <manifest xmlns:tools="http://schemas.android.com/tools"> + ... + <application tools:ignore="InsecureLegacyExternalStorage" .../> + ... + </manifest> + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="InsecureLegacyExternalStorage" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'InsecureLegacyExternalStorage' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore InsecureLegacyExternalStorage ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/InsecurePermissionProtectionLevel.md.html b/docs/checks/InsecurePermissionProtectionLevel.md.html index 29147a02..f518d0a2 100644 --- a/docs/checks/InsecurePermissionProtectionLevel.md.html +++ b/docs/checks/InsecurePermissionProtectionLevel.md.html @@ -27,7 +27,7 @@ Artifact : [com.android.security.lint:lint](com_android_security_lint_lint.md.html) Since -: 1.0.1 +: 1.0.0 Affects : Manifest files Editing @@ -55,11 +55,11 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -AndroidManifest.xml:2:Warning: Custom permissions should have signature -`protectionLevel`s or higher [InsecurePermissionProtectionLevel] +AndroidManifest.xml:2:Warning: Custom permissions should have a +signature protectionLevel or higher [InsecurePermissionProtectionLevel] <permission android:name="com.android.example.permission.CUSTOM_PERMISSION" /> ------------------------------------------------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -71,7 +71,7 @@ <activity android:name='com.example.MainActivity'></activity> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/PermissionDetectorTest.kt) @@ -91,17 +91,17 @@ ``` // build.gradle.kts -lintChecks("com.android.security.lint:lint:1.0.3") +lintChecks("com.android.security.lint:lint:1.0.4") // build.gradle -lintChecks 'com.android.security.lint:lint:1.0.3' +lintChecks 'com.android.security.lint:lint:1.0.4' // build.gradle.kts with version catalogs: lintChecks(libs.com.android.security.lint.lint) # libs.versions.toml [versions] -com-android-security-lint-lint = "1.0.3" +com-android-security-lint-lint = "1.0.4" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -113,7 +113,7 @@ } ``` -1.0.3 is the version this documentation was generated from; +1.0.4 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.android.security.lint:lint](com_android_security_lint_lint.md.html). diff --git a/docs/checks/InsecureStickyBroadcastsMethod.md.html b/docs/checks/InsecureStickyBroadcastsMethod.md.html index 6f5ce93f..475e5076 100644 --- a/docs/checks/InsecureStickyBroadcastsMethod.md.html +++ b/docs/checks/InsecureStickyBroadcastsMethod.md.html @@ -55,7 +55,7 @@ [InsecureStickyBroadcastsMethod] sendStickyOrderedBroadcast(); ---------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -75,7 +75,7 @@ sendStickyOrderedBroadcast(); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/StickyBroadcastsDetectorTest.kt) @@ -95,17 +95,17 @@ ``` // build.gradle.kts -lintChecks("com.android.security.lint:lint:1.0.3") +lintChecks("com.android.security.lint:lint:1.0.4") // build.gradle -lintChecks 'com.android.security.lint:lint:1.0.3' +lintChecks 'com.android.security.lint:lint:1.0.4' // build.gradle.kts with version catalogs: lintChecks(libs.com.android.security.lint.lint) # libs.versions.toml [versions] -com-android-security-lint-lint = "1.0.3" +com-android-security-lint-lint = "1.0.4" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -117,7 +117,7 @@ } ``` -1.0.3 is the version this documentation was generated from; +1.0.4 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.android.security.lint:lint](com_android_security_lint_lint.md.html). diff --git a/docs/checks/InsecureStickyBroadcastsPermission.md.html b/docs/checks/InsecureStickyBroadcastsPermission.md.html index 398ed902..b9ea953c 100644 --- a/docs/checks/InsecureStickyBroadcastsPermission.md.html +++ b/docs/checks/InsecureStickyBroadcastsPermission.md.html @@ -55,7 +55,7 @@ [InsecureStickyBroadcastsPermission] <uses-permission android:name="android.permission.BROADCAST_STICKY"/> --------------------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -67,7 +67,7 @@ <activity android:name='com.example.MainActivity'></activity> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/StickyBroadcastsDetectorTest.kt) @@ -87,17 +87,17 @@ ``` // build.gradle.kts -lintChecks("com.android.security.lint:lint:1.0.3") +lintChecks("com.android.security.lint:lint:1.0.4") // build.gradle -lintChecks 'com.android.security.lint:lint:1.0.3' +lintChecks 'com.android.security.lint:lint:1.0.4' // build.gradle.kts with version catalogs: lintChecks(libs.com.android.security.lint.lint) # libs.versions.toml [versions] -com-android-security-lint-lint = "1.0.3" +com-android-security-lint-lint = "1.0.4" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -109,7 +109,7 @@ } ``` -1.0.3 is the version this documentation was generated from; +1.0.4 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.android.security.lint:lint](com_android_security_lint_lint.md.html). diff --git a/docs/checks/InstantAppCall.md.html b/docs/checks/InstantAppCall.md.html new file mode 100644 index 00000000..20276b99 --- /dev/null +++ b/docs/checks/InstantAppCall.md.html @@ -0,0 +1,131 @@ + +(#) Instant App call + +!!! WARNING: Instant App call + This is a warning. + +Id +: `InstantAppCall` +Summary +: Instant App call +Severity +: Warning +Category +: Correctness +Platform +: Android +Vendor +: Android Open Source Project +Feedback +: https://issuetracker.google.com/issues/new?component=192708 +Since +: 8.12.0 (July 2025) +Affects +: Kotlin and Java files +Editing +: This check runs on the fly in the IDE editor +Implementation +: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/InstantAppDetector.kt) +Tests +: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/InstantAppDetectorTest.kt) + +Instant Apps support will be removed by Google Play in December 2025. +Publishing and all Google Play Instant APIs will no longer work. Tooling +support will be removed in Android Studio Otter Feature Drop. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/com/example/app/MyApp.kt:8:Warning: Instant Apps support will be +removed by Google Play in December 2025 [InstantAppCall] + InstantApps.showInstallPrompt(activity, null, 0, null) + ------------------------------------------------------ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/com/example/app/MyApp.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package com.example.app + +import android.app.Activity +import com.google.android.gms.instantapps.InstantApps + +class MyApp { + fun go(activity: Activity) { + InstantApps.showInstallPrompt(activity, null, 0, null) + } +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/InstantAppDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Using a suppression annotation like this on the enclosing + element: + + ```kt + // Kotlin + @Suppress("InstantAppCall") + fun method() { + showInstallPrompt(...) + } + ``` + + or + + ```java + // Java + @SuppressWarnings("InstantAppCall") + void method() { + showInstallPrompt(...); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection InstantAppCall + problematicStatement() + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="InstantAppCall" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'InstantAppCall' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore InstantAppCall ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/InstantAppDeprecation.md.html b/docs/checks/InstantAppDeprecation.md.html new file mode 100644 index 00000000..375ea94e --- /dev/null +++ b/docs/checks/InstantAppDeprecation.md.html @@ -0,0 +1,110 @@ + +(#) Instant App Deprecation + +!!! WARNING: Instant App Deprecation + This is a warning. + +Id +: `InstantAppDeprecation` +Summary +: Instant App Deprecation +Severity +: Warning +Category +: Correctness +Platform +: Android +Vendor +: Android Open Source Project +Feedback +: https://issuetracker.google.com/issues/new?component=192708 +Since +: 8.12.0 (July 2025) +Affects +: Gradle build files and TOML files +Editing +: This check runs on the fly in the IDE editor +Implementation +: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/GradleDetector.kt) +Tests +: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) + +Instant Apps support will be removed by Google Play in December 2025. +Publishing and all Google Play Instant APIs will no longer work. Tooling +support will be removed in Android Studio Otter Feature Drop. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +build.gradle:2:Warning: Instant Apps support will be removed by Google +Play in December 2025. Publishing and all Google Play Instant APIs will +no longer work. Tooling support will be removed in Android Studio Otter +Feature Drop. [InstantAppDeprecation] + implementation 'com.google.android.gms:play-services-instantapps:18.1.0' + ------------------------------------------------------------------------ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`build.gradle`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~groovy linenumbers +dependencies { + implementation 'com.google.android.gms:play-services-instantapps:18.1.0' +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `GradleDetector.testInstntAppDeprectedDependencies`. +To report a problem with this extracted sample, visit +https://issuetracker.google.com/issues/new?component=192708. + +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection InstantAppDeprecation + problematicStatement() + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="InstantAppDeprecation" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'InstantAppDeprecation' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore InstantAppDeprecation ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/Instantiatable.md.html b/docs/checks/Instantiatable.md.html index ac5600db..70a06ab1 100644 --- a/docs/checks/Instantiatable.md.html +++ b/docs/checks/Instantiatable.md.html @@ -51,7 +51,7 @@ [Instantiatable] android:actionViewClass="test.pkg.NotView" /> ---------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -71,20 +71,20 @@ android:showAsAction="always|collapseActionView" android:actionViewClass="test.pkg.NotView" /> </menu> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/SearchView.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers package test.pkg import android.widget.TextView abstract class SearchView : TextView(null) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/NotView.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers package test.pkg abstract class NotView : android.app.Fragment() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/MissingClassDetectorTest.kt) diff --git a/docs/checks/IntentFilterExportedReceiver.md.html b/docs/checks/IntentFilterExportedReceiver.md.html index ddf206e6..eff14edc 100644 --- a/docs/checks/IntentFilterExportedReceiver.md.html +++ b/docs/checks/IntentFilterExportedReceiver.md.html @@ -67,7 +67,7 @@ otherwise. [IntentFilterExportedReceiver] <receiver android:name="com.google.android.c2dm.C2DMBroadcastReceiver"> -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -87,7 +87,7 @@ </receiver> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ExportedFlagDetectorTest.kt) diff --git a/docs/checks/IntentFilterUniqueDataAttributes.md.html b/docs/checks/IntentFilterUniqueDataAttributes.md.html index 59c66a4e..29e01dd1 100644 --- a/docs/checks/IntentFilterUniqueDataAttributes.md.html +++ b/docs/checks/IntentFilterUniqueDataAttributes.md.html @@ -87,7 +87,7 @@ [IntentFilterUniqueDataAttributes] <data alt-android:scheme="http" alt-android:host="example.org"/> ---------------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -102,7 +102,7 @@ </intent-filter> </activity> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AppLinksValidDetectorTest.kt) diff --git a/docs/checks/IntentReset.md.html b/docs/checks/IntentReset.md.html index 74c35927..05deba89 100644 --- a/docs/checks/IntentReset.md.html +++ b/docs/checks/IntentReset.md.html @@ -46,7 +46,7 @@ setType will clear the type: Call setDataAndType instead? [IntentReset] intent.setData(uri); // ERROR 2.1 ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -124,7 +124,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/IntentDetectorTest.kt) diff --git a/docs/checks/IntentWithNullActionLaunch.md.html b/docs/checks/IntentWithNullActionLaunch.md.html index 4ee39ff7..a3063c8b 100644 --- a/docs/checks/IntentWithNullActionLaunch.md.html +++ b/docs/checks/IntentWithNullActionLaunch.md.html @@ -51,7 +51,7 @@ filter. [IntentWithNullActionLaunch] Intent intent = new Intent(); ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -70,7 +70,7 @@ startActivity(intent); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/IntentWillNullActionDetectorTest.kt) diff --git a/docs/checks/InternalAgpApiUsage.md.html b/docs/checks/InternalAgpApiUsage.md.html index edb0f919..458456de 100644 --- a/docs/checks/InternalAgpApiUsage.md.html +++ b/docs/checks/InternalAgpApiUsage.md.html @@ -45,32 +45,6 @@ up these APIs if you find them useful. -(##) Example - -Here is an example of lint warnings produced by this check: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/test.kt:1:Error: Avoid using internal Android Gradle Plugin APIs -[InternalAgpApiUsage] -import com.android.build.gradle.internal.lint.VariantInputs ------------------------------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`src/test.kt`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers -import com.android.build.gradle.internal.lint.VariantInputs -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can also visit the -[source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/lint/lint-gradle/src/test/java/androidx/lint/gradle/InternalApiUsageDetectorTest.kt) -for the unit tests for this check to see additional scenarios. - -The above example was automatically extracted from the first unit test -found for this lint check, `InternalApiUsageDetector.Test usage of internal Android Gradle API`. -To report a problem with this extracted sample, visit -https://issuetracker.google.com/issues/new?component=1147525. - (##) Including !!! @@ -79,17 +53,17 @@ ``` // build.gradle.kts -implementation("androidx.lint:lint-gradle:1.0.0-alpha04") +implementation("androidx.lint:lint-gradle:1.0.0-alpha05") // build.gradle -implementation 'androidx.lint:lint-gradle:1.0.0-alpha04' +implementation 'androidx.lint:lint-gradle:1.0.0-alpha05' // build.gradle.kts with version catalogs: implementation(libs.lint.gradle) # libs.versions.toml [versions] -lint-gradle = "1.0.0-alpha04" +lint-gradle = "1.0.0-alpha05" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -101,7 +75,7 @@ } ``` -1.0.0-alpha04 is the version this documentation was generated from; +1.0.0-alpha05 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.lint:lint-gradle](androidx_lint_lint-gradle.md.html). diff --git a/docs/checks/InternalGradleApiUsage.md.html b/docs/checks/InternalGradleApiUsage.md.html index e5bf7e01..a8187021 100644 --- a/docs/checks/InternalGradleApiUsage.md.html +++ b/docs/checks/InternalGradleApiUsage.md.html @@ -53,7 +53,11 @@ [InternalGradleApiUsage] import org.gradle.api.internal.component.SoftwareComponentInternal ------------------------------------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src/test.kt:4:Error: Avoid using internal Gradle APIs +[InternalGradleApiUsage] +import org.gradle.api.internal.component.SoftwareComponentInternal as IMPORT_ALIAS_2_SOFTWARECOMPONENTINTERNAL +-------------------------------------------------------------------------------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -69,7 +73,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/lint/lint-gradle/src/test/java/androidx/lint/gradle/InternalApiUsageDetectorTest.kt) @@ -88,17 +92,17 @@ ``` // build.gradle.kts -implementation("androidx.lint:lint-gradle:1.0.0-alpha04") +implementation("androidx.lint:lint-gradle:1.0.0-alpha05") // build.gradle -implementation 'androidx.lint:lint-gradle:1.0.0-alpha04' +implementation 'androidx.lint:lint-gradle:1.0.0-alpha05' // build.gradle.kts with version catalogs: implementation(libs.lint.gradle) # libs.versions.toml [versions] -lint-gradle = "1.0.0-alpha04" +lint-gradle = "1.0.0-alpha05" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -110,7 +114,7 @@ } ``` -1.0.0-alpha04 is the version this documentation was generated from; +1.0.0-alpha05 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.lint:lint-gradle](androidx_lint_lint-gradle.md.html). diff --git a/docs/checks/InternalInsetResource.md.html b/docs/checks/InternalInsetResource.md.html index f877a998..2044ff81 100644 --- a/docs/checks/InternalInsetResource.md.html +++ b/docs/checks/InternalInsetResource.md.html @@ -44,7 +44,7 @@ status_bar_height is not supported [InternalInsetResource] getIdentifier("status_bar_height", "dimen", "android") ------------------------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -56,7 +56,7 @@ fun Resources.getStatusBarHeightIdentifier(): Int = getIdentifier("status_bar_height", "dimen", "android") -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/InternalInsetResourceDetectorTest.kt) diff --git a/docs/checks/InternalKgpApiUsage.md.html b/docs/checks/InternalKgpApiUsage.md.html new file mode 100644 index 00000000..7127b1a2 --- /dev/null +++ b/docs/checks/InternalKgpApiUsage.md.html @@ -0,0 +1,147 @@ + +(#) Avoid using internal Kotlin Gradle Plugin APIs + +!!! ERROR: Avoid using internal Kotlin Gradle Plugin APIs + This is an error. + +Id +: `InternalKgpApiUsage` +Summary +: Avoid using internal Kotlin Gradle Plugin APIs +Severity +: Error +Category +: Correctness +Platform +: Any +Vendor +: Android Open Source Project +Identifier +: androidx.lint:lint-gradle +Feedback +: https://issuetracker.google.com/issues/new?component=1147525 +Min +: Lint 8.7+ +Compiled +: Lint 8.7+ +Artifact +: [androidx.lint:lint-gradle](androidx_lint_lint-gradle.md.html) +Since +: 1.0.0-alpha05 +Affects +: Kotlin and Java files +Editing +: This check runs on the fly in the IDE editor +Implementation +: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/lint/lint-gradle/src/main/java/androidx/lint/gradle/InternalApiUsageDetector.kt) +Tests +: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/lint/lint-gradle/src/test/java/androidx/lint/gradle/InternalApiUsageDetectorTest.kt) +Copyright Year +: 2024 + +Using internal APIs results in fragile plugin behavior as these types +have no binary +compatibility guarantees. It is best to create a feature request to open +up these +APIs if you find them useful. + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("androidx.lint:lint-gradle:1.0.0-alpha05") + +// build.gradle +implementation 'androidx.lint:lint-gradle:1.0.0-alpha05' + +// build.gradle.kts with version catalogs: +implementation(libs.lint.gradle) + +# libs.versions.toml +[versions] +lint-gradle = "1.0.0-alpha05" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +lint-gradle = { + module = "androidx.lint:lint-gradle", + version.ref = "lint-gradle" +} +``` + +1.0.0-alpha05 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about androidx.lint:lint-gradle](androidx_lint_lint-gradle.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Using a suppression annotation like this on the enclosing + element: + + ```kt + // Kotlin + @Suppress("InternalKgpApiUsage") + fun method() { + problematicStatement() + } + ``` + + or + + ```java + // Java + @SuppressWarnings("InternalKgpApiUsage") + void method() { + problematicStatement(); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection InternalKgpApiUsage + problematicStatement() + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="InternalKgpApiUsage" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'InternalKgpApiUsage' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore InternalKgpApiUsage ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/InvalidAccessibility.md.html b/docs/checks/InvalidAccessibility.md.html index 5713a093..bb09b348 100644 --- a/docs/checks/InvalidAccessibility.md.html +++ b/docs/checks/InvalidAccessibility.md.html @@ -48,7 +48,7 @@ use importantForAccessibility [InvalidAccessibility] android:contentDescription="@null"/> ----- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -59,7 +59,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:contentDescription="@null"/> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/InvalidAccessibilityDetectorTest.kt) diff --git a/docs/checks/InvalidAnalyticsName.md.html b/docs/checks/InvalidAnalyticsName.md.html index e074271b..c18641fe 100644 --- a/docs/checks/InvalidAnalyticsName.md.html +++ b/docs/checks/InvalidAnalyticsName.md.html @@ -43,7 +43,7 @@ [InvalidAnalyticsName] FirebaseAnalytics.getInstance(this).logEvent("a;", new Bundle()); ---------------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -57,7 +57,7 @@ FirebaseAnalytics.getInstance(this).logEvent("a;", new Bundle()); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/FirebaseAnalyticsDetectorTest.java) diff --git a/docs/checks/InvalidColorHexValue.md.html b/docs/checks/InvalidColorHexValue.md.html index 966632d9..95848de2 100644 --- a/docs/checks/InvalidColorHexValue.md.html +++ b/docs/checks/InvalidColorHexValue.md.html @@ -62,7 +62,7 @@ [InvalidColorHexValue] val color3 = Color(0x00_0_0_0L) ----------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -75,7 +75,7 @@ val color = Color(0x00000) val color2 = Color(0xEEEEE) val color3 = Color(0x00_0_0_0L) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/ui/ui-graphics-lint/src/test/java/androidx/compose/ui/graphics/lint/ColorDetectorTest.kt) @@ -94,17 +94,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui-graphics-android:1.9.0-alpha01") +implementation("androidx.compose.ui:ui-graphics-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.ui:ui-graphics-android:1.9.0-alpha01' +implementation 'androidx.compose.ui:ui-graphics-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.ui.graphics.android) # libs.versions.toml [versions] -ui-graphics-android = "1.9.0-alpha01" +ui-graphics-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -116,11 +116,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.ui:ui-graphics-lint:1.9.0-alpha01`. +You can also use `androidx.compose.ui:ui-graphics-lint:1.11.0-alpha06`. [Additional details about androidx.compose.ui:ui-graphics-android](androidx_compose_ui_ui-graphics-android.md.html). diff --git a/docs/checks/InvalidFragmentVersionForActivityResult.md.html b/docs/checks/InvalidFragmentVersionForActivityResult.md.html index ee40536f..b769470a 100644 --- a/docs/checks/InvalidFragmentVersionForActivityResult.md.html +++ b/docs/checks/InvalidFragmentVersionForActivityResult.md.html @@ -53,10 +53,10 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text src/main/kotlin/com/example/test.kt:6:Error: Upgrade Fragment version to -at least . [InvalidFragmentVersionForActivityResult] +at least 1.3.0. [InvalidFragmentVersionForActivityResult] val launcher = ActivityResultCaller().registerForActivityResult(ActivityResultContract()) -------------------------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -65,7 +65,7 @@ dependencies { api("androidx.fragment:fragment:1.2.4") } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/main/kotlin/com/example/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -75,7 +75,7 @@ import androidx.activity.result.contract.ActivityResultContract val launcher = ActivityResultCaller().registerForActivityResult(ActivityResultContract()) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/activity/activity-lint/src/test/java/androidx/activity/lint/ActivityResultFragmentVersionDetectorTest.kt) @@ -94,17 +94,17 @@ ``` // build.gradle.kts -implementation("androidx.activity:activity:1.11.0-rc01") +implementation("androidx.activity:activity:1.13.0-rc01") // build.gradle -implementation 'androidx.activity:activity:1.11.0-rc01' +implementation 'androidx.activity:activity:1.13.0-rc01' // build.gradle.kts with version catalogs: implementation(libs.activity) # libs.versions.toml [versions] -activity = "1.11.0-rc01" +activity = "1.13.0-rc01" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -116,7 +116,7 @@ } ``` -1.11.0-rc01 is the version this documentation was generated from; +1.13.0-rc01 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.activity:activity](androidx_activity_activity.md.html). diff --git a/docs/checks/InvalidId.md.html b/docs/checks/InvalidId.md.html index c580250e..a40f6db1 100644 --- a/docs/checks/InvalidId.md.html +++ b/docs/checks/InvalidId.md.html @@ -61,7 +61,7 @@ @+id/name; try using @+id/string_whatevs [InvalidId] android:id="@+string/whatevs" ----------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -116,7 +116,7 @@ </LinearLayout> </RelativeLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WrongIdDetectorTest.kt) diff --git a/docs/checks/InvalidImeActionId.md.html b/docs/checks/InvalidImeActionId.md.html index b02a34c3..63ef46d2 100644 --- a/docs/checks/InvalidImeActionId.md.html +++ b/docs/checks/InvalidImeActionId.md.html @@ -43,7 +43,7 @@ integer value [InvalidImeActionId] <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:imeActionId="@+id/login"/> -------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -52,7 +52,7 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:imeActionId="@+id/login"/> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/InvalidImeActionIdDetectorTest.kt) diff --git a/docs/checks/InvalidImport.md.html b/docs/checks/InvalidImport.md.html index 6dba29fb..855d72b5 100644 --- a/docs/checks/InvalidImport.md.html +++ b/docs/checks/InvalidImport.md.html @@ -46,7 +46,7 @@ src/foo/Example.java:3:Warning: Forbidden import [InvalidImport] import foo.R.drawable; -------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -58,7 +58,7 @@ class Example { } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/InvalidImportDetectorTest.kt) diff --git a/docs/checks/InvalidLanguageTagDelimiter.md.html b/docs/checks/InvalidLanguageTagDelimiter.md.html index dd1461f8..93a9166a 100644 --- a/docs/checks/InvalidLanguageTagDelimiter.md.html +++ b/docs/checks/InvalidLanguageTagDelimiter.md.html @@ -51,7 +51,7 @@ should be used in a language tag [InvalidLanguageTagDelimiter] bar(Locale("en_UK")) ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -65,7 +65,7 @@ fun foo() { bar(Locale("en_UK")) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/ui/ui-text-lint/src/test/java/androidx/compose/ui/text/lint/LocaleInvalidLanguageTagDetectorTest.kt) @@ -84,17 +84,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui-text-android:1.9.0-alpha01") +implementation("androidx.compose.ui:ui-text-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.ui:ui-text-android:1.9.0-alpha01' +implementation 'androidx.compose.ui:ui-text-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.ui.text.android) # libs.versions.toml [versions] -ui-text-android = "1.9.0-alpha01" +ui-text-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -106,11 +106,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.ui:ui-text-lint:1.9.0-alpha01`. +You can also use `androidx.compose.ui:ui-text-lint:1.11.0-alpha06`. [Additional details about androidx.compose.ui:ui-text-android](androidx_compose_ui_ui-text-android.md.html). diff --git a/docs/checks/InvalidManifestAttribute.md.html b/docs/checks/InvalidManifestAttribute.md.html new file mode 100644 index 00000000..f4e1ac76 --- /dev/null +++ b/docs/checks/InvalidManifestAttribute.md.html @@ -0,0 +1,172 @@ + +(#) Invalid manifest attribute + +!!! WARNING: Invalid manifest attribute + This is a warning. + +Id +: `InvalidManifestAttribute` +Summary +: Invalid manifest attribute +Severity +: Warning +Category +: Correctness +Platform +: Android +Vendor +: Android Open Source Project +Feedback +: https://issuetracker.google.com/issues/new?component=192708 +Since +: 9.0.0 (January 2026) +Affects +: Manifest files +Editing +: This check runs on the fly in the IDE editor +Implementation +: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/ManifestAttributeDetector.kt) +Tests +: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ManifestAttributeDetectorTest.kt) + +Most manifest attributes can be added to any tag without triggering any +build-time warnings or errors, but those attributes may be invalid, and +will be silently ignored. + +For example, only a very specific subset of `` attributes are +valid on an ``; the rest are ignored, which can be +confusing. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +AndroidManifest.xml:7:Warning: Attribute process on +com.example.ActivityAlias is invalid, and will be silently ignored. This +attribute is always ignored on . +[InvalidManifestAttribute] + android:process=":process" + -------------------------- +AndroidManifest.xml:27:Warning: Attribute theme on +com.example.ActivityAlias2 is invalid, and will be silently ignored. +This attribute is always ignored on . +[InvalidManifestAttribute] + android:theme="@style/Theme.NoDisplay" + -------------------------------------- +AndroidManifest.xml:33:Warning: Attribute visibleToInstantApps on + com.example.ActivityAlias3 is invalid, and will be +silently ignored. This attribute is always ignored on . +[InvalidManifestAttribute] + android:visibleToInstantApps="true" + ----------------------------------- +AndroidManifest.xml:35:Warning: Attribute theme on +com.example.ActivityAlias3 is invalid, and will be silently ignored. +This attribute is always ignored on . +[InvalidManifestAttribute] + android:theme="@style/Theme.NoDisplay" + -------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`AndroidManifest.xml`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.example.app"> + <application> + <activity-alias + android:name="com.example.ActivityAlias" + android:targetActivity="com.example.Activity" + android:process=":process" + android:label="@string/activity_name" + android:exported="true" + android:icon="@drawable/activity_alias_icon" + android:attributionTags="activity_alias" + android:permission="com.example.permission.PERMISSION" + android:banner="@string/activity_alias_banner" + android:description="@string/activity_alias_description" + android:logo="@drawable/activity_alias_logo" + android:roundIcon="@drawable/activity_alias_round_icon" + > + <intent-filter> + <action android:name="android.intent.action.VIEW" /> + <category android:name="android.intent.category.DEFAULT" /> + </intent-filter> + </activity-alias> + <activity-alias + android:name="com.example.ActivityAlias2" + android:targetActivity="com.example.Activity" + android:permission="com.example.permission.PERMISSION" + android:theme="@style/Theme.NoDisplay" + > + </activity-alias> + <activity-alias + android:name="com.example.ActivityAlias3" + android:targetActivity="com.example.Activity" + android:visibleToInstantApps="true" + android:permission="com.example.permission.PERMISSION" + android:theme="@style/Theme.NoDisplay" + > + </activity-alias> + </application> +</manifest> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ManifestAttributeDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Adding the suppression attribute + `tools:ignore="InvalidManifestAttribute"` on the problematic XML + element (or one of its enclosing elements). You may also need to add + the following namespace declaration on the root element in the XML + file if it's not already there: + `xmlns:tools="http://schemas.android.com/tools"`. + + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <manifest xmlns:tools="http://schemas.android.com/tools"> + ... + <activity-alias tools:ignore="InvalidManifestAttribute" .../> + ... + </manifest> + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="InvalidManifestAttribute" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'InvalidManifestAttribute' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore InvalidManifestAttribute ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/InvalidNavigation.md.html b/docs/checks/InvalidNavigation.md.html index d8c8b0eb..cbbcd886 100644 --- a/docs/checks/InvalidNavigation.md.html +++ b/docs/checks/InvalidNavigation.md.html @@ -40,7 +40,7 @@ @id/includedId [InvalidNavigation] app:startDestination="@id/includedId"> -------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -53,7 +53,7 @@ app:startDestination="@id/includedId"> <include app:graph="@navigation/foo"/> </navigation> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/navigation/foo.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -65,7 +65,7 @@ app:startDestination="@id/foo2"> <fragment android:id="@+id/foo2"/> </navigation> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/StartDestinationDetectorTest.kt) diff --git a/docs/checks/InvalidPackage.md.html b/docs/checks/InvalidPackage.md.html index 2f053a02..78629d55 100644 --- a/docs/checks/InvalidPackage.md.html +++ b/docs/checks/InvalidPackage.md.html @@ -56,7 +56,7 @@ included in Android: javax.swing. Referenced from test.pkg.LibraryClass. [InvalidPackage] 2 errors, 0 warnings -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant test files: @@ -94,7 +94,7 @@ </GridLayout> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/themes.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -114,7 +114,7 @@ </style> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/color/colors.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -134,7 +134,7 @@ </style> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [libs/unsupported.jar](examples/libs/unsupported.jar) diff --git a/docs/checks/InvalidPeriodicWorkRequestInterval.md.html b/docs/checks/InvalidPeriodicWorkRequestInterval.md.html index 986cda09..10f5fbb2 100644 --- a/docs/checks/InvalidPeriodicWorkRequestInterval.md.html +++ b/docs/checks/InvalidPeriodicWorkRequestInterval.md.html @@ -53,7 +53,7 @@ [InvalidPeriodicWorkRequestInterval] val builder = PeriodicWorkRequest.Builder(TestWorker::class.java, 15L, TimeUnit.MILLISECONDS) ------------------------------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -64,7 +64,7 @@ import androidx.work.ListenableWorker class TestWorker: ListenableWorker() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `com/example/Test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -79,7 +79,7 @@ val builder = PeriodicWorkRequest.Builder(TestWorker::class.java, 15L, TimeUnit.MILLISECONDS) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/work/work-lint/src/test/java/androidx/work/lint/InvalidPeriodicWorkRequestIntervalDetectorTest.kt) @@ -98,17 +98,17 @@ ``` // build.gradle.kts -implementation("androidx.work:work-runtime:2.10.1") +implementation("androidx.work:work-runtime:2.11.1") // build.gradle -implementation 'androidx.work:work-runtime:2.10.1' +implementation 'androidx.work:work-runtime:2.11.1' // build.gradle.kts with version catalogs: implementation(libs.work.runtime) # libs.versions.toml [versions] -work-runtime = "2.10.1" +work-runtime = "2.11.1" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -120,7 +120,7 @@ } ``` -2.10.1 is the version this documentation was generated from; +2.11.1 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.work:work-runtime](androidx_work_work-runtime.md.html). diff --git a/docs/checks/InvalidPermission.md.html b/docs/checks/InvalidPermission.md.html index 1e43e41c..c7982844 100644 --- a/docs/checks/InvalidPermission.md.html +++ b/docs/checks/InvalidPermission.md.html @@ -46,7 +46,7 @@ permission is a no-op and potentially dangerous [InvalidPermission] android:permission="android.permission.SET_WALLPAPER"/> ----------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -79,8 +79,7 @@ </application> </manifest> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ManifestPermissionAttributeDetectorTest.kt) diff --git a/docs/checks/InvalidPurposeString.md.html b/docs/checks/InvalidPurposeString.md.html new file mode 100644 index 00000000..7109ac90 --- /dev/null +++ b/docs/checks/InvalidPurposeString.md.html @@ -0,0 +1,120 @@ + +(#) Invalid purpose string for permission + +!!! ERROR: Invalid purpose string for permission + This is an error, and is also enforced at build time when + supported by the build system. For Android this means it will + run during release builds. + +Id +: `InvalidPurposeString` +Summary +: Invalid purpose string for permission +Severity +: Fatal +Category +: Correctness +Platform +: Android +Vendor +: Android Open Source Project +Feedback +: https://issuetracker.google.com/issues/new?component=192708 +Since +: 9.0.0 (January 2026) +Affects +: Manifest files +Editing +: This check runs on the fly in the IDE editor +Implementation +: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/PurposeDeclarationDetector.kt) +Tests +: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PurposeDeclarationDetectorTest.kt) + +If a permission requires a purpose string, a valid +`android:purposeString` attribute should be declared. This attribute +must reference a localized string resource that's no more than 300 +characters (150 recommended) for all locales the app supports as the +text is displayed on user-facing surfaces. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +AndroidManifest.xml:4:Error: The referenced purposeString must be +non-blank and have no more than 300 characters. Invalid example(s) +include: myPurposeString (Default) [InvalidPurposeString] + <uses-permission android:name="USE_FOO" android:purposeString="@string/myPurposeString" /> + ----------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here are the relevant source files: + +`AndroidManifest.xml`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.example.helloworld"> + <uses-sdk android:minSdkVersion="30" android:targetSdkVersion="38" /> + <uses-permission android:name="USE_FOO" android:purposeString="@string/myPurposeString" /> +</manifest> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`res/values/strings.xml`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<resources><string name="myPurposeString"></string></resources> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PurposeDeclarationDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `PurposeDeclarationDetector.testRequestingPermissionWithLongPurposeStringFail`. +To report a problem with this extracted sample, visit +https://issuetracker.google.com/issues/new?component=192708. + +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Adding the suppression attribute + `tools:ignore="InvalidPurposeString"` on the problematic XML element + (or one of its enclosing elements). You may also need to add the + following namespace declaration on the root element in the XML file + if it's not already there: + `xmlns:tools="http://schemas.android.com/tools"`. + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="InvalidPurposeString" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'InvalidPurposeString' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore InvalidPurposeString ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/InvalidResourceFolder.md.html b/docs/checks/InvalidResourceFolder.md.html index b793fdea..296fbea7 100644 --- a/docs/checks/InvalidResourceFolder.md.html +++ b/docs/checks/InvalidResourceFolder.md.html @@ -52,7 +52,7 @@ res/values-ldtrl-mnc123/strings.xml:Error: Invalid resource folder: make sure qualifiers appear in the correct order, are spelled correctly, etc. [InvalidResourceFolder] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -60,25 +60,25 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-ldtrl-mnc123/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-kok-rIN/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-no-rNOR/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/LocaleFolderDetectorTest.kt) diff --git a/docs/checks/InvalidSetHasFixedSize.md.html b/docs/checks/InvalidSetHasFixedSize.md.html index 61d7b0eb..35cd78f1 100644 --- a/docs/checks/InvalidSetHasFixedSize.md.html +++ b/docs/checks/InvalidSetHasFixedSize.md.html @@ -53,7 +53,7 @@ scrolling direction. [InvalidSetHasFixedSize] recyclerView?.setHasFixedSize(true) ----------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -65,7 +65,7 @@ android:id="@+id/my_recycler_view" android:layout_width="match_parent" android:layout_height="wrap_content"/> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `com/example/R.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -76,7 +76,7 @@ const val my_recycler_view = 0 } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `com/example/Example.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -92,7 +92,7 @@ recyclerView?.setHasFixedSize(true) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/recyclerview/recyclerview-lint/src/test/java/androidx/recyclerview/lint/InvalidSetHasFixedSizeTest.kt) diff --git a/docs/checks/InvalidSingleLineComment.md.html b/docs/checks/InvalidSingleLineComment.md.html index b0959813..c8ead309 100644 --- a/docs/checks/InvalidSingleLineComment.md.html +++ b/docs/checks/InvalidSingleLineComment.md.html @@ -49,7 +49,7 @@ beginning [InvalidSingleLineComment] //Something. --- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -62,7 +62,7 @@ //Something. } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/InvalidSingleLineCommentDetectorTest.kt) diff --git a/docs/checks/InvalidString.md.html b/docs/checks/InvalidString.md.html index 2cb78097..50a4f918 100644 --- a/docs/checks/InvalidString.md.html +++ b/docs/checks/InvalidString.md.html @@ -49,7 +49,7 @@ [InvalidString] <string name="my_string">My string" ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -59,7 +59,7 @@ <string name="my_string">My string" </string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/InvalidStringDetectorTest.kt) diff --git a/docs/checks/InvalidUseOfOnBackPressed.md.html b/docs/checks/InvalidUseOfOnBackPressed.md.html index 01998e86..190a82ea 100644 --- a/docs/checks/InvalidUseOfOnBackPressed.md.html +++ b/docs/checks/InvalidUseOfOnBackPressed.md.html @@ -59,7 +59,7 @@ [InvalidUseOfOnBackPressed] dispatcher.onBackPressed() -------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -81,7 +81,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/activity/activity-lint/src/test/java/androidx/activity/lint/OnBackPressedDispatcherTest.kt) @@ -100,17 +100,17 @@ ``` // build.gradle.kts -implementation("androidx.activity:activity:1.11.0-rc01") +implementation("androidx.activity:activity:1.13.0-rc01") // build.gradle -implementation 'androidx.activity:activity:1.11.0-rc01' +implementation 'androidx.activity:activity:1.13.0-rc01' // build.gradle.kts with version catalogs: implementation(libs.activity) # libs.versions.toml [versions] -activity = "1.11.0-rc01" +activity = "1.13.0-rc01" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -122,7 +122,7 @@ } ``` -1.11.0-rc01 is the version this documentation was generated from; +1.13.0-rc01 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.activity:activity](androidx_activity_activity.md.html). diff --git a/docs/checks/InvalidUsesTagAttribute.md.html b/docs/checks/InvalidUsesTagAttribute.md.html index 980b4c90..589996e7 100644 --- a/docs/checks/InvalidUsesTagAttribute.md.html +++ b/docs/checks/InvalidUsesTagAttribute.md.html @@ -47,7 +47,7 @@ [InvalidUsesTagAttribute] <uses name="medias"/> ------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -83,7 +83,7 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/xml/automotive_app_desc.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -91,7 +91,7 @@ <automotiveApp> <uses name="medias"/> </automotiveApp> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AndroidAutoDetectorTest.java) diff --git a/docs/checks/InvalidVectorPath.md.html b/docs/checks/InvalidVectorPath.md.html index b53e5dd9..695ebc4a 100644 --- a/docs/checks/InvalidVectorPath.md.html +++ b/docs/checks/InvalidVectorPath.md.html @@ -49,7 +49,7 @@ 0.000105 instead. [InvalidVectorPath] android:pathData="m 1.05e-4,2.75448" /> ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -63,7 +63,7 @@ android:fillColor="@android:color/white" android:pathData="m 1.05e-4,2.75448" /> </vector> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/VectorPathDetectorTest.java) diff --git a/docs/checks/InvalidWakeLockTag.md.html b/docs/checks/InvalidWakeLockTag.md.html index 05e1af87..9acc9f9e 100644 --- a/docs/checks/InvalidWakeLockTag.md.html +++ b/docs/checks/InvalidWakeLockTag.md.html @@ -42,7 +42,7 @@ empty to make wake lock problems easier to debug [InvalidWakeLockTag] mWakeLock = manager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, ""); ------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -62,7 +62,7 @@ mWakeLock = manager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, ""); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PowerManagerDetectorTest.java) diff --git a/docs/checks/InvalidWearFeatureAttribute.md.html b/docs/checks/InvalidWearFeatureAttribute.md.html index 95f52432..5909173d 100644 --- a/docs/checks/InvalidWearFeatureAttribute.md.html +++ b/docs/checks/InvalidWearFeatureAttribute.md.html @@ -43,7 +43,7 @@ for this feature [InvalidWearFeatureAttribute] <uses-feature android:name="android.hardware.type.watch" android:required="false"/> ------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -59,7 +59,7 @@ android:value="true" /> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WearStandaloneAppDetectorTest.java) diff --git a/docs/checks/JCenter.md.html b/docs/checks/JCenter.md.html index baca7f0c..9e33db77 100644 --- a/docs/checks/JCenter.md.html +++ b/docs/checks/JCenter.md.html @@ -49,7 +49,7 @@ build.gradle:3:Warning: Don't use jcenter() [JCenter] jcenter() --------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -60,7 +60,7 @@ jcenter() } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/JcenterDetectorTest.kt) diff --git a/docs/checks/JavaOnlyDetector.md.html b/docs/checks/JavaOnlyDetector.md.html index 48f8a0ea..b80a2cf6 100644 --- a/docs/checks/JavaOnlyDetector.md.html +++ b/docs/checks/JavaOnlyDetector.md.html @@ -62,7 +62,7 @@ Kotlin, see its documentation for details. [JavaOnlyDetector] val r = this::g ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -79,7 +79,7 @@ val r = this::g } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/JavaOnlyDetectorTest.kt) diff --git a/docs/checks/JavaPluginLanguageLevel.md.html b/docs/checks/JavaPluginLanguageLevel.md.html index 012018cd..9674eb60 100644 --- a/docs/checks/JavaPluginLanguageLevel.md.html +++ b/docs/checks/JavaPluginLanguageLevel.md.html @@ -50,7 +50,7 @@ [JavaPluginLanguageLevel] id 'java' --------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -59,7 +59,7 @@ plugins { id 'java' } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/JavascriptInterface.md.html b/docs/checks/JavascriptInterface.md.html index 3d91dde9..b23d4559 100644 --- a/docs/checks/JavascriptInterface.md.html +++ b/docs/checks/JavascriptInterface.md.html @@ -67,7 +67,7 @@ [JavascriptInterface] webview.addJavascriptInterface(t, "myobj"); ---------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -90,7 +90,7 @@ public void test3() { } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/InheritsFromAnnotated.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -110,7 +110,7 @@ } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/NonAnnotatedObject.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -123,7 +123,7 @@ public void test2() { } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/JavaScriptTest.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -162,7 +162,7 @@ o = new AnnotatedObject(); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/JavaScriptInterfaceDetectorTest.kt) diff --git a/docs/checks/JcenterRepositoryObsolete.md.html b/docs/checks/JcenterRepositoryObsolete.md.html index 935e431f..3712cdf2 100644 --- a/docs/checks/JcenterRepositoryObsolete.md.html +++ b/docs/checks/JcenterRepositoryObsolete.md.html @@ -52,7 +52,7 @@ [JcenterRepositoryObsolete] jcenter() --------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -74,7 +74,7 @@ jcenter() } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/JobSchedulerService.md.html b/docs/checks/JobSchedulerService.md.html index 35425e71..1f8d0748 100644 --- a/docs/checks/JobSchedulerService.md.html +++ b/docs/checks/JobSchedulerService.md.html @@ -50,7 +50,7 @@ [JobSchedulerService] new ComponentName(this, NotAJobService.class)); --------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -90,7 +90,7 @@ .build()); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyJobService.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -113,7 +113,7 @@ return false; } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/NotAJobService.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -123,7 +123,7 @@ public abstract class NotAJobService extends Service { } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/AndroidManifest.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -139,7 +139,7 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/JobSchedulerDetectorTest.java) diff --git a/docs/checks/JvmStaticProvidesInObjectDetector.md.html b/docs/checks/JvmStaticProvidesInObjectDetector.md.html index dbfcb5ec..7078bc81 100644 --- a/docs/checks/JvmStaticProvidesInObjectDetector.md.html +++ b/docs/checks/JvmStaticProvidesInObjectDetector.md.html @@ -34,158 +34,10 @@ : Kotlin and Java files and test sources Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/google/dagger/tree/master/java/dagger/lint/DaggerKotlinIssueDetector.kt) -Tests -: [Source Code](https://github.com/google/dagger/tree/master/javatests/dagger/lint/DaggerKotlinIssueDetectorTest.kt) -Copyright Year -: 2020 It's redundant to annotate @Provides functions in object classes with @JvmStatic. -(##) Example - -Here is an example of lint warnings produced by this check: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/foo/MyQualifier.kt:26:Warning: @JvmStatic used for @Provides -function in an object class [JvmStaticProvidesInObjectDetector] - @JvmStatic - ---------- -src/foo/MyQualifier.kt:43:Warning: @JvmStatic used for @Provides -function in an object class [JvmStaticProvidesInObjectDetector] - @JvmStatic - ---------- -src/foo/MyQualifier.kt:56:Warning: @JvmStatic used for @Provides -function in an object class [JvmStaticProvidesInObjectDetector] - @kotlin.jvm.JvmStatic - --------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`src/foo/MyQualifier.kt`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers -package foo -import javax.inject.Inject -import javax.inject.Qualifier -import kotlin.jvm.JvmStatic -import dagger.Provides -import dagger.Module - -@Qualifier -annotation class MyQualifier - -class InjectedTest { - // This should fail because of `:field` - @Inject - @field:MyQualifier - lateinit var prop: String - - // This is fine! - @Inject - @MyQualifier - lateinit var prop2: String -} - -@Module -object ObjectModule { - // This should fail because it uses `@JvmStatic` - @JvmStatic - @Provides - fun provideFoo(): String { - - } - - // This is fine! - @Provides - fun provideBar(): String { - - } -} - -@Module -class ClassModule { - companion object { - // This should fail because the companion object is part of ClassModule, so this is unnecessary. - @JvmStatic - @Provides - fun provideBaz(): String { - - } - } -} - -@Module -class ClassModuleQualified { - companion object { - // This should fail because the companion object is part of ClassModule, so this is unnecessary. - // This specifically tests a fully qualified annotation - @kotlin.jvm.JvmStatic - @Provides - fun provideBaz(): String { - - } - } -} - -@Module -class ClassModule2 { - // This should fail because the companion object is part of ClassModule - @Module - companion object { - @Provides - fun provideBaz(): String { - - } - } -} - -@Module -class ClassModule2Qualified { - // This should fail because the companion object is part of ClassModule - // This specifically tests a fully qualified annotation - @dagger.Module - companion object { - @Provides - fun provideBaz(): String { - - } - } -} - -// This is correct as of Dagger 2.26! -@Module -class ClassModule3 { - companion object { - @Provides - fun provideBaz(): String { - - } - } -} - -class ClassModule4 { - // This is should fail because this should be extracted to a standalone object. - @Module - companion object { - @Provides - fun provideBaz(): String { - - } - } -} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can also visit the -[source code](https://github.com/google/dagger/tree/master/javatests/dagger/lint/DaggerKotlinIssueDetectorTest.kt) -for the unit tests for this check to see additional scenarios. - -The above example was automatically extracted from the first unit test -found for this lint check, `DaggerKotlinIssueDetector.simpleSmokeTestForQualifiersAndProviders`. -To report a problem with this extracted sample, visit -https://github.com/google/dagger/issues. - (##) Including !!! diff --git a/docs/checks/KaptUsageInsteadOfKsp.md.html b/docs/checks/KaptUsageInsteadOfKsp.md.html index c02c93b7..01b66e4d 100644 --- a/docs/checks/KaptUsageInsteadOfKsp.md.html +++ b/docs/checks/KaptUsageInsteadOfKsp.md.html @@ -65,7 +65,7 @@ [KaptUsageInsteadOfKsp] kapt("com.github.bumptech.glide:compiler:glide_version") -------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -86,7 +86,7 @@ kapt 'com.github.bumptech.glide:compiler:4.14.2' kapt("com.github.bumptech.glide:compiler:glide_version") } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/KeyboardInaccessibleWidget.md.html b/docs/checks/KeyboardInaccessibleWidget.md.html index 44c261a8..5bedfd62 100644 --- a/docs/checks/KeyboardInaccessibleWidget.md.html +++ b/docs/checks/KeyboardInaccessibleWidget.md.html @@ -44,7 +44,7 @@ also add 'focusable' [KeyboardInaccessibleWidget] android:clickable="true" /> ------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -52,7 +52,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <Button xmlns:android="http://schemas.android.com/apk/res/android" android:clickable="true" /> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/KeyboardNavigationDetectorTest.java) diff --git a/docs/checks/KnownPermissionError.md.html b/docs/checks/KnownPermissionError.md.html index 2229de66..f1d32196 100644 --- a/docs/checks/KnownPermissionError.md.html +++ b/docs/checks/KnownPermissionError.md.html @@ -51,25 +51,25 @@ ---- AndroidManifest.xml:5:Error: TRUE is not a valid permission value [KnownPermissionError] - <activity android:permission="TRUE" /> - ---- + <activity android:name="name1" android:permission="TRUE" /> + ---- AndroidManifest.xml:6:Error: True is not a valid permission value [KnownPermissionError] - <activity-alias android:permission="True" /> - ---- + <activity-alias android:name="name2" android:permission="True" /> + ---- AndroidManifest.xml:7:Error: true is not a valid permission value [KnownPermissionError] - <receiver android:permission="true" /> - ---- + <receiver android:name="name3" android:permission="true" /> + ---- AndroidManifest.xml:8:Error: false is not a valid permission value [KnownPermissionError] - <service android:permission="false" /> - ----- + <service android:name="name4" android:permission="false" /> + ----- AndroidManifest.xml:9:Error: false is not a valid permission value [KnownPermissionError] - <provider android:permission="false" /> - ----- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + <provider android:name="name5" android:permission="false" /> + ----- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -79,14 +79,14 @@ xmlns:tools="http://schemas.android.com/tools" package="com.example.helloworld"> <application android:permission="true"> - <activity android:permission="TRUE" /> - <activity-alias android:permission="True" /> - <receiver android:permission="true" /> - <service android:permission="false" /> - <provider android:permission="false" /> + <activity android:name="name1" android:permission="TRUE" /> + <activity-alias android:name="name2" android:permission="True" /> + <receiver android:name="name3" android:permission="true" /> + <service android:name="name4" android:permission="false" /> + <provider android:name="name5" android:permission="false" /> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PermissionErrorDetectorTest.kt) diff --git a/docs/checks/KotlinNullnessAnnotation.md.html b/docs/checks/KotlinNullnessAnnotation.md.html index 28f3ec24..ce4e3442 100644 --- a/docs/checks/KotlinNullnessAnnotation.md.html +++ b/docs/checks/KotlinNullnessAnnotation.md.html @@ -58,7 +58,7 @@ [KotlinNullnessAnnotation] fun testError(@NonNull number: Number?) { } -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -79,7 +79,7 @@ // Here we have a nullable string which has been annotated with @NonNull, // which is totally misleading; the annotation is wrong. fun testError(@NonNull number: Number?) { } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/KotlinNullnessAnnotationDetectorTest.kt) diff --git a/docs/checks/KotlinPairNotCreated.md.html b/docs/checks/KotlinPairNotCreated.md.html index df07a83b..d3760cb7 100644 --- a/docs/checks/KotlinPairNotCreated.md.html +++ b/docs/checks/KotlinPairNotCreated.md.html @@ -55,7 +55,7 @@ commons [KotlinPairNotCreated] Pair pair = Pair.create("first", "second"); ------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -74,7 +74,7 @@ pair.first.toString(); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/NonKotlinPairDetectorTest.kt) diff --git a/docs/checks/KotlinPropertyAccess.md.html b/docs/checks/KotlinPropertyAccess.md.html index 1ca4f3be..52def4df 100644 --- a/docs/checks/KotlinPropertyAccess.md.html +++ b/docs/checks/KotlinPropertyAccess.md.html @@ -92,7 +92,7 @@ [KotlinPropertyAccess] @Override public Float getNumber3() { return 0.0f; } // ERROR (even though we have corresponding setter) ---------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -173,7 +173,7 @@ public void setNumber4(Float number) { } // OK } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/InteroperabilityDetectorTest.kt) diff --git a/docs/checks/KotlinRequireNotNullUseMessage.md.html b/docs/checks/KotlinRequireNotNullUseMessage.md.html index 76853c8f..2955f572 100644 --- a/docs/checks/KotlinRequireNotNullUseMessage.md.html +++ b/docs/checks/KotlinRequireNotNullUseMessage.md.html @@ -46,7 +46,7 @@ [KotlinRequireNotNullUseMessage] requireNotNull(value) -------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -55,7 +55,7 @@ fun test(value: Int?) { requireNotNull(value) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-kotlin-lint/src/test/kotlin/com/vanniktech/lintrules/rxjava2/KotlinRequireNotNullUseMessageDetectorTest.kt) diff --git a/docs/checks/KotlincFE10.md.html b/docs/checks/KotlincFE10.md.html index da349885..2743a42b 100644 --- a/docs/checks/KotlincFE10.md.html +++ b/docs/checks/KotlincFE10.md.html @@ -81,7 +81,7 @@ possible; K1 will be going away soon. [KotlincFE10] val effectiveVisibility = descriptor.visibility.effectiveVisibility(descriptor, false) // ERROR ---------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -143,7 +143,7 @@ private const val PACKAGE_PRIVATE = 2 } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/KotlincFE10DetectorTest.kt) diff --git a/docs/checks/KtxExtensionAvailable.md.html b/docs/checks/KtxExtensionAvailable.md.html index 38fd7336..7ecbde02 100644 --- a/docs/checks/KtxExtensionAvailable.md.html +++ b/docs/checks/KtxExtensionAvailable.md.html @@ -50,7 +50,7 @@ this library [KtxExtensionAvailable] implementation "androidx.core:core:1.2.0" -------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -66,7 +66,7 @@ implementation "androidx.core:core:999.2.0" // No KTX extensions for this version. implementation "androidx.core:fake-artifact:1.2.0" // No KTX extensions for this artifact. } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/LabelFor.md.html b/docs/checks/LabelFor.md.html index 8b4805d7..b03df944 100644 --- a/docs/checks/LabelFor.md.html +++ b/docs/checks/LabelFor.md.html @@ -60,7 +60,7 @@ attribute [LabelFor] android:hint="" --------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -97,7 +97,7 @@ android:hint="" android:text="MultiAutoCompleteTextView"/> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/LabelForDetectorTest.kt) diff --git a/docs/checks/LambdaLast.md.html b/docs/checks/LambdaLast.md.html index debda033..51ef68ec 100644 --- a/docs/checks/LambdaLast.md.html +++ b/docs/checks/LambdaLast.md.html @@ -54,7 +54,7 @@ [LambdaLast] public void error2(SamInterface sam, int x) { } ----- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -79,7 +79,7 @@ default void other() { } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -92,10 +92,10 @@ // Lamda not last, but we're not flagging issues in Kotlin files for the // interoperability issue fun error(bar: (Int) -> Int, foo: Int) { } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/InteroperabilityDetectorTest.kt) +You can also visit the source code ([InteroperabilityDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/InteroperabilityDetectorTest.kt) +[LintIssueDocGeneratorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/LintIssueDocGeneratorTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/LaunchActivityFromNotification.md.html b/docs/checks/LaunchActivityFromNotification.md.html index e92b19f3..5df5c25b 100644 --- a/docs/checks/LaunchActivityFromNotification.md.html +++ b/docs/checks/LaunchActivityFromNotification.md.html @@ -52,7 +52,7 @@ [LaunchActivityFromNotification] .setContentIntent(serviceIntent) ------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -74,7 +74,7 @@ context.startActivity(i); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/NotificationTest.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -105,7 +105,7 @@ notificationManager.notify(id, notification); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/NotificationTrampolineDetectorTest.kt) diff --git a/docs/checks/LaunchDuringComposition.md.html b/docs/checks/LaunchDuringComposition.md.html index 35a257a5..e66a2202 100644 --- a/docs/checks/LaunchDuringComposition.md.html +++ b/docs/checks/LaunchDuringComposition.md.html @@ -76,7 +76,7 @@ of a SideEffect and not during composition [LaunchDuringComposition] launcher.launch("test") ------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -129,7 +129,7 @@ launcher.launch("test") } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/activity/activity-compose-lint/src/test/java/androidx/activity/compose/lint/ActivityResultLaunchDetectorTest.kt) @@ -148,17 +148,17 @@ ``` // build.gradle.kts -implementation("androidx.activity:activity-compose:1.11.0-rc01") +implementation("androidx.activity:activity-compose:1.13.0-rc01") // build.gradle -implementation 'androidx.activity:activity-compose:1.11.0-rc01' +implementation 'androidx.activity:activity-compose:1.13.0-rc01' // build.gradle.kts with version catalogs: implementation(libs.activity.compose) # libs.versions.toml [versions] -activity-compose = "1.11.0-rc01" +activity-compose = "1.13.0-rc01" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -170,7 +170,7 @@ } ``` -1.11.0-rc01 is the version this documentation was generated from; +1.13.0-rc01 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.activity:activity-compose](androidx_activity_activity-compose.md.html). diff --git a/docs/checks/LayoutFileNameMatchesClass.md.html b/docs/checks/LayoutFileNameMatchesClass.md.html index 126aee32..6ecf2977 100644 --- a/docs/checks/LayoutFileNameMatchesClass.md.html +++ b/docs/checks/LayoutFileNameMatchesClass.md.html @@ -49,7 +49,7 @@ R.layout.unit_test_activity_foo [LayoutFileNameMatchesClass] setContentView(R.layout.activity_bar); --------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -60,7 +60,7 @@ public abstract class Activity { public void setContentView(int viewId) { } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/main/java/foo/FooActivity.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -71,12 +71,12 @@ setContentView(R.layout.activity_bar); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `null`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text linenumbers unit_test_ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/LayoutFileNameMatchesClassDetectorTest.kt) diff --git a/docs/checks/LeanbackUsesWifi.md.html b/docs/checks/LeanbackUsesWifi.md.html index 2aaa12c1..f19c576b 100644 --- a/docs/checks/LeanbackUsesWifi.md.html +++ b/docs/checks/LeanbackUsesWifi.md.html @@ -49,7 +49,7 @@ availability on TVs that support only Ethernet [LeanbackUsesWifi] <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/> ---------------------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -64,7 +64,7 @@ android:label="@string/app_name" > </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/LeanbackWifiUsageDetectorTest.kt) diff --git a/docs/checks/LibraryCustomView.md.html b/docs/checks/LibraryCustomView.md.html index 81b95611..74c74c46 100644 --- a/docs/checks/LibraryCustomView.md.html +++ b/docs/checks/LibraryCustomView.md.html @@ -49,7 +49,7 @@ "http://schemas.android.com/apk/res-auto" instead [LibraryCustomView] xmlns:foo="http://schemas.android.com/apk/res/foo" -------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -85,7 +85,7 @@ </foo.bar.Baz> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/NamespaceDetectorTest.kt) diff --git a/docs/checks/LifecycleAnnotationProcessorWithJava8.md.html b/docs/checks/LifecycleAnnotationProcessorWithJava8.md.html index a5d87098..6ceac43c 100644 --- a/docs/checks/LifecycleAnnotationProcessorWithJava8.md.html +++ b/docs/checks/LifecycleAnnotationProcessorWithJava8.md.html @@ -55,7 +55,7 @@ incremental build. [LifecycleAnnotationProcessorWithJava8] annotationProcessor "android.arch.lifecycle:compiler:1.1.1" --------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -70,7 +70,7 @@ targetCompatibility JavaVersion.VERSION_1_8 } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/LifecycleCurrentStateInComposition.md.html b/docs/checks/LifecycleCurrentStateInComposition.md.html index c603d657..2cc812f6 100644 --- a/docs/checks/LifecycleCurrentStateInComposition.md.html +++ b/docs/checks/LifecycleCurrentStateInComposition.md.html @@ -27,7 +27,7 @@ Artifact : [androidx.lifecycle:lifecycle-runtime-compose-android](androidx_lifecycle_lifecycle-runtime-compose-android.md.html) Since -: 2.9.0-alpha10 +: 2.9.0 Affects : Kotlin and Java files and test sources Editing @@ -86,7 +86,7 @@ [LifecycleCurrentStateInComposition] lifecycle.currentState ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -136,7 +136,7 @@ lifecycle.currentState } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/lifecycle/lifecycle-runtime-compose-lint/src/test/java/androidx/lifecycle/runtime/compose/lint/ComposableLifecycleCurrentStateDetectorTest.kt) @@ -155,17 +155,17 @@ ``` // build.gradle.kts -implementation("androidx.lifecycle:lifecycle-runtime-compose-android:2.9.0-rc01") +implementation("androidx.lifecycle:lifecycle-runtime-compose-android:2.11.0-alpha01") // build.gradle -implementation 'androidx.lifecycle:lifecycle-runtime-compose-android:2.9.0-rc01' +implementation 'androidx.lifecycle:lifecycle-runtime-compose-android:2.11.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.lifecycle.runtime.compose.android) # libs.versions.toml [versions] -lifecycle-runtime-compose-android = "2.9.0-rc01" +lifecycle-runtime-compose-android = "2.11.0-alpha01" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -177,7 +177,7 @@ } ``` -2.9.0-rc01 is the version this documentation was generated from; +2.11.0-alpha01 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.lifecycle:lifecycle-runtime-compose-android](androidx_lifecycle_lifecycle-runtime-compose-android.md.html). diff --git a/docs/checks/LintDocExample.md.html b/docs/checks/LintDocExample.md.html index cecc7dd8..328384fa 100644 --- a/docs/checks/LintDocExample.md.html +++ b/docs/checks/LintDocExample.md.html @@ -53,7 +53,7 @@ extracted into lint's per-issue documentation pages [LintDocExample] fun testBasic() { ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -139,7 +139,7 @@ "Should you use `x ?: y` instead of ```foo ? 1 : 0``` ?"); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyKotlinLintDetector.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -239,7 +239,7 @@ println("Debugging code") } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyIssueRegistry.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -251,7 +251,7 @@ MyKotlinLintDetector.Companion.ISSUE ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyVendorIssueRegistry.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -266,7 +266,7 @@ MyKotlinLintDetector.Companion.ISSUE ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/InheritingRegistry.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -280,7 +280,7 @@ MyKotlinLintDetector.Companion.ISSUE ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyKotlinLintDetectorTest.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -334,7 +334,7 @@ ).run().expect(expected) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/LintDetectorDetectorTest.kt) diff --git a/docs/checks/LintImplBadUrl.md.html b/docs/checks/LintImplBadUrl.md.html index e932a807..9dd85042 100644 --- a/docs/checks/LintImplBadUrl.md.html +++ b/docs/checks/LintImplBadUrl.md.html @@ -49,7 +49,7 @@ in file://explanation.doc [LintImplBadUrl] .addMoreInfo("file://explanation.doc") ---------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -135,7 +135,7 @@ "Should you use `x ?: y` instead of ```foo ? 1 : 0``` ?"); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyKotlinLintDetector.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -235,7 +235,7 @@ println("Debugging code") } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyIssueRegistry.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -247,7 +247,7 @@ MyKotlinLintDetector.Companion.ISSUE ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyVendorIssueRegistry.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -262,7 +262,7 @@ MyKotlinLintDetector.Companion.ISSUE ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/InheritingRegistry.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -276,7 +276,7 @@ MyKotlinLintDetector.Companion.ISSUE ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyKotlinLintDetectorTest.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -330,7 +330,7 @@ ).run().expect(expected) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/LintDetectorDetectorTest.kt) diff --git a/docs/checks/LintImplDollarEscapes.md.html b/docs/checks/LintImplDollarEscapes.md.html index 6e98b7e2..219eed83 100644 --- a/docs/checks/LintImplDollarEscapes.md.html +++ b/docs/checks/LintImplDollarEscapes.md.html @@ -55,7 +55,7 @@ cumbersome escapes. Lint will treat a $ as a $. [LintImplDollarEscapes] println("Value=${"$"}") ------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -141,7 +141,7 @@ "Should you use `x ?: y` instead of ```foo ? 1 : 0``` ?"); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyKotlinLintDetector.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -241,7 +241,7 @@ println("Debugging code") } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyIssueRegistry.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -253,7 +253,7 @@ MyKotlinLintDetector.Companion.ISSUE ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyVendorIssueRegistry.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -268,7 +268,7 @@ MyKotlinLintDetector.Companion.ISSUE ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/InheritingRegistry.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -282,7 +282,7 @@ MyKotlinLintDetector.Companion.ISSUE ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyKotlinLintDetectorTest.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -336,7 +336,7 @@ ).run().expect(expected) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/LintDetectorDetectorTest.kt) diff --git a/docs/checks/LintImplIdFormat.md.html b/docs/checks/LintImplIdFormat.md.html index 6fb3b93a..09eb40ec 100644 --- a/docs/checks/LintImplIdFormat.md.html +++ b/docs/checks/LintImplIdFormat.md.html @@ -57,7 +57,7 @@ capitalized camel case, such as MyIssueId [LintImplIdFormat] id = "badlyCapitalized id", --------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -143,7 +143,7 @@ "Should you use `x ?: y` instead of ```foo ? 1 : 0``` ?"); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyKotlinLintDetector.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -243,7 +243,7 @@ println("Debugging code") } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyIssueRegistry.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -255,7 +255,7 @@ MyKotlinLintDetector.Companion.ISSUE ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyVendorIssueRegistry.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -270,7 +270,7 @@ MyKotlinLintDetector.Companion.ISSUE ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/InheritingRegistry.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -284,7 +284,7 @@ MyKotlinLintDetector.Companion.ISSUE ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyKotlinLintDetectorTest.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -338,7 +338,7 @@ ).run().expect(expected) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/LintDetectorDetectorTest.kt) diff --git a/docs/checks/LintImplPsiEquals.md.html b/docs/checks/LintImplPsiEquals.md.html index f1a8f5a1..bcf4b0f8 100644 --- a/docs/checks/LintImplPsiEquals.md.html +++ b/docs/checks/LintImplPsiEquals.md.html @@ -47,7 +47,7 @@ with equals, use isEquivalentTo(PsiElement) instead [LintImplPsiEquals] if (element2.equals(element1)) { } ------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -133,7 +133,7 @@ "Should you use `x ?: y` instead of ```foo ? 1 : 0``` ?"); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyKotlinLintDetector.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -233,7 +233,7 @@ println("Debugging code") } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyIssueRegistry.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -245,7 +245,7 @@ MyKotlinLintDetector.Companion.ISSUE ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyVendorIssueRegistry.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -260,7 +260,7 @@ MyKotlinLintDetector.Companion.ISSUE ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/InheritingRegistry.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -274,7 +274,7 @@ MyKotlinLintDetector.Companion.ISSUE ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyKotlinLintDetectorTest.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -328,7 +328,7 @@ ).run().expect(expected) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/LintDetectorDetectorTest.kt) diff --git a/docs/checks/LintImplTextFormat.md.html b/docs/checks/LintImplTextFormat.md.html index 0de1cdd4..d9a6076d 100644 --- a/docs/checks/LintImplTextFormat.md.html +++ b/docs/checks/LintImplTextFormat.md.html @@ -66,7 +66,7 @@ not be separated by a space [LintImplTextFormat] "Should you use `x ?: y` instead of ```foo ? 1 : 0``` ?"); - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -152,7 +152,7 @@ "Should you use `x ?: y` instead of ```foo ? 1 : 0``` ?"); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyKotlinLintDetector.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -252,7 +252,7 @@ println("Debugging code") } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyIssueRegistry.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -264,7 +264,7 @@ MyKotlinLintDetector.Companion.ISSUE ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyVendorIssueRegistry.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -279,7 +279,7 @@ MyKotlinLintDetector.Companion.ISSUE ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/InheritingRegistry.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -293,7 +293,7 @@ MyKotlinLintDetector.Companion.ISSUE ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyKotlinLintDetectorTest.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -347,7 +347,7 @@ ).run().expect(expected) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/LintDetectorDetectorTest.kt) diff --git a/docs/checks/LintImplTrimIndent.md.html b/docs/checks/LintImplTrimIndent.md.html index 7da57ea1..da4f293e 100644 --- a/docs/checks/LintImplTrimIndent.md.html +++ b/docs/checks/LintImplTrimIndent.md.html @@ -58,7 +58,7 @@ indent by lint when displaying to users [LintImplTrimIndent] """.trimIndent(), ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -144,7 +144,7 @@ "Should you use `x ?: y` instead of ```foo ? 1 : 0``` ?"); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyKotlinLintDetector.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -244,7 +244,7 @@ println("Debugging code") } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyIssueRegistry.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -256,7 +256,7 @@ MyKotlinLintDetector.Companion.ISSUE ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyVendorIssueRegistry.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -271,7 +271,7 @@ MyKotlinLintDetector.Companion.ISSUE ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/InheritingRegistry.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -285,7 +285,7 @@ MyKotlinLintDetector.Companion.ISSUE ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyKotlinLintDetectorTest.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -339,7 +339,7 @@ ).run().expect(expected) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/LintDetectorDetectorTest.kt) diff --git a/docs/checks/LintImplUnexpectedDomain.md.html b/docs/checks/LintImplUnexpectedDomain.md.html index f9747f7c..a5aa992e 100644 --- a/docs/checks/LintImplUnexpectedDomain.md.html +++ b/docs/checks/LintImplUnexpectedDomain.md.html @@ -44,7 +44,7 @@ (http://my.personal.blogger.com/aboutme.htm) [LintImplUnexpectedDomain] .addMoreInfo("http://my.personal.blogger.com/aboutme.htm") ------------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -130,7 +130,7 @@ "Should you use `x ?: y` instead of ```foo ? 1 : 0``` ?"); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyKotlinLintDetector.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -230,7 +230,7 @@ println("Debugging code") } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyIssueRegistry.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -242,7 +242,7 @@ MyKotlinLintDetector.Companion.ISSUE ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyVendorIssueRegistry.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -257,7 +257,7 @@ MyKotlinLintDetector.Companion.ISSUE ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/InheritingRegistry.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -271,7 +271,7 @@ MyKotlinLintDetector.Companion.ISSUE ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyKotlinLintDetectorTest.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -325,7 +325,7 @@ ).run().expect(expected) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/LintDetectorDetectorTest.kt) diff --git a/docs/checks/LintImplUseKotlin.md.html b/docs/checks/LintImplUseKotlin.md.html index 07d0cdbd..84f83fc8 100644 --- a/docs/checks/LintImplUseKotlin.md.html +++ b/docs/checks/LintImplUseKotlin.md.html @@ -45,7 +45,7 @@ mechanisms in the Lint API [LintImplUseKotlin] public class MyJavaLintDetector extends Detector { ------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -131,7 +131,7 @@ "Should you use `x ?: y` instead of ```foo ? 1 : 0``` ?"); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyKotlinLintDetector.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -231,7 +231,7 @@ println("Debugging code") } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyIssueRegistry.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -243,7 +243,7 @@ MyKotlinLintDetector.Companion.ISSUE ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyVendorIssueRegistry.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -258,7 +258,7 @@ MyKotlinLintDetector.Companion.ISSUE ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/InheritingRegistry.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -272,7 +272,7 @@ MyKotlinLintDetector.Companion.ISSUE ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyKotlinLintDetectorTest.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -326,7 +326,7 @@ ).run().expect(expected) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/LintDetectorDetectorTest.kt) diff --git a/docs/checks/LintImplUseUast.md.html b/docs/checks/LintImplUseUast.md.html index 47478f5c..b0a9956d 100644 --- a/docs/checks/LintImplUseUast.md.html +++ b/docs/checks/LintImplUseUast.md.html @@ -82,7 +82,7 @@ UElement.parentOfType [LintImplUseUast] PsiTreeUtil.getParentOfType(method, PsiClass.class); // ERROR --------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -168,7 +168,7 @@ "Should you use `x ?: y` instead of ```foo ? 1 : 0``` ?"); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyKotlinLintDetector.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -268,7 +268,7 @@ println("Debugging code") } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyIssueRegistry.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -280,7 +280,7 @@ MyKotlinLintDetector.Companion.ISSUE ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyVendorIssueRegistry.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -295,7 +295,7 @@ MyKotlinLintDetector.Companion.ISSUE ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/InheritingRegistry.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -309,7 +309,7 @@ MyKotlinLintDetector.Companion.ISSUE ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyKotlinLintDetectorTest.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -363,7 +363,7 @@ ).run().expect(expected) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/LintDetectorDetectorTest.kt) diff --git a/docs/checks/LocalContextConfigurationRead.md.html b/docs/checks/LocalContextConfigurationRead.md.html index a468bf2e..1a505287 100644 --- a/docs/checks/LocalContextConfigurationRead.md.html +++ b/docs/checks/LocalContextConfigurationRead.md.html @@ -59,7 +59,7 @@ [LocalContextConfigurationRead] LocalContext.current.getResources().getConfiguration() ------------------------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -76,8 +76,14 @@ LocalContext.current.getResources() LocalContext.current.resources.configuration LocalContext.current.getResources().getConfiguration() + LocalContext.current.getText(-1) + LocalContext.current.getString(-1) + LocalContext.current.getString(-1, Any()) + LocalContext.current.getColor(-1) + LocalContext.current.getDrawable(-1) + LocalContext.current.getColorStateList(-1) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/LocalContextResourcesConfigurationReadDetectorTest.kt) @@ -96,17 +102,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui-android:1.9.0-alpha01") +implementation("androidx.compose.ui:ui-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.ui:ui-android:1.9.0-alpha01' +implementation 'androidx.compose.ui:ui-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.ui.android) # libs.versions.toml [versions] -ui-android = "1.9.0-alpha01" +ui-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -118,11 +124,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.ui:ui-lint:1.9.0-alpha01`. +You can also use `androidx.compose.ui:ui-lint:1.11.0-alpha06`. [Additional details about androidx.compose.ui:ui-android](androidx_compose_ui_ui-android.md.html). diff --git a/docs/checks/LocalContextGetResourceValueCall.md.html b/docs/checks/LocalContextGetResourceValueCall.md.html new file mode 100644 index 00000000..f8c99dcb --- /dev/null +++ b/docs/checks/LocalContextGetResourceValueCall.md.html @@ -0,0 +1,217 @@ + +(#) Querying resource properties using LocalContext.current + +!!! ERROR: Querying resource properties using LocalContext.current + This is an error. + +Id +: `LocalContextGetResourceValueCall` +Summary +: Querying resource properties using LocalContext.current +Severity +: Error +Category +: Correctness +Platform +: Any +Vendor +: Jetpack Compose +Identifier +: androidx.compose.ui +Feedback +: https://issuetracker.google.com/issues/new?component=612128 +Min +: Lint 8.7+ +Compiled +: Lint 8.7+ +Artifact +: [androidx.compose.ui:ui-android](androidx_compose_ui_ui-android.md.html) +Since +: 1.10.0 +Affects +: Kotlin and Java files and test sources +Editing +: This check runs on the fly in the IDE editor +Implementation +: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/ui/ui-lint/src/main/java/androidx/compose/ui/lint/LocalContextResourcesConfigurationReadDetector.kt) +Tests +: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/LocalContextResourcesConfigurationReadDetectorTest.kt) +Copyright Year +: 2024 + +Changes to the Configuration object will not cause LocalContext.current +reads to be invalidated, so calls to APIs such as Context.getString() +will not be updated when the Configuration changes, and so stale values +might be used. Instead, you can use Compose APIs such as stringResource, +colorResource, and painterResource - or LocalResources.current and query +properties from Resources directly. Using these APIs will invalidate +callers when the Configuration changes, to ensure that these calls +reflect the latest values. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/test/test.kt:13:Error: Querying resource values using +LocalContext.current [LocalContextGetResourceValueCall] + LocalContext.current.getText(-1) + -------------------------------- +src/test/test.kt:14:Error: Querying resource values using +LocalContext.current [LocalContextGetResourceValueCall] + LocalContext.current.getString(-1) + ---------------------------------- +src/test/test.kt:15:Error: Querying resource values using +LocalContext.current [LocalContextGetResourceValueCall] + LocalContext.current.getString(-1, Any()) + ----------------------------------------- +src/test/test.kt:16:Error: Querying resource values using +LocalContext.current [LocalContextGetResourceValueCall] + LocalContext.current.getColor(-1) + --------------------------------- +src/test/test.kt:17:Error: Querying resource values using +LocalContext.current [LocalContextGetResourceValueCall] + LocalContext.current.getDrawable(-1) + ------------------------------------ +src/test/test.kt:18:Error: Querying resource values using +LocalContext.current [LocalContextGetResourceValueCall] + LocalContext.current.getColorStateList(-1) + ------------------------------------------ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/test/test.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package test + +import androidx.compose.runtime.Composable +import androidx.compose.ui.platform.LocalContext + +@Composable +fun Test() { + LocalContext.current.resources + LocalContext.current.getResources() + LocalContext.current.resources.configuration + LocalContext.current.getResources().getConfiguration() + LocalContext.current.getText(-1) + LocalContext.current.getString(-1) + LocalContext.current.getString(-1, Any()) + LocalContext.current.getColor(-1) + LocalContext.current.getDrawable(-1) + LocalContext.current.getColorStateList(-1) +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/LocalContextResourcesConfigurationReadDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `LocalContextResourcesConfigurationReadDetector.error`. +To report a problem with this extracted sample, visit +https://issuetracker.google.com/issues/new?component=612128. + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("androidx.compose.ui:ui-android:1.11.0-alpha06") + +// build.gradle +implementation 'androidx.compose.ui:ui-android:1.11.0-alpha06' + +// build.gradle.kts with version catalogs: +implementation(libs.ui.android) + +# libs.versions.toml +[versions] +ui-android = "1.11.0-alpha06" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +ui-android = { + module = "androidx.compose.ui:ui-android", + version.ref = "ui-android" +} +``` + +1.11.0-alpha06 is the version this documentation was generated from; +there may be newer versions available. + +NOTE: These lint checks are **also** made available separate from the main library. +You can also use `androidx.compose.ui:ui-lint:1.11.0-alpha06`. + + +[Additional details about androidx.compose.ui:ui-android](androidx_compose_ui_ui-android.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Using a suppression annotation like this on the enclosing + element: + + ```kt + // Kotlin + @Suppress("LocalContextGetResourceValueCall") + fun method() { + problematicStatement() + } + ``` + + or + + ```java + // Java + @SuppressWarnings("LocalContextGetResourceValueCall") + void method() { + problematicStatement(); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection LocalContextGetResourceValueCall + problematicStatement() + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="LocalContextGetResourceValueCall" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'LocalContextGetResourceValueCall' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore LocalContextGetResourceValueCall ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/LocalContextResourcesRead.md.html b/docs/checks/LocalContextResourcesRead.md.html index 50fd1fe5..f8c93d78 100644 --- a/docs/checks/LocalContextResourcesRead.md.html +++ b/docs/checks/LocalContextResourcesRead.md.html @@ -27,7 +27,7 @@ Artifact : [androidx.compose.ui:ui-android](androidx_compose_ui_ui-android.md.html) Since -: 1.9.0-alpha01 +: 1.9.0 Affects : Kotlin and Java files and test sources Editing @@ -41,7 +41,7 @@ Changes to the Configuration object will not cause LocalContext.current.resources reads to be invalidated, so calls to APIs -suchas Resources.getString() will not be updated when the Configuration +such as Resources.getString() will not be updated when the Configuration changes. Instead, use LocalResources.current to retrieve the Resources - this will invalidate callers when the Configuration changes, to ensure that these calls reflect the latest values. @@ -58,7 +58,7 @@ LocalContext.current.resources [LocalContextResourcesRead] LocalContext.current.getResources() ----------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -75,8 +75,14 @@ LocalContext.current.getResources() LocalContext.current.resources.configuration LocalContext.current.getResources().getConfiguration() + LocalContext.current.getText(-1) + LocalContext.current.getString(-1) + LocalContext.current.getString(-1, Any()) + LocalContext.current.getColor(-1) + LocalContext.current.getDrawable(-1) + LocalContext.current.getColorStateList(-1) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/LocalContextResourcesConfigurationReadDetectorTest.kt) @@ -95,17 +101,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui-android:1.9.0-alpha01") +implementation("androidx.compose.ui:ui-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.ui:ui-android:1.9.0-alpha01' +implementation 'androidx.compose.ui:ui-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.ui.android) # libs.versions.toml [versions] -ui-android = "1.9.0-alpha01" +ui-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -117,11 +123,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.ui:ui-lint:1.9.0-alpha01`. +You can also use `androidx.compose.ui:ui-lint:1.11.0-alpha06`. [Additional details about androidx.compose.ui:ui-android](androidx_compose_ui_ui-android.md.html). diff --git a/docs/checks/LocalSuppress.md.html b/docs/checks/LocalSuppress.md.html index d89c4b50..037e22c0 100644 --- a/docs/checks/LocalSuppress.md.html +++ b/docs/checks/LocalSuppress.md.html @@ -74,7 +74,7 @@ out to the surrounding method [LocalSuppress] @SuppressLint("NewApi") // Invalid ----------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -117,7 +117,7 @@ int a = View.MEASURED_STATE_MASK; } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AnnotationDetectorTest.kt) diff --git a/docs/checks/LocaleFolder.md.html b/docs/checks/LocaleFolder.md.html index 9d42a4b7..3b90fb3a 100644 --- a/docs/checks/LocaleFolder.md.html +++ b/docs/checks/LocaleFolder.md.html @@ -54,7 +54,7 @@ res/values-he/strings.xml:Warning: The locale folder "he" should be called "iw" instead; see the java.util.Locale documentation [LocaleFolder] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -62,31 +62,31 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-no/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-he/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-id/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-yi/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/LocaleFolderDetectorTest.kt) diff --git a/docs/checks/LockedOrientationActivity.md.html b/docs/checks/LockedOrientationActivity.md.html index 81111c30..50f09927 100644 --- a/docs/checks/LockedOrientationActivity.md.html +++ b/docs/checks/LockedOrientationActivity.md.html @@ -51,7 +51,7 @@ [LockedOrientationActivity] <activity android:name=".MainActivity" android:screenOrientation="portrait"/> ------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -64,7 +64,7 @@ <activity android:name=".MainActivity" android:screenOrientation="portrait"/> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ChromeOsDetectorTest.java) diff --git a/docs/checks/LogConditional.md.html b/docs/checks/LogConditional.md.html index 1a09b6e7..986c52f8 100644 --- a/docs/checks/LogConditional.md.html +++ b/docs/checks/LogConditional.md.html @@ -51,7 +51,7 @@ (BuildConfig.DEBUG) { ... } [LogConditional] Log.i(TAG, "message" + m) // string is not constant; computed each time ------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -66,7 +66,7 @@ Log.i(TAG, "message" + m) // string is not constant; computed each time } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/LogDetectorTest.kt) diff --git a/docs/checks/LogInfoDisclosure.md.html b/docs/checks/LogInfoDisclosure.md.html new file mode 100644 index 00000000..a246d0a3 --- /dev/null +++ b/docs/checks/LogInfoDisclosure.md.html @@ -0,0 +1,186 @@ + +(#) Potentially sensitive information logged to Logcat + +!!! WARNING: Potentially sensitive information logged to Logcat + This is a warning. + +Id +: `LogInfoDisclosure` +Summary +: Potentially sensitive information logged to Logcat +Severity +: Warning +Category +: Security +Platform +: Any +Vendor +: Google - Android 3P Vulnerability Research +Contact +: https://github.com/google/android-security-lints +Feedback +: https://github.com/google/android-security-lints/issues +Min +: Lint 4.1 +Compiled +: Lint 8.0 and 8.1 +Artifact +: [com.android.security.lint:lint](com_android_security_lint_lint.md.html) +Since +: 1.0.4 +Affects +: Kotlin and Java files +Editing +: This check runs on the fly in the IDE editor +See +: https://goo.gle/LogInfoDisclosure +Implementation +: [Source Code](https://github.com/google/android-security-lints/tree/main/checks/src/main/java/com/example/lint/checks/LogcatDetector.kt) +Tests +: [Source Code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/LogcatDetectorTest.kt) +Copyright Year +: 2024 + +Sensitive information such as application secrets should never be logged +to logcat. Any sensitive data should therefore be removed from logcat +logs. Ensure all logging to logcat is sanitized in non-debug versions of +your application. + +!!! Tip + This lint check has an associated quickfix available in the IDE. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/MainActivity.java:7:Warning: Sensitive data should never be logged +to logcat [LogInfoDisclosure] + Log.wtf("testpasswdtest", "test"); + --------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/MainActivity.java`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers +import android.app.Activity; +import android.util.Log; + +public class MainActivity extends Activity { + + private void testLogs() { + Log.wtf("testpasswdtest", "test"); + } +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/LogcatDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `LogcatDetector.logInfoDisclosureMethod_whenSuspiciousStringPresent_showsWarning`. +To report a problem with this extracted sample, visit +https://github.com/google/android-security-lints/issues. + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. This lint check is included in the lint documentation, + but the Android team may or may not agree with its recommendations. + +``` +// build.gradle.kts +lintChecks("com.android.security.lint:lint:1.0.4") + +// build.gradle +lintChecks 'com.android.security.lint:lint:1.0.4' + +// build.gradle.kts with version catalogs: +lintChecks(libs.com.android.security.lint.lint) + +# libs.versions.toml +[versions] +com-android-security-lint-lint = "1.0.4" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +com-android-security-lint-lint = { + module = "com.android.security.lint:lint", + version.ref = "com-android-security-lint-lint" +} +``` + +1.0.4 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.android.security.lint:lint](com_android_security_lint_lint.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Using a suppression annotation like this on the enclosing + element: + + ```kt + // Kotlin + @Suppress("LogInfoDisclosure") + fun method() { + d(...) + } + ``` + + or + + ```java + // Java + @SuppressWarnings("LogInfoDisclosure") + void method() { + d(...); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection LogInfoDisclosure + problematicStatement() + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="LogInfoDisclosure" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'LogInfoDisclosure' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore LogInfoDisclosure ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/LogNotTimber.md.html b/docs/checks/LogNotTimber.md.html index 3251ab3d..0e478b89 100644 --- a/docs/checks/LogNotTimber.md.html +++ b/docs/checks/LogNotTimber.md.html @@ -51,7 +51,7 @@ [LogNotTimber] Log.d("TAG", "msg"); ------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -64,7 +64,7 @@ Log.d("TAG", "msg"); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/foo/Example.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -75,7 +75,7 @@ Log.d("TAG", "msg") } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/JakeWharton/timber/tree/trunk/timber-lint/src/test/java/timber/lint/WrongTimberUsageDetectorTest.kt) diff --git a/docs/checks/LogTagMismatch.md.html b/docs/checks/LogTagMismatch.md.html index 333d0829..df8f0c53 100644 --- a/docs/checks/LogTagMismatch.md.html +++ b/docs/checks/LogTagMismatch.md.html @@ -44,7 +44,7 @@ [LogTagMismatch] Log.d(TAG2, "message") // warn: mismatched tags - TAG1 and TAG2 ---- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -62,7 +62,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/LogDetectorTest.kt) diff --git a/docs/checks/LongLogTag.md.html b/docs/checks/LongLogTag.md.html index cef6216d..c2dc87c7 100644 --- a/docs/checks/LongLogTag.md.html +++ b/docs/checks/LongLogTag.md.html @@ -40,7 +40,7 @@ (SuperSuperLongLogTagWhichExceedsMax) [LongLogTag] Log.d(TAG, "message") --- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -57,10 +57,10 @@ Log.d(TAG, "message") } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/LogDetectorTest.kt) +You can also visit the source code ([LogDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/LogDetectorTest.kt) +[ProjectInitializerTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/ProjectInitializerTest.kt) for the unit tests for this check to see additional scenarios. (##) Suppressing diff --git a/docs/checks/MainScopeUsage.md.html b/docs/checks/MainScopeUsage.md.html index 8b04087c..77fd84ba 100644 --- a/docs/checks/MainScopeUsage.md.html +++ b/docs/checks/MainScopeUsage.md.html @@ -55,7 +55,7 @@ slack.foundation.coroutines.android.MainScope. [MainScopeUsage] val scope = MainScope() ----------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -68,7 +68,7 @@ fun example() { val scope = MainScope() } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MainScopeUsageDetectorTest.kt) diff --git a/docs/checks/MangledCRLF.md.html b/docs/checks/MangledCRLF.md.html index ce6cd6ac..ee8a3bbb 100644 --- a/docs/checks/MangledCRLF.md.html +++ b/docs/checks/MangledCRLF.md.html @@ -51,7 +51,7 @@ return (\r) without corresponding newline (\n) [MangledCRLF] android:layout_height="match_parent" > ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: diff --git a/docs/checks/ManifestOrder.md.html b/docs/checks/ManifestOrder.md.html index 6198da3e..854a728e 100644 --- a/docs/checks/ManifestOrder.md.html +++ b/docs/checks/ManifestOrder.md.html @@ -46,7 +46,7 @@ tag [ManifestOrder] <uses-sdk android:minSdkVersion="Froyo" /> -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -69,7 +69,7 @@ <uses-sdk android:minSdkVersion="Froyo" /> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -102,11 +102,11 @@ <!-- Wallpaper --> <string name="wallpaper_instructions">Tap picture to set portrait wallpaper</string> </resources> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ManifestDetectorTest.kt) +You can also visit the source code ([ManifestDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ManifestDetectorTest.kt) +[ProjectInitializerTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/ProjectInitializerTest.kt) +[ConfigurationHierarchyTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/client/api/ConfigurationHierarchyTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/ManifestResource.md.html b/docs/checks/ManifestResource.md.html index 511ecd33..1da58d52 100644 --- a/docs/checks/ManifestResource.md.html +++ b/docs/checks/ManifestResource.md.html @@ -55,7 +55,7 @@ Found variation in watch-v20 [ManifestResource] android:enabled="@bool/enable_wearable_location_service"> -------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -73,35 +73,35 @@ </service> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/values.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> <string name="location_process">Location Process</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/bools.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <bool name="enable_wearable_location_service">true</bool> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-en-rUS/values.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> <string name="location_process">Location Process (English)</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-watch/bools.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <bool name="enable_wearable_location_service">false</bool> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/xml/backup.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -110,14 +110,14 @@ <exclude domain="file" path="dd/fo3o.txt"/> <exclude domain="file" path="dd/ss/foo.txt"/> </full-backup-content> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/xml-mcc/backup.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <full-backup-content> <include domain="file" path="mcc"/> </full-backup-content> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ManifestResourceDetectorTest.kt) diff --git a/docs/checks/ManifestTypo.md.html b/docs/checks/ManifestTypo.md.html index ccb7e5b8..63dec9b8 100644 --- a/docs/checks/ManifestTypo.md.html +++ b/docs/checks/ManifestTypo.md.html @@ -44,7 +44,7 @@ ? [ManifestTypo] <use-sdk android:minSdkVersion="14" /> -------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -78,7 +78,7 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -112,8 +112,7 @@ <!-- Wallpaper --> <string name="wallpaper_instructions">Tap picture to set portrait wallpaper</string> </resources> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ManifestTypoDetectorTest.java) diff --git a/docs/checks/MatchingMenuId.md.html b/docs/checks/MatchingMenuId.md.html index b8297f04..2b799b6c 100644 --- a/docs/checks/MatchingMenuId.md.html +++ b/docs/checks/MatchingMenuId.md.html @@ -50,7 +50,7 @@ [MatchingMenuId] <item android:id="@+id/something"/> -------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -59,7 +59,7 @@ <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/something"/> </menu> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/MatchingMenuIdDetectorTest.kt) diff --git a/docs/checks/MatchingViewId.md.html b/docs/checks/MatchingViewId.md.html index dc177b76..2f26ed4d 100644 --- a/docs/checks/MatchingViewId.md.html +++ b/docs/checks/MatchingViewId.md.html @@ -50,14 +50,14 @@ activityMain [MatchingViewId] <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/text"/> --------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: `res/layout/activity_main.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/text"/> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/MatchingViewIdDetectorTest.kt) diff --git a/docs/checks/MemberExtensionConflict.md.html b/docs/checks/MemberExtensionConflict.md.html index d140606c..5429a1c5 100644 --- a/docs/checks/MemberExtensionConflict.md.html +++ b/docs/checks/MemberExtensionConflict.md.html @@ -21,7 +21,7 @@ Feedback : https://issuetracker.google.com/issues/new?component=192708 Since -: 8.11.0-alpha03 (March 2025) +: 8.11.0 (June 2025) Affects : Kotlin and Java files Editing @@ -62,7 +62,7 @@ [MemberExtensionConflict] l.removeMiddle() // WARNING 2 ---------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -73,7 +73,7 @@ val magicCount: Int fun removeMiddle() } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/users/own/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -85,7 +85,7 @@ get() = 42 fun MyList.removeMiddle() {} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/ListWrapper.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -101,7 +101,7 @@ val x = l.magicCount // WARNING 1 l.removeMiddle() // WARNING 2 } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/MemberExtensionConflictDetectorTest.kt) diff --git a/docs/checks/MenuTitle.md.html b/docs/checks/MenuTitle.md.html index 6a3d8458..cfe5684f 100644 --- a/docs/checks/MenuTitle.md.html +++ b/docs/checks/MenuTitle.md.html @@ -62,7 +62,7 @@ [MenuTitle] <item android:id="@+id/menu_plus_one" ---- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -83,7 +83,7 @@ android:showAsAction="always" android:icon="@drawable/ic_menu_plus1"/> </menu> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/TitleDetectorTest.java) diff --git a/docs/checks/MergeMarker.md.html b/docs/checks/MergeMarker.md.html index 1191ad0b..e4887ec8 100644 --- a/docs/checks/MergeMarker.md.html +++ b/docs/checks/MergeMarker.md.html @@ -45,7 +45,7 @@ res/values/strings.xml:9:Error: Missing merge marker? [MergeMarker] >>>>>>> branch-a ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -63,7 +63,7 @@ <string name="string3">String 3</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/MergeMarkerDetectorTest.kt) diff --git a/docs/checks/MergeRootFrame.md.html b/docs/checks/MergeRootFrame.md.html index a06459ec..38656e5f 100644 --- a/docs/checks/MergeRootFrame.md.html +++ b/docs/checks/MergeRootFrame.md.html @@ -46,7 +46,7 @@ a tag [MergeRootFrame] <FrameLayout ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -56,7 +56,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" /> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/ImportFrameActivity.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -72,7 +72,7 @@ setContentView(R.layout.simple); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/MergeRootFrameLayoutDetectorTest.kt) diff --git a/docs/checks/MinSdkTooLow.md.html b/docs/checks/MinSdkTooLow.md.html index b2934a13..b9ac72e9 100644 --- a/docs/checks/MinSdkTooLow.md.html +++ b/docs/checks/MinSdkTooLow.md.html @@ -47,7 +47,7 @@ supported devices. [MinSdkTooLow] minSdk = libs.versions.keys.msv.get().toInt() // ERROR 14 --------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -61,7 +61,7 @@ targetSdk = libs.versions.keys.tsv.get().toInt() // ERROR 15 } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `../gradle/libs.versions.toml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~toml linenumbers @@ -89,7 +89,7 @@ javaCompileSdk = "17" # OK 1 other-compileSdk = "15" # OK 2 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/MipmapIcons.md.html b/docs/checks/MipmapIcons.md.html index 3fdbb0e3..82127f72 100644 --- a/docs/checks/MipmapIcons.md.html +++ b/docs/checks/MipmapIcons.md.html @@ -61,7 +61,7 @@ @drawable for launcher icons [MipmapIcons] android:icon="@drawable/activity1" ---------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -101,12 +101,13 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `build.gradle`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~groovy linenumbers android { defaultConfig { + applicationId "test.mipmap" resConfigs "cs" } flavorDimensions "pricing", "releaseType" @@ -121,7 +122,7 @@ paid { dimension "pricing" } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ManifestDetectorTest.kt) diff --git a/docs/checks/MissingApplicationIcon.md.html b/docs/checks/MissingApplicationIcon.md.html index 4dafc5a5..bef4bdcc 100644 --- a/docs/checks/MissingApplicationIcon.md.html +++ b/docs/checks/MissingApplicationIcon.md.html @@ -48,7 +48,7 @@ is no default [MissingApplicationIcon] <application ----------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -75,7 +75,7 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -108,11 +108,10 @@ <!-- Wallpaper --> <string name="wallpaper_instructions">Tap picture to set portrait wallpaper</string> </resources> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ManifestDetectorTest.kt) +You can also visit the source code ([ManifestDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ManifestDetectorTest.kt) +[ProjectInitializerTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/ProjectInitializerTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/MissingAutoVerifyAttribute.md.html b/docs/checks/MissingAutoVerifyAttribute.md.html index c9a8a9e3..4d528c79 100644 --- a/docs/checks/MissingAutoVerifyAttribute.md.html +++ b/docs/checks/MissingAutoVerifyAttribute.md.html @@ -1,13 +1,13 @@ -(#) Application has custom scheme intent filters with missing `autoVerify` attributes +(#) Application has http/https scheme intent filters with missing `autoVerify` attributes -!!! WARNING: Application has custom scheme intent filters with missing `autoVerify` attributes +!!! WARNING: Application has http/https scheme intent filters with missing `autoVerify` attributes This is a warning. Id : `MissingAutoVerifyAttribute` Summary -: Application has custom scheme intent filters with missing `autoVerify` attributes +: Application has http/https scheme intent filters with missing `autoVerify` attributes Severity : Warning Category @@ -27,7 +27,7 @@ Artifact : [com.android.security.lint:lint](com_android_security_lint_lint.md.html) Since -: 1.0.1 +: 1.0.0 Affects : Manifest files Editing @@ -35,15 +35,18 @@ See : https://goo.gle/MissingAutoVerifyAttribute Implementation -: [Source Code](https://github.com/google/android-security-lints/tree/main/checks/src/main/java/com/example/lint/checks/CustomSchemeDetector.kt) +: [Source Code](https://github.com/google/android-security-lints/tree/main/checks/src/main/java/com/example/lint/checks/MissingAutoVerifyDetector.kt) Tests -: [Source Code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/CustomSchemeDetectorTest.kt) +: [Source Code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/MissingAutoVerifyDetectorTest.kt) Copyright Year : 2024 -Intent filters should contain the `autoVerify` attribute and explicitly -set it to true, in order to signal to the system to automatically verify -the associated hosts in your app's intent filters. +Intent filters that handle `http` or `https` schemes and include +`android.intent.action.VIEW`, `android.intent.category.BROWSABLE`, and +`android.intent.category.DEFAULT` should also include +`android:autoVerify="true"`. This enables Android App Links, which +securely associates your app with your domain. See +https://developer.android.com/training/app-links/verify-android-applinks. !!! Tip This lint check has an associated quickfix available in the IDE. @@ -52,12 +55,14 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -AndroidManifest.xml:5:Warning: Custom scheme intent filters should -explicitly set the autoVerify attribute to true +AndroidManifest.xml:5:Warning: This intent filter matches App Links +(VIEW, BROWSABLE, DEFAULT, http/https), but is missing the +android:autoVerify="true" attribute. See +https://developer.android.com/training/app-links/verify-android-applinks [MissingAutoVerifyAttribute] - <intent-filter android:autoVerify='false'> - ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + <intent-filter> + ------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -67,21 +72,24 @@ <application android:debuggable='false'> <meta-data android:name='android.webkit.WebView.EnableSafeBrowsing'/> <activity android:name='com.example.MainActivity'> - <intent-filter android:autoVerify='false'> + <intent-filter> <action android:name='android.intent.action.VIEW' /> - <data android:scheme='telegram://' /> + <category android:name='android.intent.category.BROWSABLE' /> + <category android:name='android.intent.category.DEFAULT' /> + <data android:scheme='http' /> + <data android:scheme='https' /> </intent-filter> </activity> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the -[source code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/CustomSchemeDetectorTest.kt) +[source code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/MissingAutoVerifyDetectorTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test -found for this lint check, `CustomSchemeDetector.testWhenFalseAutoVerifyAttributeSpecifiedOnCustomSchemeIntentFilter_showsWarning`. +found for this lint check, `MissingAutoVerifyDetector.testWhenAppLinkMissingAutoVerify_showsWarning`. To report a problem with this extracted sample, visit https://github.com/google/android-security-lints/issues. @@ -94,17 +102,17 @@ ``` // build.gradle.kts -lintChecks("com.android.security.lint:lint:1.0.3") +lintChecks("com.android.security.lint:lint:1.0.4") // build.gradle -lintChecks 'com.android.security.lint:lint:1.0.3' +lintChecks 'com.android.security.lint:lint:1.0.4' // build.gradle.kts with version catalogs: lintChecks(libs.com.android.security.lint.lint) # libs.versions.toml [versions] -com-android-security-lint-lint = "1.0.3" +com-android-security-lint-lint = "1.0.4" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -116,7 +124,7 @@ } ``` -1.0.3 is the version this documentation was generated from; +1.0.4 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.android.security.lint:lint](com_android_security_lint_lint.md.html). diff --git a/docs/checks/MissingBackupPin.md.html b/docs/checks/MissingBackupPin.md.html index 72316bef..dd1fefd6 100644 --- a/docs/checks/MissingBackupPin.md.html +++ b/docs/checks/MissingBackupPin.md.html @@ -43,7 +43,7 @@ highly recommended [MissingBackupPin] <pin-set> ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -59,7 +59,7 @@ </pin-set> </domain-config> </network-security-config> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/NetworkSecurityConfigDetectorTest.java) diff --git a/docs/checks/MissingClass.md.html b/docs/checks/MissingClass.md.html index d8c2f4f4..955cb045 100644 --- a/docs/checks/MissingClass.md.html +++ b/docs/checks/MissingClass.md.html @@ -46,7 +46,7 @@ [MissingClass] <foo.bar.Baz /> --------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -60,7 +60,7 @@ <test.pkg.MyView /> <test.pkg.NotView /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyView.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -69,16 +69,16 @@ abstract class MyView : I, androic.view.View(null) interface I -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/NotView.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers package test.pkg abstract class NotView : android.app.Fragment() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/MissingClassDetectorTest.kt) +You can also visit the source code ([MissingClassDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/MissingClassDetectorTest.kt) +[LintIssueDocGeneratorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/LintIssueDocGeneratorTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/MissingColorAlphaChannel.md.html b/docs/checks/MissingColorAlphaChannel.md.html index 42671e8d..03428fe5 100644 --- a/docs/checks/MissingColorAlphaChannel.md.html +++ b/docs/checks/MissingColorAlphaChannel.md.html @@ -72,7 +72,7 @@ [MissingColorAlphaChannel] val color4 = Color(0x00_00_00L) ----------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -91,7 +91,7 @@ val color3 = Color(0xeEeeEE) // separators and L suffix val color4 = Color(0x00_00_00L) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/ui/ui-graphics-lint/src/test/java/androidx/compose/ui/graphics/lint/ColorDetectorTest.kt) @@ -110,17 +110,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui-graphics-android:1.9.0-alpha01") +implementation("androidx.compose.ui:ui-graphics-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.ui:ui-graphics-android:1.9.0-alpha01' +implementation 'androidx.compose.ui:ui-graphics-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.ui.graphics.android) # libs.versions.toml [versions] -ui-graphics-android = "1.9.0-alpha01" +ui-graphics-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -132,11 +132,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.ui:ui-graphics-lint:1.9.0-alpha01`. +You can also use `androidx.compose.ui:ui-graphics-lint:1.11.0-alpha06`. [Additional details about androidx.compose.ui:ui-graphics-android](androidx_compose_ui_ui-graphics-android.md.html). diff --git a/docs/checks/MissingConstraints.md.html b/docs/checks/MissingConstraints.md.html index 8b2eccb1..8e2fb3f5 100644 --- a/docs/checks/MissingConstraints.md.html +++ b/docs/checks/MissingConstraints.md.html @@ -61,7 +61,7 @@ horizontal constraint [MissingConstraints] <TextView -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -132,7 +132,7 @@ app:relativeBegin="20dp" /> <requestFocus/> </androidx.constraintlayout.widget.ConstraintLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ConstraintLayoutDetectorTest.kt) diff --git a/docs/checks/MissingDefaultResource.md.html b/docs/checks/MissingDefaultResource.md.html index 46d686f9..90bdc154 100644 --- a/docs/checks/MissingDefaultResource.md.html +++ b/docs/checks/MissingDefaultResource.md.html @@ -70,7 +70,7 @@ match this qualifier [MissingDefaultResource] <dimen name="extra_dimen1">1pt</dimen> <!-- error --> ------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -80,7 +80,7 @@ <dimen name="ok_dimen">base</dimen> <!-- ok --> <style name="ok_style"></style> <!-- ok --> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-land/dimen.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -90,7 +90,7 @@ <dimen name="extra_dimen1">1pt</dimen> <!-- error --> <style name="extra_style1"></style> <!-- ok --> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-v21/dimen.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -99,7 +99,7 @@ resources for API levels, often used for theming --> <dimen name="ok_extra_dimen">1pt</dimen> <!-- ok --> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-land-v21/dimen.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -107,29 +107,29 @@ <dimen name="ok_extra_dimen">2pt</dimen> <!-- ok --> <dimen name="extra_dimen2">1pt</dimen> <!-- error --> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/drawable-mdpi/ok_drawable.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> <drawable name="color_drawable">#ffffffff</drawable> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/color/ok_color.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <color xmlns:android="http://schemas.android.com/apk/res/android" android:color="#ff0000" /> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/color-port/extra_color.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <color xmlns:android="http://schemas.android.com/apk/res/android" android:color="#ff0000" /> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout-land/extra_layout.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <merge/> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/TranslationDetectorTest.kt) diff --git a/docs/checks/MissingFirebaseInstanceTokenRefresh.md.html b/docs/checks/MissingFirebaseInstanceTokenRefresh.md.html index 396960c0..7e41cfd1 100644 --- a/docs/checks/MissingFirebaseInstanceTokenRefresh.md.html +++ b/docs/checks/MissingFirebaseInstanceTokenRefresh.md.html @@ -44,7 +44,7 @@ order to observe token changes [MissingFirebaseInstanceTokenRefresh] public class MessagingService extends FirebaseMessagingService { ---------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -56,7 +56,7 @@ public class MessagingService extends FirebaseMessagingService { } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/FirebaseMessagingDetectorTest.java) diff --git a/docs/checks/MissingId.md.html b/docs/checks/MissingId.md.html index 7a060370..08d828c0 100644 --- a/docs/checks/MissingId.md.html +++ b/docs/checks/MissingId.md.html @@ -59,7 +59,7 @@ id or a tag to preserve state across activity restarts [MissingId] <fragment -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -89,7 +89,7 @@ android:layout_height="wrap_content" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/MissingIdDetectorTest.java) diff --git a/docs/checks/MissingInflatedId.md.html b/docs/checks/MissingInflatedId.md.html index f19ee7a4..a4ec3624 100644 --- a/docs/checks/MissingInflatedId.md.html +++ b/docs/checks/MissingInflatedId.md.html @@ -45,7 +45,7 @@ a declaration with id image_view [MissingInflatedId] val imgView = rootView.findViewById<ImageView>(R.id.image_view) --------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -76,24 +76,24 @@ return rootView } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout/activity_main.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" /> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout/list_item.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" /> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `test.pkg`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text linenumbers @id/text_field -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/MissingInflatedIdDetectorTest.kt) diff --git a/docs/checks/MissingIntentFilterForMediaSearch.md.html b/docs/checks/MissingIntentFilterForMediaSearch.md.html index ced8da8b..5c75b9d2 100644 --- a/docs/checks/MissingIntentFilterForMediaSearch.md.html +++ b/docs/checks/MissingIntentFilterForMediaSearch.md.html @@ -52,7 +52,7 @@ [MissingIntentFilterForMediaSearch] <application ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -84,7 +84,7 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/xml/automotive_app_desc.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -92,7 +92,7 @@ <automotiveApp> <uses name="media"/> </automotiveApp> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AndroidAutoDetectorTest.java) diff --git a/docs/checks/MissingKeepAnnotation-2.md.html b/docs/checks/MissingKeepAnnotation-2.md.html index 098b3403..fe0a44a7 100644 --- a/docs/checks/MissingKeepAnnotation-2.md.html +++ b/docs/checks/MissingKeepAnnotation-2.md.html @@ -32,20 +32,64 @@ : This check runs on the fly in the IDE editor Implementation : [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-runtime-lint/src/main/java/androidx/navigation/runtime/lint/TypeSafeDestinationMissingAnnotationDetector.kt) +Tests +: [MissingKeepAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/MissingKeepAnnotationDetectorTest.kt) +Tests +: [MissingKeepAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-common-lint/src/test/java/androidx/navigation/common/lint/MissingKeepAnnotationDetectorTest.kt) +Tests +: [MissingKeepAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/MissingKeepAnnotationDetectorTest.kt) Copyright Year : 2024 Type-safe nav arguments such as Enum types can get incorrectly obfuscated in minified builds when not referenced directly. +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/com/example/TestEnum.kt:6:Warning: To prevent this Enum's serializer +from being obfuscated in minified builds, annotate it with +@androidx.annotation.Keep [MissingKeepAnnotation] +enum class TestEnum { ONE, TWO } + -------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/com/example/TestEnum.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package com.example + +import androidx.navigation.* +import androidx.navigation.compose.* + +enum class TestEnum { ONE, TWO } +class TestClass(val arg: TestEnum) + +fun navigation() { + ComposeNavigatorDestinationBuilder(route = TestClass::class) +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the source code ([MissingKeepAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/MissingKeepAnnotationDetectorTest.kt) +[MissingKeepAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-common-lint/src/test/java/androidx/navigation/common/lint/MissingKeepAnnotationDetectorTest.kt) +[MissingKeepAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/MissingKeepAnnotationDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `TypeSafeDestinationMissingAnnotationDetector.testComposeNavigatorDestinationBuilderConstructor_hasError`. +To report a problem with this extracted sample, contact +Jetpack Navigation Compose. + (##) Conflicts This issue id has also been used by other, unrelated lint checks. Issue id's must be unique, so you cannot combine these libraries. Also defined in: * MissingKeepAnnotation: In minified builds, Enum classes used as type-safe Navigation arguments should be annotated with @androidx.annotation.Keep (this issue) -* [MissingKeepAnnotation from androidx.navigation:navigation-common:2.9.0-rc01](MissingKeepAnnotation.md.html) -* [MissingKeepAnnotation from androidx.navigation:navigation-runtime:2.9.0-rc01](MissingKeepAnnotation-3.md.html) +* [MissingKeepAnnotation from androidx.navigation:navigation-common:2.9.7](MissingKeepAnnotation.md.html) +* [MissingKeepAnnotation from androidx.navigation:navigation-runtime:2.9.7](MissingKeepAnnotation-3.md.html) (##) Including @@ -56,17 +100,17 @@ ``` // build.gradle.kts -implementation("androidx.navigation:navigation-compose:2.9.0-rc01") +implementation("androidx.navigation:navigation-compose:2.9.7") // build.gradle -implementation 'androidx.navigation:navigation-compose:2.9.0-rc01' +implementation 'androidx.navigation:navigation-compose:2.9.7' // build.gradle.kts with version catalogs: implementation(libs.navigation.compose) # libs.versions.toml [versions] -navigation-compose = "2.9.0-rc01" +navigation-compose = "2.9.7" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -78,7 +122,7 @@ } ``` -2.9.0-rc01 is the version this documentation was generated from; +2.9.7 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.navigation:navigation-compose](androidx_navigation_navigation-compose.md.html). diff --git a/docs/checks/MissingKeepAnnotation-3.md.html b/docs/checks/MissingKeepAnnotation-3.md.html index 7d3ae75f..1b5a7517 100644 --- a/docs/checks/MissingKeepAnnotation-3.md.html +++ b/docs/checks/MissingKeepAnnotation-3.md.html @@ -34,20 +34,64 @@ : This check runs on the fly in the IDE editor Implementation : [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-runtime-lint/src/main/java/androidx/navigation/runtime/lint/TypeSafeDestinationMissingAnnotationDetector.kt) +Tests +: [MissingKeepAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/MissingKeepAnnotationDetectorTest.kt) +Tests +: [MissingKeepAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-common-lint/src/test/java/androidx/navigation/common/lint/MissingKeepAnnotationDetectorTest.kt) +Tests +: [MissingKeepAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/MissingKeepAnnotationDetectorTest.kt) Copyright Year : 2024 Type-safe nav arguments such as Enum types can get incorrectly obfuscated in minified builds when not referenced directly. +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/com/example/TestEnum.kt:6:Warning: To prevent this Enum's serializer +from being obfuscated in minified builds, annotate it with +@androidx.annotation.Keep [MissingKeepAnnotation] +enum class TestEnum { ONE, TWO } + -------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/com/example/TestEnum.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package com.example + +import androidx.navigation.* +import androidx.navigation.compose.* + +enum class TestEnum { ONE, TWO } +class TestClass(val arg: TestEnum) + +fun navigation() { + ComposeNavigatorDestinationBuilder(route = TestClass::class) +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the source code ([MissingKeepAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/MissingKeepAnnotationDetectorTest.kt) +[MissingKeepAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-common-lint/src/test/java/androidx/navigation/common/lint/MissingKeepAnnotationDetectorTest.kt) +[MissingKeepAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/MissingKeepAnnotationDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `TypeSafeDestinationMissingAnnotationDetector.testComposeNavigatorDestinationBuilderConstructor_hasError`. +To report a problem with this extracted sample, visit +https://issuetracker.google.com/issues/new?component=409828. + (##) Conflicts This issue id has also been used by other, unrelated lint checks. Issue id's must be unique, so you cannot combine these libraries. Also defined in: * MissingKeepAnnotation: In minified builds, Enum classes used as type-safe Navigation arguments should be annotated with @androidx.annotation.Keep (this issue) -* [MissingKeepAnnotation from androidx.navigation:navigation-common:2.9.0-rc01](MissingKeepAnnotation.md.html) -* [MissingKeepAnnotation from androidx.navigation:navigation-compose:2.9.0-rc01](MissingKeepAnnotation-2.md.html) +* [MissingKeepAnnotation from androidx.navigation:navigation-common:2.9.7](MissingKeepAnnotation.md.html) +* [MissingKeepAnnotation from androidx.navigation:navigation-compose:2.9.7](MissingKeepAnnotation-2.md.html) (##) Including @@ -58,17 +102,17 @@ ``` // build.gradle.kts -implementation("androidx.navigation:navigation-runtime:2.9.0-rc01") +implementation("androidx.navigation:navigation-runtime:2.9.7") // build.gradle -implementation 'androidx.navigation:navigation-runtime:2.9.0-rc01' +implementation 'androidx.navigation:navigation-runtime:2.9.7' // build.gradle.kts with version catalogs: implementation(libs.navigation.runtime) # libs.versions.toml [versions] -navigation-runtime = "2.9.0-rc01" +navigation-runtime = "2.9.7" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -80,7 +124,7 @@ } ``` -2.9.0-rc01 is the version this documentation was generated from; +2.9.7 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.navigation:navigation-runtime](androidx_navigation_navigation-runtime.md.html). diff --git a/docs/checks/MissingKeepAnnotation.md.html b/docs/checks/MissingKeepAnnotation.md.html index 051629bf..1a3eebc9 100644 --- a/docs/checks/MissingKeepAnnotation.md.html +++ b/docs/checks/MissingKeepAnnotation.md.html @@ -34,20 +34,64 @@ : This check runs on the fly in the IDE editor Implementation : [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-runtime-lint/src/main/java/androidx/navigation/runtime/lint/TypeSafeDestinationMissingAnnotationDetector.kt) +Tests +: [MissingKeepAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/MissingKeepAnnotationDetectorTest.kt) +Tests +: [MissingKeepAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-common-lint/src/test/java/androidx/navigation/common/lint/MissingKeepAnnotationDetectorTest.kt) +Tests +: [MissingKeepAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/MissingKeepAnnotationDetectorTest.kt) Copyright Year : 2024 Type-safe nav arguments such as Enum types can get incorrectly obfuscated in minified builds when not referenced directly. +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/com/example/TestEnum.kt:6:Warning: To prevent this Enum's serializer +from being obfuscated in minified builds, annotate it with +@androidx.annotation.Keep [MissingKeepAnnotation] +enum class TestEnum { ONE, TWO } + -------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/com/example/TestEnum.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package com.example + +import androidx.navigation.* +import androidx.navigation.compose.* + +enum class TestEnum { ONE, TWO } +class TestClass(val arg: TestEnum) + +fun navigation() { + ComposeNavigatorDestinationBuilder(route = TestClass::class) +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the source code ([MissingKeepAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/MissingKeepAnnotationDetectorTest.kt) +[MissingKeepAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-common-lint/src/test/java/androidx/navigation/common/lint/MissingKeepAnnotationDetectorTest.kt) +[MissingKeepAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/MissingKeepAnnotationDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `TypeSafeDestinationMissingAnnotationDetector.testComposeNavigatorDestinationBuilderConstructor_hasError`. +To report a problem with this extracted sample, visit +https://issuetracker.google.com/issues/new?component=409828. + (##) Conflicts This issue id has also been used by other, unrelated lint checks. Issue id's must be unique, so you cannot combine these libraries. Also defined in: * MissingKeepAnnotation: In minified builds, Enum classes used as type-safe Navigation arguments should be annotated with @androidx.annotation.Keep (this issue) -* [MissingKeepAnnotation from androidx.navigation:navigation-compose:2.9.0-rc01](MissingKeepAnnotation-2.md.html) -* [MissingKeepAnnotation from androidx.navigation:navigation-runtime:2.9.0-rc01](MissingKeepAnnotation-3.md.html) +* [MissingKeepAnnotation from androidx.navigation:navigation-compose:2.9.7](MissingKeepAnnotation-2.md.html) +* [MissingKeepAnnotation from androidx.navigation:navigation-runtime:2.9.7](MissingKeepAnnotation-3.md.html) (##) Including @@ -58,17 +102,17 @@ ``` // build.gradle.kts -implementation("androidx.navigation:navigation-common:2.9.0-rc01") +implementation("androidx.navigation:navigation-common:2.9.7") // build.gradle -implementation 'androidx.navigation:navigation-common:2.9.0-rc01' +implementation 'androidx.navigation:navigation-common:2.9.7' // build.gradle.kts with version catalogs: implementation(libs.navigation.common) # libs.versions.toml [versions] -navigation-common = "2.9.0-rc01" +navigation-common = "2.9.7" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -80,7 +124,7 @@ } ``` -2.9.0-rc01 is the version this documentation was generated from; +2.9.7 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.navigation:navigation-common](androidx_navigation_navigation-common.md.html). diff --git a/docs/checks/MissingLeanbackLauncher.md.html b/docs/checks/MissingLeanbackLauncher.md.html index 1cea1404..3ac15164 100644 --- a/docs/checks/MissingLeanbackLauncher.md.html +++ b/docs/checks/MissingLeanbackLauncher.md.html @@ -44,7 +44,7 @@ [MissingLeanbackLauncher] <manifest xmlns:android="http://schemas.android.com/apk/res/android" -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -65,7 +65,7 @@ </activity> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AndroidTvDetectorTest.java) diff --git a/docs/checks/MissingLeanbackSupport.md.html b/docs/checks/MissingLeanbackSupport.md.html index 2421c690..c99e8fa3 100644 --- a/docs/checks/MissingLeanbackSupport.md.html +++ b/docs/checks/MissingLeanbackSupport.md.html @@ -53,7 +53,7 @@ [MissingLeanbackSupport] <manifest xmlns:android="http://schemas.android.com/apk/res/android" -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -71,7 +71,7 @@ </activity> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AndroidTvDetectorTest.java) diff --git a/docs/checks/MissingMediaBrowserServiceIntentFilter.md.html b/docs/checks/MissingMediaBrowserServiceIntentFilter.md.html index 825b40b6..fb37ae08 100644 --- a/docs/checks/MissingMediaBrowserServiceIntentFilter.md.html +++ b/docs/checks/MissingMediaBrowserServiceIntentFilter.md.html @@ -53,7 +53,7 @@ auto support [MissingMediaBrowserServiceIntentFilter] <application ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -82,7 +82,7 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/xml/automotive_app_desc.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -90,7 +90,7 @@ <automotiveApp> <uses name="media"/> </automotiveApp> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AndroidAutoDetectorTest.java) diff --git a/docs/checks/MissingOnPlayFromSearch.md.html b/docs/checks/MissingOnPlayFromSearch.md.html index 8e05eb7e..d278a1e8 100644 --- a/docs/checks/MissingOnPlayFromSearch.md.html +++ b/docs/checks/MissingOnPlayFromSearch.md.html @@ -45,7 +45,7 @@ Auto. [MissingOnPlayFromSearch] public class MSessionCallback extends Callback { ---------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -81,7 +81,7 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/xml/automotive_app_desc.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -89,7 +89,7 @@ <automotiveApp> <uses name="media"/> </automotiveApp> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/com/example/android/uamp/MSessionCallback.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -103,7 +103,7 @@ // custom impl } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AndroidAutoDetectorTest.java) diff --git a/docs/checks/MissingPermission.md.html b/docs/checks/MissingPermission.md.html index 80c2fe9f..30643407 100644 --- a/docs/checks/MissingPermission.md.html +++ b/docs/checks/MissingPermission.md.html @@ -50,7 +50,7 @@ android.permission.ACCESS_COARSE_LOCATION [MissingPermission] LocationManager.Location location = locationManager.myMethod(provider); ---------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -65,7 +65,7 @@ LocationManager.Location location = locationManager.myMethod(provider); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PermissionDetectorTest.kt) diff --git a/docs/checks/MissingPrefix.md.html b/docs/checks/MissingPrefix.md.html index d0a009e1..aa2f9cb3 100644 --- a/docs/checks/MissingPrefix.md.html +++ b/docs/checks/MissingPrefix.md.html @@ -52,7 +52,7 @@ namespace prefix [MissingPrefix] <Button style="@style/setupWizardOuterFrame" android.text="Button" android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content"/> --------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -64,7 +64,7 @@ <ImageView android:style="@style/bogus" android:id="@+id/android_logo" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/android_button" android:focusable="false" android:clickable="false" android:layout_weight="1.0" /> <LinearLayout other:orientation="horizontal"/> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/MissingPrefixDetectorTest.kt) diff --git a/docs/checks/MissingPurpose.md.html b/docs/checks/MissingPurpose.md.html new file mode 100644 index 00000000..1cd27b2c --- /dev/null +++ b/docs/checks/MissingPurpose.md.html @@ -0,0 +1,123 @@ + +(#) Missing purpose for permission + +!!! ERROR: Missing purpose for permission + This is an error, and is also enforced at build time when + supported by the build system. For Android this means it will + run during release builds. + +Id +: `MissingPurpose` +Summary +: Missing purpose for permission +Severity +: Fatal +Category +: Correctness +Platform +: Android +Vendor +: Android Open Source Project +Feedback +: https://issuetracker.google.com/issues/new?component=192708 +Since +: 9.0.0 (January 2026) +Affects +: Manifest files +Editing +: This check runs on the fly in the IDE editor +Implementation +: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/PurposeDeclarationDetector.kt) +Tests +: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PurposeDeclarationDetectorTest.kt) + +When requesting a permission that requires purpose declaration, +appropriate tags and/or attributes must be defined based on the required +purpose types. Failure to do so will lead to unexpected runtime issues. + +Purpose: If a permission requires purpose, at least one `` +child tag must be declared. This tag must use appropriate preset valid +purpose string found in the permission's documentation. The declared +purpose(s) must cover all API levels for which the permission requires +purpose. + +Purpose String: If a permission requires a purpose string, +`android:purposeString` attribute must be declared with a string +resource referencing appropriate localized string(s) including the +reason for why the permission is required by the app. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +AndroidManifest.xml:4:Error: USE_FOO permission is missing required +purpose attributes/elements: missing one or more tags required +for API level(s) 38 [MissingPurpose] + <uses-permission android:name="USE_FOO" /> + ------------------------------------------ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`AndroidManifest.xml`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.example.helloworld"> + <uses-sdk android:minSdkVersion="30" android:targetSdkVersion="38" /> + <uses-permission android:name="USE_FOO" /> +</manifest> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PurposeDeclarationDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `PurposeDeclarationDetector.testDocumentationExampleRequestingPermissionWithNoPurposeFail`. +To report a problem with this extracted sample, visit +https://issuetracker.google.com/issues/new?component=192708. + +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Adding the suppression attribute `tools:ignore="MissingPurpose"` on + the problematic XML element (or one of its enclosing elements). You + may also need to add the following namespace declaration on the root + element in the XML file if it's not already there: + `xmlns:tools="http://schemas.android.com/tools"`. + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="MissingPurpose" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'MissingPurpose' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore MissingPurpose ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/MissingQuantity.md.html b/docs/checks/MissingQuantity.md.html index cc763f3c..c7ac4859 100644 --- a/docs/checks/MissingQuantity.md.html +++ b/docs/checks/MissingQuantity.md.html @@ -56,7 +56,7 @@ [MissingQuantity] <plurals name="numberOfSongsAvailable"> ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -70,7 +70,7 @@ <item quantity="other">@string/hello</item> </plurals> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/plurals2.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -81,7 +81,7 @@ <item quantity="other">%d songs found.</item> </plurals> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-pl/plurals2.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -93,7 +93,7 @@ <item quantity="other">Znaleziono %d piosenek.</item> </plurals> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PluralsDetectorTest.java) diff --git a/docs/checks/MissingResourceImportAlias.md.html b/docs/checks/MissingResourceImportAlias.md.html index 8bf67c9e..5dd68b06 100644 --- a/docs/checks/MissingResourceImportAlias.md.html +++ b/docs/checks/MissingResourceImportAlias.md.html @@ -66,7 +66,7 @@ <option name="import-aliases" value="some string" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (##) Example @@ -76,7 +76,7 @@ from other modules [MissingResourceImportAlias] import slack.l10n.R ------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -87,7 +87,7 @@ import slack.l10n.R class MyClass -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/resources/MissingResourceImportAliasDetectorTest.kt) diff --git a/docs/checks/MissingResourcesProperties.md.html b/docs/checks/MissingResourcesProperties.md.html index 2108e532..bfcb3ec1 100644 --- a/docs/checks/MissingResourcesProperties.md.html +++ b/docs/checks/MissingResourcesProperties.md.html @@ -42,7 +42,7 @@ [MissingResourcesProperties] generateLocaleConfig true -------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -55,7 +55,7 @@ generateLocaleConfig true } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/MissingResourcesPropertiesDetectorTest.kt) diff --git a/docs/checks/MissingScrollbars.md.html b/docs/checks/MissingScrollbars.md.html index e8811395..dbd125a8 100644 --- a/docs/checks/MissingScrollbars.md.html +++ b/docs/checks/MissingScrollbars.md.html @@ -49,7 +49,7 @@ [MissingScrollbars] <ScrollView ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -60,7 +60,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" /> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/MissingScrollbarsDetectorTest.kt) diff --git a/docs/checks/MissingSerializableAnnotation-2.md.html b/docs/checks/MissingSerializableAnnotation-2.md.html index ad5ad41a..b99b4926 100644 --- a/docs/checks/MissingSerializableAnnotation-2.md.html +++ b/docs/checks/MissingSerializableAnnotation-2.md.html @@ -32,6 +32,12 @@ : This check runs on the fly in the IDE editor Implementation : [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-runtime-lint/src/main/java/androidx/navigation/runtime/lint/TypeSafeDestinationMissingAnnotationDetector.kt) +Tests +: [MissingSerializableAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/MissingSerializableAnnotationDetectorTest.kt) +Tests +: [MissingSerializableAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-common-lint/src/test/java/androidx/navigation/common/lint/MissingSerializableAnnotationDetectorTest.kt) +Tests +: [MissingSerializableAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/MissingSerializableAnnotationDetectorTest.kt) Copyright Year : 2024 @@ -39,14 +45,53 @@ Navigation library to convert the class or object declaration into a NavDestination. +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/com/example/TestClass.kt:7:Error: To use this class or object as a +type-safe destination, annotate it with @Serializable +[MissingSerializableAnnotation] +class DeepLink + -------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/com/example/TestClass.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package com.example + +import androidx.navigation.* +import kotlinx.serialization.* + +@Serializable class TestClass +class DeepLink + +fun navigation() { + val builder = NavDestinationBuilder(route = TestClass::class) + builder.deepLink() +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the source code ([MissingSerializableAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/MissingSerializableAnnotationDetectorTest.kt) +[MissingSerializableAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-common-lint/src/test/java/androidx/navigation/common/lint/MissingSerializableAnnotationDetectorTest.kt) +[MissingSerializableAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/MissingSerializableAnnotationDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `TypeSafeDestinationMissingAnnotationDetector.testDeeplink_hasError`. +To report a problem with this extracted sample, contact +Jetpack Navigation Compose. + (##) Conflicts This issue id has also been used by other, unrelated lint checks. Issue id's must be unique, so you cannot combine these libraries. Also defined in: * MissingSerializableAnnotation: Type-safe NavDestinations must be annotated with @kotlinx.serialization.Serializable (this issue) -* [MissingSerializableAnnotation from androidx.navigation:navigation-common:2.9.0-rc01](MissingSerializableAnnotation.md.html) -* [MissingSerializableAnnotation from androidx.navigation:navigation-runtime:2.9.0-rc01](MissingSerializableAnnotation-3.md.html) +* [MissingSerializableAnnotation from androidx.navigation:navigation-common:2.9.7](MissingSerializableAnnotation.md.html) +* [MissingSerializableAnnotation from androidx.navigation:navigation-runtime:2.9.7](MissingSerializableAnnotation-3.md.html) (##) Including @@ -57,17 +102,17 @@ ``` // build.gradle.kts -implementation("androidx.navigation:navigation-compose:2.9.0-rc01") +implementation("androidx.navigation:navigation-compose:2.9.7") // build.gradle -implementation 'androidx.navigation:navigation-compose:2.9.0-rc01' +implementation 'androidx.navigation:navigation-compose:2.9.7' // build.gradle.kts with version catalogs: implementation(libs.navigation.compose) # libs.versions.toml [versions] -navigation-compose = "2.9.0-rc01" +navigation-compose = "2.9.7" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -79,7 +124,7 @@ } ``` -2.9.0-rc01 is the version this documentation was generated from; +2.9.7 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.navigation:navigation-compose](androidx_navigation_navigation-compose.md.html). diff --git a/docs/checks/MissingSerializableAnnotation-3.md.html b/docs/checks/MissingSerializableAnnotation-3.md.html index 1d0e458c..80389763 100644 --- a/docs/checks/MissingSerializableAnnotation-3.md.html +++ b/docs/checks/MissingSerializableAnnotation-3.md.html @@ -34,6 +34,12 @@ : This check runs on the fly in the IDE editor Implementation : [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-runtime-lint/src/main/java/androidx/navigation/runtime/lint/TypeSafeDestinationMissingAnnotationDetector.kt) +Tests +: [MissingSerializableAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/MissingSerializableAnnotationDetectorTest.kt) +Tests +: [MissingSerializableAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-common-lint/src/test/java/androidx/navigation/common/lint/MissingSerializableAnnotationDetectorTest.kt) +Tests +: [MissingSerializableAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/MissingSerializableAnnotationDetectorTest.kt) Copyright Year : 2024 @@ -41,14 +47,53 @@ Navigation library to convert the class or object declaration into a NavDestination. +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/com/example/TestClass.kt:7:Error: To use this class or object as a +type-safe destination, annotate it with @Serializable +[MissingSerializableAnnotation] +class DeepLink + -------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/com/example/TestClass.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package com.example + +import androidx.navigation.* +import kotlinx.serialization.* + +@Serializable class TestClass +class DeepLink + +fun navigation() { + val builder = NavDestinationBuilder(route = TestClass::class) + builder.deepLink() +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the source code ([MissingSerializableAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/MissingSerializableAnnotationDetectorTest.kt) +[MissingSerializableAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-common-lint/src/test/java/androidx/navigation/common/lint/MissingSerializableAnnotationDetectorTest.kt) +[MissingSerializableAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/MissingSerializableAnnotationDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `TypeSafeDestinationMissingAnnotationDetector.testDeeplink_hasError`. +To report a problem with this extracted sample, visit +https://issuetracker.google.com/issues/new?component=409828. + (##) Conflicts This issue id has also been used by other, unrelated lint checks. Issue id's must be unique, so you cannot combine these libraries. Also defined in: * MissingSerializableAnnotation: Type-safe NavDestinations must be annotated with @kotlinx.serialization.Serializable (this issue) -* [MissingSerializableAnnotation from androidx.navigation:navigation-common:2.9.0-rc01](MissingSerializableAnnotation.md.html) -* [MissingSerializableAnnotation from androidx.navigation:navigation-compose:2.9.0-rc01](MissingSerializableAnnotation-2.md.html) +* [MissingSerializableAnnotation from androidx.navigation:navigation-common:2.9.7](MissingSerializableAnnotation.md.html) +* [MissingSerializableAnnotation from androidx.navigation:navigation-compose:2.9.7](MissingSerializableAnnotation-2.md.html) (##) Including @@ -59,17 +104,17 @@ ``` // build.gradle.kts -implementation("androidx.navigation:navigation-runtime:2.9.0-rc01") +implementation("androidx.navigation:navigation-runtime:2.9.7") // build.gradle -implementation 'androidx.navigation:navigation-runtime:2.9.0-rc01' +implementation 'androidx.navigation:navigation-runtime:2.9.7' // build.gradle.kts with version catalogs: implementation(libs.navigation.runtime) # libs.versions.toml [versions] -navigation-runtime = "2.9.0-rc01" +navigation-runtime = "2.9.7" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -81,7 +126,7 @@ } ``` -2.9.0-rc01 is the version this documentation was generated from; +2.9.7 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.navigation:navigation-runtime](androidx_navigation_navigation-runtime.md.html). diff --git a/docs/checks/MissingSerializableAnnotation.md.html b/docs/checks/MissingSerializableAnnotation.md.html index 41946204..5249c42e 100644 --- a/docs/checks/MissingSerializableAnnotation.md.html +++ b/docs/checks/MissingSerializableAnnotation.md.html @@ -34,6 +34,12 @@ : This check runs on the fly in the IDE editor Implementation : [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-runtime-lint/src/main/java/androidx/navigation/runtime/lint/TypeSafeDestinationMissingAnnotationDetector.kt) +Tests +: [MissingSerializableAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/MissingSerializableAnnotationDetectorTest.kt) +Tests +: [MissingSerializableAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-common-lint/src/test/java/androidx/navigation/common/lint/MissingSerializableAnnotationDetectorTest.kt) +Tests +: [MissingSerializableAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/MissingSerializableAnnotationDetectorTest.kt) Copyright Year : 2024 @@ -41,14 +47,53 @@ Navigation library to convert the class or object declaration into a NavDestination. +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/com/example/TestClass.kt:7:Error: To use this class or object as a +type-safe destination, annotate it with @Serializable +[MissingSerializableAnnotation] +class DeepLink + -------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/com/example/TestClass.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package com.example + +import androidx.navigation.* +import kotlinx.serialization.* + +@Serializable class TestClass +class DeepLink + +fun navigation() { + val builder = NavDestinationBuilder(route = TestClass::class) + builder.deepLink() +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the source code ([MissingSerializableAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/MissingSerializableAnnotationDetectorTest.kt) +[MissingSerializableAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-common-lint/src/test/java/androidx/navigation/common/lint/MissingSerializableAnnotationDetectorTest.kt) +[MissingSerializableAnnotationDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/MissingSerializableAnnotationDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `TypeSafeDestinationMissingAnnotationDetector.testDeeplink_hasError`. +To report a problem with this extracted sample, visit +https://issuetracker.google.com/issues/new?component=409828. + (##) Conflicts This issue id has also been used by other, unrelated lint checks. Issue id's must be unique, so you cannot combine these libraries. Also defined in: * MissingSerializableAnnotation: Type-safe NavDestinations must be annotated with @kotlinx.serialization.Serializable (this issue) -* [MissingSerializableAnnotation from androidx.navigation:navigation-compose:2.9.0-rc01](MissingSerializableAnnotation-2.md.html) -* [MissingSerializableAnnotation from androidx.navigation:navigation-runtime:2.9.0-rc01](MissingSerializableAnnotation-3.md.html) +* [MissingSerializableAnnotation from androidx.navigation:navigation-compose:2.9.7](MissingSerializableAnnotation-2.md.html) +* [MissingSerializableAnnotation from androidx.navigation:navigation-runtime:2.9.7](MissingSerializableAnnotation-3.md.html) (##) Including @@ -59,17 +104,17 @@ ``` // build.gradle.kts -implementation("androidx.navigation:navigation-common:2.9.0-rc01") +implementation("androidx.navigation:navigation-common:2.9.7") // build.gradle -implementation 'androidx.navigation:navigation-common:2.9.0-rc01' +implementation 'androidx.navigation:navigation-common:2.9.7' // build.gradle.kts with version catalogs: implementation(libs.navigation.common) # libs.versions.toml [versions] -navigation-common = "2.9.0-rc01" +navigation-common = "2.9.7" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -81,7 +126,7 @@ } ``` -2.9.0-rc01 is the version this documentation was generated from; +2.9.7 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.navigation:navigation-common](androidx_navigation_navigation-common.md.html). diff --git a/docs/checks/MissingSuperCall.md.html b/docs/checks/MissingSuperCall.md.html index 73b36641..810bbabd 100644 --- a/docs/checks/MissingSuperCall.md.html +++ b/docs/checks/MissingSuperCall.md.html @@ -45,7 +45,7 @@ super.someMethod [MissingSuperCall] override fun someMethod(arg: Int) { ---------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -65,10 +65,10 @@ // Bug: required to call super.someMethod(arg) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/CallSuperDetectorTest.kt) +You can also visit the source code ([CallSuperDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/CallSuperDetectorTest.kt) +[ProjectInitializerTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/ProjectInitializerTest.kt) for the unit tests for this check to see additional scenarios. (##) Suppressing diff --git a/docs/checks/MissingTranslation.md.html b/docs/checks/MissingTranslation.md.html index 92a533f9..fb6f3934 100644 --- a/docs/checks/MissingTranslation.md.html +++ b/docs/checks/MissingTranslation.md.html @@ -67,7 +67,7 @@ [MissingTranslation] <string name="menu_settings">Settings</string> -------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -103,8 +103,7 @@ <!-- Wallpaper --> <string name="wallpaper_instructions">Tap picture to set portrait wallpaper</string> </resources> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-cs/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -119,7 +118,7 @@ <skip /> <string name="wallpaper_instructions">"Klepnutím na obrázek nastavíte tapetu portrétu"</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-de-rDE/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -135,7 +134,7 @@ <string name="wallpaper_instructions">"Tippen Sie auf Bild, um Porträt-Bildschirmhintergrund einzustellen"</string> <string name="continue_skip_label">"Weiter"</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-es/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -157,7 +156,7 @@ <item>"Nombre de tu colegio"</item> </string-array> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-es-rUS/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -166,7 +165,7 @@ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <string name="menu_search">"Búsqueda"</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-land/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -190,8 +189,7 @@ <!-- Wallpaper --> <string name="wallpaper_instructions">Tap image to set landscape wallpaper</string> </resources> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-cs/arrays.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -204,7 +202,7 @@ <item>"Název střední školy"</item> </string-array> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-es/donottranslate.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -212,7 +210,7 @@ <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <string name="full_wday_month_day_no_year">EEEE, d MMMM</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-nl-rNL/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -229,22 +227,22 @@ <skip /> <string name="wallpaper_instructions">"Tik op afbeelding om portretachtergrond in te stellen"</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/public.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources><public /></resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout/foo.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <LinearLayout/> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout-ja/foo.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <LinearLayout/> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/TranslationDetectorTest.kt) diff --git a/docs/checks/MissingTvBanner.md.html b/docs/checks/MissingTvBanner.md.html index cd667135..b074d1e3 100644 --- a/docs/checks/MissingTvBanner.md.html +++ b/docs/checks/MissingTvBanner.md.html @@ -47,7 +47,7 @@ tag or each Leanback launcher activity [MissingTvBanner] <application> ----------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -66,7 +66,7 @@ </activity> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AndroidTvDetectorTest.java) diff --git a/docs/checks/MissingVersion.md.html b/docs/checks/MissingVersion.md.html index f9e04dea..94eacdcb 100644 --- a/docs/checks/MissingVersion.md.html +++ b/docs/checks/MissingVersion.md.html @@ -52,7 +52,7 @@ the application version [MissingVersion] <manifest xmlns:android="http://schemas.android.com/apk/res/android" -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -78,10 +78,10 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ManifestDetectorTest.kt) +You can also visit the source code ([ManifestDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ManifestDetectorTest.kt) +[ProjectInitializerTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/ProjectInitializerTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/MissingXmlHeader.md.html b/docs/checks/MissingXmlHeader.md.html index 136c9832..6acfd99a 100644 --- a/docs/checks/MissingXmlHeader.md.html +++ b/docs/checks/MissingXmlHeader.md.html @@ -49,14 +49,14 @@ [MissingXmlHeader] <resources/> ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: `res/values/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources/> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/MissingXmlHeaderDetectorTest.kt) diff --git a/docs/checks/MockLocation.md.html b/docs/checks/MockLocation.md.html index 4e075a68..56826933 100644 --- a/docs/checks/MockLocation.md.html +++ b/docs/checks/MockLocation.md.html @@ -55,7 +55,7 @@ src/debug/AndroidManifest.xml) [MockLocation] <uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" /> ------------------------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -71,7 +71,7 @@ <uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" /> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/debug/AndroidManifest.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -85,7 +85,7 @@ <uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" /> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/AndroidManifest.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -99,7 +99,7 @@ <uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" /> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `build.gradle`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~groovy linenumbers @@ -107,13 +107,13 @@ compileSdkVersion 25 defaultConfig { applicationId "com.android.tools.test" - minSdkVersion 5 + minSdkVersion 14 targetSdkVersion 16 versionCode 2 versionName "MyName" } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ManifestDetectorTest.kt) diff --git a/docs/checks/ModifierFactoryExtensionFunction.md.html b/docs/checks/ModifierFactoryExtensionFunction.md.html index b9456d7c..3955b6e2 100644 --- a/docs/checks/ModifierFactoryExtensionFunction.md.html +++ b/docs/checks/ModifierFactoryExtensionFunction.md.html @@ -69,7 +69,7 @@ [ModifierFactoryExtensionFunction] val fooModifier3: Modifier get() = Modifier ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -92,7 +92,7 @@ } val fooModifier3: Modifier get() = Modifier -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/ModifierDeclarationDetectorTest.kt) @@ -111,17 +111,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui-android:1.9.0-alpha01") +implementation("androidx.compose.ui:ui-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.ui:ui-android:1.9.0-alpha01' +implementation 'androidx.compose.ui:ui-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.ui.android) # libs.versions.toml [versions] -ui-android = "1.9.0-alpha01" +ui-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -133,11 +133,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.ui:ui-lint:1.9.0-alpha01`. +You can also use `androidx.compose.ui:ui-lint:1.11.0-alpha06`. [Additional details about androidx.compose.ui:ui-android](androidx_compose_ui_ui-android.md.html). diff --git a/docs/checks/ModifierFactoryReturnType.md.html b/docs/checks/ModifierFactoryReturnType.md.html index a0e9149c..bd9959ae 100644 --- a/docs/checks/ModifierFactoryReturnType.md.html +++ b/docs/checks/ModifierFactoryReturnType.md.html @@ -51,7 +51,7 @@ [ModifierFactoryReturnType] fun Modifier.fooModifier(): Modifier.Element { ----------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -66,7 +66,7 @@ fun Modifier.fooModifier(): Modifier.Element { return TestModifier } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/ModifierDeclarationDetectorTest.kt) @@ -85,17 +85,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui-android:1.9.0-alpha01") +implementation("androidx.compose.ui:ui-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.ui:ui-android:1.9.0-alpha01' +implementation 'androidx.compose.ui:ui-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.ui.android) # libs.versions.toml [versions] -ui-android = "1.9.0-alpha01" +ui-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -107,11 +107,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.ui:ui-lint:1.9.0-alpha01`. +You can also use `androidx.compose.ui:ui-lint:1.11.0-alpha06`. [Additional details about androidx.compose.ui:ui-android](androidx_compose_ui_ui-android.md.html). diff --git a/docs/checks/ModifierFactoryUnreferencedReceiver.md.html b/docs/checks/ModifierFactoryUnreferencedReceiver.md.html index 687cc0aa..bcf1dba2 100644 --- a/docs/checks/ModifierFactoryUnreferencedReceiver.md.html +++ b/docs/checks/ModifierFactoryUnreferencedReceiver.md.html @@ -58,7 +58,7 @@ [ModifierFactoryUnreferencedReceiver] fun Modifier.fooModifier(): Modifier.Element { ----------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -73,7 +73,7 @@ fun Modifier.fooModifier(): Modifier.Element { return TestModifier } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/ModifierDeclarationDetectorTest.kt) @@ -92,17 +92,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui-android:1.9.0-alpha01") +implementation("androidx.compose.ui:ui-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.ui:ui-android:1.9.0-alpha01' +implementation 'androidx.compose.ui:ui-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.ui.android) # libs.versions.toml [versions] -ui-android = "1.9.0-alpha01" +ui-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -114,11 +114,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.ui:ui-lint:1.9.0-alpha01`. +You can also use `androidx.compose.ui:ui-lint:1.11.0-alpha06`. [Additional details about androidx.compose.ui:ui-android](androidx_compose_ui_ui-android.md.html). diff --git a/docs/checks/ModifierNodeInspectableProperties.md.html b/docs/checks/ModifierNodeInspectableProperties.md.html index 2dc83874..31c79696 100644 --- a/docs/checks/ModifierNodeInspectableProperties.md.html +++ b/docs/checks/ModifierNodeInspectableProperties.md.html @@ -49,7 +49,7 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/test/Element.kt:8:Information: Element does not override +src/test/Element.kt:8:Hint: Element does not override inspectableProperties(). The layout inspector will use the default implementation of this function, which will attempt to read Element's properties reflectively. Override inspectableProperties() if you'd like @@ -57,7 +57,7 @@ [ModifierNodeInspectableProperties] class Element : ModifierNodeElement<Modifier.Node>() { ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -73,7 +73,7 @@ override fun create() = object : Modifier.Node() {} override fun update(node: Modifier.Node) = node } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/ModifierNodeInspectablePropertiesDetectorTest.kt) @@ -92,17 +92,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui-android:1.9.0-alpha01") +implementation("androidx.compose.ui:ui-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.ui:ui-android:1.9.0-alpha01' +implementation 'androidx.compose.ui:ui-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.ui.android) # libs.versions.toml [versions] -ui-android = "1.9.0-alpha01" +ui-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -114,11 +114,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.ui:ui-lint:1.9.0-alpha01`. +You can also use `androidx.compose.ui:ui-lint:1.11.0-alpha06`. [Additional details about androidx.compose.ui:ui-android](androidx_compose_ui_ui-android.md.html). diff --git a/docs/checks/ModifierParameter.md.html b/docs/checks/ModifierParameter.md.html index 5960babe..b93574ab 100644 --- a/docs/checks/ModifierParameter.md.html +++ b/docs/checks/ModifierParameter.md.html @@ -57,7 +57,7 @@ should be named modifier [ModifierParameter] buttonModifier: Modifier = Modifier, -------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -75,7 +75,7 @@ elevation: Float = 5, content: @Composable () -> Unit ) {} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/ModifierParameterDetectorTest.kt) @@ -94,17 +94,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui-android:1.9.0-alpha01") +implementation("androidx.compose.ui:ui-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.ui:ui-android:1.9.0-alpha01' +implementation 'androidx.compose.ui:ui-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.ui.android) # libs.versions.toml [versions] -ui-android = "1.9.0-alpha01" +ui-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -116,11 +116,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.ui:ui-lint:1.9.0-alpha01`. +You can also use `androidx.compose.ui:ui-lint:1.11.0-alpha06`. [Additional details about androidx.compose.ui:ui-android](androidx_compose_ui_ui-android.md.html). diff --git a/docs/checks/ModuleCompanionObjects.md.html b/docs/checks/ModuleCompanionObjects.md.html index e6ed3885..37720f8a 100644 --- a/docs/checks/ModuleCompanionObjects.md.html +++ b/docs/checks/ModuleCompanionObjects.md.html @@ -34,158 +34,10 @@ : Kotlin and Java files and test sources Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/google/dagger/tree/master/java/dagger/lint/DaggerKotlinIssueDetector.kt) -Tests -: [Source Code](https://github.com/google/dagger/tree/master/javatests/dagger/lint/DaggerKotlinIssueDetectorTest.kt) -Copyright Year -: 2020 Companion objects in @Module-annotated classes are considered part of the API. -(##) Example - -Here is an example of lint warnings produced by this check: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/foo/MyQualifier.kt:66:Warning: Module companion objects should not -be annotated with @Module. [ModuleCompanionObjects] - // This should fail because the companion object is part of ClassModule - ^ -src/foo/MyQualifier.kt:78:Warning: Module companion objects should not -be annotated with @Module. [ModuleCompanionObjects] - // This should fail because the companion object is part of ClassModule - ^ -src/foo/MyQualifier.kt:101:Warning: Module companion objects should not -be annotated with @Module. [ModuleCompanionObjects] - // This is should fail because this should be extracted to a standalone object. - ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`src/foo/MyQualifier.kt`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers -package foo -import javax.inject.Inject -import javax.inject.Qualifier -import kotlin.jvm.JvmStatic -import dagger.Provides -import dagger.Module - -@Qualifier -annotation class MyQualifier - -class InjectedTest { - // This should fail because of `:field` - @Inject - @field:MyQualifier - lateinit var prop: String - - // This is fine! - @Inject - @MyQualifier - lateinit var prop2: String -} - -@Module -object ObjectModule { - // This should fail because it uses `@JvmStatic` - @JvmStatic - @Provides - fun provideFoo(): String { - - } - - // This is fine! - @Provides - fun provideBar(): String { - - } -} - -@Module -class ClassModule { - companion object { - // This should fail because the companion object is part of ClassModule, so this is unnecessary. - @JvmStatic - @Provides - fun provideBaz(): String { - - } - } -} - -@Module -class ClassModuleQualified { - companion object { - // This should fail because the companion object is part of ClassModule, so this is unnecessary. - // This specifically tests a fully qualified annotation - @kotlin.jvm.JvmStatic - @Provides - fun provideBaz(): String { - - } - } -} - -@Module -class ClassModule2 { - // This should fail because the companion object is part of ClassModule - @Module - companion object { - @Provides - fun provideBaz(): String { - - } - } -} - -@Module -class ClassModule2Qualified { - // This should fail because the companion object is part of ClassModule - // This specifically tests a fully qualified annotation - @dagger.Module - companion object { - @Provides - fun provideBaz(): String { - - } - } -} - -// This is correct as of Dagger 2.26! -@Module -class ClassModule3 { - companion object { - @Provides - fun provideBaz(): String { - - } - } -} - -class ClassModule4 { - // This is should fail because this should be extracted to a standalone object. - @Module - companion object { - @Provides - fun provideBaz(): String { - - } - } -} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can also visit the -[source code](https://github.com/google/dagger/tree/master/javatests/dagger/lint/DaggerKotlinIssueDetectorTest.kt) -for the unit tests for this check to see additional scenarios. - -The above example was automatically extracted from the first unit test -found for this lint check, `DaggerKotlinIssueDetector.simpleSmokeTestForQualifiersAndProviders`. -To report a problem with this extracted sample, visit -https://github.com/google/dagger/issues. - (##) Including !!! diff --git a/docs/checks/ModuleCompanionObjectsNotInModuleParent.md.html b/docs/checks/ModuleCompanionObjectsNotInModuleParent.md.html index 86ed952a..5bdf5297 100644 --- a/docs/checks/ModuleCompanionObjectsNotInModuleParent.md.html +++ b/docs/checks/ModuleCompanionObjectsNotInModuleParent.md.html @@ -34,12 +34,6 @@ : Kotlin and Java files and test sources Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/google/dagger/tree/master/java/dagger/lint/DaggerKotlinIssueDetector.kt) -Tests -: [Source Code](https://github.com/google/dagger/tree/master/javatests/dagger/lint/DaggerKotlinIssueDetectorTest.kt) -Copyright Year -: 2020 Companion objects in @Module-annotated classes are considered part of the API. This diff --git a/docs/checks/MonochromeLauncherIcon.md.html b/docs/checks/MonochromeLauncherIcon.md.html index 2cff9ecd..cfb2d0fd 100644 --- a/docs/checks/MonochromeLauncherIcon.md.html +++ b/docs/checks/MonochromeLauncherIcon.md.html @@ -29,16 +29,13 @@ Tests : [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/MonochromeLauncherIconDetectorTest.kt) -If `android:roundIcon` and `android:icon` are both in your manifest, you -must either remove the reference to `android:roundIcon` if it is not -needed; or, supply the monochrome icon in the drawable defined by the -`android:roundIcon` and `android:icon` attribute. - -For example, if `android:roundIcon` and `android:icon` are both in the -manifest, a launcher might choose to use `android:roundIcon` over -`android:icon` to display the adaptive app icon. Therefore, your themed -application iconwill not show if your monochrome attribute is not also -specified in `android:roundIcon`. +The system may use the coloring of the user's chosen wallpaper and theme +to tint app icons. Providing a `` layer (which will be used +for tinting) for every adaptive icon is strongly recommended, otherwise +Android 16 QPR 2 and above will simply tint the color version of the +icon, which may look unusual. Devices running earlier Android versions +will (with no monochrome layer) show the untinted color icon for your +app, which will look inconsistent. (##) Example @@ -52,7 +49,7 @@ roundIcon is missing a monochrome tag [MonochromeLauncherIcon] <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -62,7 +59,7 @@ <background android:drawable="@drawable/ic_launcher_background" /> <foreground android:drawable="@drawable/ic_launcher_foreground" /> </adaptive-icon> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/drawable-ldpi/ic_round_icon.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -70,7 +67,7 @@ <background android:drawable="@drawable/ic_launcher_background" /> <foreground android:drawable="@drawable/ic_launcher_foreground" /> </adaptive-icon> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/AndroidManifest.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -81,7 +78,7 @@ android:label="@string/app_name" > </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/MonochromeLauncherIconDetectorTest.kt) diff --git a/docs/checks/MoshiUsageAdaptedByRequiresAdapter.md.html b/docs/checks/MoshiUsageAdaptedByRequiresAdapter.md.html index 774b5275..30d008d9 100644 --- a/docs/checks/MoshiUsageAdaptedByRequiresAdapter.md.html +++ b/docs/checks/MoshiUsageAdaptedByRequiresAdapter.md.html @@ -58,7 +58,7 @@ [MoshiUsageAdaptedByRequiresAdapter] @AdaptedBy(NotAnAdapter::class) val value2: String ------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -81,13 +81,13 @@ class Example3 @JsonClass(generateAdapter = true) -data class Example3( +data class Example4( @AdaptedBy(CustomAdapter::class) val value1: String, @AdaptedBy(NotAnAdapter::class) val value2: String ) @AdaptedBy(CustomAdapterMissingKeep::class) -class Example4 +class Example5 @Keep abstract class CustomFactory : JsonAdapter.Factory @@ -95,7 +95,7 @@ abstract class CustomAdapter : JsonAdapter() class NotAnAdapter abstract class CustomAdapterMissingKeep : JsonAdapter() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageAdaptedByRequiresKeep.md.html b/docs/checks/MoshiUsageAdaptedByRequiresKeep.md.html index c88b0d01..ea2a940f 100644 --- a/docs/checks/MoshiUsageAdaptedByRequiresKeep.md.html +++ b/docs/checks/MoshiUsageAdaptedByRequiresKeep.md.html @@ -52,7 +52,7 @@ must have @Keep. [MoshiUsageAdaptedByRequiresKeep] @AdaptedBy(CustomAdapterMissingKeep::class) ------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -75,13 +75,13 @@ class Example3 @JsonClass(generateAdapter = true) -data class Example3( +data class Example4( @AdaptedBy(CustomAdapter::class) val value1: String, @AdaptedBy(NotAnAdapter::class) val value2: String ) @AdaptedBy(CustomAdapterMissingKeep::class) -class Example4 +class Example5 @Keep abstract class CustomFactory : JsonAdapter.Factory @@ -89,7 +89,7 @@ abstract class CustomAdapter : JsonAdapter() class NotAnAdapter abstract class CustomAdapterMissingKeep : JsonAdapter() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageArray.md.html b/docs/checks/MoshiUsageArray.md.html index 2d03812d..8d1e6c1d 100644 --- a/docs/checks/MoshiUsageArray.md.html +++ b/docs/checks/MoshiUsageArray.md.html @@ -68,7 +68,7 @@ [MoshiUsageArray] val complexArray: Array<List<String>>, ------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -77,7 +77,7 @@ package external class ExternalType -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/external/ExternalTypeAnnotated.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -87,7 +87,7 @@ @JsonClass(generateAdapter = true) data class ExternalTypeAnnotated(val value: String) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/slack/model/Example.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -154,7 +154,7 @@ @JsonClass(generateAdapter = true) data class CustomGenericType(val value: T) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageBlankGenerator.md.html b/docs/checks/MoshiUsageBlankGenerator.md.html index 94b5a8e6..d5ec098c 100644 --- a/docs/checks/MoshiUsageBlankGenerator.md.html +++ b/docs/checks/MoshiUsageBlankGenerator.md.html @@ -52,7 +52,7 @@ values. [MoshiUsageBlankGenerator] @JsonClass(generateAdapter = true, generator = "") -- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -64,7 +64,7 @@ @JsonClass(generateAdapter = true, generator = "") data class Example(val value: String) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageBlankJsonName.md.html b/docs/checks/MoshiUsageBlankJsonName.md.html index 0c573097..7396b0d7 100644 --- a/docs/checks/MoshiUsageBlankJsonName.md.html +++ b/docs/checks/MoshiUsageBlankJsonName.md.html @@ -53,7 +53,7 @@ [MoshiUsageBlankJsonName] data class Example(@Json(name = "") val value: String) -- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -66,7 +66,7 @@ @JsonClass(generateAdapter = true) data class Example(@Json(name = "") val value: String) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageBlankTypeLabel.md.html b/docs/checks/MoshiUsageBlankTypeLabel.md.html index fab1192d..bcfa00c3 100644 --- a/docs/checks/MoshiUsageBlankTypeLabel.md.html +++ b/docs/checks/MoshiUsageBlankTypeLabel.md.html @@ -51,8 +51,8 @@ src/slack/model/BaseType.kt:5:Error: Moshi-sealed requires a type label specified after the 'sealed:' prefix. [MoshiUsageBlankTypeLabel] @JsonClass(generateAdapter = true, generator = "sealed:") - ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + --------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -64,7 +64,7 @@ @JsonClass(generateAdapter = true, generator = "sealed:") sealed class BaseType -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageClassVisibility.md.html b/docs/checks/MoshiUsageClassVisibility.md.html index 2bae1d28..ebca36ad 100644 --- a/docs/checks/MoshiUsageClassVisibility.md.html +++ b/docs/checks/MoshiUsageClassVisibility.md.html @@ -61,7 +61,7 @@ [MoshiUsageClassVisibility] protected data class ProtectedClass(val value: String) --------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -78,7 +78,7 @@ @JsonClass(generateAdapter = true) protected data class ProtectedClass(val value: String) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageDoubleClassAnnotation.md.html b/docs/checks/MoshiUsageDoubleClassAnnotation.md.html index 4d53bd38..7f4933b1 100644 --- a/docs/checks/MoshiUsageDoubleClassAnnotation.md.html +++ b/docs/checks/MoshiUsageDoubleClassAnnotation.md.html @@ -59,7 +59,7 @@ @JsonClass. [MoshiUsageDoubleClassAnnotation] @AdaptedBy(CustomFactory::class) -------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -78,7 +78,7 @@ @Keep abstract class CustomFactory : JsonAdapter.Factory -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageDoubleTypeLabel.md.html b/docs/checks/MoshiUsageDoubleTypeLabel.md.html index 4e40cd58..19008c4d 100644 --- a/docs/checks/MoshiUsageDoubleTypeLabel.md.html +++ b/docs/checks/MoshiUsageDoubleTypeLabel.md.html @@ -59,7 +59,7 @@ @DefaultObject. [MoshiUsageDoubleTypeLabel] @DefaultObject -------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -77,7 +77,7 @@ @TypeLabel(label = "one") @DefaultObject object Default : BaseType() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageDuplicateJsonName.md.html b/docs/checks/MoshiUsageDuplicateJsonName.md.html index ac8c9c94..b3298d34 100644 --- a/docs/checks/MoshiUsageDuplicateJsonName.md.html +++ b/docs/checks/MoshiUsageDuplicateJsonName.md.html @@ -64,7 +64,7 @@ member 'anotherValue2'. [MoshiUsageDuplicateJsonName] @Json(name = "value2") val anotherValue3: String ------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -82,7 +82,7 @@ @Json(name = "value2") val anotherValue2: String, @Json(name = "value2") val anotherValue3: String ) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageEnumPropertyCouldBeMoshi.md.html b/docs/checks/MoshiUsageEnumPropertyCouldBeMoshi.md.html index 8dd678d0..bdb06638 100644 --- a/docs/checks/MoshiUsageEnumPropertyCouldBeMoshi.md.html +++ b/docs/checks/MoshiUsageEnumPropertyCouldBeMoshi.md.html @@ -54,7 +54,7 @@ also use Moshi. [MoshiUsageEnumPropertyCouldBeMoshi] data class Example(val value: TestEnum) -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -70,7 +70,7 @@ enum class TestEnum { VALUE } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageEnumPropertyDefaultUnknown.md.html b/docs/checks/MoshiUsageEnumPropertyDefaultUnknown.md.html index 73573297..6a0de578 100644 --- a/docs/checks/MoshiUsageEnumPropertyDefaultUnknown.md.html +++ b/docs/checks/MoshiUsageEnumPropertyDefaultUnknown.md.html @@ -66,7 +66,7 @@ 'UNKNOWN' for a Moshi enum. [MoshiUsageEnumPropertyDefaultUnknown] val value5: TestEnum = TestEnum.UNKNOWN, ---------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -89,7 +89,7 @@ enum class TestEnum { UNKNOWN, VALUE } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageGenerateAdapterShouldBeTrue.md.html b/docs/checks/MoshiUsageGenerateAdapterShouldBeTrue.md.html index 35a30bf3..dd243d74 100644 --- a/docs/checks/MoshiUsageGenerateAdapterShouldBeTrue.md.html +++ b/docs/checks/MoshiUsageGenerateAdapterShouldBeTrue.md.html @@ -53,7 +53,7 @@ [MoshiUsageGenerateAdapterShouldBeTrue] @JsonClass(generateAdapter = false) ----- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -65,7 +65,7 @@ @JsonClass(generateAdapter = false) data class Example(val value: String) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageGenericSealedSubtype.md.html b/docs/checks/MoshiUsageGenericSealedSubtype.md.html index 5a56edca..86dc1bb4 100644 --- a/docs/checks/MoshiUsageGenericSealedSubtype.md.html +++ b/docs/checks/MoshiUsageGenericSealedSubtype.md.html @@ -53,7 +53,7 @@ moshi-sealed cannot be generic. [MoshiUsageGenericSealedSubtype] data class Subtype<T>(val foo: T) : BaseType<T>() --- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -75,7 +75,7 @@ @TypeLabel(label = "two") @JsonClass(generateAdapter = true) data class SubtypeTwo(val foo: String) : BaseType() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageInappropriateTypeLabel.md.html b/docs/checks/MoshiUsageInappropriateTypeLabel.md.html index 9878a87f..1461f3a3 100644 --- a/docs/checks/MoshiUsageInappropriateTypeLabel.md.html +++ b/docs/checks/MoshiUsageInappropriateTypeLabel.md.html @@ -64,7 +64,7 @@ @DefaultObject annotation. [MoshiUsageInappropriateTypeLabel] @DefaultObject -------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -85,7 +85,7 @@ @DefaultObject object Default -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageMissingPrimary.md.html b/docs/checks/MoshiUsageMissingPrimary.md.html index a0210d83..b19b373b 100644 --- a/docs/checks/MoshiUsageMissingPrimary.md.html +++ b/docs/checks/MoshiUsageMissingPrimary.md.html @@ -54,7 +54,7 @@ a primary constructor or be sealed. [MoshiUsageMissingPrimary] class Example ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -66,7 +66,7 @@ @JsonClass(generateAdapter = true) class Example -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageMissingTypeLabel.md.html b/docs/checks/MoshiUsageMissingTypeLabel.md.html index 34899556..355b0a5e 100644 --- a/docs/checks/MoshiUsageMissingTypeLabel.md.html +++ b/docs/checks/MoshiUsageMissingTypeLabel.md.html @@ -58,7 +58,7 @@ [MoshiUsageMissingTypeLabel] object ObjectSubType : BaseType() ------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -75,7 +75,7 @@ data class Subtype(val foo: String) : BaseType() object ObjectSubType : BaseType() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageMutableCollections.md.html b/docs/checks/MoshiUsageMutableCollections.md.html index cd57d683..f26df019 100644 --- a/docs/checks/MoshiUsageMutableCollections.md.html +++ b/docs/checks/MoshiUsageMutableCollections.md.html @@ -65,7 +65,7 @@ than mutable versions. [MoshiUsageMutableCollections] val mutableMap: MutableMap<String, String> -------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -74,7 +74,7 @@ package external class ExternalType -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/external/ExternalTypeAnnotated.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -84,7 +84,7 @@ @JsonClass(generateAdapter = true) data class ExternalTypeAnnotated(val value: String) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/slack/model/Example.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -151,7 +151,7 @@ @JsonClass(generateAdapter = true) data class CustomGenericType(val value: T) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageNonMoshiClassCollection.md.html b/docs/checks/MoshiUsageNonMoshiClassCollection.md.html index a046009c..db926cf9 100644 --- a/docs/checks/MoshiUsageNonMoshiClassCollection.md.html +++ b/docs/checks/MoshiUsageNonMoshiClassCollection.md.html @@ -51,17 +51,15 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/slack/model/Example.kt:25:Information: Concrete Collection type -'ArrayList' is not natively supported by Moshi. -[MoshiUsageNonMoshiClassCollection] +src/slack/model/Example.kt:25:Hint: Concrete Collection type 'ArrayList' +is not natively supported by Moshi. [MoshiUsageNonMoshiClassCollection] val concreteList: ArrayList<Int>, -------------- -src/slack/model/Example.kt:26:Information: Concrete Collection type -'HashSet' is not natively supported by Moshi. -[MoshiUsageNonMoshiClassCollection] +src/slack/model/Example.kt:26:Hint: Concrete Collection type 'HashSet' +is not natively supported by Moshi. [MoshiUsageNonMoshiClassCollection] val concreteSet: HashSet<Int>, ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -70,7 +68,7 @@ package external class ExternalType -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/external/ExternalTypeAnnotated.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -80,7 +78,7 @@ @JsonClass(generateAdapter = true) data class ExternalTypeAnnotated(val value: String) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/slack/model/Example.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -147,7 +145,7 @@ @JsonClass(generateAdapter = true) data class CustomGenericType(val value: T) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageNonMoshiClassExternal.md.html b/docs/checks/MoshiUsageNonMoshiClassExternal.md.html index f9b3bee4..1a80a437 100644 --- a/docs/checks/MoshiUsageNonMoshiClassExternal.md.html +++ b/docs/checks/MoshiUsageNonMoshiClassExternal.md.html @@ -69,7 +69,7 @@ natively supported by Moshi. [MoshiUsageNonMoshiClassExternal] val badNestedGeneric: CustomGenericType<List<ExternalType>>, ------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -78,7 +78,7 @@ package external class ExternalType -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/external/ExternalTypeAnnotated.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -88,7 +88,7 @@ @JsonClass(generateAdapter = true) data class ExternalTypeAnnotated(val value: String) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/slack/model/Example.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -155,7 +155,7 @@ @JsonClass(generateAdapter = true) data class CustomGenericType(val value: T) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageNonMoshiClassInternal.md.html b/docs/checks/MoshiUsageNonMoshiClassInternal.md.html index 57000e93..c8272c73 100644 --- a/docs/checks/MoshiUsageNonMoshiClassInternal.md.html +++ b/docs/checks/MoshiUsageNonMoshiClassInternal.md.html @@ -50,12 +50,12 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/slack/model/Example.kt:35:Information: Non-Moshi internal type +src/slack/model/Example.kt:35:Hint: Non-Moshi internal type 'InternalType' is not natively supported by Moshi. [MoshiUsageNonMoshiClassInternal] val internalType: InternalType, ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -64,7 +64,7 @@ package external class ExternalType -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/external/ExternalTypeAnnotated.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -74,7 +74,7 @@ @JsonClass(generateAdapter = true) data class ExternalTypeAnnotated(val value: String) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/slack/model/Example.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -141,7 +141,7 @@ @JsonClass(generateAdapter = true) data class CustomGenericType(val value: T) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageNonMoshiClassMap.md.html b/docs/checks/MoshiUsageNonMoshiClassMap.md.html index 674ffb5f..a15b9840 100644 --- a/docs/checks/MoshiUsageNonMoshiClassMap.md.html +++ b/docs/checks/MoshiUsageNonMoshiClassMap.md.html @@ -50,11 +50,11 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/slack/model/Example.kt:27:Information: Concrete Map type 'HashMap' -is not natively supported by Moshi. [MoshiUsageNonMoshiClassMap] +src/slack/model/Example.kt:27:Hint: Concrete Map type 'HashMap' is not +natively supported by Moshi. [MoshiUsageNonMoshiClassMap] val concreteMap: HashMap<String, String>, ----------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -63,7 +63,7 @@ package external class ExternalType -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/external/ExternalTypeAnnotated.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -73,7 +73,7 @@ @JsonClass(generateAdapter = true) data class ExternalTypeAnnotated(val value: String) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/slack/model/Example.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -140,7 +140,7 @@ @JsonClass(generateAdapter = true) data class CustomGenericType(val value: T) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageNonMoshiClassPlatform.md.html b/docs/checks/MoshiUsageNonMoshiClassPlatform.md.html index 7cfca1dd..b6f395b2 100644 --- a/docs/checks/MoshiUsageNonMoshiClassPlatform.md.html +++ b/docs/checks/MoshiUsageNonMoshiClassPlatform.md.html @@ -56,7 +56,7 @@ natively supported by Moshi. [MoshiUsageNonMoshiClassPlatform] val platformType: Date, ---- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -65,7 +65,7 @@ package external class ExternalType -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/external/ExternalTypeAnnotated.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -75,7 +75,7 @@ @JsonClass(generateAdapter = true) data class ExternalTypeAnnotated(val value: String) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/slack/model/Example.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -142,7 +142,7 @@ @JsonClass(generateAdapter = true) data class CustomGenericType(val value: T) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageObject.md.html b/docs/checks/MoshiUsageObject.md.html index 263daa3d..f4d389fc 100644 --- a/docs/checks/MoshiUsageObject.md.html +++ b/docs/checks/MoshiUsageObject.md.html @@ -57,7 +57,7 @@ with @JsonClass. [MoshiUsageObject] @JsonClass(generateAdapter = true) ---------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -69,7 +69,7 @@ @JsonClass(generateAdapter = true) object Example -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageParamNeedsInit.md.html b/docs/checks/MoshiUsageParamNeedsInit.md.html index 31f60e5f..9ecd48fa 100644 --- a/docs/checks/MoshiUsageParamNeedsInit.md.html +++ b/docs/checks/MoshiUsageParamNeedsInit.md.html @@ -53,7 +53,7 @@ in Moshi classes must have default values. [MoshiUsageParamNeedsInit] class Example(val value: String, nonProp: String, @Transient val transientProp: String) --------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -66,7 +66,7 @@ @JsonClass(generateAdapter = true) class Example(val value: String, nonProp: String, @Transient val transientProp: String) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsagePrivateConstructor.md.html b/docs/checks/MoshiUsagePrivateConstructor.md.html index ddc0458b..debb365b 100644 --- a/docs/checks/MoshiUsagePrivateConstructor.md.html +++ b/docs/checks/MoshiUsagePrivateConstructor.md.html @@ -59,7 +59,7 @@ be private. [MoshiUsagePrivateConstructor] data class Example2 protected constructor(val value: String) --------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -74,7 +74,7 @@ @JsonClass(generateAdapter = true) data class Example2 protected constructor(val value: String) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsagePrivateConstructorProperty.md.html b/docs/checks/MoshiUsagePrivateConstructorProperty.md.html index 63306831..01d57083 100644 --- a/docs/checks/MoshiUsagePrivateConstructorProperty.md.html +++ b/docs/checks/MoshiUsagePrivateConstructorProperty.md.html @@ -55,7 +55,7 @@ Moshi classes cannot be private. [MoshiUsagePrivateConstructorProperty] data class Example(private val value: String, protected val value2: String) --------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -67,7 +67,7 @@ @JsonClass(generateAdapter = true) data class Example(private val value: String, protected val value2: String) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageQualifierRetention.md.html b/docs/checks/MoshiUsageQualifierRetention.md.html index 14619c07..ccc91576 100644 --- a/docs/checks/MoshiUsageQualifierRetention.md.html +++ b/docs/checks/MoshiUsageQualifierRetention.md.html @@ -54,7 +54,7 @@ RUNTIME retention. [MoshiUsageQualifierRetention] @Retention(AnnotationRetention.BINARY) -------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -99,7 +99,7 @@ @Retention(AnnotationRetention.BINARY) @JsonQualifier annotation class WrongRetention -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageQualifierTarget.md.html b/docs/checks/MoshiUsageQualifierTarget.md.html index 6ea5bb99..f256d1cb 100644 --- a/docs/checks/MoshiUsageQualifierTarget.md.html +++ b/docs/checks/MoshiUsageQualifierTarget.md.html @@ -53,7 +53,7 @@ include FIELD targeting. [MoshiUsageQualifierTarget] @Target(PROPERTY) ----------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -98,7 +98,7 @@ @Retention(AnnotationRetention.BINARY) @JsonQualifier annotation class WrongRetention -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageRedundantJsonName.md.html b/docs/checks/MoshiUsageRedundantJsonName.md.html index a1ca2695..365c6e71 100644 --- a/docs/checks/MoshiUsageRedundantJsonName.md.html +++ b/docs/checks/MoshiUsageRedundantJsonName.md.html @@ -56,8 +56,8 @@ the property/enum member name is redundant. [MoshiUsageRedundantJsonName] data class Example(@Json(name = "value") val value: String) - ----- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -70,7 +70,7 @@ @JsonClass(generateAdapter = true) data class Example(@Json(name = "value") val value: String) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageRedundantSiteTarget.md.html b/docs/checks/MoshiUsageRedundantSiteTarget.md.html index e6754c38..b685d1af 100644 --- a/docs/checks/MoshiUsageRedundantSiteTarget.md.html +++ b/docs/checks/MoshiUsageRedundantSiteTarget.md.html @@ -55,7 +55,7 @@ redundant. [MoshiUsageRedundantSiteTarget] @field:Json(name = "foo") val value: String ----- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -70,7 +70,7 @@ data class Example( @field:Json(name = "foo") val value: String ) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageSealedMustBeSealed.md.html b/docs/checks/MoshiUsageSealedMustBeSealed.md.html index 8b21cd72..f937e621 100644 --- a/docs/checks/MoshiUsageSealedMustBeSealed.md.html +++ b/docs/checks/MoshiUsageSealedMustBeSealed.md.html @@ -51,7 +51,7 @@ 'sealed' types. [MoshiUsageSealedMustBeSealed] abstract class BaseType -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -63,7 +63,7 @@ @JsonClass(generateAdapter = true, generator = "sealed:type") abstract class BaseType -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageSerializedName.md.html b/docs/checks/MoshiUsageSerializedName.md.html index 33b21834..085c186c 100644 --- a/docs/checks/MoshiUsageSerializedName.md.html +++ b/docs/checks/MoshiUsageSerializedName.md.html @@ -72,7 +72,7 @@ Gson's @SerializedName. [MoshiUsageSerializedName] @Json(name = "mixed_alts") @SerializedName("mixed_alts", alternate = ["foo"]) val mixedAlternates: String, -------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -94,7 +94,7 @@ @Json(name = "mixed_diff") @SerializedName("mixed_diff_2") val mixedDiff: String, @Json(name = "mixed_alts") @SerializedName("mixed_alts", alternate = ["foo"]) val mixedAlternates: String, ) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageSnakeCase.md.html b/docs/checks/MoshiUsageSnakeCase.md.html index 0a9cfa3f..37dc93b7 100644 --- a/docs/checks/MoshiUsageSnakeCase.md.html +++ b/docs/checks/MoshiUsageSnakeCase.md.html @@ -56,7 +56,7 @@ rather than direct snake casing. [MoshiUsageSnakeCase] val snake_case: String, ---------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -72,7 +72,7 @@ val snake_case: String, @Json(name = "taken") val already_annotated_is_ignored: String ) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageTransientNeedsInit.md.html b/docs/checks/MoshiUsageTransientNeedsInit.md.html index 0dd8cac6..3c5f29f8 100644 --- a/docs/checks/MoshiUsageTransientNeedsInit.md.html +++ b/docs/checks/MoshiUsageTransientNeedsInit.md.html @@ -53,7 +53,7 @@ must have default values. [MoshiUsageTransientNeedsInit] class Example(val value: String, nonProp: String, @Transient val transientProp: String) ------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -66,7 +66,7 @@ @JsonClass(generateAdapter = true) class Example(val value: String, nonProp: String, @Transient val transientProp: String) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageUnsupportedType.md.html b/docs/checks/MoshiUsageUnsupportedType.md.html index 9adb548e..5c953ab3 100644 --- a/docs/checks/MoshiUsageUnsupportedType.md.html +++ b/docs/checks/MoshiUsageUnsupportedType.md.html @@ -68,7 +68,7 @@ @JsonClass. [MoshiUsageUnsupportedType] @JsonClass(generateAdapter = true) ---------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -90,8 +90,11 @@ @JsonClass(generateAdapter = true) interface UnsupportedInterface + + @JsonClass(generateAdapter = false) + interface UnsupportedInterfaceButGenerateAdapterIsFalseIsOk } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageUseData.md.html b/docs/checks/MoshiUsageUseData.md.html index c8531a69..0295b8ec 100644 --- a/docs/checks/MoshiUsageUseData.md.html +++ b/docs/checks/MoshiUsageUseData.md.html @@ -55,7 +55,7 @@ data classes. [MoshiUsageUseData] class Example(val value: String, nonProp: String, @Transient val transientProp: String) ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -68,7 +68,7 @@ @JsonClass(generateAdapter = true) class Example(val value: String, nonProp: String, @Transient val transientProp: String) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MoshiUsageVarProperty.md.html b/docs/checks/MoshiUsageVarProperty.md.html index 0fbc2939..90411d31 100644 --- a/docs/checks/MoshiUsageVarProperty.md.html +++ b/docs/checks/MoshiUsageVarProperty.md.html @@ -56,7 +56,7 @@ immutable. [MoshiUsageVarProperty] data class Example(var value: String) --- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -68,7 +68,7 @@ @JsonClass(generateAdapter = true) data class Example(var value: String) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MoshiUsageDetectorTest.kt) diff --git a/docs/checks/MotionLayoutInvalidSceneFileReference.md.html b/docs/checks/MotionLayoutInvalidSceneFileReference.md.html index 46d9f168..b7fbb555 100644 --- a/docs/checks/MotionLayoutInvalidSceneFileReference.md.html +++ b/docs/checks/MotionLayoutInvalidSceneFileReference.md.html @@ -44,7 +44,7 @@ @xml/motion_scene doesn't exist [MotionLayoutInvalidSceneFileReference] app:layoutDescription="@xml/motion_scene" ----------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -58,7 +58,7 @@ android:layout_width="match_parent" android:layout_height="match_parent"> </androidx.constraintlayout.motion.widget.MotionLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/MotionLayoutDetectorTest.kt) diff --git a/docs/checks/MotionLayoutMissingId.md.html b/docs/checks/MotionLayoutMissingId.md.html index 5af48547..9229a895 100644 --- a/docs/checks/MotionLayoutMissingId.md.html +++ b/docs/checks/MotionLayoutMissingId.md.html @@ -42,14 +42,14 @@ android:id attribute [MotionLayoutMissingId] <View ---- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: `res/xml/motion_scene.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <MotionScene/> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout/motion_test.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -68,7 +68,7 @@ android:text="Button" /> </androidx.constraintlayout.motion.widget.MotionLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/MotionLayoutIdDetectorTest.kt) diff --git a/docs/checks/MotionSceneFileValidationError.md.html b/docs/checks/MotionSceneFileValidationError.md.html index edd40473..3667ffdf 100644 --- a/docs/checks/MotionSceneFileValidationError.md.html +++ b/docs/checks/MotionSceneFileValidationError.md.html @@ -44,7 +44,7 @@ be defined [MotionSceneFileValidationError] <CustomAttribute app:customPixelDimension="2sp"/> --------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -60,7 +60,7 @@ </Constraint> </ConstraintSet> </MotionScene> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/MotionSceneDetectorTest.kt) diff --git a/docs/checks/MultipleAwaitPointerEventScopes.md.html b/docs/checks/MultipleAwaitPointerEventScopes.md.html index 0fb1decd..b6e3132f 100644 --- a/docs/checks/MultipleAwaitPointerEventScopes.md.html +++ b/docs/checks/MultipleAwaitPointerEventScopes.md.html @@ -53,17 +53,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui-android:1.9.0-alpha01") +implementation("androidx.compose.ui:ui-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.ui:ui-android:1.9.0-alpha01' +implementation 'androidx.compose.ui:ui-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.ui.android) # libs.versions.toml [versions] -ui-android = "1.9.0-alpha01" +ui-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -75,11 +75,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.ui:ui-lint:1.9.0-alpha01`. +You can also use `androidx.compose.ui:ui-lint:1.11.0-alpha06`. [Additional details about androidx.compose.ui:ui-android](androidx_compose_ui_ui-android.md.html). diff --git a/docs/checks/MultipleUsesSdk.md.html b/docs/checks/MultipleUsesSdk.md.html index b3472055..e1d406e2 100644 --- a/docs/checks/MultipleUsesSdk.md.html +++ b/docs/checks/MultipleUsesSdk.md.html @@ -49,7 +49,7 @@ element in the manifest: merge these together [MultipleUsesSdk] <uses-sdk android:targetSdkVersion="14" /> -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -79,7 +79,7 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -112,11 +112,10 @@ <!-- Wallpaper --> <string name="wallpaper_instructions">Tap picture to set portrait wallpaper</string> </resources> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ManifestDetectorTest.kt) +You can also visit the source code ([ManifestDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ManifestDetectorTest.kt) +[ConfigurationHierarchyTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/client/api/ConfigurationHierarchyTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/MustBeInModule.md.html b/docs/checks/MustBeInModule.md.html index 1769eba3..9ae3aaa3 100644 --- a/docs/checks/MustBeInModule.md.html +++ b/docs/checks/MustBeInModule.md.html @@ -63,7 +63,7 @@ modules [MustBeInModule] @Provides fun invalidBind(): Int = 3 ------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -107,7 +107,7 @@ @Provides fun validBind(): Int = 3 } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/DaggerIssuesDetectorTest.kt) diff --git a/docs/checks/MustUseNamedParams.md.html b/docs/checks/MustUseNamedParams.md.html index 600e805a..759bc643 100644 --- a/docs/checks/MustUseNamedParams.md.html +++ b/docs/checks/MustUseNamedParams.md.html @@ -52,7 +52,7 @@ methods must name all parameters. [MustUseNamedParams] methodWithAnnotation("Zac") --------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -80,7 +80,7 @@ methodWithoutAnnotation(name = "Sean2") } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/MustUseNamedParamsDetectorTest.kt) diff --git a/docs/checks/MutableCollectionMutableState.md.html b/docs/checks/MutableCollectionMutableState.md.html index be4fa6a4..fa88836a 100644 --- a/docs/checks/MutableCollectionMutableState.md.html +++ b/docs/checks/MutableCollectionMutableState.md.html @@ -91,7 +91,7 @@ mutable collection type [MutableCollectionMutableState] val collectionProperty = mutableStateOf(collectionParam) -------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -128,7 +128,7 @@ val mapParameter = mutableStateOf(mapParam) val collectionProperty = mutableStateOf(collectionParam) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/MutableCollectionMutableStateDetectorTest.kt) @@ -147,17 +147,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime-android:1.9.0-alpha01") +implementation("androidx.compose.runtime:runtime-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.runtime:runtime-android:1.9.0-alpha01' +implementation 'androidx.compose.runtime:runtime-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.runtime.android) # libs.versions.toml [versions] -runtime-android = "1.9.0-alpha01" +runtime-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -169,11 +169,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.runtime:runtime-lint:1.9.0-alpha01`. +You can also use `androidx.compose.runtime:runtime-lint:1.11.0-alpha06`. [Additional details about androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html). diff --git a/docs/checks/MutableImplicitPendingIntent.md.html b/docs/checks/MutableImplicitPendingIntent.md.html index fa902c5e..aef0eb19 100644 --- a/docs/checks/MutableImplicitPendingIntent.md.html +++ b/docs/checks/MutableImplicitPendingIntent.md.html @@ -100,7 +100,7 @@ within explicit [MutableImplicitPendingIntent] PendingIntent.getActivities(null, 0, listOf(Intent(), mIntent), PendingIntent.FLAG_MUTABLE) ------------------------------------------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -122,7 +122,7 @@ PendingIntent.getActivities(null, 0, { new Intent(), mIntent }, PendingIntent.FLAG_MUTABLE); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/PendingIntentKotlinTest.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -142,7 +142,7 @@ PendingIntent.getActivities(null, 0, listOf(Intent(), mIntent), PendingIntent.FLAG_MUTABLE) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PendingIntentMutableImplicitDetectorTest.kt) diff --git a/docs/checks/MutatingSharedPrefs.md.html b/docs/checks/MutatingSharedPrefs.md.html index 183537f3..4e6c9b84 100644 --- a/docs/checks/MutatingSharedPrefs.md.html +++ b/docs/checks/MutatingSharedPrefs.md.html @@ -48,7 +48,7 @@ SharedPreferences.getStringSet()` [MutatingSharedPrefs] s.add("error") -------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -70,7 +70,7 @@ val t = mutableSetOf() t.add("ok") } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/SharedPrefsDetectorTest.kt) diff --git a/docs/checks/NamespaceTypo.md.html b/docs/checks/NamespaceTypo.md.html index d8c90dda..142d9c38 100644 --- a/docs/checks/NamespaceTypo.md.html +++ b/docs/checks/NamespaceTypo.md.html @@ -49,7 +49,7 @@ expected http://schemas.android.com/apk/res/android [NamespaceTypo] <LinearLayout xmlns:android="http://schemas.android.com/apk/res/andriod" ------------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -79,10 +79,10 @@ android:text="Button" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/NamespaceDetectorTest.kt) +You can also visit the source code ([NamespaceDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/NamespaceDetectorTest.kt) +[SuppressibleTestModeTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/infrastructure/SuppressibleTestModeTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/NamingPattern.md.html b/docs/checks/NamingPattern.md.html index fc0101f0..062ddb6f 100644 --- a/docs/checks/NamingPattern.md.html +++ b/docs/checks/NamingPattern.md.html @@ -48,7 +48,7 @@ case [NamingPattern] String iOSVersion; ---------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -61,7 +61,7 @@ String iOSVersion; } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/NamingPatternDetectorTest.kt) diff --git a/docs/checks/NegativeMargin.md.html b/docs/checks/NegativeMargin.md.html index 927f1423..8c23ab00 100644 --- a/docs/checks/NegativeMargin.md.html +++ b/docs/checks/NegativeMargin.md.html @@ -48,7 +48,7 @@ negative [NegativeMargin] <TextView android:layout_marginTop="-1dp"/> <!-- WARNING --> ------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -71,7 +71,7 @@ <TextView android:layout_marginTop="-1dp" tools:ignore="NegativeMargin"/> <!-- SUPPRESSED --> </GridLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/NegativeMarginDetectorTest.kt) diff --git a/docs/checks/NestedScrolling.md.html b/docs/checks/NestedScrolling.md.html index b1ae05de..ee0ad27d 100644 --- a/docs/checks/NestedScrolling.md.html +++ b/docs/checks/NestedScrolling.md.html @@ -43,7 +43,7 @@ [NestedScrolling] <ListView -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -66,7 +66,7 @@ </LinearLayout> </ScrollView> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/NestedScrollingWidgetDetectorTest.kt) diff --git a/docs/checks/NestedWeights.md.html b/docs/checks/NestedWeights.md.html index 78b32772..36b4b7b5 100644 --- a/docs/checks/NestedWeights.md.html +++ b/docs/checks/NestedWeights.md.html @@ -44,7 +44,7 @@ performance [NestedWeights] android:layout_weight="1" ------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -90,7 +90,7 @@ </FrameLayout> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/InefficientWeightDetectorTest.java) diff --git a/docs/checks/NetworkSecurityConfig.md.html b/docs/checks/NetworkSecurityConfig.md.html index 3c2d6512..4cb95d78 100644 --- a/docs/checks/NetworkSecurityConfig.md.html +++ b/docs/checks/NetworkSecurityConfig.md.html @@ -56,7 +56,7 @@ [NetworkSecurityConfig] <domain-config> ------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -76,7 +76,7 @@ <domain-config> </domain-config> </network-security-config> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/NetworkSecurityConfigDetectorTest.java) diff --git a/docs/checks/NewApi.md.html b/docs/checks/NewApi.md.html index ae38be06..8452f778 100644 --- a/docs/checks/NewApi.md.html +++ b/docs/checks/NewApi.md.html @@ -67,7 +67,7 @@ android.net.ConnectivityManager#getActiveNetwork [NewApi] val network = cm.activeNetwork // Error: Requires API 23 ------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -78,7 +78,7 @@ android:minSdkVersion="21" android:targetSdkVersion="30" /> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -92,10 +92,16 @@ val network2 = cm.activeNetwork // OK } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ApiDetectorTest.java) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the source code ([ApiDetectorTest.java](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ApiDetectorTest.java) +[ApiDetectorDesugaringTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ApiDetectorDesugaringTest.kt) +[FlaggedApiDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/optional/FlaggedApiDetectorTest.kt) +[ApiDetectorProvisionalTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ApiDetectorProvisionalTest.kt) +[ProjectInitializerTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/ProjectInitializerTest.kt) +[VersionChecksTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/detector/api/VersionChecksTest.kt) +[MainTest.java](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/MainTest.java) +[ConfigurationHierarchyTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/client/api/ConfigurationHierarchyTest.kt) for the unit tests for this check to see additional scenarios. (##) Suppressing diff --git a/docs/checks/NewerVersionAvailable.md.html b/docs/checks/NewerVersionAvailable.md.html index b4c3c65e..5f47ccfd 100644 --- a/docs/checks/NewerVersionAvailable.md.html +++ b/docs/checks/NewerVersionAvailable.md.html @@ -55,7 +55,7 @@ [NewerVersionAvailable] gradlePlugins-dependency-analysis = "1.0.0" ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -92,7 +92,7 @@ android-application3 = { id = "com.android.application", version.ref = "gradlePlugins-agp-dev" } crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "gradlePlugins-crashlytics" } dependency-analysis = { id = "com.autonomousapps.dependency-analysis", version.ref = "gradlePlugins-dependency-analysis" } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/NfcTechWhitespace.md.html b/docs/checks/NfcTechWhitespace.md.html index 5702ed70..22239514 100644 --- a/docs/checks/NfcTechWhitespace.md.html +++ b/docs/checks/NfcTechWhitespace.md.html @@ -58,7 +58,7 @@ whitespace inside elements [NfcTechWhitespace] android.nfc.tech.ndefformatable ------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -86,10 +86,10 @@ </tech-list> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/NfcTechListDetectorTest.kt) +You can also visit the source code ([NfcTechListDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/NfcTechListDetectorTest.kt) +[SuppressibleTestModeTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/infrastructure/SuppressibleTestModeTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/NoCollectCallFound.md.html b/docs/checks/NoCollectCallFound.md.html index 9a993b7c..e4342a12 100644 --- a/docs/checks/NoCollectCallFound.md.html +++ b/docs/checks/NoCollectCallFound.md.html @@ -77,7 +77,7 @@ progress [NoCollectCallFound] PredictiveBackHandler { progress -> } -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -123,7 +123,7 @@ PredictiveBackHandler { progress -> } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/activity/activity-compose-lint/src/test/java/androidx/activity/compose/lint/CollectProgressDetectorTest.kt) @@ -142,17 +142,17 @@ ``` // build.gradle.kts -implementation("androidx.activity:activity-compose:1.11.0-rc01") +implementation("androidx.activity:activity-compose:1.13.0-rc01") // build.gradle -implementation 'androidx.activity:activity-compose:1.11.0-rc01' +implementation 'androidx.activity:activity-compose:1.13.0-rc01' // build.gradle.kts with version catalogs: implementation(libs.activity.compose) # libs.versions.toml [versions] -activity-compose = "1.11.0-rc01" +activity-compose = "1.13.0-rc01" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -164,7 +164,7 @@ } ``` -1.11.0-rc01 is the version this documentation was generated from; +1.13.0-rc01 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.activity:activity-compose](androidx_activity_activity-compose.md.html). diff --git a/docs/checks/NoHardKeywords.md.html b/docs/checks/NoHardKeywords.md.html index 0568c8f6..f596310b 100644 --- a/docs/checks/NoHardKeywords.md.html +++ b/docs/checks/NoHardKeywords.md.html @@ -59,7 +59,7 @@ [NoHardKeywords] public Object object = null; ------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -73,7 +73,7 @@ public void foo(int fun, int internalName) { } public Object object = null; } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/Keywords.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -90,7 +90,7 @@ return super.object(); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/InteroperabilityDetectorTest.kt) diff --git a/docs/checks/NoOp.md.html b/docs/checks/NoOp.md.html index 4fd3e77e..c91ee01a 100644 --- a/docs/checks/NoOp.md.html +++ b/docs/checks/NoOp.md.html @@ -55,7 +55,7 @@ <option name="pure-getters" value="false" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (##) Example @@ -70,7 +70,7 @@ src/Test.kt:5:Warning: This reference is unused: length [NoOp] s.length // ERROR 3 ------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -83,7 +83,7 @@ s.length // ERROR 3 } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/NoOpDetectorTest.kt) diff --git a/docs/checks/NonConstantResourceId.md.html b/docs/checks/NonConstantResourceId.md.html index 0229b578..f404fc22 100644 --- a/docs/checks/NonConstantResourceId.md.html +++ b/docs/checks/NonConstantResourceId.md.html @@ -50,7 +50,7 @@ switch case statements [NonConstantResourceId] case R.id.text: someValue = 3; break; --------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -80,7 +80,7 @@ } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/NonConstantResourceIdDetectorTest.kt) diff --git a/docs/checks/NonObservableLocale.md.html b/docs/checks/NonObservableLocale.md.html new file mode 100644 index 00000000..710fc673 --- /dev/null +++ b/docs/checks/NonObservableLocale.md.html @@ -0,0 +1,194 @@ + +(#) Reading locale in a non-observable way in a composable function + +!!! ERROR: Reading locale in a non-observable way in a composable function + This is an error. + +Id +: `NonObservableLocale` +Summary +: Reading locale in a non-observable way in a composable function +Severity +: Error +Category +: Correctness +Platform +: Any +Vendor +: Jetpack Compose +Identifier +: androidx.compose.ui +Feedback +: https://issuetracker.google.com/issues/new?component=612128 +Min +: Lint 8.7+ +Compiled +: Lint 8.7+ +Artifact +: [androidx.compose.ui:ui-android](androidx_compose_ui_ui-android.md.html) +Since +: 1.11.0-alpha03 +Affects +: Kotlin and Java files and test sources +Editing +: This check runs on the fly in the IDE editor +Implementation +: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/ui/ui-lint/src/main/java/androidx/compose/ui/lint/NonObservableLocaleDetector.kt) +Tests +: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/NonObservableLocaleDetectorTest.kt) +Copyright Year +: 2025 + +Calling `java.util.Locale.getDefault()`, +`android.os.LocaleList.getAdjustedDefault()` or +`androidx.core.os.LocaleListCompat.getAdjustedDefault()` within a +composable function is not recommended. Calling these functions does not +read observable state and will not be updated if the user changes the +locale. This can lead to subtle bugs in your UI where the wrong locale +is used for formatting dates, times, numbers, and other locale-sensitive +information. To fix this, you should use +`androidx.compose.ui.platform.LocalLocale.current.platformLocale` +instead. This will ensure that your UI is always up-to-date with the +current locale. + +!!! Tip + This lint check has an associated quickfix available in the IDE. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/test/test.kt:9:Error: Reading locale in a non-observable way in a +composable function [NonObservableLocale] + val locale = Locale.getDefault() + ------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/test/test.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package test + +import androidx.compose.runtime.Composable +import java.util.Locale + +@Composable +fun MyComposable() { + val locale = Locale.getDefault() +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/NonObservableLocaleDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `NonObservableLocaleDetector.testJavaLocale_inComposable_showsWarning`. +To report a problem with this extracted sample, visit +https://issuetracker.google.com/issues/new?component=612128. + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("androidx.compose.ui:ui-android:1.11.0-alpha06") + +// build.gradle +implementation 'androidx.compose.ui:ui-android:1.11.0-alpha06' + +// build.gradle.kts with version catalogs: +implementation(libs.ui.android) + +# libs.versions.toml +[versions] +ui-android = "1.11.0-alpha06" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +ui-android = { + module = "androidx.compose.ui:ui-android", + version.ref = "ui-android" +} +``` + +1.11.0-alpha06 is the version this documentation was generated from; +there may be newer versions available. + +NOTE: These lint checks are **also** made available separate from the main library. +You can also use `androidx.compose.ui:ui-lint:1.11.0-alpha06`. + + +[Additional details about androidx.compose.ui:ui-android](androidx_compose_ui_ui-android.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Using a suppression annotation like this on the enclosing + element: + + ```kt + // Kotlin + @Suppress("NonObservableLocale") + fun method() { + problematicStatement() + } + ``` + + or + + ```java + // Java + @SuppressWarnings("NonObservableLocale") + void method() { + problematicStatement(); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection NonObservableLocale + problematicStatement() + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="NonObservableLocale" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'NonObservableLocale' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore NonObservableLocale ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/NonResizeableActivity.md.html b/docs/checks/NonResizeableActivity.md.html index fe6c5980..6ca2e9da 100644 --- a/docs/checks/NonResizeableActivity.md.html +++ b/docs/checks/NonResizeableActivity.md.html @@ -52,7 +52,7 @@ screen devices. [NonResizeableActivity] <activity android:name=".MainActivity" android:resizeableActivity="false"/> ---------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -65,7 +65,7 @@ <activity android:name=".MainActivity" android:resizeableActivity="false"/> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ChromeOsDetectorTest.java) diff --git a/docs/checks/NotConstructor.md.html b/docs/checks/NotConstructor.md.html index fe1e4178..d6e53f15 100644 --- a/docs/checks/NotConstructor.md.html +++ b/docs/checks/NotConstructor.md.html @@ -40,7 +40,7 @@ constructor but is a normal method [NotConstructor] public PnrUtils PnrUtils() { ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -53,7 +53,7 @@ return this; } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WrongConstructorDetectorTest.kt) diff --git a/docs/checks/NotInterpolated.md.html b/docs/checks/NotInterpolated.md.html index 9e4ac7bc..6395fd08 100644 --- a/docs/checks/NotInterpolated.md.html +++ b/docs/checks/NotInterpolated.md.html @@ -46,7 +46,7 @@ interpolation you must use double quotes ("). [NotInterpolated] compile 'com.android.support:design:${supportLibVersion}' --------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -59,7 +59,7 @@ compile 'com.android.support:design:${supportLibVersion}' compile "com.android.support:appcompat-v7:${supportLibVersion}" } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/NotSibling.md.html b/docs/checks/NotSibling.md.html index ce1a41a2..b36ecdef 100644 --- a/docs/checks/NotSibling.md.html +++ b/docs/checks/NotSibling.md.html @@ -45,7 +45,7 @@ RelativeLayout [NotSibling] android:layout_alignTop="@id/my_id1" ------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -96,7 +96,7 @@ android:text="Button" /> </RelativeLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout/layout2.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -112,7 +112,7 @@ android:text="Button" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/ids.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -123,7 +123,7 @@ <item name="my_id1" type="id"/> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WrongIdDetectorTest.kt) diff --git a/docs/checks/NotificationIconCompatibility.md.html b/docs/checks/NotificationIconCompatibility.md.html index 796d6af6..f7832ba3 100644 --- a/docs/checks/NotificationIconCompatibility.md.html +++ b/docs/checks/NotificationIconCompatibility.md.html @@ -43,7 +43,7 @@ raster image to support Android versions below 5.0 (API 21) [NotificationIconCompatibility] 0 errors, 1 warnings -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -88,12 +88,12 @@ .setLargeIcon(bitmap).build(); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/drawable/icon1.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <vector/> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/IconDetectorTest.java) diff --git a/docs/checks/NotificationId0.md.html b/docs/checks/NotificationId0.md.html index 642a1581..797a727b 100644 --- a/docs/checks/NotificationId0.md.html +++ b/docs/checks/NotificationId0.md.html @@ -44,7 +44,7 @@ [NotificationId0] service.startForeground(MY_ID, notification, 1) // ERROR 2: cannot be zero ----- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -66,7 +66,7 @@ service.startForeground(MY_ID, notification, 1) // ERROR 2: cannot be zero } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/InvalidNotificationIdDetectorTest.kt) diff --git a/docs/checks/NotificationPermission.md.html b/docs/checks/NotificationPermission.md.html index d5217bc4..e225d5d9 100644 --- a/docs/checks/NotificationPermission.md.html +++ b/docs/checks/NotificationPermission.md.html @@ -44,7 +44,7 @@ POST_NOTIFICATIONS permission [NotificationPermission] notificationManager.notify(id, notification); -------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -54,7 +54,7 @@ <uses-sdk android:minSdkVersion="17" android:targetSdkVersion="33" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/NotificationTestAndroidx.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -81,7 +81,7 @@ notificationManager.notify(id, notification); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/NotificationPermissionDetectorTest.kt) diff --git a/docs/checks/NotificationTrampoline.md.html b/docs/checks/NotificationTrampoline.md.html index bef3c2ee..e65d38b8 100644 --- a/docs/checks/NotificationTrampoline.md.html +++ b/docs/checks/NotificationTrampoline.md.html @@ -52,7 +52,7 @@ directly from the notification [NotificationTrampoline] .addAction(android.R.drawable.ic_dialog_email, "Launch Receiver From Action", ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -74,7 +74,7 @@ context.startActivity(i); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/NotificationTest.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -123,7 +123,7 @@ notificationManager.notify(id, notification); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/NotificationTrampolineDetectorTest.kt) diff --git a/docs/checks/NotifyDataSetChanged.md.html b/docs/checks/NotifyDataSetChanged.md.html index ee61cbc8..5a75d38c 100644 --- a/docs/checks/NotifyDataSetChanged.md.html +++ b/docs/checks/NotifyDataSetChanged.md.html @@ -44,7 +44,7 @@ notifyDataSetChanged as a last resort. [NotifyDataSetChanged] notifyDataSetChanged(); ---------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -80,7 +80,7 @@ public void onBindViewHolder(ViewHolder holder, int position) { } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/RecyclerViewDetectorTest.kt) diff --git a/docs/checks/NullSafeMutableLiveData-2.md.html b/docs/checks/NullSafeMutableLiveData-2.md.html index f4d95a27..5b652f8a 100644 --- a/docs/checks/NullSafeMutableLiveData-2.md.html +++ b/docs/checks/NullSafeMutableLiveData-2.md.html @@ -61,7 +61,7 @@ well. Issue id's must be unique, so you cannot combine these libraries. Also defined in: * NullSafeMutableLiveData: LiveData value assignment nullability mismatch (this issue) -* [NullSafeMutableLiveData from androidx.lifecycle:lifecycle-livedata-core:2.9.0-rc01](NullSafeMutableLiveData.md.html) +* [NullSafeMutableLiveData from androidx.lifecycle:lifecycle-livedata-core:2.11.0-alpha01](NullSafeMutableLiveData.md.html) * [NullSafeMutableLiveData from androidx.lifecycle:lifecycle-livedata-core-ktx:2.8.0-alpha01](NullSafeMutableLiveData-2.md.html) diff --git a/docs/checks/NullSafeMutableLiveData.md.html b/docs/checks/NullSafeMutableLiveData.md.html index 129653a8..795a8f65 100644 --- a/docs/checks/NullSafeMutableLiveData.md.html +++ b/docs/checks/NullSafeMutableLiveData.md.html @@ -61,7 +61,7 @@ well. Issue id's must be unique, so you cannot combine these libraries. Also defined in: * NullSafeMutableLiveData: LiveData value assignment nullability mismatch (this issue) -* [NullSafeMutableLiveData from androidx.lifecycle:lifecycle-livedata-core:2.9.0-rc01](NullSafeMutableLiveData.md.html) +* [NullSafeMutableLiveData from androidx.lifecycle:lifecycle-livedata-core:2.11.0-alpha01](NullSafeMutableLiveData.md.html) * [NullSafeMutableLiveData from androidx.lifecycle:lifecycle-livedata-core-ktx:2.8.0-alpha01](NullSafeMutableLiveData-2.md.html) @@ -73,17 +73,17 @@ ``` // build.gradle.kts -implementation("androidx.lifecycle:lifecycle-livedata-core:2.9.0-rc01") +implementation("androidx.lifecycle:lifecycle-livedata-core:2.11.0-alpha01") // build.gradle -implementation 'androidx.lifecycle:lifecycle-livedata-core:2.9.0-rc01' +implementation 'androidx.lifecycle:lifecycle-livedata-core:2.11.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.lifecycle.livedata.core) # libs.versions.toml [versions] -lifecycle-livedata-core = "2.9.0-rc01" +lifecycle-livedata-core = "2.11.0-alpha01" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -95,7 +95,7 @@ } ``` -2.9.0-rc01 is the version this documentation was generated from; +2.11.0-alpha01 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.lifecycle:lifecycle-livedata-core](androidx_lifecycle_lifecycle-livedata-core.md.html). diff --git a/docs/checks/NullableConcurrentHashMap.md.html b/docs/checks/NullableConcurrentHashMap.md.html index 75aef5f9..d3a93e8a 100644 --- a/docs/checks/NullableConcurrentHashMap.md.html +++ b/docs/checks/NullableConcurrentHashMap.md.html @@ -56,7 +56,7 @@ [NullableConcurrentHashMap] val map2: java.util.concurrent.ConcurrentHashMap<String?, Int> = java.util.concurrent.ConcurrentHashMap() ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -66,7 +66,7 @@ val map = java.util.concurrent.ConcurrentHashMap() val map2: java.util.concurrent.ConcurrentHashMap = java.util.concurrent.ConcurrentHashMap() } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/NullableConcurrentHashMapDetectorTest.kt) diff --git a/docs/checks/ObjectAnimatorBinding.md.html b/docs/checks/ObjectAnimatorBinding.md.html index bd67a23c..15c1cb23 100644 --- a/docs/checks/ObjectAnimatorBinding.md.html +++ b/docs/checks/ObjectAnimatorBinding.md.html @@ -43,7 +43,7 @@ arg) [ObjectAnimatorBinding] ObjectAnimator animator2 = ObjectAnimator.ofInt(myObject, "prop2", 0, 1, 2, 5); ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -71,7 +71,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ObjectAnimatorDetectorTest.kt) diff --git a/docs/checks/ObsoleteLayoutParam.md.html b/docs/checks/ObsoleteLayoutParam.md.html index 7e3e37ce..187a6002 100644 --- a/docs/checks/ObsoleteLayoutParam.md.html +++ b/docs/checks/ObsoleteLayoutParam.md.html @@ -72,7 +72,7 @@ LinearLayout: layout_below [ObsoleteLayoutParam] android:layout_below="@+id/button1" ----------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -165,8 +165,7 @@ </GridLayout> </FrameLayout> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ObsoleteLayoutParamsDetectorTest.java) diff --git a/docs/checks/ObsoleteSdkInt.md.html b/docs/checks/ObsoleteSdkInt.md.html index 48e8e9a2..cec750ff 100644 --- a/docs/checks/ObsoleteSdkInt.md.html +++ b/docs/checks/ObsoleteSdkInt.md.html @@ -53,7 +53,7 @@ [ObsoleteSdkInt] if (Build.VERSION.SDK_INT < 21) { // UNNECESSARY, never true -------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -63,7 +63,7 @@ package="test.pkg"> <uses-sdk android:minSdkVersion="23"/> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/ObsoleteSdkInt.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -78,10 +78,12 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ApiDetectorTest.java) +You can also visit the source code ([ApiDetectorTest.java](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ApiDetectorTest.java) +[AnnotationDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AnnotationDetectorTest.kt) +[LintIssueDocGeneratorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/LintIssueDocGeneratorTest.kt) +[VersionChecksTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/detector/api/VersionChecksTest.kt) for the unit tests for this check to see additional scenarios. (##) Suppressing diff --git a/docs/checks/OldTargetApi.md.html b/docs/checks/OldTargetApi.md.html index 6b0615f9..f3bef2a0 100644 --- a/docs/checks/OldTargetApi.md.html +++ b/docs/checks/OldTargetApi.md.html @@ -34,16 +34,16 @@ : [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) When your application or sdk runs on a version of Android that is more -recent than your `targetSdkVersion` specifies that it has been tested -with, various compatibility modes kick in. This ensures that your -application continues to work, but it may look out of place. For -example, if the `targetSdkVersion` is less than 14, your app may get an -option button in the UI. - -To fix this issue, set the `targetSdkVersion` to the highest available -value. Then test your app to make sure everything works correctly. You -may want to consult the compatibility notes to see what changes apply to -each version you are adding support for: +recent than your `targetSdk` specifies that it has been tested with, +various compatibility modes kick in. This ensures that your application +continues to work, but it may look out of place. For example, if the +`targetSdk` is less than 14, your app may get an option button in the +UI. + +To fix this issue, set the `targetSdk` to the highest available value. +Then test your app to make sure everything works correctly. You may want +to consult the compatibility notes to see what changes apply to each +version you are adding support for: https://developer.android.com/reference/android/os/Build.VERSION_CODES.html as well as follow this guide: https://developer.android.com/distribute/best-practices/develop/target-sdk.html. @@ -61,7 +61,7 @@ [OldTargetApi] targetSdk = libs.versions.keys.tsv.get().toInt() // ERROR 15 ------------------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -75,7 +75,7 @@ targetSdk = libs.versions.keys.tsv.get().toInt() // ERROR 15 } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `../gradle/libs.versions.toml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~toml linenumbers @@ -103,7 +103,7 @@ javaCompileSdk = "17" # OK 1 other-compileSdk = "15" # OK 2 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/OnClick.md.html b/docs/checks/OnClick.md.html index 0ca1b62f..ecf5d58c 100644 --- a/docs/checks/OnClick.md.html +++ b/docs/checks/OnClick.md.html @@ -80,7 +80,7 @@ a Java keyword [OnClick] android:onClick="new" --- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -189,7 +189,7 @@ android:text="Button" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/OnClickActivity.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -241,7 +241,7 @@ Log.i("x", "wrong7: called"); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/OnClickDetectorTest.java) diff --git a/docs/checks/OpaqueUnitKey.md.html b/docs/checks/OpaqueUnitKey.md.html index 80d04f78..d610d1be 100644 --- a/docs/checks/OpaqueUnitKey.md.html +++ b/docs/checks/OpaqueUnitKey.md.html @@ -64,7 +64,7 @@ [OpaqueUnitKey] val x = remember(unitProperty) { listOf(1, 2, 3) } ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -80,7 +80,7 @@ fun Test() { val x = remember(unitProperty) { listOf(1, 2, 3) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/OpaqueUnitKeyDetectorTest.kt) @@ -99,17 +99,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime-android:1.9.0-alpha01") +implementation("androidx.compose.runtime:runtime-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.runtime:runtime-android:1.9.0-alpha01' +implementation 'androidx.compose.runtime:runtime-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.runtime.android) # libs.versions.toml [versions] -runtime-android = "1.9.0-alpha01" +runtime-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -121,11 +121,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.runtime:runtime-lint:1.9.0-alpha01`. +You can also use `androidx.compose.runtime:runtime-lint:1.11.0-alpha06`. [Additional details about androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html). diff --git a/docs/checks/OpenForTesting.md.html b/docs/checks/OpenForTesting.md.html index c75c48fa..8cb3f9c8 100644 --- a/docs/checks/OpenForTesting.md.html +++ b/docs/checks/OpenForTesting.md.html @@ -48,7 +48,7 @@ from tests [OpenForTesting] class MyBuilder3 extends Builder1 { // ERROR 3 -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -78,7 +78,7 @@ override fun someMethod(arg: Int) { } // ERROR 2 override fun someOtherMethod(arg: Int) { } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyBuilder3.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -86,7 +86,7 @@ class MyBuilder3 extends Builder1 { // ERROR 3 @Override void someMethod(int arg) { } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `test/test/pkg/MyBuilder4.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -94,7 +94,7 @@ class MyBuilder4 extends Builder1 { // OK: In unit test @Override void someMethod(int arg) { } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `test/test/pkg/MyBuilder5.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -102,7 +102,7 @@ class MyBuilder5 extends Builder2 { // OK: In unit test @Override void someMethod(int arg) { } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/OpenForTestingDetectorTest.kt) diff --git a/docs/checks/Orientation.md.html b/docs/checks/Orientation.md.html index b96749ce..5ceb46a4 100644 --- a/docs/checks/Orientation.md.html +++ b/docs/checks/Orientation.md.html @@ -56,7 +56,7 @@ [Orientation] <LinearLayout ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -122,7 +122,7 @@ </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/InefficientWeightDetectorTest.java) diff --git a/docs/checks/OutdatedLibrary.md.html b/docs/checks/OutdatedLibrary.md.html index ae70c374..59ec7dd9 100644 --- a/docs/checks/OutdatedLibrary.md.html +++ b/docs/checks/OutdatedLibrary.md.html @@ -77,7 +77,7 @@ - 1.1.0 or higher [OutdatedLibrary] compile 'com.example.issues:latest-is-preview:1.0.0' // Outdated non-blocking -------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -119,7 +119,7 @@ compile 'com.another.example:example' // Ok (not in Index) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/Overdraw.md.html b/docs/checks/Overdraw.md.html index 1796d645..36fb41f7 100644 --- a/docs/checks/Overdraw.md.html +++ b/docs/checks/Overdraw.md.html @@ -61,7 +61,7 @@ (inferred theme is @style/MyTheme) [Overdraw] android:background="@drawable/custombg" --------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -105,7 +105,7 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/drawable/custombg.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -114,7 +114,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:src="@drawable/ic_launcher" android:tileMode="clamp" /> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/drawable/custombg2.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -122,8 +122,7 @@ <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/ic_launcher" /> </selector> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout/sixth.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -140,7 +139,7 @@ android:text="@string/hello" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout/fifth.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -157,7 +156,7 @@ android:text="@string/hello" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout/fourth.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -174,7 +173,7 @@ android:text="@string/hello" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout/main.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -191,7 +190,7 @@ android:text="@string/hello" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout/second.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -208,7 +207,7 @@ android:text="@string/hello" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout/third.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -225,7 +224,7 @@ android:text="@string/hello" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -236,7 +235,7 @@ <string name="app_name">Overdraw</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/styles.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -265,7 +264,7 @@ </style> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/FourthActivity.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -282,7 +281,7 @@ setContentView(R.layout.fourth); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/OverdrawActivity.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -299,7 +298,7 @@ setContentView(R.layout.main); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/SecondActivity.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -316,7 +315,7 @@ setContentView(R.layout.second); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/ThirdActivity.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -334,7 +333,7 @@ setContentView(R.layout.third); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/OverdrawDetectorTest.java) diff --git a/docs/checks/OverrideAbstract.md.html b/docs/checks/OverrideAbstract.md.html index 1426cdcc..42e722c8 100644 --- a/docs/checks/OverrideAbstract.md.html +++ b/docs/checks/OverrideAbstract.md.html @@ -67,7 +67,7 @@ [OverrideAbstract] private static class MyNotificationListenerService7 extends MyNotificationListenerService3 { ------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -142,7 +142,7 @@ private static class MyNotificationListenerService9 extends MyNotificationListenerService1 { } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/OverrideConcreteDetectorTest.java) diff --git a/docs/checks/PackageVisibilityPolicy.md.html b/docs/checks/PackageVisibilityPolicy.md.html new file mode 100644 index 00000000..b219d3d9 --- /dev/null +++ b/docs/checks/PackageVisibilityPolicy.md.html @@ -0,0 +1,187 @@ + +(#) Package/App Visibility Insights + +!!! WARNING: Package/App Visibility Insights + This is a warning. + +Id +: `PackageVisibilityPolicy` +Summary +: Package/App Visibility Insights +Severity +: Warning +Category +: Play Policy +Platform +: Android +Vendor +: Play policy insights beta +Min +: Lint 8.2 to 8.6 +Compiled +: Lint 8.7+ +Artifact +: [com.google.play.policy.insights:insights-lint](com_google_play_policy_insights_insights-lint.md.html) +Since +: 0.1.3 +Affects +: Manifest files +Editing +: This check runs on the fly in the IDE editor + +Accessing a user's installed app inventory is sensitive data. Google +Play policy strictly limits broad visibility (`QUERY_ALL_PACKAGES`), +allowing it only for core app functionality that requires extensive +knowledge of installed apps for interoperability. You must prioritize +using finite, targeted queries to access specific apps when possible, +which can be more privacy-friendly. Under no circumstances can data from +the installed app inventory be sold or shared for advertising or +analytics monetization. + +**Dos:** + +- Submit a declaration form in your Play Console for + `QUERY_ALL_PACKAGES` and any other high-risk permissions. +- For your app review, clearly document why your app needs app + visibility whether broad or more targeted. +- Access only the minimum data needed. +- Follow the specific allowable use cases for `QUERY_ALL_PACKAGES.` + +**Don'ts:** + +- Request `QUERY_ALL_PACKAGES` if your need can be met with finite, + targeted queries. +- Gain broad app visibility via methods not explicitly allowed by + policy. +- Provide false information about your app's core functionality or data + needs. +- Collect or use unnecessary data from installed app data. + +**Helpful Links:** + +See Policy page: https://goo.gle/play-policy-package-visibility +See Help Center article: +https://goo.gle/play-help-broad-package-visibility +See Declaration form: https://goo.gle/play-permission-decl-form + +Always review the full policy in the Policy Center to ensure +compliance. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +AndroidManifest.xml:3:Warning: Protect user privacy by limiting all app +visibility, especially QUERY_ALL_PACKAGES to essential core functions. +[PackageVisibilityPolicy] + <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/> + ---------------------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`AndroidManifest.xml`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android"> + <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/> +</manifest> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](/policyinsights/src/test/java/com/google/play/policy/insights/PackageVisibilityPolicyDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `PackageVisibilityPolicyDetector.testFlagsQueryAllPackages`. +To report a problem with this extracted sample, contact +Play policy insights beta. + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("com.google.play.policy.insights:insights-lint:0.1.4") + +// build.gradle +implementation 'com.google.play.policy.insights:insights-lint:0.1.4' + +// build.gradle.kts with version catalogs: +implementation(libs.insights.lint) + +# libs.versions.toml +[versions] +insights-lint = "0.1.4" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +insights-lint = { + module = "com.google.play.policy.insights:insights-lint", + version.ref = "insights-lint" +} +``` + +0.1.4 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.google.play.policy.insights:insights-lint](com_google_play_policy_insights_insights-lint.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Adding the suppression attribute + `tools:ignore="PackageVisibilityPolicy"` on the problematic XML + element (or one of its enclosing elements). You may also need to add + the following namespace declaration on the root element in the XML + file if it's not already there: + `xmlns:tools="http://schemas.android.com/tools"`. + + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <manifest xmlns:tools="http://schemas.android.com/tools"> + ... + <uses-permission tools:ignore="PackageVisibilityPolicy" .../> + ... + </manifest> + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="PackageVisibilityPolicy" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'PackageVisibilityPolicy' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore PackageVisibilityPolicy ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/PackagedPrivateKey.md.html b/docs/checks/PackagedPrivateKey.md.html index 5acd499b..44edd230 100644 --- a/docs/checks/PackagedPrivateKey.md.html +++ b/docs/checks/PackagedPrivateKey.md.html @@ -43,7 +43,7 @@ private key file. Please make sure not to embed this in your APK file. [PackagedPrivateKey] 1 errors, 0 warnings -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -67,7 +67,7 @@ 9MDXXVaY6rqx1yfZYDcWVgKGXTJhBXALCeGMWF43bvAmPq3M13QJA0rlO7lAUUF2 5INqBUeJxZWYxn6tRr9WMty/UcYnPR3YHgt0RDZycvbcqPsU5tHk9Q== -----END RSA PRIVATE KEY----- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PrivateKeyDetectorTest.kt) diff --git a/docs/checks/ParcelClassLoader.md.html b/docs/checks/ParcelClassLoader.md.html index b34b3f15..b0b68a47 100644 --- a/docs/checks/ParcelClassLoader.md.html +++ b/docs/checks/ParcelClassLoader.md.html @@ -102,7 +102,7 @@ instead. [ParcelClassLoader] Parcelable error9 = in.readPersistableBundle(); ----------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -130,7 +130,7 @@ Parcelable ok = in.readParcelable(getClass().getClassLoader()); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ReadParcelableDetectorTest.java) diff --git a/docs/checks/ParcelCreator.md.html b/docs/checks/ParcelCreator.md.html index ad38f480..1be10308 100644 --- a/docs/checks/ParcelCreator.md.html +++ b/docs/checks/ParcelCreator.md.html @@ -49,7 +49,7 @@ Parcelable but does not provide a CREATOR field [ParcelCreator] public class MyParcelable1 implements Parcelable { ------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -70,7 +70,7 @@ public void writeToParcel(Parcel arg0, int arg1) { } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/bytecode/MyParcelable2.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -99,7 +99,7 @@ public void writeToParcel(Parcel arg0, int arg1) { } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/bytecode/MyParcelable3.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -120,7 +120,7 @@ public void writeToParcel(Parcel arg0, int arg1) { } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/bytecode/MyParcelable4.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -139,7 +139,7 @@ public void writeToParcel(Parcel arg0, int arg1) { } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/bytecode/MyParcelable5.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -151,10 +151,10 @@ @Override public int describeContents(); } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ParcelDetectorTest.java) +You can also visit the source code ([ParcelDetectorTest.java](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ParcelDetectorTest.java) +[ProjectInitializerTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/ProjectInitializerTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/ParcelizeFunctionProperty.md.html b/docs/checks/ParcelizeFunctionProperty.md.html index 8346be68..36beb8b8 100644 --- a/docs/checks/ParcelizeFunctionProperty.md.html +++ b/docs/checks/ParcelizeFunctionProperty.md.html @@ -92,7 +92,7 @@ [ParcelizeFunctionProperty] val aliasedFunction: FunctionType, ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -119,7 +119,7 @@ @IgnoredOnParcel val ignoredFunction: () -> Unit = {}, // This is allowed ) : Parcelable -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/parcel/ParcelizeFunctionPropertyDetectorTest.kt) diff --git a/docs/checks/PendingBindings.md.html b/docs/checks/PendingBindings.md.html index 8b6eb890..32f9dc6d 100644 --- a/docs/checks/PendingBindings.md.html +++ b/docs/checks/PendingBindings.md.html @@ -74,7 +74,7 @@ resizes. [PendingBindings] holder.dataBinder.someMethod(); // ERROR: no fallthrough ------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -249,7 +249,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/RecyclerViewDetectorTest.kt) diff --git a/docs/checks/PermissionImpliesUnsupportedChromeOsHardware.md.html b/docs/checks/PermissionImpliesUnsupportedChromeOsHardware.md.html index 825c7658..e9a9beba 100644 --- a/docs/checks/PermissionImpliesUnsupportedChromeOsHardware.md.html +++ b/docs/checks/PermissionImpliesUnsupportedChromeOsHardware.md.html @@ -36,7 +36,7 @@ assumes that certain hardware related permissions indicate that the underlying hardware features are required by default. To fix the issue, consider declaring the corresponding element with -`required="false"` attribute. +`android:required="false"` attribute. !!! Tip This lint check has an associated quickfix available in the IDE. @@ -47,10 +47,11 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text AndroidManifest.xml:4:Error: Permission exists without corresponding hardware tag [PermissionImpliesUnsupportedChromeOsHardware] +android:required="false" /> tag +[PermissionImpliesUnsupportedChromeOsHardware] <uses-permission android:name="android.permission.CALL_PHONE"/> --------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -61,7 +62,7 @@ xmlns:tools="http://schemas.android.com/tools"> <uses-permission android:name="android.permission.CALL_PHONE"/> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ChromeOsDetectorTest.java) diff --git a/docs/checks/PermissionImpliesUnsupportedHardware.md.html b/docs/checks/PermissionImpliesUnsupportedHardware.md.html index 4b0fdef1..fd8cb8e1 100644 --- a/docs/checks/PermissionImpliesUnsupportedHardware.md.html +++ b/docs/checks/PermissionImpliesUnsupportedHardware.md.html @@ -50,7 +50,7 @@ required="false"> tag [PermissionImpliesUnsupportedHardware] <uses-permission android:name="android.permission.CALL_PHONE"/> --------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -62,7 +62,7 @@ <uses-feature android:name="android.software.leanback"/> <uses-permission android:name="android.permission.CALL_PHONE"/> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AndroidTvDetectorTest.java) diff --git a/docs/checks/PermissionNamingConvention.md.html b/docs/checks/PermissionNamingConvention.md.html index 40568535..fe8c2504 100644 --- a/docs/checks/PermissionNamingConvention.md.html +++ b/docs/checks/PermissionNamingConvention.md.html @@ -69,7 +69,7 @@ naming convention [PermissionNamingConvention] <permission android:name="FOO_BAR" /> ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -87,7 +87,7 @@ <permission android:name="android.permission.FOO_BAR" /> <permission android:name="FOO_BAR" /> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PermissionErrorDetectorTest.kt) diff --git a/docs/checks/PhotoAndVideoPolicy.md.html b/docs/checks/PhotoAndVideoPolicy.md.html new file mode 100644 index 00000000..1569cc44 --- /dev/null +++ b/docs/checks/PhotoAndVideoPolicy.md.html @@ -0,0 +1,191 @@ + +(#) Photos & Video Insights + +!!! WARNING: Photos & Video Insights + This is a warning. + +Id +: `PhotoAndVideoPolicy` +Summary +: Photos & Video Insights +Severity +: Warning +Category +: Play Policy +Platform +: Android +Vendor +: Play policy insights beta +Min +: Lint 8.2 to 8.6 +Compiled +: Lint 8.7+ +Artifact +: [com.google.play.policy.insights:insights-lint](com_google_play_policy_insights_insights-lint.md.html) +Since +: 0.1.3 +Affects +: Manifest files +Editing +: This check runs on the fly in the IDE editor + +To protect user privacy and security, Google Play requires apps that +request `READ_MEDIA_IMAGES` or `READ_MEDIA_VIDEO` permissions to show +strong, legitimate core use cases for persistent or frequent access to +photos and videos. If your app does *not* qualify for this access, you +should remove the permissions. Instead, use a system picker like the +more privacy-preserving Android Photo Picker for one-time or infrequent +needs. + +**Dos:** + +- Submit a declaration form in your Play Console. +- Use a system picker such as the photo picker if you don’t need broad + access +- Provide evidence to justify your use case during app review. +- Clearly explain to users why your app needs these permissions. + +**Don'ts:** + +- Collect more photo or video data than necessary. +- Attempt to bypass or manipulate user consent. +- Block or gate functionality if a user declines a non-critical + permission. Instead, use a system picker to gracefully handle the + file request. + +**Helpful Links:** + +See Policy page: https://goo.gle/play-policy-photo-video +See Help Center article: https://goo.gle/play-help-photo-video +See Declaration form: https://goo.gle/play-permission-decl-form + +Always review the full policy in the Policy Center to ensure +compliance. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +AndroidManifest.xml:3:Warning: To get broad access to photos and videos, +apps must have core use case that requires persistent or frequent +photo/video access of files located in shared storage +[PhotoAndVideoPolicy] + <uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/> + --------------------------------------------------- +AndroidManifest.xml:4:Warning: To get broad access to photos and videos, +apps must have core use case that requires persistent or frequent +photo/video access of files located in shared storage +[PhotoAndVideoPolicy] + <uses-permission android:name="android.permission.READ_MEDIA_VIDEO"/> + -------------------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`AndroidManifest.xml`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android"> + <uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/> + <uses-permission android:name="android.permission.READ_MEDIA_VIDEO"/> + <uses-sdk android:targetSdkVersion="33"/> +</manifest> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](/policyinsights/src/test/java/com/google/play/policy/insights/PhotoAndVideoPolicyDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `PhotoAndVideoPolicyDetector.testFlagsPermissions`. +To report a problem with this extracted sample, contact +Play policy insights beta. + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("com.google.play.policy.insights:insights-lint:0.1.4") + +// build.gradle +implementation 'com.google.play.policy.insights:insights-lint:0.1.4' + +// build.gradle.kts with version catalogs: +implementation(libs.insights.lint) + +# libs.versions.toml +[versions] +insights-lint = "0.1.4" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +insights-lint = { + module = "com.google.play.policy.insights:insights-lint", + version.ref = "insights-lint" +} +``` + +0.1.4 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.google.play.policy.insights:insights-lint](com_google_play_policy_insights_insights-lint.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Adding the suppression attribute + `tools:ignore="PhotoAndVideoPolicy"` on the problematic XML element + (or one of its enclosing elements). You may also need to add the + following namespace declaration on the root element in the XML file + if it's not already there: + `xmlns:tools="http://schemas.android.com/tools"`. + + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <manifest xmlns:tools="http://schemas.android.com/tools"> + ... + <uses-permission tools:ignore="PhotoAndVideoPolicy" .../> + ... + </manifest> + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="PhotoAndVideoPolicy" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'PhotoAndVideoPolicy' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore PhotoAndVideoPolicy ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/PictureInPictureIssue.md.html b/docs/checks/PictureInPictureIssue.md.html index 326c0bf1..8427165b 100644 --- a/docs/checks/PictureInPictureIssue.md.html +++ b/docs/checks/PictureInPictureIssue.md.html @@ -47,7 +47,7 @@ and setSourceRectHint(...) [PictureInPictureIssue] <application ----------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -81,7 +81,7 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/TestActivity.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -94,7 +94,7 @@ enterPictureInPictureMode() } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PictureInPictureDetectorTest.kt) diff --git a/docs/checks/PinSetExpiry.md.html b/docs/checks/PinSetExpiry.md.html index 79ba6c06..0950c06a 100644 --- a/docs/checks/PinSetExpiry.md.html +++ b/docs/checks/PinSetExpiry.md.html @@ -42,7 +42,7 @@ [PinSetExpiry] <pin-set expiration="%1$s"> ---------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -61,7 +61,7 @@ </pin-set> </domain-config> </network-security-config> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/NetworkSecurityConfigDetectorTest.java) diff --git a/docs/checks/PlaySdkIndexDeprecated.md.html b/docs/checks/PlaySdkIndexDeprecated.md.html index c5dee555..785e4e4c 100644 --- a/docs/checks/PlaySdkIndexDeprecated.md.html +++ b/docs/checks/PlaySdkIndexDeprecated.md.html @@ -47,7 +47,7 @@ [PlaySdkIndexDeprecated] compile 'com.example.issues:deprecated:2.0.0' // Deprecated ------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -89,7 +89,7 @@ compile 'com.another.example:example' // Ok (not in Index) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/PlaySdkIndexNonCompliant.md.html b/docs/checks/PlaySdkIndexNonCompliant.md.html index 88c16d4a..017665ea 100644 --- a/docs/checks/PlaySdkIndexNonCompliant.md.html +++ b/docs/checks/PlaySdkIndexNonCompliant.md.html @@ -87,22 +87,24 @@ compile 'com.example.ads.third.party:example:7.1.6' // Policy (Malware), non-blocking ------------------------------------------- build.gradle:21:Warning: com.example.ads.third.party:example version -7.1.7 has User Data policy issues that will block publishing of your app -to Play Console in the future [PlaySdkIndexNonCompliant] +7.1.7 has Malware policy, Permissions policy, User Data policy issues +that will block publishing of your app to Play Console in the future +[PlaySdkIndexNonCompliant] compile 'com.example.ads.third.party:example:7.1.7' // Policy (multiple types), non-blocking ------------------------------------------- build.gradle:22:Error: [Prevents app release in Google Play Console] -com.example.ads.third.party:example version 7.1.8 has User Data policy -issues that will block publishing of your app to Play Console -[PlaySdkIndexNonCompliant] +com.example.ads.third.party:example version 7.1.8 has Malware policy, +User Data policy issues that will block publishing of your app to Play +Console [PlaySdkIndexNonCompliant] compile 'com.example.ads.third.party:example:7.1.8' // Policy (multiple types), blocking ------------------------------------------- build.gradle:23:Warning: com.example.ads.third.party:example version -7.1.9 has Permissions policy issues that will block publishing of your -app to Play Console in the future [PlaySdkIndexNonCompliant] +7.1.9 has Malware policy, Permissions policy issues that will block +publishing of your app to Play Console in the future +[PlaySdkIndexNonCompliant] compile 'com.example.ads.third.party:example:7.1.9' // Policy (multiple types), no severity ------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -144,7 +146,7 @@ compile 'com.another.example:example' // Ok (not in Index) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/PlaySdkIndexVulnerability.md.html b/docs/checks/PlaySdkIndexVulnerability.md.html index 0fcd5750..2a2562cd 100644 --- a/docs/checks/PlaySdkIndexVulnerability.md.html +++ b/docs/checks/PlaySdkIndexVulnerability.md.html @@ -58,7 +58,7 @@ [PlaySdkIndexVulnerability] compile 'com.example.ads.third.party:example:7.1.12' // Vulnerability multiple (non-blocking) -------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -100,7 +100,7 @@ compile 'com.another.example:example' // Ok (not in Index) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/PluralsCandidate.md.html b/docs/checks/PluralsCandidate.md.html index b8855a0e..bd63088f 100644 --- a/docs/checks/PluralsCandidate.md.html +++ b/docs/checks/PluralsCandidate.md.html @@ -62,7 +62,7 @@ [PluralsCandidate] <string name="lockscreen_too_many_failed_attempts_dialog_message1"> ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -76,7 +76,7 @@ \n\nTry again in >%d seconds. </string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/StringFormatDetectorTest.java) diff --git a/docs/checks/PrivateApi.md.html b/docs/checks/PrivateApi.md.html index 95c75dcd..a91325c4 100644 --- a/docs/checks/PrivateApi.md.html +++ b/docs/checks/PrivateApi.md.html @@ -55,7 +55,7 @@ devices or in the future [PrivateApi] Class SystemProperties = cl.loadClass("android.os.SystemProperties"); ------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -74,7 +74,7 @@ Class SystemProperties = cl.loadClass("android.os.SystemProperties"); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PrivateApiDetectorTest.kt) diff --git a/docs/checks/PrivateResource.md.html b/docs/checks/PrivateResource.md.html index 82e98ab2..2be618f2 100644 --- a/docs/checks/PrivateResource.md.html +++ b/docs/checks/PrivateResource.md.html @@ -25,7 +25,7 @@ Editing : This check runs on the fly in the IDE editor Implementation -: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/PrivateResourceDetector.java) +: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/PrivateResourceDetector.kt) Tests : [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PrivateResourceDetectorTest.kt) Copyright Year @@ -45,7 +45,7 @@ com.android.tools:test-library:1.0.0 [PrivateResource] android:text="@string/my_private_string" /> ------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -67,10 +67,10 @@ android:layout_height="wrap_content" android:text="@string/my_public_string" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PrivateResourceDetectorTest.kt) +You can also visit the source code ([PrivateResourceDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PrivateResourceDetectorTest.kt) +[ProjectInitializerTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/ProjectInitializerTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/ProduceStateDoesNotAssignValue.md.html b/docs/checks/ProduceStateDoesNotAssignValue.md.html index a4f1ddf1..402753a2 100644 --- a/docs/checks/ProduceStateDoesNotAssignValue.md.html +++ b/docs/checks/ProduceStateDoesNotAssignValue.md.html @@ -69,7 +69,7 @@ [ProduceStateDoesNotAssignValue] produceState(true, true) { ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -103,7 +103,7 @@ fun State.doSomethingWithState() {} fun doSomethingElseWithState(state: State) {} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ProduceStateDetectorTest.kt) @@ -122,17 +122,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime-android:1.9.0-alpha01") +implementation("androidx.compose.runtime:runtime-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.runtime:runtime-android:1.9.0-alpha01' +implementation 'androidx.compose.runtime:runtime-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.runtime.android) # libs.versions.toml [versions] -runtime-android = "1.9.0-alpha01" +runtime-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -144,11 +144,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.runtime:runtime-lint:1.9.0-alpha01`. +You can also use `androidx.compose.runtime:runtime-lint:1.11.0-alpha06`. [Additional details about androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html). diff --git a/docs/checks/Proguard.md.html b/docs/checks/Proguard.md.html index 700ca2b9..83790dcb 100644 --- a/docs/checks/Proguard.md.html +++ b/docs/checks/Proguard.md.html @@ -53,7 +53,7 @@ [Proguard] -keepclasseswithmembernames class * { ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -95,10 +95,10 @@ -keep class * implements android.os.Parcelable { public static final android.os.Parcelable$Creator *; } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ProguardDetectorTest.kt) +You can also visit the source code ([ProguardDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ProguardDetectorTest.kt) +[ProjectInitializerTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/ProjectInitializerTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/ProguardAndroidTxtUsage.md.html b/docs/checks/ProguardAndroidTxtUsage.md.html new file mode 100644 index 00000000..3ef347da --- /dev/null +++ b/docs/checks/ProguardAndroidTxtUsage.md.html @@ -0,0 +1,118 @@ + +(#) Use proguard-android-optimize.txt to enable optimizations + +!!! WARNING: Use proguard-android-optimize.txt to enable optimizations + This is a warning. + +Id +: `ProguardAndroidTxtUsage` +Summary +: Use proguard-android-optimize.txt to enable optimizations +Severity +: Warning +Category +: Performance +Platform +: Android +Vendor +: Android Open Source Project +Feedback +: https://issuetracker.google.com/issues/new?component=192708 +Since +: 9.0.0 (January 2026) +Affects +: Gradle build files +Editing +: This check runs on the fly in the IDE editor +See +: https://developer.android.com/topic/performance/app-optimization/enable-app-optimization +Implementation +: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/ProguardAndroidTxtDetector.kt) +Tests +: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ProguardAndroidTxtDetectorTest.kt) + +Support for `getDefaultProguardFile('proguard-android.txt')` will be +removed in AGP 9.0 since it includes `-dontoptimize`, which prevents R8 +from performing many optimizations. Instead use +`getDefaultProguardFile('proguard-android-optimize.txt)`, and if needed, +temporarily use `-dontoptimize` in a custom keep rule file while fixing +breakages. + +!!! Tip + This lint check has an associated quickfix available in the IDE. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +build.gradle:6:Warning: Avoid +getDefaultProguardFile('proguard-android.txt') +[ProguardAndroidTxtUsage] + proguardFiles(getDefaultProguardFile('proguard-android.txt'), 'custom.pro') + ---------------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`build.gradle`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~groovy linenumbers +apply plugin: 'com.android.application' + +android { + buildTypes { + release { + proguardFiles(getDefaultProguardFile('proguard-android.txt'), 'custom.pro') + } + } +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ProguardAndroidTxtDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection ProguardAndroidTxtUsage + problematicStatement() + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="ProguardAndroidTxtUsage" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'ProguardAndroidTxtUsage' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore ProguardAndroidTxtUsage ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/ProguardSplit.md.html b/docs/checks/ProguardSplit.md.html index 592bd1bc..bb23b931 100644 --- a/docs/checks/ProguardSplit.md.html +++ b/docs/checks/ProguardSplit.md.html @@ -69,7 +69,7 @@ and then keep only project-specific configuration here [ProguardSplit] -keep public class * extends android.app.Activity ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -111,14 +111,13 @@ -keep class * implements android.os.Parcelable { public static final android.os.Parcelable$Creator *; } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `project.properties`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~properties linenumbers target=android-14 proguard.config=${sdk.dir}/foo.cfg:${user.home}/bar.pro;myfile.txt - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ProguardDetectorTest.kt) diff --git a/docs/checks/PropertyEscape.md.html b/docs/checks/PropertyEscape.md.html index 6ab4bb34..a1903dfb 100644 --- a/docs/checks/PropertyEscape.md.html +++ b/docs/checks/PropertyEscape.md.html @@ -54,7 +54,7 @@ Data\\Android\\android-studio\\sdk [PropertyEscape] ok.sdk.dir=C:\\Documents and Settings\\UserName\\Local Settings\\Application Data\\Android\\android-studio\\sdk - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -74,7 +74,7 @@ windows2.dir=C\:\\my\\path\\to\\sdk not.a.path.prop=Hello \my\path\to\sdk ok.sdk.dir=C:\\Documents and Settings\\UserName\\Local Settings\\Application Data\\Android\\android-studio\\sdk -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PropertyFileDetectorTest.kt) diff --git a/docs/checks/ProtectedPermissions.md.html b/docs/checks/ProtectedPermissions.md.html index f588f446..a874d091 100644 --- a/docs/checks/ProtectedPermissions.md.html +++ b/docs/checks/ProtectedPermissions.md.html @@ -44,7 +44,7 @@ [ProtectedPermissions] <uses-permission android:name="android.permission.BACKUP" /> ---------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -65,7 +65,7 @@ <uses-permission android:name="android.permission.BACKUP" /> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/SystemPermissionsDetectorTest.java) diff --git a/docs/checks/ProtoLayoutEdgeContentLayoutResponsive-2.md.html b/docs/checks/ProtoLayoutEdgeContentLayoutResponsive-2.md.html new file mode 100644 index 00000000..a4d61442 --- /dev/null +++ b/docs/checks/ProtoLayoutEdgeContentLayoutResponsive-2.md.html @@ -0,0 +1,330 @@ + +(#) ProtoLayout Material EdgeContentLayout should be used with responsivebehaviour to ensure the best behaviour across different screen sizes andlocales + +!!! WARNING: ProtoLayout Material EdgeContentLayout should be used with responsivebehaviour to ensure the best behaviour across different screen sizes andlocales + This is a warning. + +Id +: `ProtoLayoutEdgeContentLayoutResponsive` +Summary +: ProtoLayout Material EdgeContentLayout should be used with responsivebehaviour to ensure the best behaviour across different screen sizes andlocales +Severity +: Warning +Category +: Correctness +Platform +: Android +Vendor +: Android Open Source Project +Identifier +: androidx.wear.protolayout +Feedback +: https://issuetracker.google.com/issues/new?component=1112273 +Min +: Lint 8.7+ +Compiled +: Lint 8.7+ +Artifact +: [androidx.wear.protolayout:protolayout](androidx_wear_protolayout_protolayout.md.html) +Since +: 1.2.0 +Affects +: Kotlin and Java files +Editing +: This check runs on the fly in the IDE editor +Implementation +: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/wear/protolayout/protolayout-lint/src/main/java/androidx/wear/protolayout/lint/ResponsiveLayoutDetector.kt) +Tests +: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/wear/protolayout/protolayout-lint/src/test/java/EdgeContentLayoutResponsiveDetectorTest.kt) +Copyright Year +: 2024 + +It is highly recommended to use the latest +setResponsiveInsetEnabled(true) when you're +using the ProtoLayout's EdgeContentLayout. + +This is will take care of all outer margins and inner padding to ensure +that content of +labels doesn't go off the screen (especially with different locales) and +that primary +label is placed in the consistent place. + +!!! Tip + This lint check has an associated quickfix available in the IDE. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/foo/Bar.kt:4:Warning: EdgeContentLayout used, but responsiveness +isn't set: Please call +setResponsiveContentInsetEnabled(true) for the best results across +different screen sizes and update to the looks of layout. +[ProtoLayoutEdgeContentLayoutResponsive] +val layout = EdgeContentLayout.Builder(null) + ------------------------- +src/foo/Bar.kt:9:Warning: EdgeContentLayout used, but responsiveness +isn't set: Please call +setResponsiveContentInsetEnabled(true) for the best results across +different screen sizes and update to the looks of layout. +[ProtoLayoutEdgeContentLayoutResponsive] + val layout = EdgeContentLayout.Builder(null) + ------------------------- +src/foo/Bar.kt:12:Warning: EdgeContentLayout used, but responsiveness +isn't set: Please call +setResponsiveContentInsetEnabled(true) for the best results across +different screen sizes and update to the looks of layout. +[ProtoLayoutEdgeContentLayoutResponsive] + val layoutFalse = EdgeContentLayout.Builder(null) + ------------------------- +src/foo/Bar.kt:17:Warning: EdgeContentLayout used, but responsiveness +isn't set: Please call +setResponsiveContentInsetEnabled(true) for the best results across +different screen sizes and update to the looks of layout. +[ProtoLayoutEdgeContentLayoutResponsive] + val l = EdgeContentLayout.Builder(null) + ------------------------- +src/foo/Bar.kt:24:Warning: EdgeContentLayout used, but responsiveness +isn't set: Please call +setResponsiveContentInsetEnabled(true) for the best results across +different screen sizes and update to the looks of layout. +[ProtoLayoutEdgeContentLayoutResponsive] + EdgeContentLayout.Builder().setResponsiveContentInsetEnabled(enabled) + ------------------------- +src/foo/Bar.kt:32:Warning: EdgeContentLayout used, but responsiveness +isn't set: Please call +setResponsiveContentInsetEnabled(true) for the best results across +different screen sizes and update to the looks of layout. +[ProtoLayoutEdgeContentLayoutResponsive] + return EdgeContentLayout.Builder().build() + ------------------------- +src/foo/Bar.kt:36:Warning: EdgeContentLayout used, but responsiveness +isn't set: Please call +setResponsiveContentInsetEnabled(true) for the best results across +different screen sizes and update to the looks of layout. +[ProtoLayoutEdgeContentLayoutResponsive] + EdgeContentLayout.Builder() + ------------------------- +src/foo/Bar.kt:42:Warning: EdgeContentLayout used, but responsiveness +isn't set: Please call +setResponsiveContentInsetEnabled(true) for the best results across +different screen sizes and update to the looks of layout. +[ProtoLayoutEdgeContentLayoutResponsive] + random(EdgeContentLayout.Builder()) + ------------------------- +src/foo/Bar.kt:47:Warning: EdgeContentLayout used, but responsiveness +isn't set: Please call +setResponsiveContentInsetEnabled(true) for the best results across +different screen sizes and update to the looks of layout. +[ProtoLayoutEdgeContentLayoutResponsive] + val e = EdgeContentLayout.Builder() + ------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here are the relevant source files: + +`src/androidx/wear/protolayout/material/layouts/EdgeContentLayout.java`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers +package androidx.wear.protolayout.material.layouts; + +import androidx.wear.protolayout.DeviceParameters; + +public class EdgeContentLayout { + public static class Builder { + public Builder(DeviceParameters deviceParameters) {} + public Builder() {} + + public Builder setResponsiveContentInsetEnabled(boolean enabled) { + return this; + } + + public EdgeContentLayout build() { + return new EdgeContentLayout(); + } + } +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`src/foo/Bar.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package foo +import androidx.wear.protolayout.material.layouts.EdgeContentLayout + +val layout = EdgeContentLayout.Builder(null) + .setResponsiveContentInsetEnabled(false) + .build() + +class Bar { + val layout = EdgeContentLayout.Builder(null) + .build() + + val layoutFalse = EdgeContentLayout.Builder(null) + .setResponsiveContentInsetEnabled(false) + .build() + + fun buildFalse() { + val l = EdgeContentLayout.Builder(null) + .setResponsiveContentInsetEnabled(false) + return l.build() + } + + fun update() { + val enabled = false + EdgeContentLayout.Builder().setResponsiveContentInsetEnabled(enabled) + } + + fun build() { + update().build() + } + + fun build2() { + return EdgeContentLayout.Builder().build() + } + + fun doubleFalse() { + EdgeContentLayout.Builder() + .setResponsiveContentInsetEnabled(true) + .setResponsiveContentInsetEnabled(false) + } + + fun callRandom() { + random(EdgeContentLayout.Builder()) + } + fun random(val l: EdgeContentLayout.Builder) {} + + fun condition(val cond: Boolean) { + val e = EdgeContentLayout.Builder() + if (cond) { + e.setResponsiveContentInsetEnabled(false) + } else { + e.setResponsiveContentInsetEnabled(true) + } + } +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/wear/protolayout/protolayout-lint/src/test/java/EdgeContentLayoutResponsiveDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `ResponsiveLayoutDetector.edgeContentLayout without responsiveness requires and fixes setter`. +To report a problem with this extracted sample, visit +https://issuetracker.google.com/issues/new?component=1112273. + +(##) Repackaged + +This lint check appears to have been packaged in other artifacts as +well. Issue id's must be unique, so you cannot combine these libraries. +Also defined in: +* ProtoLayoutEdgeContentLayoutResponsive: ProtoLayout Material EdgeContentLayout should be used with responsivebehaviour to ensure the best behaviour across different screen sizes andlocales (this issue) +* [ProtoLayoutEdgeContentLayoutResponsive from androidx.wear.protolayout:protolayout-expression:1.4.0-rc01](ProtoLayoutEdgeContentLayoutResponsive.md.html) +* [ProtoLayoutEdgeContentLayoutResponsive from androidx.wear.protolayout:protolayout:1.3.0-beta01](ProtoLayoutEdgeContentLayoutResponsive-2.md.html) + + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("androidx.wear.protolayout:protolayout:1.3.0-beta01") + +// build.gradle +implementation 'androidx.wear.protolayout:protolayout:1.3.0-beta01' + +// build.gradle.kts with version catalogs: +implementation(libs.protolayout) + +# libs.versions.toml +[versions] +protolayout = "1.3.0-beta01" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +protolayout = { + module = "androidx.wear.protolayout:protolayout", + version.ref = "protolayout" +} +``` + +1.3.0-beta01 is the version this documentation was generated from; +there may be newer versions available. + +NOTE: These lint checks are **also** made available separate from the main library. +Use one of the following artifacts: +* `androidx.wear.protolayout:protolayout-material3:1.3.0-beta01` +* `androidx.wear.protolayout:protolayout-material:1.3.0-beta01` + + +[Additional details about androidx.wear.protolayout:protolayout](androidx_wear_protolayout_protolayout.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Using a suppression annotation like this on the enclosing + element: + + ```kt + // Kotlin + @Suppress("ProtoLayoutEdgeContentLayoutResponsive") + fun method() { + Builder(...) + } + ``` + + or + + ```java + // Java + @SuppressWarnings("ProtoLayoutEdgeContentLayoutResponsive") + void method() { + new Builder(...); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection ProtoLayoutEdgeContentLayoutResponsive + problematicStatement() + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="ProtoLayoutEdgeContentLayoutResponsive" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'ProtoLayoutEdgeContentLayoutResponsive' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore ProtoLayoutEdgeContentLayoutResponsive ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/ProtoLayoutEdgeContentLayoutResponsive.md.html b/docs/checks/ProtoLayoutEdgeContentLayoutResponsive.md.html index 20c9411a..f0e3bec0 100644 --- a/docs/checks/ProtoLayoutEdgeContentLayoutResponsive.md.html +++ b/docs/checks/ProtoLayoutEdgeContentLayoutResponsive.md.html @@ -25,7 +25,7 @@ Compiled : Lint 8.7+ Artifact -: [androidx.wear.protolayout:protolayout](androidx_wear_protolayout_protolayout.md.html) +: [androidx.wear.protolayout:protolayout-expression](androidx_wear_protolayout_protolayout-expression.md.html) Since : 1.2.0 Affects @@ -35,7 +35,7 @@ Implementation : [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/wear/protolayout/protolayout-lint/src/main/java/androidx/wear/protolayout/lint/ResponsiveLayoutDetector.kt) Tests -: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/wear/protolayout/protolayout-lint/src/test/java/PrimaryLayoutResponsiveDetectorTest.kt) +: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/wear/protolayout/protolayout-lint/src/test/java/EdgeContentLayoutResponsiveDetectorTest.kt) Copyright Year : 2024 @@ -49,6 +49,179 @@ that primary label is placed in the consistent place. +!!! Tip + This lint check has an associated quickfix available in the IDE. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/foo/Bar.kt:4:Warning: EdgeContentLayout used, but responsiveness +isn't set: Please call +setResponsiveContentInsetEnabled(true) for the best results across +different screen sizes and update to the looks of layout. +[ProtoLayoutEdgeContentLayoutResponsive] +val layout = EdgeContentLayout.Builder(null) + ------------------------- +src/foo/Bar.kt:9:Warning: EdgeContentLayout used, but responsiveness +isn't set: Please call +setResponsiveContentInsetEnabled(true) for the best results across +different screen sizes and update to the looks of layout. +[ProtoLayoutEdgeContentLayoutResponsive] + val layout = EdgeContentLayout.Builder(null) + ------------------------- +src/foo/Bar.kt:12:Warning: EdgeContentLayout used, but responsiveness +isn't set: Please call +setResponsiveContentInsetEnabled(true) for the best results across +different screen sizes and update to the looks of layout. +[ProtoLayoutEdgeContentLayoutResponsive] + val layoutFalse = EdgeContentLayout.Builder(null) + ------------------------- +src/foo/Bar.kt:17:Warning: EdgeContentLayout used, but responsiveness +isn't set: Please call +setResponsiveContentInsetEnabled(true) for the best results across +different screen sizes and update to the looks of layout. +[ProtoLayoutEdgeContentLayoutResponsive] + val l = EdgeContentLayout.Builder(null) + ------------------------- +src/foo/Bar.kt:24:Warning: EdgeContentLayout used, but responsiveness +isn't set: Please call +setResponsiveContentInsetEnabled(true) for the best results across +different screen sizes and update to the looks of layout. +[ProtoLayoutEdgeContentLayoutResponsive] + EdgeContentLayout.Builder().setResponsiveContentInsetEnabled(enabled) + ------------------------- +src/foo/Bar.kt:32:Warning: EdgeContentLayout used, but responsiveness +isn't set: Please call +setResponsiveContentInsetEnabled(true) for the best results across +different screen sizes and update to the looks of layout. +[ProtoLayoutEdgeContentLayoutResponsive] + return EdgeContentLayout.Builder().build() + ------------------------- +src/foo/Bar.kt:36:Warning: EdgeContentLayout used, but responsiveness +isn't set: Please call +setResponsiveContentInsetEnabled(true) for the best results across +different screen sizes and update to the looks of layout. +[ProtoLayoutEdgeContentLayoutResponsive] + EdgeContentLayout.Builder() + ------------------------- +src/foo/Bar.kt:42:Warning: EdgeContentLayout used, but responsiveness +isn't set: Please call +setResponsiveContentInsetEnabled(true) for the best results across +different screen sizes and update to the looks of layout. +[ProtoLayoutEdgeContentLayoutResponsive] + random(EdgeContentLayout.Builder()) + ------------------------- +src/foo/Bar.kt:47:Warning: EdgeContentLayout used, but responsiveness +isn't set: Please call +setResponsiveContentInsetEnabled(true) for the best results across +different screen sizes and update to the looks of layout. +[ProtoLayoutEdgeContentLayoutResponsive] + val e = EdgeContentLayout.Builder() + ------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here are the relevant source files: + +`src/androidx/wear/protolayout/material/layouts/EdgeContentLayout.java`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers +package androidx.wear.protolayout.material.layouts; + +import androidx.wear.protolayout.DeviceParameters; + +public class EdgeContentLayout { + public static class Builder { + public Builder(DeviceParameters deviceParameters) {} + public Builder() {} + + public Builder setResponsiveContentInsetEnabled(boolean enabled) { + return this; + } + + public EdgeContentLayout build() { + return new EdgeContentLayout(); + } + } +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`src/foo/Bar.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package foo +import androidx.wear.protolayout.material.layouts.EdgeContentLayout + +val layout = EdgeContentLayout.Builder(null) + .setResponsiveContentInsetEnabled(false) + .build() + +class Bar { + val layout = EdgeContentLayout.Builder(null) + .build() + + val layoutFalse = EdgeContentLayout.Builder(null) + .setResponsiveContentInsetEnabled(false) + .build() + + fun buildFalse() { + val l = EdgeContentLayout.Builder(null) + .setResponsiveContentInsetEnabled(false) + return l.build() + } + + fun update() { + val enabled = false + EdgeContentLayout.Builder().setResponsiveContentInsetEnabled(enabled) + } + + fun build() { + update().build() + } + + fun build2() { + return EdgeContentLayout.Builder().build() + } + + fun doubleFalse() { + EdgeContentLayout.Builder() + .setResponsiveContentInsetEnabled(true) + .setResponsiveContentInsetEnabled(false) + } + + fun callRandom() { + random(EdgeContentLayout.Builder()) + } + fun random(val l: EdgeContentLayout.Builder) {} + + fun condition(val cond: Boolean) { + val e = EdgeContentLayout.Builder() + if (cond) { + e.setResponsiveContentInsetEnabled(false) + } else { + e.setResponsiveContentInsetEnabled(true) + } + } +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/wear/protolayout/protolayout-lint/src/test/java/EdgeContentLayoutResponsiveDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `ResponsiveLayoutDetector.edgeContentLayout without responsiveness requires and fixes setter`. +To report a problem with this extracted sample, visit +https://issuetracker.google.com/issues/new?component=1112273. + +(##) Repackaged + +This lint check appears to have been packaged in other artifacts as +well. Issue id's must be unique, so you cannot combine these libraries. +Also defined in: +* ProtoLayoutEdgeContentLayoutResponsive: ProtoLayout Material EdgeContentLayout should be used with responsivebehaviour to ensure the best behaviour across different screen sizes andlocales (this issue) +* [ProtoLayoutEdgeContentLayoutResponsive from androidx.wear.protolayout:protolayout-expression:1.4.0-rc01](ProtoLayoutEdgeContentLayoutResponsive.md.html) +* [ProtoLayoutEdgeContentLayoutResponsive from androidx.wear.protolayout:protolayout:1.3.0-beta01](ProtoLayoutEdgeContentLayoutResponsive-2.md.html) + + (##) Including !!! @@ -57,39 +230,32 @@ ``` // build.gradle.kts -implementation("androidx.wear.protolayout:protolayout:1.3.0-beta01") +implementation("androidx.wear.protolayout:protolayout-expression:1.4.0-rc01") // build.gradle -implementation 'androidx.wear.protolayout:protolayout:1.3.0-beta01' +implementation 'androidx.wear.protolayout:protolayout-expression:1.4.0-rc01' // build.gradle.kts with version catalogs: -implementation(libs.protolayout) +implementation(libs.protolayout.expression) # libs.versions.toml [versions] -protolayout = "1.3.0-beta01" +protolayout-expression = "1.4.0-rc01" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single # line (see https://github.com/toml-lang/toml/issues/516) so adjust # when pasting into libs.versions.toml: -protolayout = { - module = "androidx.wear.protolayout:protolayout", - version.ref = "protolayout" +protolayout-expression = { + module = "androidx.wear.protolayout:protolayout-expression", + version.ref = "protolayout-expression" } ``` -1.3.0-beta01 is the version this documentation was generated from; +1.4.0-rc01 is the version this documentation was generated from; there may be newer versions available. -NOTE: These lint checks are **also** made available separate from the main library. -Use one of the following artifacts: -* `androidx.wear.protolayout:protolayout-expression:1.3.0-beta01` -* `androidx.wear.protolayout:protolayout-material3:1.3.0-beta01` -* `androidx.wear.protolayout:protolayout-material:1.3.0-beta01` - - -[Additional details about androidx.wear.protolayout:protolayout](androidx_wear_protolayout_protolayout.md.html). +[Additional details about androidx.wear.protolayout:protolayout-expression](androidx_wear_protolayout_protolayout-expression.md.html). (##) Suppressing You can suppress false positives using one of the following mechanisms: diff --git a/docs/checks/ProtoLayoutMinSchema-2.md.html b/docs/checks/ProtoLayoutMinSchema-2.md.html new file mode 100644 index 00000000..79256a1d --- /dev/null +++ b/docs/checks/ProtoLayoutMinSchema-2.md.html @@ -0,0 +1,249 @@ + +(#) ProtoLayout feature is not guaranteed to be available on the target device API + +!!! ERROR: ProtoLayout feature is not guaranteed to be available on the target device API + This is an error. + +Id +: `ProtoLayoutMinSchema` +Summary +: ProtoLayout feature is not guaranteed to be available on the target device API +Severity +: Error +Category +: Correctness +Platform +: Android +Vendor +: Android Open Source Project +Identifier +: androidx.wear.protolayout +Feedback +: https://issuetracker.google.com/issues/new?component=1112273 +Min +: Lint 8.7+ +Compiled +: Lint 8.7+ +Artifact +: [androidx.wear.protolayout:protolayout](androidx_wear_protolayout_protolayout.md.html) +Since +: 1.1.0 +Affects +: Kotlin and Java files +Editing +: This check runs on the fly in the IDE editor +Implementation +: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/wear/protolayout/protolayout-lint/src/main/java/androidx/wear/protolayout/lint/ProtoLayoutMinSchemaDetector.kt) +Tests +: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/wear/protolayout/protolayout-lint/src/test/java/ProtoLayoutMinSchemaDetectorTest.kt) +Copyright Year +: 2023 + +Using features that are not supported by an older ProtoLayout +renderer/evaluator, can lead to unexpected rendering or invalid results +(for expressions). + +Each Wear OS platform version has a guaranteed minimum ProtoLayout +schema version. +On API 33, all consumers for ProtoLayout support at least Schema version +1.2 (major=1, minor=200). +On API 34, all consumers for ProtoLayout support at least Schema version +1.3 (major=1, minor=300). + +You can use those newer features through conditional Android API checks, +or by increasing the minSdk for your project. +You can also annotate your methods with @RequiresApi or +@RequiresSchemaAnnotation if you know they require the +corresponding version. +Note that @RequiresSchemaVersion annotation on classes are mostly +ignored (except for Builder classes). + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/foo/Bar.kt:6:Error: This API is not guaranteed to be available on +the device (requires schema 1.200). [ProtoLayoutMinSchema] + private val fieldAssignment = withAnnotation.annotatedMethod() + -------------------------------- +src/foo/Bar.kt:12:Error: This API is not guaranteed to be available on +the device (requires schema 1.200). [ProtoLayoutMinSchema] + bar() + ----- +src/foo/Bar.kt:14:Error: This API is not guaranteed to be available on +the device (requires schema 1.200). [ProtoLayoutMinSchema] + withAnnotation.annotatedMethod() + -------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here are the relevant source files: + +`src/foo/WithAnnotation.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package foo +import androidx.wear.protolayout.expression.RequiresSchemaVersion + +@RequiresSchemaVersion(major=1, minor=200) +class WithAnnotation { + fun unAnnotatedMethod(){} + + @RequiresSchemaVersion(major=1, minor=200) + fun annotatedMethod(){} + + @RequiresSchemaVersion(major=1, minor=200) + fun unreferencedMethod(){} + + companion object { + @RequiresSchemaVersion(major=1, minor=200) + const val ANNOTATED_CONST = 10 + } +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`src/foo/Bar.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package foo +import androidx.wear.protolayout.expression.RequiresSchemaVersion + +class Bar { + private val withAnnotation = WithAnnotation() + private val fieldAssignment = withAnnotation.annotatedMethod() + + @RequiresSchemaVersion(major=1, minor=200) + fun bar() {} + + fun baz() { + bar() + withAnnotation.unAnnotatedMethod() + withAnnotation.annotatedMethod() + //TODO: b/308552481 - This should fail + val b = withAnnotation.ANNOTATED_CONST + } +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/wear/protolayout/protolayout-lint/src/test/java/ProtoLayoutMinSchemaDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `ProtoLayoutMinSchemaDetector.calling V1_2 API requires SDK version check`. +To report a problem with this extracted sample, visit +https://issuetracker.google.com/issues/new?component=1112273. + +(##) Repackaged + +This lint check appears to have been packaged in other artifacts as +well. Issue id's must be unique, so you cannot combine these libraries. +Also defined in: +* ProtoLayoutMinSchema: ProtoLayout feature is not guaranteed to be available on the target device API (this issue) +* [ProtoLayoutMinSchema from androidx.wear.protolayout:protolayout-expression:1.4.0-rc01](ProtoLayoutMinSchema.md.html) +* [ProtoLayoutMinSchema from androidx.wear.protolayout:protolayout:1.3.0-beta01](ProtoLayoutMinSchema-2.md.html) + + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("androidx.wear.protolayout:protolayout:1.3.0-beta01") + +// build.gradle +implementation 'androidx.wear.protolayout:protolayout:1.3.0-beta01' + +// build.gradle.kts with version catalogs: +implementation(libs.protolayout) + +# libs.versions.toml +[versions] +protolayout = "1.3.0-beta01" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +protolayout = { + module = "androidx.wear.protolayout:protolayout", + version.ref = "protolayout" +} +``` + +1.3.0-beta01 is the version this documentation was generated from; +there may be newer versions available. + +NOTE: These lint checks are **also** made available separate from the main library. +Use one of the following artifacts: +* `androidx.wear.protolayout:protolayout-material3:1.3.0-beta01` +* `androidx.wear.protolayout:protolayout-material:1.3.0-beta01` + + +[Additional details about androidx.wear.protolayout:protolayout](androidx_wear_protolayout_protolayout.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Using a suppression annotation like this on the enclosing + element: + + ```kt + // Kotlin + @Suppress("ProtoLayoutMinSchema") + fun method() { + problematicStatement() + } + ``` + + or + + ```java + // Java + @SuppressWarnings("ProtoLayoutMinSchema") + void method() { + problematicStatement(); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection ProtoLayoutMinSchema + problematicStatement() + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="ProtoLayoutMinSchema" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'ProtoLayoutMinSchema' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore ProtoLayoutMinSchema ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/ProtoLayoutMinSchema.md.html b/docs/checks/ProtoLayoutMinSchema.md.html index 9aab0208..46935bbe 100644 --- a/docs/checks/ProtoLayoutMinSchema.md.html +++ b/docs/checks/ProtoLayoutMinSchema.md.html @@ -25,7 +25,7 @@ Compiled : Lint 8.7+ Artifact -: [androidx.wear.protolayout:protolayout](androidx_wear_protolayout_protolayout.md.html) +: [androidx.wear.protolayout:protolayout-expression](androidx_wear_protolayout_protolayout-expression.md.html) Since : 1.1.0 Affects @@ -74,7 +74,7 @@ the device (requires schema 1.200). [ProtoLayoutMinSchema] withAnnotation.annotatedMethod() -------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -98,7 +98,7 @@ const val ANNOTATED_CONST = 10 } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/foo/Bar.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -120,7 +120,7 @@ val b = withAnnotation.ANNOTATED_CONST } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/wear/protolayout/protolayout-lint/src/test/java/ProtoLayoutMinSchemaDetectorTest.kt) @@ -131,6 +131,16 @@ To report a problem with this extracted sample, visit https://issuetracker.google.com/issues/new?component=1112273. +(##) Repackaged + +This lint check appears to have been packaged in other artifacts as +well. Issue id's must be unique, so you cannot combine these libraries. +Also defined in: +* ProtoLayoutMinSchema: ProtoLayout feature is not guaranteed to be available on the target device API (this issue) +* [ProtoLayoutMinSchema from androidx.wear.protolayout:protolayout-expression:1.4.0-rc01](ProtoLayoutMinSchema.md.html) +* [ProtoLayoutMinSchema from androidx.wear.protolayout:protolayout:1.3.0-beta01](ProtoLayoutMinSchema-2.md.html) + + (##) Including !!! @@ -139,39 +149,32 @@ ``` // build.gradle.kts -implementation("androidx.wear.protolayout:protolayout:1.3.0-beta01") +implementation("androidx.wear.protolayout:protolayout-expression:1.4.0-rc01") // build.gradle -implementation 'androidx.wear.protolayout:protolayout:1.3.0-beta01' +implementation 'androidx.wear.protolayout:protolayout-expression:1.4.0-rc01' // build.gradle.kts with version catalogs: -implementation(libs.protolayout) +implementation(libs.protolayout.expression) # libs.versions.toml [versions] -protolayout = "1.3.0-beta01" +protolayout-expression = "1.4.0-rc01" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single # line (see https://github.com/toml-lang/toml/issues/516) so adjust # when pasting into libs.versions.toml: -protolayout = { - module = "androidx.wear.protolayout:protolayout", - version.ref = "protolayout" +protolayout-expression = { + module = "androidx.wear.protolayout:protolayout-expression", + version.ref = "protolayout-expression" } ``` -1.3.0-beta01 is the version this documentation was generated from; +1.4.0-rc01 is the version this documentation was generated from; there may be newer versions available. -NOTE: These lint checks are **also** made available separate from the main library. -Use one of the following artifacts: -* `androidx.wear.protolayout:protolayout-expression:1.3.0-beta01` -* `androidx.wear.protolayout:protolayout-material3:1.3.0-beta01` -* `androidx.wear.protolayout:protolayout-material:1.3.0-beta01` - - -[Additional details about androidx.wear.protolayout:protolayout](androidx_wear_protolayout_protolayout.md.html). +[Additional details about androidx.wear.protolayout:protolayout-expression](androidx_wear_protolayout_protolayout-expression.md.html). (##) Suppressing You can suppress false positives using one of the following mechanisms: diff --git a/docs/checks/ProtoLayoutPrimaryLayoutResponsive-2.md.html b/docs/checks/ProtoLayoutPrimaryLayoutResponsive-2.md.html new file mode 100644 index 00000000..f5d59dc6 --- /dev/null +++ b/docs/checks/ProtoLayoutPrimaryLayoutResponsive-2.md.html @@ -0,0 +1,271 @@ + +(#) ProtoLayout Material PrimaryLayout should be used with responsive behaviourto ensure the best behaviour across different screen sizes and locales + +!!! WARNING: ProtoLayout Material PrimaryLayout should be used with responsive behaviourto ensure the best behaviour across different screen sizes and locales + This is a warning. + +Id +: `ProtoLayoutPrimaryLayoutResponsive` +Summary +: ProtoLayout Material PrimaryLayout should be used with responsive behaviourto ensure the best behaviour across different screen sizes and locales +Severity +: Warning +Category +: Correctness +Platform +: Android +Vendor +: Android Open Source Project +Identifier +: androidx.wear.protolayout +Feedback +: https://issuetracker.google.com/issues/new?component=1112273 +Min +: Lint 8.7+ +Compiled +: Lint 8.7+ +Artifact +: [androidx.wear.protolayout:protolayout](androidx_wear_protolayout_protolayout.md.html) +Since +: 1.2.0 +Affects +: Kotlin and Java files +Editing +: This check runs on the fly in the IDE editor +Implementation +: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/wear/protolayout/protolayout-lint/src/main/java/androidx/wear/protolayout/lint/ResponsiveLayoutDetector.kt) +Tests +: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/wear/protolayout/protolayout-lint/src/test/java/PrimaryLayoutResponsiveDetectorTest.kt) +Copyright Year +: 2024 + +It is highly recommended to use the latest +setResponsiveInsetEnabled(true) when you're +using the ProtoLayout's PrimaryLayout. + +This is will take care of all inner padding to ensure that content of +labels and bottom +chip doesn't go off the screen (especially with different locales). + +!!! Tip + This lint check has an associated quickfix available in the IDE. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/foo/Bar.kt:4:Warning: PrimaryLayout used, but responsiveness isn't +set: Please call +setResponsiveContentInsetEnabled(true) for the best results across +different screen sizes. [ProtoLayoutPrimaryLayoutResponsive] +val layout = PrimaryLayout.Builder(null) + --------------------- +src/foo/Bar.kt:9:Warning: PrimaryLayout used, but responsiveness isn't +set: Please call +setResponsiveContentInsetEnabled(true) for the best results across +different screen sizes. [ProtoLayoutPrimaryLayoutResponsive] + val layout = PrimaryLayout.Builder(null) + --------------------- +src/foo/Bar.kt:12:Warning: PrimaryLayout used, but responsiveness isn't +set: Please call +setResponsiveContentInsetEnabled(true) for the best results across +different screen sizes. [ProtoLayoutPrimaryLayoutResponsive] + val layoutFalse = PrimaryLayout.Builder(null) + --------------------- +src/foo/Bar.kt:17:Warning: PrimaryLayout used, but responsiveness isn't +set: Please call +setResponsiveContentInsetEnabled(true) for the best results across +different screen sizes. [ProtoLayoutPrimaryLayoutResponsive] + val l = PrimaryLayout.Builder(null) + --------------------- +src/foo/Bar.kt:24:Warning: PrimaryLayout used, but responsiveness isn't +set: Please call +setResponsiveContentInsetEnabled(true) for the best results across +different screen sizes. [ProtoLayoutPrimaryLayoutResponsive] + PrimaryLayout.Builder().setResponsiveContentInsetEnabled(enabled) + --------------------- +src/foo/Bar.kt:32:Warning: PrimaryLayout used, but responsiveness isn't +set: Please call +setResponsiveContentInsetEnabled(true) for the best results across +different screen sizes. [ProtoLayoutPrimaryLayoutResponsive] + return PrimaryLayout.Builder().build() + --------------------- +src/foo/Bar.kt:36:Warning: PrimaryLayout used, but responsiveness isn't +set: Please call +setResponsiveContentInsetEnabled(true) for the best results across +different screen sizes. [ProtoLayoutPrimaryLayoutResponsive] + PrimaryLayout.Builder() + --------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/foo/Bar.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package foo +import androidx.wear.protolayout.material.layouts.PrimaryLayout + +val layout = PrimaryLayout.Builder(null) + .setResponsiveContentInsetEnabled(false) + .build() + +class Bar { + val layout = PrimaryLayout.Builder(null) + .build() + + val layoutFalse = PrimaryLayout.Builder(null) + .setResponsiveContentInsetEnabled(false) + .build() + + fun buildFalse() { + val l = PrimaryLayout.Builder(null) + .setResponsiveContentInsetEnabled(false) + return l.build() + } + + fun update() { + val enabled = false + PrimaryLayout.Builder().setResponsiveContentInsetEnabled(enabled) + } + + fun build() { + update().build() + } + + fun build2() { + return PrimaryLayout.Builder().build() + } + + fun doubleFalse() { + PrimaryLayout.Builder() + .setResponsiveContentInsetEnabled(true) + .setResponsiveContentInsetEnabled(false) + } +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/wear/protolayout/protolayout-lint/src/test/java/PrimaryLayoutResponsiveDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `ResponsiveLayoutDetector.primaryLayout without responsiveness requires and fixes setter`. +To report a problem with this extracted sample, visit +https://issuetracker.google.com/issues/new?component=1112273. + +(##) Repackaged + +This lint check appears to have been packaged in other artifacts as +well. Issue id's must be unique, so you cannot combine these libraries. +Also defined in: +* ProtoLayoutPrimaryLayoutResponsive: ProtoLayout Material PrimaryLayout should be used with responsive behaviourto ensure the best behaviour across different screen sizes and locales (this issue) +* [ProtoLayoutPrimaryLayoutResponsive from androidx.wear.protolayout:protolayout-expression:1.4.0-rc01](ProtoLayoutPrimaryLayoutResponsive.md.html) +* [ProtoLayoutPrimaryLayoutResponsive from androidx.wear.protolayout:protolayout:1.3.0-beta01](ProtoLayoutPrimaryLayoutResponsive-2.md.html) + + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("androidx.wear.protolayout:protolayout:1.3.0-beta01") + +// build.gradle +implementation 'androidx.wear.protolayout:protolayout:1.3.0-beta01' + +// build.gradle.kts with version catalogs: +implementation(libs.protolayout) + +# libs.versions.toml +[versions] +protolayout = "1.3.0-beta01" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +protolayout = { + module = "androidx.wear.protolayout:protolayout", + version.ref = "protolayout" +} +``` + +1.3.0-beta01 is the version this documentation was generated from; +there may be newer versions available. + +NOTE: These lint checks are **also** made available separate from the main library. +Use one of the following artifacts: +* `androidx.wear.protolayout:protolayout-material3:1.3.0-beta01` +* `androidx.wear.protolayout:protolayout-material:1.3.0-beta01` + + +[Additional details about androidx.wear.protolayout:protolayout](androidx_wear_protolayout_protolayout.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Using a suppression annotation like this on the enclosing + element: + + ```kt + // Kotlin + @Suppress("ProtoLayoutPrimaryLayoutResponsive") + fun method() { + Builder(...) + } + ``` + + or + + ```java + // Java + @SuppressWarnings("ProtoLayoutPrimaryLayoutResponsive") + void method() { + new Builder(...); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection ProtoLayoutPrimaryLayoutResponsive + problematicStatement() + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="ProtoLayoutPrimaryLayoutResponsive" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'ProtoLayoutPrimaryLayoutResponsive' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore ProtoLayoutPrimaryLayoutResponsive ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/ProtoLayoutPrimaryLayoutResponsive.md.html b/docs/checks/ProtoLayoutPrimaryLayoutResponsive.md.html index 44fc26ed..690230ea 100644 --- a/docs/checks/ProtoLayoutPrimaryLayoutResponsive.md.html +++ b/docs/checks/ProtoLayoutPrimaryLayoutResponsive.md.html @@ -25,7 +25,7 @@ Compiled : Lint 8.7+ Artifact -: [androidx.wear.protolayout:protolayout](androidx_wear_protolayout_protolayout.md.html) +: [androidx.wear.protolayout:protolayout-expression](androidx_wear_protolayout_protolayout-expression.md.html) Since : 1.2.0 Affects @@ -96,7 +96,7 @@ different screen sizes. [ProtoLayoutPrimaryLayoutResponsive] PrimaryLayout.Builder() --------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -142,7 +142,7 @@ .setResponsiveContentInsetEnabled(false) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/wear/protolayout/protolayout-lint/src/test/java/PrimaryLayoutResponsiveDetectorTest.kt) @@ -153,6 +153,16 @@ To report a problem with this extracted sample, visit https://issuetracker.google.com/issues/new?component=1112273. +(##) Repackaged + +This lint check appears to have been packaged in other artifacts as +well. Issue id's must be unique, so you cannot combine these libraries. +Also defined in: +* ProtoLayoutPrimaryLayoutResponsive: ProtoLayout Material PrimaryLayout should be used with responsive behaviourto ensure the best behaviour across different screen sizes and locales (this issue) +* [ProtoLayoutPrimaryLayoutResponsive from androidx.wear.protolayout:protolayout-expression:1.4.0-rc01](ProtoLayoutPrimaryLayoutResponsive.md.html) +* [ProtoLayoutPrimaryLayoutResponsive from androidx.wear.protolayout:protolayout:1.3.0-beta01](ProtoLayoutPrimaryLayoutResponsive-2.md.html) + + (##) Including !!! @@ -161,39 +171,32 @@ ``` // build.gradle.kts -implementation("androidx.wear.protolayout:protolayout:1.3.0-beta01") +implementation("androidx.wear.protolayout:protolayout-expression:1.4.0-rc01") // build.gradle -implementation 'androidx.wear.protolayout:protolayout:1.3.0-beta01' +implementation 'androidx.wear.protolayout:protolayout-expression:1.4.0-rc01' // build.gradle.kts with version catalogs: -implementation(libs.protolayout) +implementation(libs.protolayout.expression) # libs.versions.toml [versions] -protolayout = "1.3.0-beta01" +protolayout-expression = "1.4.0-rc01" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single # line (see https://github.com/toml-lang/toml/issues/516) so adjust # when pasting into libs.versions.toml: -protolayout = { - module = "androidx.wear.protolayout:protolayout", - version.ref = "protolayout" +protolayout-expression = { + module = "androidx.wear.protolayout:protolayout-expression", + version.ref = "protolayout-expression" } ``` -1.3.0-beta01 is the version this documentation was generated from; +1.4.0-rc01 is the version this documentation was generated from; there may be newer versions available. -NOTE: These lint checks are **also** made available separate from the main library. -Use one of the following artifacts: -* `androidx.wear.protolayout:protolayout-expression:1.3.0-beta01` -* `androidx.wear.protolayout:protolayout-material3:1.3.0-beta01` -* `androidx.wear.protolayout:protolayout-material:1.3.0-beta01` - - -[Additional details about androidx.wear.protolayout:protolayout](androidx_wear_protolayout_protolayout.md.html). +[Additional details about androidx.wear.protolayout:protolayout-expression](androidx_wear_protolayout_protolayout-expression.md.html). (##) Suppressing You can suppress false positives using one of the following mechanisms: diff --git a/docs/checks/ProviderReadPermissionOnly.md.html b/docs/checks/ProviderReadPermissionOnly.md.html index 8ee0dc24..1ab11091 100644 --- a/docs/checks/ProviderReadPermissionOnly.md.html +++ b/docs/checks/ProviderReadPermissionOnly.md.html @@ -60,7 +60,7 @@ android:writePermission [ProviderReadPermissionOnly] <provider android:name="test.pkg.KotlinTestContentProvider" android:readPermission="android.permission.READ_DATA"/> ---------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -74,7 +74,7 @@ <provider android:name="test.pkg.KotlinTestContentProvider" android:readPermission="android.permission.READ_DATA"/> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/JavaTestContentProvider.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -104,7 +104,7 @@ System.out.println(uri); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/KotlinTestContentProvider.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -132,7 +132,7 @@ return null } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ProviderPermissionDetectorTest.kt) diff --git a/docs/checks/ProvidesMustNotBeAbstract.md.html b/docs/checks/ProvidesMustNotBeAbstract.md.html index 055ba725..51cb7944 100644 --- a/docs/checks/ProvidesMustNotBeAbstract.md.html +++ b/docs/checks/ProvidesMustNotBeAbstract.md.html @@ -83,7 +83,7 @@ [ProvidesMustNotBeAbstract] @Provides fun @receiver:MyQualifier Boolean.bind(): Comparable<Boolean> = this@bind ----------------------------------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -123,7 +123,7 @@ @Provides fun String.bind(): Comparable = this@bind @Provides fun @receiver:MyQualifier Boolean.bind(): Comparable = this@bind } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/DaggerIssuesDetectorTest.kt) diff --git a/docs/checks/ProxyPassword.md.html b/docs/checks/ProxyPassword.md.html index 358b71e1..59e9a5c6 100644 --- a/docs/checks/ProxyPassword.md.html +++ b/docs/checks/ProxyPassword.md.html @@ -42,14 +42,14 @@ [ProxyPassword] systemProp.http.proxyPassword=something --------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: `gradle.properties`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~properties linenumbers systemProp.http.proxyPassword=something -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PropertyFileDetectorTest.kt) diff --git a/docs/checks/PublicKeyCredential.md.html b/docs/checks/PublicKeyCredential.md.html index 8c017217..f59c7de4 100644 --- a/docs/checks/PublicKeyCredential.md.html +++ b/docs/checks/PublicKeyCredential.md.html @@ -42,7 +42,7 @@ [PublicKeyCredential] val request = CreatePublicKeyCredentialRequest() ---------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -51,7 +51,7 @@ dependencies { implementation 'androidx.credentials:credentials-play-services-auth:+' } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/main/kotlin/test/pkg/Test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -64,7 +64,7 @@ val request = CreatePublicKeyCredentialRequest() } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PublicKeyCredentialDetectorTest.kt) diff --git a/docs/checks/PxUsage.md.html b/docs/checks/PxUsage.md.html index 10bbdd22..f24eb4db 100644 --- a/docs/checks/PxUsage.md.html +++ b/docs/checks/PxUsage.md.html @@ -55,7 +55,7 @@ use "dp" instead [PxUsage] android:layout_width="2px" -------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -115,7 +115,7 @@ android:maxHeight="1px" android:scaleType="center" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PxUsageDetectorTest.java) diff --git a/docs/checks/QueryAllPackagesPermission.md.html b/docs/checks/QueryAllPackagesPermission.md.html index d1fe7fd6..a1297600 100644 --- a/docs/checks/QueryAllPackagesPermission.md.html +++ b/docs/checks/QueryAllPackagesPermission.md.html @@ -47,7 +47,7 @@ [QueryAllPackagesPermission] <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/><!-- ERROR --> ---------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -60,7 +60,7 @@ <uses-permission android:name="android.permission.CAMERA"/><!-- OK --> <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/><!-- ERROR --> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MainActivity.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -95,7 +95,7 @@ private fun getInstalledPackages() = Unit private fun resolveActivity() = Unit } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PackageVisibilityDetectorTest.kt) diff --git a/docs/checks/QueryPermissionsNeeded.md.html b/docs/checks/QueryPermissionsNeeded.md.html index 731a6444..d6b9e0ae 100644 --- a/docs/checks/QueryPermissionsNeeded.md.html +++ b/docs/checks/QueryPermissionsNeeded.md.html @@ -86,7 +86,7 @@ https://g.co/dev/packagevisibility for details [QueryPermissionsNeeded] Intent().resolveActivityInfo(pm, 0) // ERROR ------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -123,7 +123,7 @@ private fun getInstalledPackages() = Unit private fun resolveActivity() = Unit } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PackageVisibilityDetectorTest.kt) diff --git a/docs/checks/R8GradualApi.md.html b/docs/checks/R8GradualApi.md.html new file mode 100644 index 00000000..949f3f4c --- /dev/null +++ b/docs/checks/R8GradualApi.md.html @@ -0,0 +1,125 @@ + +(#) R8 Gradual API can be used only with experimental flag + +!!! WARNING: R8 Gradual API can be used only with experimental flag + This is a warning. + +Id +: `R8GradualApi` +Summary +: R8 Gradual API can be used only with experimental flag +Severity +: Warning +Category +: Correctness +Platform +: Android +Vendor +: Android Open Source Project +Feedback +: https://issuetracker.google.com/issues/new?component=192708 +Since +: 9.0.0 (January 2026) +Affects +: Gradle build files +Editing +: This check runs on the fly in the IDE editor +See +: https://developer.android.com/ndk/guides/abis +Implementation +: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/GradleDetector.kt) +Tests +: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) + +R8 Gradual API can be used only when experimental flag +android.r8.gradual.support is set to true. + +!!! Tip + This lint check has an associated quickfix available in the IDE. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +build.gradle:5:Warning: Cannot use optimization.enable=true without +setting android.r8.gradual.support=true flag. [R8GradualApi] + enable = true + ------ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here are the relevant source files: + +`gradle.properties`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~properties linenumbers +# comments +android.r8.gradual.support=false +android.r8.optimizedResourceShrinking=true +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`build.gradle`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~groovy linenumbers +android { + buildTypes { + release { + optimization { + enable = true + } + } + } +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `GradleDetector.testR8NewApiWithFalseFlag`. +To report a problem with this extracted sample, visit +https://issuetracker.google.com/issues/new?component=192708. + +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection R8GradualApi + problematicStatement() + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="R8GradualApi" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'R8GradualApi' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore R8GradualApi ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/Range.md.html b/docs/checks/Range.md.html index f6bdf347..a038d87a 100644 --- a/docs/checks/Range.md.html +++ b/docs/checks/Range.md.html @@ -188,7 +188,7 @@ [Range] printIndirectSize("1234567"); // ERROR --------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -354,7 +354,7 @@ printIndirectSize("1234567"); // ERROR } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/RangeDetectorTest.kt) diff --git a/docs/checks/RawColor.md.html b/docs/checks/RawColor.md.html index cb697a70..e8650ab5 100644 --- a/docs/checks/RawColor.md.html +++ b/docs/checks/RawColor.md.html @@ -51,7 +51,7 @@ instead. [RawColor] app:someCustomColor="#fff"/> ---- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -59,7 +59,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <TextView xmlns:app="http://schemas.android.com/apk/res-auto" app:someCustomColor="#fff"/> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/RawColorDetectorTest.kt) diff --git a/docs/checks/RawDimen.md.html b/docs/checks/RawDimen.md.html index 99043034..b1120cdf 100644 --- a/docs/checks/RawDimen.md.html +++ b/docs/checks/RawDimen.md.html @@ -52,14 +52,14 @@ instead. [RawDimen] <TextView xmlns:app="http://schemas.android.com/apk/res-auto" app:someCustomAttribute="16dp"/> ---- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: `res/layout/ids.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <TextView xmlns:app="http://schemas.android.com/apk/res-auto" app:someCustomAttribute="16dp"/> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/RawDimenDetectorTest.kt) diff --git a/docs/checks/RawDispatchersUse.md.html b/docs/checks/RawDispatchersUse.md.html index ac16686c..3d6e3110 100644 --- a/docs/checks/RawDispatchersUse.md.html +++ b/docs/checks/RawDispatchersUse.md.html @@ -76,7 +76,7 @@ [RawDispatchersUse] Dispatchers::Main ----------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -97,7 +97,7 @@ Dispatchers::Unconfined Dispatchers::Main } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/RawDispatchersUsageDetectorTest.kt) diff --git a/docs/checks/Recycle.md.html b/docs/checks/Recycle.md.html index 112056a2..d4b0fbcb 100644 --- a/docs/checks/Recycle.md.html +++ b/docs/checks/Recycle.md.html @@ -75,7 +75,7 @@ recycled after use with #recycle() [Recycle] final TypedArray a = getContext().obtainStyledAttributes(attrs, // Not recycled ---------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -277,7 +277,7 @@ b = a; } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/CleanupDetectorTest.kt) diff --git a/docs/checks/RecyclerView.md.html b/docs/checks/RecyclerView.md.html index b4e17406..8d15f9a1 100644 --- a/docs/checks/RecyclerView.md.html +++ b/docs/checks/RecyclerView.md.html @@ -65,7 +65,7 @@ it up later [RecyclerView] public void onBindViewHolder(ViewHolder holder, final int position, List<Object> payloads) { ------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -190,7 +190,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/RecyclerViewDetectorTest.kt) diff --git a/docs/checks/RedactedInJavaUsage.md.html b/docs/checks/RedactedInJavaUsage.md.html index 0a67e485..ee0380dc 100644 --- a/docs/checks/RedactedInJavaUsage.md.html +++ b/docs/checks/RedactedInJavaUsage.md.html @@ -59,7 +59,7 @@ Kotlin classes! [RedactedInJavaUsage] @Redacted --------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -75,7 +75,7 @@ data class RedactedClass(val value: String) data class RedactedProps(@Redacted val value: String) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/RedactedClass.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -106,7 +106,7 @@ } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/AnotherRedactedClass.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -125,7 +125,7 @@ return value; } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/RedactedUsageDetectorTest.kt) diff --git a/docs/checks/RedundantBinds.md.html b/docs/checks/RedundantBinds.md.html index df86e38b..8cd47554 100644 --- a/docs/checks/RedundantBinds.md.html +++ b/docs/checks/RedundantBinds.md.html @@ -56,7 +56,7 @@ different type [RedundantBinds] @Binds fun invalidBind(real: Long): Long ---------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -77,7 +77,7 @@ @Binds fun invalidBind(real: Long): Long @Binds fun invalidBind(real: Long): Long } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/DaggerIssuesDetectorTest.kt) diff --git a/docs/checks/RedundantLabel.md.html b/docs/checks/RedundantLabel.md.html index 7041f8b7..bc7d0a40 100644 --- a/docs/checks/RedundantLabel.md.html +++ b/docs/checks/RedundantLabel.md.html @@ -44,7 +44,7 @@ [RedundantLabel] <activity android:name=".MainActivity" android:label="@string/app_name"> -------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -66,7 +66,7 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ManifestDetectorTest.kt) diff --git a/docs/checks/RedundantNamespace.md.html b/docs/checks/RedundantNamespace.md.html index 04215a6c..790fb569 100644 --- a/docs/checks/RedundantNamespace.md.html +++ b/docs/checks/RedundantNamespace.md.html @@ -45,7 +45,7 @@ redundant [RedundantNamespace] xmlns:android="http://schemas.android.com/apk/res/android" ---------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -64,7 +64,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" /></LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/NamespaceDetectorTest.kt) diff --git a/docs/checks/ReferenceType.md.html b/docs/checks/ReferenceType.md.html index 65d358bc..08d3818a 100644 --- a/docs/checks/ReferenceType.md.html +++ b/docs/checks/ReferenceType.md.html @@ -59,7 +59,7 @@ expected value of type @color/ [ReferenceType] <item name="drawableAsColor" type="color">@drawable/my_drawable</item> --------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -81,7 +81,7 @@ <item name="colorAsDrawable" type="drawable">@color/my_color</item> <item name="drawableAsColor" type="color">@drawable/my_drawable</item> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/DuplicateResourceDetectorTest.java) diff --git a/docs/checks/ReflectionAnnotation.md.html b/docs/checks/ReflectionAnnotation.md.html new file mode 100644 index 00000000..4868338a --- /dev/null +++ b/docs/checks/ReflectionAnnotation.md.html @@ -0,0 +1,156 @@ + +(#) Missing Reflection Annotation + +!!! WARNING: Missing Reflection Annotation + This is a warning. + +Id +: `ReflectionAnnotation` +Summary +: Missing Reflection Annotation +Note +: **This issue is disabled by default**; use `--enable ReflectionAnnotation` +Severity +: Warning +Category +: Correctness +Platform +: Android +Vendor +: Android Open Source Project +Feedback +: https://issuetracker.google.com/issues/new?component=192708 +Since +: 8.13.0 (September 2025) +Affects +: Kotlin and Java files +Editing +: This check runs on the fly in the IDE editor +Implementation +: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/KeepRuleDetector.kt) +Tests +: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/KeepRuleDetectorTest.kt) + +When methods are using reflection to access APIs, they should declare +what APIs they are accessing using the new +`@UsesReflectionToAccessMethod` and `@UsesReflectionToAccessField` +annotations. This makes it possible for the shrinker (R8) to correctly +remove unused code and resources without accidentally also removing +reflectively accessed code, which can lead to program crashes. + +!!! Tip + This lint check has an associated quickfix available in the IDE. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/test/pkg/test.kt:5:Warning: This method calls +androidx.api.Printer.print() reflectively, so it should be annotated +with @UsesReflectionToAccessMethod(...) [ReflectionAnnotation] + .invoke(p, s) + ------ +src/test/pkg/JavaUsage.java:9:Warning: This method calls +androidx.api.Printer.print() reflectively, so it should be annotated +with @UsesReflectionToAccessMethod(...) [ReflectionAnnotation] + .invoke(p, s); + ------ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here are the relevant source files: + +`src/test/pkg/test.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package test.pkg +fun simpleCall(p: Any, s: String) { + Class.forName("androidx.api.Printer") + .getDeclaredMethod("print", String::class.java) + .invoke(p, s) +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`src/test/pkg/JavaUsage.java`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers +package test.pkg; + +import java.lang.reflect.Method; + +public class JavaUsage { + public void simpleCall(Object p, String s) throws Exception { + Class.forName("androidx.api.Printer") + .getDeclaredMethod("print", String.class) + .invoke(p, s); + } +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/KeepRuleDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Using a suppression annotation like this on the enclosing + element: + + ```kt + // Kotlin + @Suppress("ReflectionAnnotation") + fun method() { + forName(...) + } + ``` + + or + + ```java + // Java + @SuppressWarnings("ReflectionAnnotation") + void method() { + forName(...); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection ReflectionAnnotation + problematicStatement() + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="ReflectionAnnotation" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'ReflectionAnnotation' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore ReflectionAnnotation ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/Registered.md.html b/docs/checks/Registered.md.html index 998c1403..43662a37 100644 --- a/docs/checks/Registered.md.html +++ b/docs/checks/Registered.md.html @@ -50,7 +50,7 @@ test.pkg.MyActivity2 is not registered in the manifest [Registered] public class MyActivity2 extends Activity { ----------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -62,7 +62,7 @@ public class MyActivity1 extends Activity { } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyActivity2.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -72,7 +72,7 @@ public class MyActivity2 extends Activity { } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/AndroidManifest.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -82,7 +82,7 @@ <activity android:name=".MyActivity1" /> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/RegistrationDetectorTest.java) diff --git a/docs/checks/RelativeOverlap.md.html b/docs/checks/RelativeOverlap.md.html index 1ad2b0bb..17679167 100644 --- a/docs/checks/RelativeOverlap.md.html +++ b/docs/checks/RelativeOverlap.md.html @@ -42,7 +42,7 @@ localized text expansion [RelativeOverlap] <TextView -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -139,7 +139,7 @@ android:layout_toLeftOf="@id/image" /> </RelativeLayout> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/RelativeOverlapDetectorTest.kt) diff --git a/docs/checks/RememberInComposition.md.html b/docs/checks/RememberInComposition.md.html index c2440b42..7f1a21c4 100644 --- a/docs/checks/RememberInComposition.md.html +++ b/docs/checks/RememberInComposition.md.html @@ -27,7 +27,7 @@ Artifact : [androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html) Since -: 1.9.0-alpha01 +: 1.9.0 Affects : Kotlin and Java files and test sources Editing @@ -313,7 +313,7 @@ using remember [RememberInComposition] val barImplValue = barImpl.value ----- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -418,10 +418,10 @@ val barImplValue = barImpl.value } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/RememberInCompositionDetectorTest.kt) +You can also visit the source code ([RememberInCompositionDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/RememberInCompositionDetectorTest.kt) +[RememberInCompositionDetectorSuppressionTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/RememberInCompositionDetectorSuppressionTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test @@ -437,17 +437,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime-android:1.9.0-alpha01") +implementation("androidx.compose.runtime:runtime-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.runtime:runtime-android:1.9.0-alpha01' +implementation 'androidx.compose.runtime:runtime-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.runtime.android) # libs.versions.toml [versions] -runtime-android = "1.9.0-alpha01" +runtime-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -459,11 +459,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.runtime:runtime-lint:1.9.0-alpha01`. +You can also use `androidx.compose.runtime:runtime-lint:1.11.0-alpha06`. [Additional details about androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html). diff --git a/docs/checks/RememberReturnType.md.html b/docs/checks/RememberReturnType.md.html index 4a18f84a..e6b8b0d5 100644 --- a/docs/checks/RememberReturnType.md.html +++ b/docs/checks/RememberReturnType.md.html @@ -132,7 +132,7 @@ must not return Unit [RememberReturnType] val unit2 = remember(number1, number2, number3, flag, calculation = unitLambda) -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -226,7 +226,7 @@ remember(number1, number2, number3, flag, calculation = unitLambda) val unit2 = remember(number1, number2, number3, flag, calculation = unitLambda) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/RememberDetectorTest.kt) @@ -245,17 +245,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime-android:1.9.0-alpha01") +implementation("androidx.compose.runtime:runtime-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.runtime:runtime-android:1.9.0-alpha01' +implementation 'androidx.compose.runtime:runtime-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.runtime.android) # libs.versions.toml [versions] -runtime-android = "1.9.0-alpha01" +runtime-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -267,11 +267,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.runtime:runtime-lint:1.9.0-alpha01`. +You can also use `androidx.compose.runtime:runtime-lint:1.11.0-alpha06`. [Additional details about androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html). diff --git a/docs/checks/RememberSaveableSaverParameter.md.html b/docs/checks/RememberSaveableSaverParameter.md.html index d9e65eb2..01e7ec6e 100644 --- a/docs/checks/RememberSaveableSaverParameter.md.html +++ b/docs/checks/RememberSaveableSaverParameter.md.html @@ -84,7 +84,7 @@ [RememberSaveableSaverParameter] val mutableStateFoo4 = rememberSaveable(fooSaver4) { mutableStateOf(Foo()) } --------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -112,7 +112,7 @@ val foo4 = rememberSaveable(fooSaver4) { Foo() } val mutableStateFoo4 = rememberSaveable(fooSaver4) { mutableStateOf(Foo()) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-saveable-lint/src/test/java/androidx/compose/runtime/saveable/lint/RememberSaveableDetectorTest.kt) @@ -131,17 +131,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime-saveable-android:1.9.0-alpha01") +implementation("androidx.compose.runtime:runtime-saveable-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.runtime:runtime-saveable-android:1.9.0-alpha01' +implementation 'androidx.compose.runtime:runtime-saveable-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.runtime.saveable.android) # libs.versions.toml [versions] -runtime-saveable-android = "1.9.0-alpha01" +runtime-saveable-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -153,11 +153,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.runtime:runtime-saveable-lint:1.9.0-alpha01`. +You can also use `androidx.compose.runtime:runtime-saveable-lint:1.11.0-alpha06`. [Additional details about androidx.compose.runtime:runtime-saveable-android](androidx_compose_runtime_runtime-saveable-android.md.html). diff --git a/docs/checks/RemoteViewLayout.md.html b/docs/checks/RemoteViewLayout.md.html index ac7770d7..ddbc7af9 100644 --- a/docs/checks/RemoteViewLayout.md.html +++ b/docs/checks/RemoteViewLayout.md.html @@ -42,7 +42,7 @@ androidx.appcompat.widget.AppCompatTextView [RemoteViewLayout] val remoteView = RemoteViews(packageName, R.layout.test) --------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -54,7 +54,7 @@ fun test(packageName: String) { val remoteView = RemoteViews(packageName, R.layout.test) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout/test.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -84,12 +84,12 @@ <RadioGroup /> <androidx.appcompat.widget.AppCompatTextView /> </merge> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `test.pkg`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text linenumbers @layout/test -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/RemoteViewDetectorTest.kt) diff --git a/docs/checks/RemoveWorkManagerInitializer.md.html b/docs/checks/RemoveWorkManagerInitializer.md.html index 8a88eb28..2c6332a0 100644 --- a/docs/checks/RemoveWorkManagerInitializer.md.html +++ b/docs/checks/RemoveWorkManagerInitializer.md.html @@ -56,7 +56,7 @@ [RemoveWorkManagerInitializer] <application /> --------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -67,7 +67,7 @@ package="com.example"> <application /> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `com/example/App.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -83,7 +83,7 @@ override fun getWorkManagerConfiguration(): Configuration = TODO() } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/work/work-lint/src/test/java/androidx/work/lint/RemoveWorkManagerInitializerDetectorTest.kt) @@ -102,17 +102,17 @@ ``` // build.gradle.kts -implementation("androidx.work:work-runtime:2.10.1") +implementation("androidx.work:work-runtime:2.11.1") // build.gradle -implementation 'androidx.work:work-runtime:2.10.1' +implementation 'androidx.work:work-runtime:2.11.1' // build.gradle.kts with version catalogs: implementation(libs.work.runtime) # libs.versions.toml [versions] -work-runtime = "2.10.1" +work-runtime = "2.11.1" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -124,7 +124,7 @@ } ``` -2.10.1 is the version this documentation was generated from; +2.11.1 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.work:work-runtime](androidx_work_work-runtime.md.html). diff --git a/docs/checks/RepeatOnLifecycleWrongUsage-2.md.html b/docs/checks/RepeatOnLifecycleWrongUsage-2.md.html index 999c151a..e88a66e3 100644 --- a/docs/checks/RepeatOnLifecycleWrongUsage-2.md.html +++ b/docs/checks/RepeatOnLifecycleWrongUsage-2.md.html @@ -49,7 +49,7 @@ well. Issue id's must be unique, so you cannot combine these libraries. Also defined in: * RepeatOnLifecycleWrongUsage: Wrong usage of repeatOnLifecycle (this issue) -* [RepeatOnLifecycleWrongUsage from androidx.lifecycle:lifecycle-runtime-android:2.9.0-rc01](RepeatOnLifecycleWrongUsage.md.html) +* [RepeatOnLifecycleWrongUsage from androidx.lifecycle:lifecycle-runtime-android:2.11.0-alpha01](RepeatOnLifecycleWrongUsage.md.html) * [RepeatOnLifecycleWrongUsage from androidx.lifecycle:lifecycle-runtime-ktx:2.8.0-alpha01](RepeatOnLifecycleWrongUsage-2.md.html) diff --git a/docs/checks/RepeatOnLifecycleWrongUsage.md.html b/docs/checks/RepeatOnLifecycleWrongUsage.md.html index 11d3725f..b5a63884 100644 --- a/docs/checks/RepeatOnLifecycleWrongUsage.md.html +++ b/docs/checks/RepeatOnLifecycleWrongUsage.md.html @@ -49,7 +49,7 @@ well. Issue id's must be unique, so you cannot combine these libraries. Also defined in: * RepeatOnLifecycleWrongUsage: Wrong usage of repeatOnLifecycle (this issue) -* [RepeatOnLifecycleWrongUsage from androidx.lifecycle:lifecycle-runtime-android:2.9.0-rc01](RepeatOnLifecycleWrongUsage.md.html) +* [RepeatOnLifecycleWrongUsage from androidx.lifecycle:lifecycle-runtime-android:2.11.0-alpha01](RepeatOnLifecycleWrongUsage.md.html) * [RepeatOnLifecycleWrongUsage from androidx.lifecycle:lifecycle-runtime-ktx:2.8.0-alpha01](RepeatOnLifecycleWrongUsage-2.md.html) @@ -61,17 +61,17 @@ ``` // build.gradle.kts -implementation("androidx.lifecycle:lifecycle-runtime-android:2.9.0-rc01") +implementation("androidx.lifecycle:lifecycle-runtime-android:2.11.0-alpha01") // build.gradle -implementation 'androidx.lifecycle:lifecycle-runtime-android:2.9.0-rc01' +implementation 'androidx.lifecycle:lifecycle-runtime-android:2.11.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.lifecycle.runtime.android) # libs.versions.toml [versions] -lifecycle-runtime-android = "2.9.0-rc01" +lifecycle-runtime-android = "2.11.0-alpha01" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -83,7 +83,7 @@ } ``` -2.9.0-rc01 is the version this documentation was generated from; +2.11.0-alpha01 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.lifecycle:lifecycle-runtime-android](androidx_lifecycle_lifecycle-runtime-android.md.html). diff --git a/docs/checks/ReportShortcutUsage.md.html b/docs/checks/ReportShortcutUsage.md.html index 362b9996..62713b4b 100644 --- a/docs/checks/ReportShortcutUsage.md.html +++ b/docs/checks/ReportShortcutUsage.md.html @@ -48,7 +48,7 @@ [ReportShortcutUsage] ShortcutManagerCompat.setDynamicShortcuts(context, shortcuts); ------------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -72,7 +72,7 @@ ShortcutManagerCompat.setDynamicShortcuts(context, shortcuts); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ShortcutUsageDetectorTest.kt) diff --git a/docs/checks/RequestInstallPackagesPolicy.md.html b/docs/checks/RequestInstallPackagesPolicy.md.html new file mode 100644 index 00000000..e97b030c --- /dev/null +++ b/docs/checks/RequestInstallPackagesPolicy.md.html @@ -0,0 +1,222 @@ + +(#) Request Install Packages Insights + +!!! WARNING: Request Install Packages Insights + This is a warning. + +Id +: `RequestInstallPackagesPolicy` +Summary +: Request Install Packages Insights +Severity +: Warning +Category +: Play Policy +Platform +: Android +Vendor +: Play policy insights beta +Min +: Lint 8.2 to 8.6 +Compiled +: Lint 8.7+ +Artifact +: [com.google.play.policy.insights:insights-lint](com_google_play_policy_insights_insights-lint.md.html) +Since +: 0.1.3 +Affects +: Kotlin and Java files and manifest files +Editing +: This check runs on the fly in the IDE editor + +`REQUEST_INSTALL_PACKAGES` permission allows apps to request the +installation of other app packages. This permission is restricted to the +app's core functionality, specifically when the primary purpose directly +involves sending, receiving, or enabling user-initiated installation of +app packages. Using this permission to update your app, change its +functionality or bundle other APKs for silent or unauthorized +installation (except enterprise management) is prohibited. All +installations must be a direct, active choice by the user. Apps +targeting Android 8+ must hold this permission in order to use +`Intent.ACTION_INSTALL_PACKAGE.` + +**Dos:** + +- Clearly and prominently document the core functionality requiring this + permission in your app’s Play Store description and when you submit + a declaration form in your Play Console. +- Adhere strictly to the permitted functionalities including web + browsing/search, file sharing/transfer/management, enterprise device + management, backup/restore, device migration/phone transfer, + companion app to sync phone to wearable or IoT device. +- Ensure your app prevents background or unintended installations. All + app package installations must be explicitly initiated by the user. + +**Don'ts:** + +- Request this permission for a functionality that is not directly + related to the primary purpose of your app. This includes + Peer-to-Peer (P2P) sharing. P2P must be the primary purpose of the + app in order to qualify as a permitted use. +- Request this permission when the required task can be done with a less + intrusive method. +- Change how your app uses this permission without first revising your + Play Console declaration with updated and accurate information. + Deceptive and undeclared uses of this permission are prohibited. + +**Helpful Links:** + +See Policy page: https://goo.gle/play-policy-request-install-packages +See developer guidance: https://goo.gle/dac-request-install-packages +See Declaration form: https://goo.gle/play-permission-decl-form + +Always review the full policy in the Policy Center to ensure +compliance. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +AndroidManifest.xml:3:Warning: REQUEST_INSTALL_PACKAGES is restricted to +specific core functionalities and must be user-initiated. No +self-updates, unauthorized installs, or APK bundling. +[RequestInstallPackagesPolicy] + <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"/> + ---------------------------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`AndroidManifest.xml`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android"> + <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"/> +</manifest> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](/policyinsights/src/test/java/com/google/play/policy/insights/RequestInstallPackagesPolicyDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `RequestInstallPackagesPolicyDetector.testFlagsRequestInstallPackages`. +To report a problem with this extracted sample, contact +Play policy insights beta. + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("com.google.play.policy.insights:insights-lint:0.1.4") + +// build.gradle +implementation 'com.google.play.policy.insights:insights-lint:0.1.4' + +// build.gradle.kts with version catalogs: +implementation(libs.insights.lint) + +# libs.versions.toml +[versions] +insights-lint = "0.1.4" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +insights-lint = { + module = "com.google.play.policy.insights:insights-lint", + version.ref = "insights-lint" +} +``` + +0.1.4 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.google.play.policy.insights:insights-lint](com_google_play_policy_insights_insights-lint.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Adding the suppression attribute + `tools:ignore="RequestInstallPackagesPolicy"` on the problematic XML + element (or one of its enclosing elements). You may also need to add + the following namespace declaration on the root element in the XML + file if it's not already there: + `xmlns:tools="http://schemas.android.com/tools"`. + + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <manifest xmlns:tools="http://schemas.android.com/tools"> + ... + <uses-permission tools:ignore="RequestInstallPackagesPolicy" .../> + ... + </manifest> + ``` + +* Using a suppression annotation like this on the enclosing + element: + + ```kt + // Kotlin + @Suppress("RequestInstallPackagesPolicy") + fun method() { + commit(...) + } + ``` + + or + + ```java + // Java + @SuppressWarnings("RequestInstallPackagesPolicy") + void method() { + commit(...); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection RequestInstallPackagesPolicy + problematicStatement() + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="RequestInstallPackagesPolicy" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'RequestInstallPackagesPolicy' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore RequestInstallPackagesPolicy ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/RequiredSize.md.html b/docs/checks/RequiredSize.md.html index e8b29e72..f828e845 100644 --- a/docs/checks/RequiredSize.md.html +++ b/docs/checks/RequiredSize.md.html @@ -56,7 +56,7 @@ layout_height attributes are missing [RequiredSize] <EditText -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -90,7 +90,7 @@ <tag id="@+id/test" /> </EditText> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/RequiredAttributeDetectorTest.java) diff --git a/docs/checks/RequiresFeature.md.html b/docs/checks/RequiresFeature.md.html index b55fcde2..66b5b878 100644 --- a/docs/checks/RequiresFeature.md.html +++ b/docs/checks/RequiresFeature.md.html @@ -81,7 +81,7 @@ test.framework.pkg.FeatureChecker#hasFeature [RequiresFeature] api.someMethod(); // 17 - ERROR ---------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -189,7 +189,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -231,8 +231,7 @@ class SomeOtherApi { val supportsFeatureX get() = FeatureChecker.hasFeature("some.name") } - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/framework/pkg/FeatureChecker.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -242,7 +241,7 @@ public class FeatureChecker { public static boolean hasFeature(String name) { return true; } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/SomeApi.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -255,7 +254,7 @@ @RequiresFeature(name = "some.name", enforcement = "test.framework.pkg.FeatureChecker#hasFeature") public boolean someMethod() { return true; } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/RequiresFeatureDetectorTest.kt) diff --git a/docs/checks/RequiresWindowSdk.md.html b/docs/checks/RequiresWindowSdk.md.html index 1888cf55..2082858e 100644 --- a/docs/checks/RequiresWindowSdk.md.html +++ b/docs/checks/RequiresWindowSdk.md.html @@ -53,7 +53,7 @@ [RequiresWindowSdk] val supportedPostures = windowInfoTracker.supportedPostures // ERROR 1 ----------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -73,7 +73,7 @@ val supportedPostures = windowInfoTracker.supportedPostures // ERROR 1 } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WindowExtensionsDetectorTest.kt) diff --git a/docs/checks/ResAuto.md.html b/docs/checks/ResAuto.md.html index 8e91a4a0..1e0062bc 100644 --- a/docs/checks/ResAuto.md.html +++ b/docs/checks/ResAuto.md.html @@ -52,7 +52,7 @@ http://schemas.android.com/apk/res-auto? [ResAuto] xmlns:app="http://schemas.android.com/apk/auto-res/" ---------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -76,7 +76,7 @@ android:text="Button" /> </androidx.gridlayout.widget.GridLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/NamespaceDetectorTest.kt) diff --git a/docs/checks/ReservedSystemPermission.md.html b/docs/checks/ReservedSystemPermission.md.html index 7a3f347f..9872eb8d 100644 --- a/docs/checks/ReservedSystemPermission.md.html +++ b/docs/checks/ReservedSystemPermission.md.html @@ -50,7 +50,7 @@ reserved system prefix android. [ReservedSystemPermission] <permission android:name="android.permission.FOOBAR" /> ------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -62,10 +62,10 @@ <permission android:name="android.permission.BIND_APPWIDGET" /> <permission android:name="android.permission.FOOBAR" /> <application> - <service android:permission="android.permission.BIND_APPWIDGET" /> + <service android:name="myservice" android:permission="android.permission.BIND_APPWIDGET" /> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PermissionErrorDetectorTest.kt) diff --git a/docs/checks/ResourceAsColor.md.html b/docs/checks/ResourceAsColor.md.html index 9cbf570c..013bc400 100644 --- a/docs/checks/ResourceAsColor.md.html +++ b/docs/checks/ResourceAsColor.md.html @@ -66,7 +66,7 @@ [ResourceAsColor] foo2(R.color.blue); ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -101,12 +101,12 @@ private void foo2(@androidx.annotation.ColorInt int c) { } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `test.pkg`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text linenumbers @color/blue -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ResourceTypeDetectorTest.kt) diff --git a/docs/checks/ResourceCycle.md.html b/docs/checks/ResourceCycle.md.html index 2035a0dc..463b1a76 100644 --- a/docs/checks/ResourceCycle.md.html +++ b/docs/checks/ResourceCycle.md.html @@ -44,7 +44,7 @@ should not extend itself [ResourceCycle] <style name="DetailsPage_EditorialBuyButton" parent="@style/DetailsPage_EditorialBuyButton" /> ---------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -64,8 +64,7 @@ --> </resources> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ResourceCycleDetectorTest.java) diff --git a/docs/checks/ResourceName.md.html b/docs/checks/ResourceName.md.html index 846e87bf..44c8b3d2 100644 --- a/docs/checks/ResourceName.md.html +++ b/docs/checks/ResourceName.md.html @@ -48,7 +48,7 @@ [ResourceName] <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -59,7 +59,7 @@ android { resourcePrefix 'unit_test_prefix_' } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/main/res/layout/activity_main.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -69,7 +69,7 @@ android:layout_height="match_parent" android:orientation="vertical" > </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/main/res/layout/unit_test_prefix_ok.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -79,7 +79,7 @@ android:layout_height="match_parent" android:orientation="vertical" > </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ResourcePrefixDetectorTest.java) diff --git a/docs/checks/ResourceType.md.html b/docs/checks/ResourceType.md.html index 041b4b64..f9a25c3f 100644 --- a/docs/checks/ResourceType.md.html +++ b/docs/checks/ResourceType.md.html @@ -39,7 +39,7 @@ src/test.kt:9:Error: Expected resource of type string [ResourceType] setLabels(iconId) // bug: should have passed descId. Both are ints but of wrong type. ------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -55,7 +55,7 @@ fun setIcon(@DrawableRes iconId: Int, @StringRes descId: Int) { setLabels(iconId) // bug: should have passed descId. Both are ints but of wrong type. } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ResourceTypeDetectorTest.kt) diff --git a/docs/checks/ResourcesGetColorCall.md.html b/docs/checks/ResourcesGetColorCall.md.html index bc6c615a..b2724bd1 100644 --- a/docs/checks/ResourcesGetColorCall.md.html +++ b/docs/checks/ResourcesGetColorCall.md.html @@ -46,7 +46,7 @@ [ResourcesGetColorCall] resources.getColor(0); -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -60,7 +60,7 @@ resources.getColor(0); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/AndroidDetectorTest.kt) diff --git a/docs/checks/ResourcesGetColorStateListCall.md.html b/docs/checks/ResourcesGetColorStateListCall.md.html index a18dc522..381a7681 100644 --- a/docs/checks/ResourcesGetColorStateListCall.md.html +++ b/docs/checks/ResourcesGetColorStateListCall.md.html @@ -46,7 +46,7 @@ [ResourcesGetColorStateListCall] resources.getColorStateList(0); ----------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -60,7 +60,7 @@ resources.getColorStateList(0); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/AndroidDetectorTest.kt) diff --git a/docs/checks/ResourcesGetDrawableCall.md.html b/docs/checks/ResourcesGetDrawableCall.md.html index 9c0157cc..fad4ea68 100644 --- a/docs/checks/ResourcesGetDrawableCall.md.html +++ b/docs/checks/ResourcesGetDrawableCall.md.html @@ -46,7 +46,7 @@ [ResourcesGetDrawableCall] resources.getDrawable(0); ----------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -60,7 +60,7 @@ resources.getDrawable(0); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/AndroidDetectorTest.kt) diff --git a/docs/checks/RestrictCallsTo.md.html b/docs/checks/RestrictCallsTo.md.html index 0d355e4d..33766b2b 100644 --- a/docs/checks/RestrictCallsTo.md.html +++ b/docs/checks/RestrictCallsTo.md.html @@ -64,7 +64,7 @@ [RestrictCallsTo] MyApiImpl().annotatedExample() ------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -100,7 +100,7 @@ println("Hello") } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/foo/DifferentFile.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -132,7 +132,7 @@ MyApiImpl().annotatedExample() } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/RestrictCallsToDetectorTest.kt) diff --git a/docs/checks/RestrictedApi.md.html b/docs/checks/RestrictedApi.md.html index f92c7f33..70a7df67 100644 --- a/docs/checks/RestrictedApi.md.html +++ b/docs/checks/RestrictedApi.md.html @@ -52,7 +52,7 @@ only be accessed from subclasses [RestrictedApi] int counter = cls.counter; // ERROR: Not from subclass ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -88,7 +88,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/RestrictToDetectorTest.kt) diff --git a/docs/checks/RetainLeaksContext.md.html b/docs/checks/RetainLeaksContext.md.html new file mode 100644 index 00000000..1e56a804 --- /dev/null +++ b/docs/checks/RetainLeaksContext.md.html @@ -0,0 +1,197 @@ + +(#) Using `retain { ... }` to store a value that extends from or references `Context` will cause a memory leak. + +!!! ERROR: Using `retain { ... }` to store a value that extends from or references `Context` will cause a memory leak. + This is an error. + +Id +: `RetainLeaksContext` +Summary +: Using `retain { ... }` to store a value that extends from or references `Context` will cause a memory leak. +Severity +: Error +Category +: Correctness +Platform +: Any +Vendor +: Jetpack Compose +Identifier +: androidx.compose.runtime.retain +Feedback +: https://issuetracker.google.com/issues/new?component=612128 +Min +: Lint 8.7+ +Compiled +: Lint 8.7+ +Artifact +: [androidx.compose.runtime:runtime-retain-android](androidx_compose_runtime_runtime-retain-android.md.html) +Since +: 1.10.0 +Affects +: Kotlin and Java files and test sources +Editing +: This check runs on the fly in the IDE editor +Implementation +: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-retain-lint/src/main/java/androidx/compose/runtime/retain/lint/RetainDetector.kt) +Tests +: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-retain-lint/src/test/java/androidx/compose/runtime/retain/lint/RetainDetectorTest.kt) +Copyright Year +: 2025 + +The lifespan of a retained object or one of its keys can extend beyond +the lifecycle of the host activity. Retaining a `Context` (or another +type that holds a strong reference to a `Context`) as either the return +type of `calculation` or as a key input to `retain` will leak the +Context and prevent its memory from being properly reclaimed. + +If caching is necessary, consider remembering offending values instead +of retaining them. + +!!! Tip + This lint check has an associated quickfix available in the IDE. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/androidx/compose/runtime/foo/test.kt:14:Error: Retaining +android.content.Context will leak a Context reference. +[RetainLeaksContext] + val foo = retain { context } + ------ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/androidx/compose/runtime/foo/test.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package androidx.compose.runtime.foo + +import android.app.Activity +import android.content.Context +import android.content.ContextWrapper +import android.view.View +import android.view.TextView +import androidx.compose.runtime.Composable +import androidx.compose.runtime.retain.retain + +@Composable +fun Test(context: Context) { + val foo = retain { context } +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-retain-lint/src/test/java/androidx/compose/runtime/retain/lint/RetainDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `RetainDetector.testRetainContext`. +To report a problem with this extracted sample, visit +https://issuetracker.google.com/issues/new?component=612128. + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("androidx.compose.runtime:runtime-retain-android:1.11.0-alpha06") + +// build.gradle +implementation 'androidx.compose.runtime:runtime-retain-android:1.11.0-alpha06' + +// build.gradle.kts with version catalogs: +implementation(libs.runtime.retain.android) + +# libs.versions.toml +[versions] +runtime-retain-android = "1.11.0-alpha06" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +runtime-retain-android = { + module = "androidx.compose.runtime:runtime-retain-android", + version.ref = "runtime-retain-android" +} +``` + +1.11.0-alpha06 is the version this documentation was generated from; +there may be newer versions available. + +NOTE: These lint checks are **also** made available separate from the main library. +You can also use `androidx.compose.runtime:runtime-retain-lint:1.11.0-alpha06`. + + +[Additional details about androidx.compose.runtime:runtime-retain-android](androidx_compose_runtime_runtime-retain-android.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Using a suppression annotation like this on the enclosing + element: + + ```kt + // Kotlin + @Suppress("RetainLeaksContext") + fun method() { + retain(...) + } + ``` + + or + + ```java + // Java + @SuppressWarnings("RetainLeaksContext") + void method() { + retain(...); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection RetainLeaksContext + problematicStatement() + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="RetainLeaksContext" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'RetainLeaksContext' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore RetainLeaksContext ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/RetainRememberObserver.md.html b/docs/checks/RetainRememberObserver.md.html new file mode 100644 index 00000000..104e428e --- /dev/null +++ b/docs/checks/RetainRememberObserver.md.html @@ -0,0 +1,204 @@ + +(#) Values returned by `retain { ... }` must not implement RememberObserver unless they also implement RetainObserver. + +!!! ERROR: Values returned by `retain { ... }` must not implement RememberObserver unless they also implement RetainObserver. + This is an error. + +Id +: `RetainRememberObserver` +Summary +: Values returned by `retain { ... }` must not implement RememberObserver unless they also implement RetainObserver. +Severity +: Error +Category +: Correctness +Platform +: Any +Vendor +: Jetpack Compose +Identifier +: androidx.compose.runtime.retain +Feedback +: https://issuetracker.google.com/issues/new?component=612128 +Min +: Lint 8.7+ +Compiled +: Lint 8.7+ +Artifact +: [androidx.compose.runtime:runtime-retain-android](androidx_compose_runtime_runtime-retain-android.md.html) +Since +: 1.10.0 +Affects +: Kotlin and Java files and test sources +Editing +: This check runs on the fly in the IDE editor +Implementation +: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-retain-lint/src/main/java/androidx/compose/runtime/retain/lint/RetainDetector.kt) +Tests +: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-retain-lint/src/test/java/androidx/compose/runtime/retain/lint/RetainDetectorTest.kt) +Copyright Year +: 2025 + +Objects that implement RememberObserver and not RetainObserver are +unaware of the retainment lifecycle. They cannot be correctly retained +because there is no valid way to dispatch the RememberObserver callbacks +and are therefore prohibited as return values to the `calculation` +lambda of `retain`. Attempting to retain a value that implements +`RememberObserver` without also implementing `RetainObserver` will throw +an exception. Either remember the value instead of retaining it, or +implement RetainObserver on the object. + +Note that this inspection checks the statically declared return type to +ensure it does not declare itself as implementing `RememberObserver` +without also implementing `RetainObserver`. The actual runtime types are +not checked, which may lead to false negatives or false positives if the +`calculation` lambda returns a different type than the call to +`retain`. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/androidx/compose/runtime/foo/Foo.kt:11:Error: Declared retained type +androidx.compose.runtime.foo.Foo implements RememberObserver but not +RetainObserver. [RetainRememberObserver] + val foo = retain { Foo() } + ------ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/androidx/compose/runtime/foo/Foo.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package androidx.compose.runtime.foo + +import androidx.compose.runtime.Composable +import androidx.compose.runtime.RememberObserver +import androidx.compose.runtime.retain.retain +import androidx.compose.runtime.retain.RetainObserver + +@Composable +fun Test() { + val foo = retain { Foo() } +} + +class Foo : RememberObserver { + override fun onRemembered() {} + override fun onForgotten() {} + override fun onAbandoned() {} +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-retain-lint/src/test/java/androidx/compose/runtime/retain/lint/RetainDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `RetainDetector.testRetainObject_onlyRememberObserver`. +To report a problem with this extracted sample, visit +https://issuetracker.google.com/issues/new?component=612128. + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("androidx.compose.runtime:runtime-retain-android:1.11.0-alpha06") + +// build.gradle +implementation 'androidx.compose.runtime:runtime-retain-android:1.11.0-alpha06' + +// build.gradle.kts with version catalogs: +implementation(libs.runtime.retain.android) + +# libs.versions.toml +[versions] +runtime-retain-android = "1.11.0-alpha06" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +runtime-retain-android = { + module = "androidx.compose.runtime:runtime-retain-android", + version.ref = "runtime-retain-android" +} +``` + +1.11.0-alpha06 is the version this documentation was generated from; +there may be newer versions available. + +NOTE: These lint checks are **also** made available separate from the main library. +You can also use `androidx.compose.runtime:runtime-retain-lint:1.11.0-alpha06`. + + +[Additional details about androidx.compose.runtime:runtime-retain-android](androidx_compose_runtime_runtime-retain-android.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Using a suppression annotation like this on the enclosing + element: + + ```kt + // Kotlin + @Suppress("RetainRememberObserver") + fun method() { + retain(...) + } + ``` + + or + + ```java + // Java + @SuppressWarnings("RetainRememberObserver") + void method() { + retain(...); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection RetainRememberObserver + problematicStatement() + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="RetainRememberObserver" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'RetainRememberObserver' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore RetainRememberObserver ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/RetainUnitType.md.html b/docs/checks/RetainUnitType.md.html new file mode 100644 index 00000000..60dafe8e --- /dev/null +++ b/docs/checks/RetainUnitType.md.html @@ -0,0 +1,198 @@ + +(#) `retain` calls must not return `Unit` + +!!! ERROR: `retain` calls must not return `Unit` + This is an error. + +Id +: `RetainUnitType` +Summary +: `retain` calls must not return `Unit` +Severity +: Error +Category +: Correctness +Platform +: Any +Vendor +: Jetpack Compose +Identifier +: androidx.compose.runtime.retain +Feedback +: https://issuetracker.google.com/issues/new?component=612128 +Min +: Lint 8.7+ +Compiled +: Lint 8.7+ +Artifact +: [androidx.compose.runtime:runtime-retain-android](androidx_compose_runtime_runtime-retain-android.md.html) +Since +: 1.10.0 +Affects +: Kotlin and Java files and test sources +Editing +: This check runs on the fly in the IDE editor +Implementation +: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-retain-lint/src/main/java/androidx/compose/runtime/retain/lint/RetainDetector.kt) +Tests +: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-retain-lint/src/test/java/androidx/compose/runtime/retain/lint/RetainDetectorTest.kt) +Copyright Year +: 2025 + +A call to `retain` that returns `Unit` is always an error. This +typically happens when using `retain` to perform an action or mutate +variables on an object. Instead, use `SideEffect` (or `RetainedEffect`) +to make deferred changes once the composition succeeds, or mutate +`MutableState` backed variables directly, as these will handle +composition failure for you. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/androidx/compose/runtime/foo/test.kt:9:Error: retain calls must not +return Unit. [RetainUnitType] + val foo = retain { Unit } + ------ +src/androidx/compose/runtime/foo/test.kt:10:Error: retain calls must not +return Unit. [RetainUnitType] + val bar = retain<Unit> { } + ------ +src/androidx/compose/runtime/foo/test.kt:11:Error: retain calls must not +return Unit. [RetainUnitType] + val baz = retain { noop() } + ------ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/androidx/compose/runtime/foo/test.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package androidx.compose.runtime.foo + +import androidx.compose.runtime.Composable +import androidx.compose.runtime.retain.retain + +@Composable +fun Test() { + val foo = retain { Unit } + val bar = retain { } + val baz = retain { noop() } +} + +fun noop() {} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-retain-lint/src/test/java/androidx/compose/runtime/retain/lint/RetainDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `RetainDetector.testRetainUnit`. +To report a problem with this extracted sample, visit +https://issuetracker.google.com/issues/new?component=612128. + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("androidx.compose.runtime:runtime-retain-android:1.11.0-alpha06") + +// build.gradle +implementation 'androidx.compose.runtime:runtime-retain-android:1.11.0-alpha06' + +// build.gradle.kts with version catalogs: +implementation(libs.runtime.retain.android) + +# libs.versions.toml +[versions] +runtime-retain-android = "1.11.0-alpha06" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +runtime-retain-android = { + module = "androidx.compose.runtime:runtime-retain-android", + version.ref = "runtime-retain-android" +} +``` + +1.11.0-alpha06 is the version this documentation was generated from; +there may be newer versions available. + +NOTE: These lint checks are **also** made available separate from the main library. +You can also use `androidx.compose.runtime:runtime-retain-lint:1.11.0-alpha06`. + + +[Additional details about androidx.compose.runtime:runtime-retain-android](androidx_compose_runtime_runtime-retain-android.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Using a suppression annotation like this on the enclosing + element: + + ```kt + // Kotlin + @Suppress("RetainUnitType") + fun method() { + retain(...) + } + ``` + + or + + ```java + // Java + @SuppressWarnings("RetainUnitType") + void method() { + retain(...); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection RetainUnitType + problematicStatement() + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="RetainUnitType" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'RetainUnitType' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore RetainUnitType ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/RetainingDoNotRetainType.md.html b/docs/checks/RetainingDoNotRetainType.md.html new file mode 100644 index 00000000..e977e194 --- /dev/null +++ b/docs/checks/RetainingDoNotRetainType.md.html @@ -0,0 +1,216 @@ + +(#) Types annotated with `@DoNotRetain` should not be returned as the result of `retain`, either directly or transitively + +!!! ERROR: Types annotated with `@DoNotRetain` should not be returned as the result of `retain`, either directly or transitively + This is an error. + +Id +: `RetainingDoNotRetainType` +Summary +: Types annotated with `@DoNotRetain` should not be returned as the result of `retain`, either directly or transitively +Severity +: Error +Category +: Correctness +Platform +: Any +Vendor +: Jetpack Compose +Identifier +: androidx.compose.runtime.retain +Feedback +: https://issuetracker.google.com/issues/new?component=612128 +Min +: Lint 8.7+ +Compiled +: Lint 8.7+ +Artifact +: [androidx.compose.runtime:runtime-retain-android](androidx_compose_runtime_runtime-retain-android.md.html) +Since +: 1.10.0 +Affects +: Kotlin and Java files and test sources +Editing +: This check runs on the fly in the IDE editor +Implementation +: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-retain-lint/src/main/java/androidx/compose/runtime/retain/lint/RetainDetector.kt) +Tests +: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-retain-lint/src/test/java/androidx/compose/runtime/retain/lint/RetainDetectorTest.kt) +Copyright Year +: 2025 + +Objects annotated with `@DoNotRetain` are not intended to be used with +retain. Types marked with this annotation are not designed for +retention, generally because they have an independent lifecycle that +exceeds the retention lifespan and will leak resources. The +type'sdocumentation may have more information about why it does not +support retention. + +This inspection checks that marked types are never directly returned by +the `calculation` lambda of `retain` or as a key input to `retain`. +Types marked with `@DoNotRetain` may optionally specify more information +about why they should not be retained. + +!!! Tip + This lint check has an associated quickfix available in the IDE. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/androidx/compose/runtime/foo/UnretainableTypeWithCause.kt:10:Error: +androidx.compose.runtime.foo.UnretainableTypeWithCause is annotated as +@DoNotRetain: Unretainable for testing [RetainingDoNotRetainType] + val foo = retain { UnretainableTypeWithCause() } + ------ +src/androidx/compose/runtime/foo/UnretainableTypeWithCause.kt:11:Error: +androidx.compose.runtime.foo.UnretainableTypeWithoutCause is annotated +as @DoNotRetain [RetainingDoNotRetainType] + val bar = retain { UnretainableTypeWithoutCause() } + ------ +src/androidx/compose/runtime/foo/UnretainableTypeWithCause.kt:12:Error: +androidx.compose.runtime.foo.SubclassOfUnretainableType is annotated as +@DoNotRetain: Unretainable for testing [RetainingDoNotRetainType] + val baz = retain { SubclassOfUnretainableType() } + ------ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/androidx/compose/runtime/foo/UnretainableTypeWithCause.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package androidx.compose.runtime.foo + +import androidx.compose.runtime.Composable +import androidx.compose.runtime.annotation.DoNotRetain +import androidx.compose.runtime.retain.retain + +@Composable +fun Test() { + val foo = retain { UnretainableTypeWithCause() } + val bar = retain { UnretainableTypeWithoutCause() } + val baz = retain { SubclassOfUnretainableType() } +} + +@DoNotRetain("Unretainable for testing") +open class UnretainableTypeWithCause() + +@DoNotRetain +class UnretainableTypeWithoutCause() + +class SubclassOfUnretainableType() : UnretainableTypeWithCause() +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-retain-lint/src/test/java/androidx/compose/runtime/retain/lint/RetainDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `RetainDetector.testRetainMarkedType`. +To report a problem with this extracted sample, visit +https://issuetracker.google.com/issues/new?component=612128. + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("androidx.compose.runtime:runtime-retain-android:1.11.0-alpha06") + +// build.gradle +implementation 'androidx.compose.runtime:runtime-retain-android:1.11.0-alpha06' + +// build.gradle.kts with version catalogs: +implementation(libs.runtime.retain.android) + +# libs.versions.toml +[versions] +runtime-retain-android = "1.11.0-alpha06" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +runtime-retain-android = { + module = "androidx.compose.runtime:runtime-retain-android", + version.ref = "runtime-retain-android" +} +``` + +1.11.0-alpha06 is the version this documentation was generated from; +there may be newer versions available. + +NOTE: These lint checks are **also** made available separate from the main library. +You can also use `androidx.compose.runtime:runtime-retain-lint:1.11.0-alpha06`. + + +[Additional details about androidx.compose.runtime:runtime-retain-android](androidx_compose_runtime_runtime-retain-android.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Using a suppression annotation like this on the enclosing + element: + + ```kt + // Kotlin + @Suppress("RetainingDoNotRetainType") + fun method() { + retain(...) + } + ``` + + or + + ```java + // Java + @SuppressWarnings("RetainingDoNotRetainType") + void method() { + retain(...); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection RetainingDoNotRetainType + problematicStatement() + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="RetainingDoNotRetainType" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'RetainingDoNotRetainType' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore RetainingDoNotRetainType ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/RetrofitUsage.md.html b/docs/checks/RetrofitUsage.md.html index f14e355f..065f6bea 100644 --- a/docs/checks/RetrofitUsage.md.html +++ b/docs/checks/RetrofitUsage.md.html @@ -62,7 +62,7 @@ @FormUrlEncoded. [RetrofitUsage] fun missingAnnotation(@Field("hi") input: String): String ----------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -91,7 +91,7 @@ @POST("/") fun correct(@Field("hi") input: String): String } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/retrofit/RetrofitUsageDetectorTest.kt) diff --git a/docs/checks/ReturnFromAwaitPointerEventScope.md.html b/docs/checks/ReturnFromAwaitPointerEventScope.md.html index c3b583de..b4daa245 100644 --- a/docs/checks/ReturnFromAwaitPointerEventScope.md.html +++ b/docs/checks/ReturnFromAwaitPointerEventScope.md.html @@ -45,6 +45,48 @@ guarantee that the events will persist between those calls. In this case you should keep all events inside the awaitPointerEventScope block. +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/test/test.kt:12:Warning: Returning from awaitPointerEventScope may +cause some input events to be dropped +[ReturnFromAwaitPointerEventScope] + val assigned = awaitPointerEventScope { + ---------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/test/test.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package test + +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.input.pointer.pointerInput + +@Composable +fun TestComposable() { + Modifier.pointerInput(Unit) { + while (true) { + val assigned = awaitPointerEventScope { + + } + } + } +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/ReturnFromAwaitPointerEventScopeDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `ReturnFromAwaitPointerEventScopeDetector.awaitPointerEventScope_assignedToVariable_shouldWarn`. +To report a problem with this extracted sample, visit +https://issuetracker.google.com/issues/new?component=612128. + (##) Including !!! @@ -53,17 +95,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui-android:1.9.0-alpha01") +implementation("androidx.compose.ui:ui-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.ui:ui-android:1.9.0-alpha01' +implementation 'androidx.compose.ui:ui-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.ui.android) # libs.versions.toml [versions] -ui-android = "1.9.0-alpha01" +ui-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -75,11 +117,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.ui:ui-lint:1.9.0-alpha01`. +You can also use `androidx.compose.ui:ui-lint:1.11.0-alpha06`. [Additional details about androidx.compose.ui:ui-android](androidx_compose_ui_ui-android.md.html). diff --git a/docs/checks/ReturnThis.md.html b/docs/checks/ReturnThis.md.html index e20ae1ff..d9c83ea1 100644 --- a/docs/checks/ReturnThis.md.html +++ b/docs/checks/ReturnThis.md.html @@ -40,7 +40,7 @@ been annotated with @ReturnThis) [ReturnThis] return MyClass() ---------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -66,7 +66,7 @@ return MyClass() } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ReturnThisDetectorTest.kt) diff --git a/docs/checks/RiskyLibrary.md.html b/docs/checks/RiskyLibrary.md.html index bff39d35..c3716439 100644 --- a/docs/checks/RiskyLibrary.md.html +++ b/docs/checks/RiskyLibrary.md.html @@ -58,7 +58,7 @@ [RiskyLibrary] compile 'log4j:log4j:1.2.13' // Critical BLOCKING -------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -100,7 +100,7 @@ compile 'com.another.example:example' // Ok (not in Index) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/RtlCompat.md.html b/docs/checks/RtlCompat.md.html index c4ba0056..3fc360ec 100644 --- a/docs/checks/RtlCompat.md.html +++ b/docs/checks/RtlCompat.md.html @@ -88,7 +88,7 @@ android:layout_alignRight="@id/cancel" [RtlCompat] android:layout_alignEnd="@id/cancel" ----------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -146,7 +146,7 @@ android:src="@drawable/menu_list_divider" /> </RelativeLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/RtlDetectorTest.java) diff --git a/docs/checks/RtlEnabled.md.html b/docs/checks/RtlEnabled.md.html index 060fdbc7..14da4ce8 100644 --- a/docs/checks/RtlEnabled.md.html +++ b/docs/checks/RtlEnabled.md.html @@ -47,7 +47,7 @@ does not explicitly enable or disable RTL support with android:supportsRtl in the manifest [RtlEnabled] 0 errors, 4 warnings -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -57,7 +57,7 @@ package="test.rtl"> <uses-sdk android:minSdkVersion="5" android:targetSdkVersion="17" /> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout/rtl.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -127,10 +127,10 @@ tools:ignore="RtlHardcoded" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/RtlDetectorTest.java) +You can also visit the source code ([RtlDetectorTest.java](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/RtlDetectorTest.java) +[ProjectInitializerTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/ProjectInitializerTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/RtlHardcoded.md.html b/docs/checks/RtlHardcoded.md.html index 8338e225..93562f19 100644 --- a/docs/checks/RtlHardcoded.md.html +++ b/docs/checks/RtlHardcoded.md.html @@ -69,7 +69,7 @@ correct behavior in right-to-left locales [RtlHardcoded] android:gravity="right" ----- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -79,7 +79,7 @@ package="test.rtl"> <uses-sdk android:minSdkVersion="5" android:targetSdkVersion="17" /> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout/rtl.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -149,7 +149,7 @@ tools:ignore="RtlHardcoded" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/RtlDetectorTest.java) diff --git a/docs/checks/RtlSymmetry.md.html b/docs/checks/RtlSymmetry.md.html index 7911c7c8..29ba759f 100644 --- a/docs/checks/RtlSymmetry.md.html +++ b/docs/checks/RtlSymmetry.md.html @@ -44,7 +44,7 @@ [RtlSymmetry] android:paddingRight="120dip" -------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -116,7 +116,7 @@ android:text="@string/cancel" /> </RelativeLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/RtlDetectorTest.java) diff --git a/docs/checks/RxJava2DefaultScheduler.md.html b/docs/checks/RxJava2DefaultScheduler.md.html index 7dd79ab3..aa1b8498 100644 --- a/docs/checks/RxJava2DefaultScheduler.md.html +++ b/docs/checks/RxJava2DefaultScheduler.md.html @@ -47,7 +47,7 @@ scheduler [RxJava2DefaultScheduler] Observable.interval(5, TimeUnit.SECONDS); -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -63,7 +63,7 @@ Observable.interval(5, TimeUnit.SECONDS); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-rxjava2-lint/src/test/kotlin/com/vanniktech/lintrules/rxjava2/RxJava2DefaultSchedulerDetectorTest.kt) diff --git a/docs/checks/RxJava2DisposableAddAllCall.md.html b/docs/checks/RxJava2DisposableAddAllCall.md.html index 8321a859..0cdfd9dd 100644 --- a/docs/checks/RxJava2DisposableAddAllCall.md.html +++ b/docs/checks/RxJava2DisposableAddAllCall.md.html @@ -46,7 +46,7 @@ [RxJava2DisposableAddAllCall] cd.addAll(); ------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -60,7 +60,7 @@ cd.addAll(); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-rxjava2-lint/src/test/kotlin/com/vanniktech/lintrules/rxjava2/RxJava2DisposableAddAllCallDetectorTest.kt) diff --git a/docs/checks/RxJava2DisposableDisposeCall.md.html b/docs/checks/RxJava2DisposableDisposeCall.md.html index 4c5f3d32..463a754d 100644 --- a/docs/checks/RxJava2DisposableDisposeCall.md.html +++ b/docs/checks/RxJava2DisposableDisposeCall.md.html @@ -50,7 +50,7 @@ [RxJava2DisposableDisposeCall] cd.dispose(); ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -66,7 +66,7 @@ cd.dispose(); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-rxjava2-lint/src/test/kotlin/com/vanniktech/lintrules/rxjava2/RxJava2DisposableDisposeCallDetectorTest.kt) diff --git a/docs/checks/RxJava2MethodMissingCheckReturnValue.md.html b/docs/checks/RxJava2MethodMissingCheckReturnValue.md.html index 46dea422..ebd5733a 100644 --- a/docs/checks/RxJava2MethodMissingCheckReturnValue.md.html +++ b/docs/checks/RxJava2MethodMissingCheckReturnValue.md.html @@ -92,7 +92,7 @@ annotation [RxJava2MethodMissingCheckReturnValue] private Observable<List<Object>> observableList() { -------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -156,7 +156,7 @@ return null; } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-rxjava2-lint/src/test/kotlin/com/vanniktech/lintrules/rxjava2/RxJava2MethodMissingCheckReturnValueDetectorTest.kt) diff --git a/docs/checks/RxJava2MissingCompositeDisposableClear.md.html b/docs/checks/RxJava2MissingCompositeDisposableClear.md.html index 4119698a..4752df91 100644 --- a/docs/checks/RxJava2MissingCompositeDisposableClear.md.html +++ b/docs/checks/RxJava2MissingCompositeDisposableClear.md.html @@ -48,7 +48,7 @@ [RxJava2MissingCompositeDisposableClear] CompositeDisposable cd; ----------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -61,7 +61,7 @@ class Example { CompositeDisposable cd; } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-rxjava2-lint/src/test/kotlin/com/vanniktech/lintrules/rxjava2/RxJava2MissingCompositeDisposableClearDetectorTest.kt) diff --git a/docs/checks/RxJava2SchedulersFactoryCall.md.html b/docs/checks/RxJava2SchedulersFactoryCall.md.html index 0dcd973c..fa5528b0 100644 --- a/docs/checks/RxJava2SchedulersFactoryCall.md.html +++ b/docs/checks/RxJava2SchedulersFactoryCall.md.html @@ -48,7 +48,7 @@ it directly [RxJava2SchedulersFactoryCall] return Schedulers.io(); -- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -65,7 +65,7 @@ return Schedulers.io(); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-rxjava2-lint/src/test/kotlin/com/vanniktech/lintrules/rxjava2/RxJava2SchedulersFactoryCallDetectorTest.kt) diff --git a/docs/checks/RxJava2SubscribeMissingOnError.md.html b/docs/checks/RxJava2SubscribeMissingOnError.md.html index ad9c527a..18e06fb4 100644 --- a/docs/checks/RxJava2SubscribeMissingOnError.md.html +++ b/docs/checks/RxJava2SubscribeMissingOnError.md.html @@ -47,7 +47,7 @@ error Consumer [RxJava2SubscribeMissingOnError] o.subscribe(); --------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -63,7 +63,7 @@ o.subscribe(); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-rxjava2-lint/src/test/kotlin/com/vanniktech/lintrules/rxjava2/RxJava2SubscribeMissingOnErrorDetectorTest.kt) diff --git a/docs/checks/SQLiteString.md.html b/docs/checks/SQLiteString.md.html index 72b62df2..7d629b95 100644 --- a/docs/checks/SQLiteString.md.html +++ b/docs/checks/SQLiteString.md.html @@ -67,7 +67,7 @@ zeroes. See issue explanation for details.) [SQLiteString] db.execSQL(TracksColumns.CREATE_TABLE); // ERROR -------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -100,7 +100,7 @@ + ICON + " STRING" + ");"; } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/SQLiteTest.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -145,7 +145,7 @@ db.execSQL("CREATE TABLE " + tableName + "(" + schema + ");"); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/SQLiteDetectorTest.java) diff --git a/docs/checks/SSLCertificateSocketFactoryCreateSocket.md.html b/docs/checks/SSLCertificateSocketFactoryCreateSocket.md.html index 97eeab72..115bc130 100644 --- a/docs/checks/SSLCertificateSocketFactoryCreateSocket.md.html +++ b/docs/checks/SSLCertificateSocketFactoryCreateSocket.md.html @@ -86,7 +86,7 @@ [SSLCertificateSocketFactoryCreateSocket] sf.createSocket(inet6, 80, inet, 2000); -------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -123,7 +123,7 @@ SSLCertificateSocketFactory.getInsecure(-1,null)); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/SslCertificateSocketFactoryDetectorTest.kt) diff --git a/docs/checks/SSLCertificateSocketFactoryGetInsecure.md.html b/docs/checks/SSLCertificateSocketFactoryGetInsecure.md.html index d7f7d6bf..bde41dc7 100644 --- a/docs/checks/SSLCertificateSocketFactoryGetInsecure.md.html +++ b/docs/checks/SSLCertificateSocketFactoryGetInsecure.md.html @@ -48,7 +48,7 @@ peers [SSLCertificateSocketFactoryGetInsecure] SSLCertificateSocketFactory.getInsecure(-1,null)); ------------------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -85,7 +85,7 @@ SSLCertificateSocketFactory.getInsecure(-1,null)); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/SslCertificateSocketFactoryDetectorTest.kt) diff --git a/docs/checks/ScheduleExactAlarm.md.html b/docs/checks/ScheduleExactAlarm.md.html index b91a0f3a..8fa4624a 100644 --- a/docs/checks/ScheduleExactAlarm.md.html +++ b/docs/checks/ScheduleExactAlarm.md.html @@ -48,7 +48,7 @@ `SecurityException`s [ScheduleExactAlarm] alarmManager.setExact(AlarmManager.ELAPSED_REALTIME, 5000, null) ---------------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -58,7 +58,7 @@ <uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" /> <uses-sdk android:targetSdkVersion="33" /> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/AlarmTest.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -75,7 +75,7 @@ } catch (e: SecurityException) {} } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AlarmDetectorTest.kt) diff --git a/docs/checks/ScopedStorage.md.html b/docs/checks/ScopedStorage.md.html index bc38bcab..c7aeda8f 100644 --- a/docs/checks/ScopedStorage.md.html +++ b/docs/checks/ScopedStorage.md.html @@ -70,7 +70,7 @@ requestLegacyExternalStorage [ScopedStorage] <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/><!-- ERROR --> ----------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -82,7 +82,7 @@ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/><!-- ERROR --> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/><!-- OK --> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ScopedStorageDetectorTest.kt) diff --git a/docs/checks/ScrollViewCount.md.html b/docs/checks/ScrollViewCount.md.html index 04d7e5e9..04666e4d 100644 --- a/docs/checks/ScrollViewCount.md.html +++ b/docs/checks/ScrollViewCount.md.html @@ -42,7 +42,7 @@ child [ScrollViewCount] <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" ---------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -62,7 +62,7 @@ android:layout_height="match_parent" /> </ScrollView> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ChildCountDetectorTest.kt) diff --git a/docs/checks/ScrollViewSize.md.html b/docs/checks/ScrollViewSize.md.html index 74dc22c6..c3c42b9f 100644 --- a/docs/checks/ScrollViewSize.md.html +++ b/docs/checks/ScrollViewSize.md.html @@ -46,7 +46,7 @@ android:layout_width="wrap_content" [ScrollViewSize] android:layout_width="match_parent" ----------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -63,7 +63,7 @@ android:layout_height="match_parent" /> </HorizontalScrollView> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ScrollViewChildDetectorTest.kt) diff --git a/docs/checks/SdCardPath.md.html b/docs/checks/SdCardPath.md.html index 5666bf10..cc221e90 100644 --- a/docs/checks/SdCardPath.md.html +++ b/docs/checks/SdCardPath.md.html @@ -107,7 +107,7 @@ [SdCardPath] String s = "file://sdcard/foo"; ------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -149,10 +149,16 @@ String s = "file://sdcard/foo"; } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/SdCardDetectorTest.java) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the source code ([SdCardDetectorTest.java](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/SdCardDetectorTest.java) +[ApiDetectorProvisionalTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ApiDetectorProvisionalTest.kt) +[LintIssueDocGeneratorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/LintIssueDocGeneratorTest.kt) +[ProjectInitializerTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/ProjectInitializerTest.kt) +[MainTest.java](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/MainTest.java) +[ConfigurationHierarchyTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/client/api/ConfigurationHierarchyTest.kt) +[LintXmlConfigurationTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/client/api/LintXmlConfigurationTest.kt) +[LintBaselineTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/client/api/LintBaselineTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/SecretInSource.md.html b/docs/checks/SecretInSource.md.html index 1f85123b..f9d949eb 100644 --- a/docs/checks/SecretInSource.md.html +++ b/docs/checks/SecretInSource.md.html @@ -49,7 +49,7 @@ source code [SecretInSource] val model2 = GenerativeModel("name", "AIzadGhpcyBpcyBhbm90aGVy_IHQ-akd==") ------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -65,7 +65,7 @@ val model1 = GenerativeModel("name", KEY) val model2 = GenerativeModel("name", "AIzadGhpcyBpcyBhbm90aGVy_IHQ-akd==") } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/SecretDetectorTest.kt) diff --git a/docs/checks/SecureRandom.md.html b/docs/checks/SecureRandom.md.html index f5e62e82..74e4531f 100644 --- a/docs/checks/SecureRandom.md.html +++ b/docs/checks/SecureRandom.md.html @@ -98,7 +98,7 @@ [SecureRandom] random2.setSeed(fixedSeed); // Wrong -------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -162,7 +162,7 @@ } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/SecureRandomDetectorTest.kt) diff --git a/docs/checks/SelectableText.md.html b/docs/checks/SelectableText.md.html index 69610c9a..098581bc 100644 --- a/docs/checks/SelectableText.md.html +++ b/docs/checks/SelectableText.md.html @@ -52,7 +52,7 @@ [SelectableText] <TextView -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -152,7 +152,7 @@ android:textIsSelectable="true" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/TextViewDetectorTest.java) diff --git a/docs/checks/SelectedPhotoAccess.md.html b/docs/checks/SelectedPhotoAccess.md.html index 82bca523..843917d4 100644 --- a/docs/checks/SelectedPhotoAccess.md.html +++ b/docs/checks/SelectedPhotoAccess.md.html @@ -51,7 +51,7 @@ Selected Photos Access introduced in Android 14+ [SelectedPhotoAccess] <uses-permission android:name="android.permission.READ_MEDIA_VIDEO" android:minSdkVersion="33"/> ----------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -79,8 +79,7 @@ </application> </manifest> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/SelectedPhotoAccessDetectorTest.kt) diff --git a/docs/checks/SensitiveExternalPath.md.html b/docs/checks/SensitiveExternalPath.md.html index ce820ee0..9d614366 100644 --- a/docs/checks/SensitiveExternalPath.md.html +++ b/docs/checks/SensitiveExternalPath.md.html @@ -27,7 +27,7 @@ Artifact : [com.android.security.lint:lint](com_android_security_lint_lint.md.html) Since -: 1.0.1 +: 1.0.0 Affects : Resource files Editing @@ -55,7 +55,7 @@ stored or shared via [SensitiveExternalPath] <external-path name="external_path" path="sdcard/"/> ---------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -67,7 +67,7 @@ <files-path name="my_docs" path="docs/"/> <external-path name="external_path" path="sdcard/"/> </paths> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/MisconfiguredFileProviderDetectorTest.kt) @@ -87,17 +87,17 @@ ``` // build.gradle.kts -lintChecks("com.android.security.lint:lint:1.0.3") +lintChecks("com.android.security.lint:lint:1.0.4") // build.gradle -lintChecks 'com.android.security.lint:lint:1.0.3' +lintChecks 'com.android.security.lint:lint:1.0.4' // build.gradle.kts with version catalogs: lintChecks(libs.com.android.security.lint.lint) # libs.versions.toml [versions] -com-android-security-lint-lint = "1.0.3" +com-android-security-lint-lint = "1.0.4" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -109,7 +109,7 @@ } ``` -1.0.3 is the version this documentation was generated from; +1.0.4 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.android.security.lint:lint](com_android_security_lint_lint.md.html). diff --git a/docs/checks/SerializableUsage.md.html b/docs/checks/SerializableUsage.md.html index 80336bfc..6c5db3fa 100644 --- a/docs/checks/SerializableUsage.md.html +++ b/docs/checks/SerializableUsage.md.html @@ -54,7 +54,7 @@ [SerializableUsage] class ImplementsExplicitly : RuntimeException, Serializable -------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -66,7 +66,7 @@ import kotlin.RuntimeException class ImplementsExplicitly : RuntimeException, Serializable -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/SerializableDetectorTest.kt) diff --git a/docs/checks/ServiceCast.md.html b/docs/checks/ServiceCast.md.html index 5ae15114..9def1ab9 100644 --- a/docs/checks/ServiceCast.md.html +++ b/docs/checks/ServiceCast.md.html @@ -54,7 +54,7 @@ [ServiceCast] DisplayManager displayServiceWrong = (DisplayManager) context ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -91,7 +91,7 @@ android.text.ClipboardManager clipboard2 = (android.text.ClipboardManager)context.getSystemService(Context.CLIPBOARD_SERVICE); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ServiceCastDetectorTest.kt) diff --git a/docs/checks/SetAndClearCommunicationDevice.md.html b/docs/checks/SetAndClearCommunicationDevice.md.html index 9b648863..c4f98066 100644 --- a/docs/checks/SetAndClearCommunicationDevice.md.html +++ b/docs/checks/SetAndClearCommunicationDevice.md.html @@ -44,7 +44,7 @@ after setCommunicationDevice() [SetAndClearCommunicationDevice] manager.setCommunicationDevice(AudioDeviceInfo()) ------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -61,7 +61,7 @@ manager.setCommunicationDevice(AudioDeviceInfo()) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/CommunicationDeviceDetectorTest.kt) diff --git a/docs/checks/SetJavaScriptEnabled.md.html b/docs/checks/SetJavaScriptEnabled.md.html index a5b8c22a..ff08de03 100644 --- a/docs/checks/SetJavaScriptEnabled.md.html +++ b/docs/checks/SetJavaScriptEnabled.md.html @@ -47,7 +47,7 @@ application, review carefully [SetJavaScriptEnabled] webView.getSettings().setJavaScriptEnabled(true); // bad ------------------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -90,7 +90,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/SetJavaScriptEnabledDetectorTest.kt) diff --git a/docs/checks/SetTextI18n.md.html b/docs/checks/SetTextI18n.md.html index 0468819e..b09b3956 100644 --- a/docs/checks/SetTextI18n.md.html +++ b/docs/checks/SetTextI18n.md.html @@ -64,7 +64,7 @@ not be translated. Use Android resources instead. [SetTextI18n] btn.setText("User " + getUserName()); ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -99,7 +99,7 @@ return "stub"; } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/SetTextDetectorTest.kt) diff --git a/docs/checks/SetWorldReadable.md.html b/docs/checks/SetWorldReadable.md.html index f43e16cc..a2ad3f66 100644 --- a/docs/checks/SetWorldReadable.md.html +++ b/docs/checks/SetWorldReadable.md.html @@ -45,7 +45,7 @@ [SetWorldReadable] mFile.setReadable(true, false); ------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -109,7 +109,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/SecurityDetectorTest.java) diff --git a/docs/checks/SetWorldWritable.md.html b/docs/checks/SetWorldWritable.md.html index 90688bef..455c575e 100644 --- a/docs/checks/SetWorldWritable.md.html +++ b/docs/checks/SetWorldWritable.md.html @@ -45,7 +45,7 @@ [SetWorldWritable] mFile.setWritable(true, false); ------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -109,7 +109,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/SecurityDetectorTest.java) diff --git a/docs/checks/ShiftFlags.md.html b/docs/checks/ShiftFlags.md.html index d9413d82..e0e4367d 100644 --- a/docs/checks/ShiftFlags.md.html +++ b/docs/checks/ShiftFlags.md.html @@ -56,7 +56,7 @@ constant using 1 << 4 instead [ShiftFlags] public static final int FLAG12 = 0x10; ---- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -101,7 +101,7 @@ @IntDef(flag = true, value={FLAG1,FLAG9,FLAG13}) private @interface Flags13 {} @IntDef(flag = true, value={FLAG1,FLAG9,FLAG14}) private @interface Flags14 {} } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AnnotationDetectorTest.kt) diff --git a/docs/checks/ShortAlarm.md.html b/docs/checks/ShortAlarm.md.html index 52a8467c..291bcd7c 100644 --- a/docs/checks/ShortAlarm.md.html +++ b/docs/checks/ShortAlarm.md.html @@ -53,7 +53,7 @@ as of Android 5.1; don't rely on this to be exact [ShortAlarm] alarmManager.setRepeating(AlarmManager.ELAPSED_REALTIME, 5000, interval2, null); // ERROR --------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -81,10 +81,12 @@ public static final long MY_INTERVAL = 1000L; } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AlarmDetectorTest.kt) +You can also visit the source code ([AlarmDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AlarmDetectorTest.kt) +[LintDetectorDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/LintDetectorDetectorTest.kt) +[SuppressibleTestModeTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/infrastructure/SuppressibleTestModeTest.kt) +[LintIssueDocGeneratorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/LintIssueDocGeneratorTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/ShouldUseStaticImport.md.html b/docs/checks/ShouldUseStaticImport.md.html index 66e40b1b..47934d75 100644 --- a/docs/checks/ShouldUseStaticImport.md.html +++ b/docs/checks/ShouldUseStaticImport.md.html @@ -46,7 +46,7 @@ [ShouldUseStaticImport] TimeUnit.SECONDS.toDays(1); ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -59,7 +59,7 @@ TimeUnit.SECONDS.toDays(1); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/ShouldUseStaticImportDetectorTest.kt) diff --git a/docs/checks/ShowToast.md.html b/docs/checks/ShowToast.md.html index acc6a469..ed3d5263 100644 --- a/docs/checks/ShowToast.md.html +++ b/docs/checks/ShowToast.md.html @@ -58,7 +58,7 @@ you forget to call show()? [ShowToast] Toast toast2 = Toast.makeText(context, "foo", Toast.LENGTH_LONG); // not shown -------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -127,10 +127,10 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ToastDetectorTest.kt) +You can also visit the source code ([ToastDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ToastDetectorTest.kt) +[DataFlowAnalyzerTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/DataFlowAnalyzerTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/SignatureOrSystemPermissions.md.html b/docs/checks/SignatureOrSystemPermissions.md.html index aaf5931c..38be3320 100644 --- a/docs/checks/SignatureOrSystemPermissions.md.html +++ b/docs/checks/SignatureOrSystemPermissions.md.html @@ -48,7 +48,7 @@ set to signatureOrSystem [SignatureOrSystemPermissions] android:protectionLevel="signatureOrSystem"/> ------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -74,7 +74,7 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/SignatureOrSystemDetectorTest.java) diff --git a/docs/checks/SimilarGradleDependency.md.html b/docs/checks/SimilarGradleDependency.md.html index c37d22f9..6e223bb9 100644 --- a/docs/checks/SimilarGradleDependency.md.html +++ b/docs/checks/SimilarGradleDependency.md.html @@ -49,7 +49,7 @@ [SimilarGradleDependency] joda_library2 = { module = "joda-time:joda-time", version = "2.0"} ------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -63,7 +63,7 @@ joda_library = { module = "joda-time:joda-time", version.ref = "jodaVersion"} joda_library2 = { module = "joda-time:joda-time", version = "2.0"} dagger-lib = { group = "com.squareup.dagger", name ="dagger", version.ref = "dagger" } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/SimpleDateFormat.md.html b/docs/checks/SimpleDateFormat.md.html index 354da10f..5f06717c 100644 --- a/docs/checks/SimpleDateFormat.md.html +++ b/docs/checks/SimpleDateFormat.md.html @@ -66,7 +66,7 @@ Locale.US for ASCII dates. [SimpleDateFormat] new SimpleDateFormat("yyyy-MM-dd", DateFormatSymbols.getInstance()); // WRONG ------------------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -109,7 +109,7 @@ new SimpleDateFormat("yyyy-MM-dd", Locale.US); // OK } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/DateFormatDetectorTest.kt) diff --git a/docs/checks/SlashPathAttribute.md.html b/docs/checks/SlashPathAttribute.md.html new file mode 100644 index 00000000..1ce728a7 --- /dev/null +++ b/docs/checks/SlashPathAttribute.md.html @@ -0,0 +1,160 @@ + +(#) The "path" attribute should not be set to "/" as a path + +!!! WARNING: The "path" attribute should not be set to "/" as a path + This is a warning. + +Id +: `SlashPathAttribute` +Summary +: The "path" attribute should not be set to "/" as a path +Severity +: Warning +Category +: Security +Platform +: Android +Vendor +: Google - Android 3P Vulnerability Research +Contact +: https://github.com/google/android-security-lints +Feedback +: https://github.com/google/android-security-lints/issues +Min +: Lint 4.1 +Compiled +: Lint 8.0 and 8.1 +Artifact +: [com.android.security.lint:lint](com_android_security_lint_lint.md.html) +Since +: 1.0.4 +Affects +: Resource files +Editing +: This check runs on the fly in the IDE editor +See +: https://goo.gle/SlashPathAttribute +Implementation +: [Source Code](https://github.com/google/android-security-lints/tree/main/checks/src/main/java/com/example/lint/checks/MisconfiguredFileProviderDetector.kt) +Tests +: [Source Code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/MisconfiguredFileProviderDetectorTest.kt) +Copyright Year +: 2023 + +Using a broad path range like "/" can lead to the accidental exposure of +sensitive files. Ensure that a specific, narrow and limited path is +shared to prevent mistakenly exposing sensitive data. + +!!! Tip + This lint check has an associated quickfix available in the IDE. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +res/xml/file_paths.xml:5:Warning: The "path" attribute should not be set +to "/" [SlashPathAttribute] + <cache-path name="home" path="/"/> + ---------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`res/xml/file_paths.xml`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<?xml version="1.0" encoding="utf-8"?> + <paths xmlns:android="http://schemas.android.com/apk/res/android"> + <files-path name="my_images" path="images/"/> + <files-path name="my_docs" path="docs/"/> + <cache-path name="home" path="/"/> + </paths> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/MisconfiguredFileProviderDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `MisconfiguredFileProviderDetector.testWhenSlashPathUsedInConfig_showsWarningAndQuickFix`. +To report a problem with this extracted sample, visit +https://github.com/google/android-security-lints/issues. + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. This lint check is included in the lint documentation, + but the Android team may or may not agree with its recommendations. + +``` +// build.gradle.kts +lintChecks("com.android.security.lint:lint:1.0.4") + +// build.gradle +lintChecks 'com.android.security.lint:lint:1.0.4' + +// build.gradle.kts with version catalogs: +lintChecks(libs.com.android.security.lint.lint) + +# libs.versions.toml +[versions] +com-android-security-lint-lint = "1.0.4" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +com-android-security-lint-lint = { + module = "com.android.security.lint:lint", + version.ref = "com-android-security-lint-lint" +} +``` + +1.0.4 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.android.security.lint:lint](com_android_security_lint_lint.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Adding the suppression attribute `tools:ignore="SlashPathAttribute"` + on the problematic XML element (or one of its enclosing elements). + You may also need to add the following namespace declaration on the + root element in the XML file if it's not already there: + `xmlns:tools="http://schemas.android.com/tools"`. + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="SlashPathAttribute" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'SlashPathAttribute' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore SlashPathAttribute ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/Slices.md.html b/docs/checks/Slices.md.html index dde80fc0..2087601c 100644 --- a/docs/checks/Slices.md.html +++ b/docs/checks/Slices.md.html @@ -44,7 +44,7 @@ row added to it [Slices] ListBuilder lb2 = new ListBuilder(context, uri, ttl); // missing on this one ---------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -112,7 +112,7 @@ rb.setTitle(null, true /* isLoading */); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/SliceDetectorTest.kt) diff --git a/docs/checks/SlotReused.md.html b/docs/checks/SlotReused.md.html index 68785581..d712b37a 100644 --- a/docs/checks/SlotReused.md.html +++ b/docs/checks/SlotReused.md.html @@ -69,7 +69,7 @@ for more information. [SlotReused] slot: @Composable () -> Unit, ---------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -101,7 +101,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/compose-lints/tree/main/compose-lint-checks/src/test/java/slack/lint/compose/SlotReusedDetectorTest.kt) diff --git a/docs/checks/SmallSp.md.html b/docs/checks/SmallSp.md.html index be2b01e3..fa95e7e4 100644 --- a/docs/checks/SmallSp.md.html +++ b/docs/checks/SmallSp.md.html @@ -45,7 +45,7 @@ 6.5sp [SmallSp] android:layout_height="6.5sp" /> ----------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -107,7 +107,7 @@ android:textSize="11sp" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PxUsageDetectorTest.java) diff --git a/docs/checks/SmsAndCallLogPolicy.md.html b/docs/checks/SmsAndCallLogPolicy.md.html new file mode 100644 index 00000000..e4ac3d34 --- /dev/null +++ b/docs/checks/SmsAndCallLogPolicy.md.html @@ -0,0 +1,229 @@ + +(#) SMS/Call Log Insights + +!!! WARNING: SMS/Call Log Insights + This is a warning. + +Id +: `SmsAndCallLogPolicy` +Summary +: SMS/Call Log Insights +Severity +: Warning +Category +: Play Policy +Platform +: Android +Vendor +: Play policy insights beta +Min +: Lint 8.2 to 8.6 +Compiled +: Lint 8.7+ +Artifact +: [com.google.play.policy.insights:insights-lint](com_google_play_policy_insights_insights-lint.md.html) +Since +: 0.1.3 +Affects +: Manifest files +Editing +: This check runs on the fly in the IDE editor + +Google Play imposes strict restrictions on accessing highly sensitive +SMS and Call Log data. Your app must be the designated default handler +for SMS, Phone, or Assistant to request these permissions. Usage is +limited only to documented core app functionality that is absolutely +essential for your app's primary purpose. This data must never be used +for advertising or any other unapproved purpose. + +**Dos:** + +- Submit a declaration form in your Play Console. +- Clearly document the core functionality requiring access to your + users. +- Use policy-compliant alternatives like the SMS Retriever API where + possible. +- Stop accessing data immediately upon losing default handler status. + +**Don'ts:** + +- Request SMS/Call Log permissions without a core need justification. +- Use this data for advertising or purposes. +- Store or share unnecessary SMS or Call Log data. +- Attempt to derive this data using alternative methods. + +**Helpful Links:** + +See Policy page: https://goo.gle/play-policy-sms-call-log +See Help Center article: https://goo.gle/play-help-sms-call-log +See Declaration form: https://goo.gle/play-permission-decl-form + +Always review the full policy in the Policy Center to ensure +compliance. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +AndroidManifest.xml:3:Warning: Only default handlers can use SMS/Call +Log access and for core function only. You cannot use this for ads or +other non-core functionality. [SmsAndCallLogPolicy] + <uses-permission android:name="android.permission.READ_SMS"/> + ------------------------------------------ +AndroidManifest.xml:4:Warning: Only default handlers can use SMS/Call +Log access and for core function only. You cannot use this for ads or +other non-core functionality. [SmsAndCallLogPolicy] + <uses-permission android:name="android.permission.READ_CALL_LOG"/> + ----------------------------------------------- +AndroidManifest.xml:5:Warning: Only default handlers can use SMS/Call +Log access and for core function only. You cannot use this for ads or +other non-core functionality. [SmsAndCallLogPolicy] + <uses-permission android:name="android.permission.WRITE_CALL_LOG"/> + ------------------------------------------------ +AndroidManifest.xml:6:Warning: Only default handlers can use SMS/Call +Log access and for core function only. You cannot use this for ads or +other non-core functionality. [SmsAndCallLogPolicy] + <uses-permission android:name="android.permission.SEND_SMS"/> + ------------------------------------------ +AndroidManifest.xml:7:Warning: Only default handlers can use SMS/Call +Log access and for core function only. You cannot use this for ads or +other non-core functionality. [SmsAndCallLogPolicy] + <uses-permission android:name="android.permission.RECEIVE_SMS"/> + --------------------------------------------- +AndroidManifest.xml:8:Warning: Only default handlers can use SMS/Call +Log access and for core function only. You cannot use this for ads or +other non-core functionality. [SmsAndCallLogPolicy] + <uses-permission android:name="android.permission.WRITE_SMS"/> + ------------------------------------------- +AndroidManifest.xml:9:Warning: Only default handlers can use SMS/Call +Log access and for core function only. You cannot use this for ads or +other non-core functionality. [SmsAndCallLogPolicy] + <uses-permission android:name="android.permission.RECEIVE_WAP_PUSH"/> + -------------------------------------------------- +AndroidManifest.xml:10:Warning: Only default handlers can use SMS/Call +Log access and for core function only. You cannot use this for ads or +other non-core functionality. [SmsAndCallLogPolicy] + <uses-permission android:name="android.permission.RECEIVE_MMS"/> + --------------------------------------------- +AndroidManifest.xml:11:Warning: Only default handlers can use SMS/Call +Log access and for core function only. You cannot use this for ads or +other non-core functionality. [SmsAndCallLogPolicy] + <uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS"/> + -------------------------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`AndroidManifest.xml`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android"> + <uses-permission android:name="android.permission.READ_SMS"/> + <uses-permission android:name="android.permission.READ_CALL_LOG"/> + <uses-permission android:name="android.permission.WRITE_CALL_LOG"/> + <uses-permission android:name="android.permission.SEND_SMS"/> + <uses-permission android:name="android.permission.RECEIVE_SMS"/> + <uses-permission android:name="android.permission.WRITE_SMS"/> + <uses-permission android:name="android.permission.RECEIVE_WAP_PUSH"/> + <uses-permission android:name="android.permission.RECEIVE_MMS"/> + <uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS"/> +</manifest> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](/policyinsights/src/test/java/com/google/play/policy/insights/SmsAndCallLogDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `SmsAndCallLogDetector.testFlagsReadSms`. +To report a problem with this extracted sample, contact +Play policy insights beta. + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("com.google.play.policy.insights:insights-lint:0.1.4") + +// build.gradle +implementation 'com.google.play.policy.insights:insights-lint:0.1.4' + +// build.gradle.kts with version catalogs: +implementation(libs.insights.lint) + +# libs.versions.toml +[versions] +insights-lint = "0.1.4" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +insights-lint = { + module = "com.google.play.policy.insights:insights-lint", + version.ref = "insights-lint" +} +``` + +0.1.4 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.google.play.policy.insights:insights-lint](com_google_play_policy_insights_insights-lint.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Adding the suppression attribute + `tools:ignore="SmsAndCallLogPolicy"` on the problematic XML element + (or one of its enclosing elements). You may also need to add the + following namespace declaration on the root element in the XML file + if it's not already there: + `xmlns:tools="http://schemas.android.com/tools"`. + + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <manifest xmlns:tools="http://schemas.android.com/tools"> + ... + <uses-permission tools:ignore="SmsAndCallLogPolicy" .../> + ... + </manifest> + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="SmsAndCallLogPolicy" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'SmsAndCallLogPolicy' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore SmsAndCallLogPolicy ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/SoonBlockedPrivateApi.md.html b/docs/checks/SoonBlockedPrivateApi.md.html index c4d957e4..48adc07b 100644 --- a/docs/checks/SoonBlockedPrivateApi.md.html +++ b/docs/checks/SoonBlockedPrivateApi.md.html @@ -45,7 +45,7 @@ [SoonBlockedPrivateApi] Field maybeField = TelephonyManager.class.getDeclaredField("OTASP_NEEDED"); // ERROR 2 ------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -73,10 +73,10 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PrivateApiDetectorTest.kt) +You can also visit the source code ([PrivateApiDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PrivateApiDetectorTest.kt) +[SuppressibleTestModeTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/infrastructure/SuppressibleTestModeTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/SourceLockedOrientationActivity.md.html b/docs/checks/SourceLockedOrientationActivity.md.html index b86822fd..e1ebe1fb 100644 --- a/docs/checks/SourceLockedOrientationActivity.md.html +++ b/docs/checks/SourceLockedOrientationActivity.md.html @@ -53,7 +53,7 @@ [SourceLockedOrientationActivity] setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); ----------------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -76,7 +76,7 @@ setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ChromeOsSourceDetectorTest.kt) diff --git a/docs/checks/SpUsage.md.html b/docs/checks/SpUsage.md.html index 265f40c0..1355a99e 100644 --- a/docs/checks/SpUsage.md.html +++ b/docs/checks/SpUsage.md.html @@ -60,7 +60,7 @@ text sizes [SpUsage] android:textSize="14dip" /> ------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -122,7 +122,7 @@ android:textSize="11sp" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PxUsageDetectorTest.java) diff --git a/docs/checks/SpanMarkPointMissingMask.md.html b/docs/checks/SpanMarkPointMissingMask.md.html index 4f3207e6..404bc4ec 100644 --- a/docs/checks/SpanMarkPointMissingMask.md.html +++ b/docs/checks/SpanMarkPointMissingMask.md.html @@ -57,7 +57,7 @@ MARK_POINT flags. [SpanMarkPointMissingMask] return spanned.getSpanFlags(Object()) == || Spanned.x() ------------------------------------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -72,7 +72,7 @@ return spanned.getSpanFlags(Object()) == || Spanned.x() } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/text/SpanMarkPointMissingMaskDetectorTest.kt) diff --git a/docs/checks/SpecifyForegroundServiceType.md.html b/docs/checks/SpecifyForegroundServiceType.md.html index 747fe52a..1c207605 100644 --- a/docs/checks/SpecifyForegroundServiceType.md.html +++ b/docs/checks/SpecifyForegroundServiceType.md.html @@ -53,7 +53,7 @@ the AndroidManifest.xml [SpecifyForegroundServiceType] val info = ForegroundInfo(0, notification, 1) ---------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -70,7 +70,7 @@ val info = ForegroundInfo(0, notification, 1) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/work/work-lint/src/test/java/androidx/work/lint/SpecifyForegroundServiceTypeIssueDetectorTest.kt) @@ -89,17 +89,17 @@ ``` // build.gradle.kts -implementation("androidx.work:work-runtime:2.10.1") +implementation("androidx.work:work-runtime:2.11.1") // build.gradle -implementation 'androidx.work:work-runtime:2.10.1' +implementation 'androidx.work:work-runtime:2.11.1' // build.gradle.kts with version catalogs: implementation(libs.work.runtime) # libs.versions.toml [versions] -work-runtime = "2.10.1" +work-runtime = "2.11.1" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -111,7 +111,7 @@ } ``` -2.10.1 is the version this documentation was generated from; +2.11.1 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.work:work-runtime](androidx_work_work-runtime.md.html). diff --git a/docs/checks/SpecifyJobSchedulerIdRange.md.html b/docs/checks/SpecifyJobSchedulerIdRange.md.html index b9ce78d0..ab553cf3 100644 --- a/docs/checks/SpecifyJobSchedulerIdRange.md.html +++ b/docs/checks/SpecifyJobSchedulerIdRange.md.html @@ -54,7 +54,7 @@ id's for WorkManager to use. [SpecifyJobSchedulerIdRange] class TestJobService: JobService() -------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -65,7 +65,7 @@ import android.app.job.JobService class TestJobService: JobService() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/work/work-lint/src/test/java/androidx/work/lint/SpecifyJobSchedulerIdRangeIssueDetectorTest.kt) @@ -84,17 +84,17 @@ ``` // build.gradle.kts -implementation("androidx.work:work-runtime:2.10.1") +implementation("androidx.work:work-runtime:2.11.1") // build.gradle -implementation 'androidx.work:work-runtime:2.10.1' +implementation 'androidx.work:work-runtime:2.11.1' // build.gradle.kts with version catalogs: implementation(libs.work.runtime) # libs.versions.toml [versions] -work-runtime = "2.10.1" +work-runtime = "2.11.1" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -106,7 +106,7 @@ } ``` -2.10.1 is the version this documentation was generated from; +2.11.1 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.work:work-runtime](androidx_work_work-runtime.md.html). diff --git a/docs/checks/SquareAndRoundTilePreviews.md.html b/docs/checks/SquareAndRoundTilePreviews.md.html index 5e96d3ff..342a96f6 100644 --- a/docs/checks/SquareAndRoundTilePreviews.md.html +++ b/docs/checks/SquareAndRoundTilePreviews.md.html @@ -44,7 +44,7 @@ [SquareAndRoundTilePreviews] <service ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -64,7 +64,7 @@ </intent-filter> </service> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/TileProviderDetectorTest.kt) diff --git a/docs/checks/StartActivityAndCollapseDeprecated.md.html b/docs/checks/StartActivityAndCollapseDeprecated.md.html index ea6666e4..345ad940 100644 --- a/docs/checks/StartActivityAndCollapseDeprecated.md.html +++ b/docs/checks/StartActivityAndCollapseDeprecated.md.html @@ -43,7 +43,7 @@ instead. [StartActivityAndCollapseDeprecated] tileService.startActivityAndCollapse(intent) // ERROR ------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -60,7 +60,7 @@ fun callAMethod(tileService: TileService, intent: PendingIntent) { tileService.startActivityAndCollapse(intent) // OK } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/TileServiceActivityDetectorTest.kt) diff --git a/docs/checks/StateFlowValueCalledInComposition.md.html b/docs/checks/StateFlowValueCalledInComposition.md.html index fcd50ecc..dde98436 100644 --- a/docs/checks/StateFlowValueCalledInComposition.md.html +++ b/docs/checks/StateFlowValueCalledInComposition.md.html @@ -44,76 +44,84 @@ Instead you should use stateFlow.collectAsState() to observe changes to the StateFlow, and recompose when it changes. +!!! Tip + This lint check has an associated quickfix available in the IDE. + (##) Example Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/androidx/compose/runtime/foo/TestFlow.kt:20:Error: StateFlow.value +src/androidx/compose/runtime/foo/TestFlow.kt:18:Error: StateFlow.value +should not be called within composition +[StateFlowValueCalledInComposition] + stateFlow.value + ----- +src/androidx/compose/runtime/foo/TestFlow.kt:19:Error: StateFlow.value should not be called within composition [StateFlowValueCalledInComposition] testFlow.value ----- -src/androidx/compose/runtime/foo/TestFlow.kt:24:Error: StateFlow.value +src/androidx/compose/runtime/foo/TestFlow.kt:23:Error: StateFlow.value should not be called within composition [StateFlowValueCalledInComposition] stateFlow.value ----- -src/androidx/compose/runtime/foo/TestFlow.kt:25:Error: StateFlow.value +src/androidx/compose/runtime/foo/TestFlow.kt:24:Error: StateFlow.value should not be called within composition [StateFlowValueCalledInComposition] testFlow.value ----- -src/androidx/compose/runtime/foo/TestFlow.kt:29:Error: StateFlow.value +src/androidx/compose/runtime/foo/TestFlow.kt:28:Error: StateFlow.value should not be called within composition [StateFlowValueCalledInComposition] stateFlow.value ----- -src/androidx/compose/runtime/foo/TestFlow.kt:30:Error: StateFlow.value +src/androidx/compose/runtime/foo/TestFlow.kt:29:Error: StateFlow.value should not be called within composition [StateFlowValueCalledInComposition] testFlow.value ----- -src/androidx/compose/runtime/foo/TestFlow.kt:39:Error: StateFlow.value +src/androidx/compose/runtime/foo/TestFlow.kt:38:Error: StateFlow.value should not be called within composition [StateFlowValueCalledInComposition] stateFlow.value ----- -src/androidx/compose/runtime/foo/TestFlow.kt:40:Error: StateFlow.value +src/androidx/compose/runtime/foo/TestFlow.kt:39:Error: StateFlow.value should not be called within composition [StateFlowValueCalledInComposition] testFlow.value ----- -src/androidx/compose/runtime/foo/TestFlow.kt:43:Error: StateFlow.value +src/androidx/compose/runtime/foo/TestFlow.kt:42:Error: StateFlow.value should not be called within composition [StateFlowValueCalledInComposition] stateFlow.value ----- -src/androidx/compose/runtime/foo/TestFlow.kt:44:Error: StateFlow.value +src/androidx/compose/runtime/foo/TestFlow.kt:43:Error: StateFlow.value should not be called within composition [StateFlowValueCalledInComposition] testFlow.value ----- -src/androidx/compose/runtime/foo/TestFlow.kt:50:Error: StateFlow.value +src/androidx/compose/runtime/foo/TestFlow.kt:49:Error: StateFlow.value should not be called within composition [StateFlowValueCalledInComposition] stateFlow.value ----- -src/androidx/compose/runtime/foo/TestFlow.kt:51:Error: StateFlow.value +src/androidx/compose/runtime/foo/TestFlow.kt:50:Error: StateFlow.value should not be called within composition [StateFlowValueCalledInComposition] testFlow.value ----- -src/androidx/compose/runtime/foo/TestFlow.kt:55:Error: StateFlow.value +src/androidx/compose/runtime/foo/TestFlow.kt:54:Error: StateFlow.value should not be called within composition [StateFlowValueCalledInComposition] stateFlow.value ----- -src/androidx/compose/runtime/foo/TestFlow.kt:56:Error: StateFlow.value +src/androidx/compose/runtime/foo/TestFlow.kt:55:Error: StateFlow.value should not be called within composition [StateFlowValueCalledInComposition] testFlow.value ----- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -176,7 +184,7 @@ testFlow.value } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/ComposableStateFlowValueDetectorTest.kt) @@ -195,17 +203,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime-android:1.9.0-alpha01") +implementation("androidx.compose.runtime:runtime-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.runtime:runtime-android:1.9.0-alpha01' +implementation 'androidx.compose.runtime:runtime-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.runtime.android) # libs.versions.toml [versions] -runtime-android = "1.9.0-alpha01" +runtime-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -217,11 +225,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.runtime:runtime-lint:1.9.0-alpha01`. +You can also use `androidx.compose.runtime:runtime-lint:1.11.0-alpha06`. [Additional details about androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html). diff --git a/docs/checks/StateListReachable.md.html b/docs/checks/StateListReachable.md.html index b351e2ab..9e20519b 100644 --- a/docs/checks/StateListReachable.md.html +++ b/docs/checks/StateListReachable.md.html @@ -44,7 +44,7 @@ [StateListReachable] <item android:state_pressed="true" ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -57,7 +57,7 @@ <item android:state_focused="true" android:color="#ff0000ff"/> <!-- focused --> </selector> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/StateListDetectorTest.kt) diff --git a/docs/checks/StaticFieldLeak.md.html b/docs/checks/StaticFieldLeak.md.html index cce4d54e..4393f6d7 100644 --- a/docs/checks/StaticFieldLeak.md.html +++ b/docs/checks/StaticFieldLeak.md.html @@ -69,7 +69,7 @@ classes in static fields; this is a memory leak [StaticFieldLeak] private static Activity sAppContext1; // LEAK ------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -108,7 +108,7 @@ private static Context sAppContext2; // Probably app context leak private static Context applicationCtx; // Probably app context leak } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/LeakDetectorTest.kt) diff --git a/docs/checks/StopShip.md.html b/docs/checks/StopShip.md.html index 3d1a0a1c..aff27e88 100644 --- a/docs/checks/StopShip.md.html +++ b/docs/checks/StopShip.md.html @@ -61,7 +61,7 @@ code which must be fixed prior to release [StopShip] /* We must STOPSHIP! */ -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -81,10 +81,11 @@ /* We must STOPSHIP! */ String x = "STOPSHIP"; // OK } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/CommentDetectorTest.java) +You can also visit the source code ([CommentDetectorTest.java](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/CommentDetectorTest.java) +[SuppressibleTestModeTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/infrastructure/SuppressibleTestModeTest.kt) +[MainTest.java](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/MainTest.java) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/StrandhoggVulnerable.md.html b/docs/checks/StrandhoggVulnerable.md.html index ef8ef8b8..de4c5bb7 100644 --- a/docs/checks/StrandhoggVulnerable.md.html +++ b/docs/checks/StrandhoggVulnerable.md.html @@ -27,7 +27,7 @@ Artifact : [com.android.security.lint:lint](com_android_security_lint_lint.md.html) Since -: 1.0.1 +: 1.0.0 Affects : Manifest files Editing @@ -56,7 +56,7 @@ [StrandhoggVulnerable] <uses-sdk android:targetSdkVersion='27'/> -- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -68,7 +68,7 @@ <activity android:name='com.example.MainActivity'></activity> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/StrandhoggDetectorTest.kt) @@ -88,17 +88,17 @@ ``` // build.gradle.kts -lintChecks("com.android.security.lint:lint:1.0.3") +lintChecks("com.android.security.lint:lint:1.0.4") // build.gradle -lintChecks 'com.android.security.lint:lint:1.0.3' +lintChecks 'com.android.security.lint:lint:1.0.4' // build.gradle.kts with version catalogs: lintChecks(libs.com.android.security.lint.lint) # libs.versions.toml [versions] -com-android-security-lint-lint = "1.0.3" +com-android-security-lint-lint = "1.0.4" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -110,7 +110,7 @@ } ``` -1.0.3 is the version this documentation was generated from; +1.0.4 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.android.security.lint:lint](com_android_security_lint_lint.md.html). diff --git a/docs/checks/StringEscaping.md.html b/docs/checks/StringEscaping.md.html index 5467bf1c..8dfc53b9 100644 --- a/docs/checks/StringEscaping.md.html +++ b/docs/checks/StringEscaping.md.html @@ -42,24 +42,24 @@ res/values/strings.xml:3:Error: Apostrophe not preceded by \ [StringEscaping] <string name="some_string">'ERROR'</string> - ^ + ------- res/values/strings.xml:5:Error: Apostrophe not preceded by \ [StringEscaping] <string name="some_string3">What's New</string> - ^ + ------ res/values/strings.xml:12:Error: Bad character in \u unicode escape sequence [StringEscaping] <string name="some_string10">Unicode\u12.</string> - ^ + - res/values/strings.xml:19:Error: Apostrophe not preceded by \ [StringEscaping] <item>It's incorrect</item> - ^ + ------------ res/values/strings.xml:23:Error: Apostrophe not preceded by \ [StringEscaping] <item quantity="few">%d piose'nki.</item> - ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ----- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -92,7 +92,7 @@ </plurals> <string name="foo">Letzte Freischaltung:\\ </string> <!-- b/387281249 --> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/StringEscapeDetectorTest.kt) diff --git a/docs/checks/StringFormatCount.md.html b/docs/checks/StringFormatCount.md.html index cbac397e..bcf2f99e 100644 --- a/docs/checks/StringFormatCount.md.html +++ b/docs/checks/StringFormatCount.md.html @@ -48,7 +48,7 @@ values/formatstrings.xml [StringFormatCount] <string name="hello">%3$d: %1$s, %2$s?</string> ----------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -57,14 +57,14 @@ <resources> <string name="hello">Hello %1$s, %2$s?</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-es/formatstrings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> <string name="hello">%3$d: %1$s, %2$s?</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/StringFormatDetectorTest.java) diff --git a/docs/checks/StringFormatInTimber.md.html b/docs/checks/StringFormatInTimber.md.html index b0ae61f2..858cc9aa 100644 --- a/docs/checks/StringFormatInTimber.md.html +++ b/docs/checks/StringFormatInTimber.md.html @@ -51,7 +51,7 @@ [StringFormatInTimber] Timber.d(String.format("%s", "arg1")); --------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -64,7 +64,7 @@ Timber.d(String.format("%s", "arg1")); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/foo/Example.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -75,7 +75,7 @@ Timber.d(String.format("%s", "arg1")) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/JakeWharton/timber/tree/trunk/timber-lint/src/test/java/timber/lint/WrongTimberUsageDetectorTest.kt) diff --git a/docs/checks/StringFormatInvalid.md.html b/docs/checks/StringFormatInvalid.md.html index 39e2585f..77cce379 100644 --- a/docs/checks/StringFormatInvalid.md.html +++ b/docs/checks/StringFormatInvalid.md.html @@ -59,7 +59,7 @@ [StringFormatInvalid] context.getString(R.string.no_args, "first"); // ERROR -------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -70,7 +70,7 @@ context.getString(R.string.no_args, "first"); // ERROR } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -78,7 +78,7 @@ <resources> <string name="no_args">Hello</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/StringFormatDetectorTest.java) diff --git a/docs/checks/StringFormatMatches.md.html b/docs/checks/StringFormatMatches.md.html index 023a3168..dc974f75 100644 --- a/docs/checks/StringFormatMatches.md.html +++ b/docs/checks/StringFormatMatches.md.html @@ -48,7 +48,7 @@ [StringFormatMatches] String output4 = String.format(score, true); // wrong ---- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -57,7 +57,7 @@ <resources> <string name="score">Score: %1$d</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/StringFormatMatches.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -69,10 +69,10 @@ String output4 = String.format(score, true); // wrong } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/StringFormatDetectorTest.java) +You can also visit the source code ([StringFormatDetectorTest.java](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/StringFormatDetectorTest.java) +[LintIssueDocGeneratorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/LintIssueDocGeneratorTest.kt) for the unit tests for this check to see additional scenarios. (##) Suppressing diff --git a/docs/checks/StringFormatTrivial.md.html b/docs/checks/StringFormatTrivial.md.html index e646e5e3..8ff38342 100644 --- a/docs/checks/StringFormatTrivial.md.html +++ b/docs/checks/StringFormatTrivial.md.html @@ -56,7 +56,7 @@ performant to concatenate your arguments with +. [StringFormatTrivial] String output3a = String.format("%s %c %b", "Hello world", '!', true); ---------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -87,7 +87,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -97,8 +97,7 @@ <string name="trivial2">%s %c</string> <string name="trivial3">%s %c %b</string> </resources> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/StringFormatDetectorTest.java) diff --git a/docs/checks/StringNotCapitalized.md.html b/docs/checks/StringNotCapitalized.md.html index 6c1a26c2..cf9db046 100644 --- a/docs/checks/StringNotCapitalized.md.html +++ b/docs/checks/StringNotCapitalized.md.html @@ -47,8 +47,8 @@ res/values/strings.xml:2:Warning: String is not capitalized [StringNotCapitalized] <string name="my_string">my string</string> - ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + --------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -57,7 +57,7 @@ <resources> <string name="my_string">my string</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/StringNotCapitalizedDetectorTest.kt) diff --git a/docs/checks/StringShouldBeInt.md.html b/docs/checks/StringShouldBeInt.md.html index 59649f08..369706c8 100644 --- a/docs/checks/StringShouldBeInt.md.html +++ b/docs/checks/StringShouldBeInt.md.html @@ -47,23 +47,11 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -build.gradle:4:Error: Use an integer rather than a string here (replace -'19' with just 19) [StringShouldBeInt] - compileSdkVersion '19' - ---------------------- -build.gradle:7:Error: Use an integer rather than a string here (replace -'8' with just 8) [StringShouldBeInt] - minSdkVersion '8' - ----------------- -build.gradle:8:Error: Use an integer rather than a string here (replace -"16" with just 16) [StringShouldBeInt] - targetSdkVersion "16" - --------------------- -build.gradle:10:Error: Use an integer rather than a string here (replace -'19' with just 19) [StringShouldBeInt] - compileSdk '19' - --------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +build.gradle:11:Error: minSdk does not support strings; did you mean +minSdkPreview ? [StringShouldBeInt] + minSdk '' + --------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -72,22 +60,27 @@ apply plugin: 'com.android.application' android { - compileSdkVersion '19' - buildToolsVersion "19.0.1" + compileSdkVersion 19 + buildToolsVersion "19.0.0" + defaultConfig { - minSdkVersion '8' - targetSdkVersion "16" + minSdkVersion 7 + minSdkVersion "ECLAIR" + minSdk 7 + minSdk '' + targetSdkVersion 19 + versionCode 1 + versionName "1.0" } - compileSdk '19' } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test -found for this lint check, `GradleDetector.testStringInt`. +found for this lint check, `GradleDetector.testMinSdkVersion`. To report a problem with this extracted sample, visit https://issuetracker.google.com/issues/new?component=192708. diff --git a/docs/checks/SubscribeOnMain.md.html b/docs/checks/SubscribeOnMain.md.html index a21db40c..d529de6a 100644 --- a/docs/checks/SubscribeOnMain.md.html +++ b/docs/checks/SubscribeOnMain.md.html @@ -62,7 +62,7 @@ [SubscribeOnMain] obs.subscribeOn(AndroidSchedulers.mainThread()); ------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -77,7 +77,7 @@ return null; } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/com/slack/lint/Foo.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -91,7 +91,7 @@ obs.subscribeOn(AndroidSchedulers.mainThread()); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/rx/RxSubscribeOnMainDetectorTest.kt) diff --git a/docs/checks/SuperfluousMarginDeclaration.md.html b/docs/checks/SuperfluousMarginDeclaration.md.html index 3b605730..e8d71b3f 100644 --- a/docs/checks/SuperfluousMarginDeclaration.md.html +++ b/docs/checks/SuperfluousMarginDeclaration.md.html @@ -49,7 +49,7 @@ [SuperfluousMarginDeclaration] <TextView ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -61,7 +61,7 @@ android:layout_marginBottom="16dp" android:layout_marginStart="16dp" android:layout_marginEnd="16dp"/> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/SuperfluousMarginDeclarationDetectorTest.kt) diff --git a/docs/checks/SuperfluousNameSpace.md.html b/docs/checks/SuperfluousNameSpace.md.html index f3815012..908429e2 100644 --- a/docs/checks/SuperfluousNameSpace.md.html +++ b/docs/checks/SuperfluousNameSpace.md.html @@ -48,7 +48,7 @@ declared and hence not needed [SuperfluousNameSpace] xmlns:android="http://schemas.android.com/apk/res/android" ---------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -59,7 +59,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content"/> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/SuperfluousNameSpaceDetectorTest.kt) diff --git a/docs/checks/SuperfluousPaddingDeclaration.md.html b/docs/checks/SuperfluousPaddingDeclaration.md.html index 4ca9171d..d69762a9 100644 --- a/docs/checks/SuperfluousPaddingDeclaration.md.html +++ b/docs/checks/SuperfluousPaddingDeclaration.md.html @@ -49,7 +49,7 @@ [SuperfluousPaddingDeclaration] <TextView ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -61,7 +61,7 @@ android:paddingBottom="16dp" android:paddingStart="16dp" android:paddingEnd="16dp"/> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/SuperfluousPaddingDeclarationDetectorTest.kt) diff --git a/docs/checks/SupportAnnotationUsage.md.html b/docs/checks/SupportAnnotationUsage.md.html index 44d5d0e4..f5722960 100644 --- a/docs/checks/SupportAnnotationUsage.md.html +++ b/docs/checks/SupportAnnotationUsage.md.html @@ -52,7 +52,7 @@ be allowed on any element types from Java [SupportAnnotationUsage] @java.lang.annotation.Target(ElementType.PARAMETER) // ERROR 2 ------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -79,10 +79,10 @@ @java.lang.annotation.Target(ElementType.PARAMETER) // ERROR 2 @Target(AnnotationTarget.VALUE_PARAMETER) annotation class Annotation4() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AnnotationDetectorTest.kt) +You can also visit the source code ([AnnotationDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AnnotationDetectorTest.kt) +[KeepRuleDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/KeepRuleDetectorTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/Suspicious0dp.md.html b/docs/checks/Suspicious0dp.md.html index 919e8905..02c726eb 100644 --- a/docs/checks/Suspicious0dp.md.html +++ b/docs/checks/Suspicious0dp.md.html @@ -63,7 +63,7 @@ view invisible, probably intended for layout_width [Suspicious0dp] android:layout_height="0dp" --------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -172,7 +172,7 @@ </LinearLayout> </FrameLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/InefficientWeightDetectorTest.java) diff --git a/docs/checks/SuspiciousCompositionLocalModifierRead.md.html b/docs/checks/SuspiciousCompositionLocalModifierRead.md.html index 9f655ac6..cdccefe1 100644 --- a/docs/checks/SuspiciousCompositionLocalModifierRead.md.html +++ b/docs/checks/SuspiciousCompositionLocalModifierRead.md.html @@ -71,7 +71,7 @@ [SuspiciousCompositionLocalModifierRead] val readValue = currentValueOf(staticLocalInt) ------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -98,7 +98,7 @@ val readValue = currentValueOf(staticLocalInt) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/SuspiciousCompositionLocalModifierReadDetectorTest.kt) @@ -117,17 +117,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui-android:1.9.0-alpha01") +implementation("androidx.compose.ui:ui-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.ui:ui-android:1.9.0-alpha01' +implementation 'androidx.compose.ui:ui-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.ui.android) # libs.versions.toml [versions] -ui-android = "1.9.0-alpha01" +ui-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -139,11 +139,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.ui:ui-lint:1.9.0-alpha01`. +You can also use `androidx.compose.ui:ui-lint:1.11.0-alpha06`. [Additional details about androidx.compose.ui:ui-android](androidx_compose_ui_ui-android.md.html). diff --git a/docs/checks/SuspiciousImport.md.html b/docs/checks/SuspiciousImport.md.html index c847be91..8d8616dd 100644 --- a/docs/checks/SuspiciousImport.md.html +++ b/docs/checks/SuspiciousImport.md.html @@ -47,7 +47,7 @@ a fully qualified name for each usage instead [SuspiciousImport] import android.R; ----------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -62,7 +62,7 @@ public class BadImport { } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WrongImportDetectorTest.kt) diff --git a/docs/checks/SuspiciousIndentation.md.html b/docs/checks/SuspiciousIndentation.md.html index 9f015ff0..1ce8c05a 100644 --- a/docs/checks/SuspiciousIndentation.md.html +++ b/docs/checks/SuspiciousIndentation.md.html @@ -59,7 +59,7 @@ <option name="always-run" value="false" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (##) Example @@ -75,7 +75,7 @@ [SuspiciousIndentation] price.toString() + // WARN 2 ---------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -98,7 +98,7 @@ price.toString() + // WARN 2 "." } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/IndentationDetectorTest.kt) diff --git a/docs/checks/SuspiciousModifierThen.md.html b/docs/checks/SuspiciousModifierThen.md.html index 16d52a61..6e1f29d4 100644 --- a/docs/checks/SuspiciousModifierThen.md.html +++ b/docs/checks/SuspiciousModifierThen.md.html @@ -69,7 +69,7 @@ factory function with an implicit receiver [SuspiciousModifierThen] fun Modifier.test4() = this.then(if (true) test() else TestModifier) ---- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -88,7 +88,7 @@ fun Modifier.test3() = this.then(with(1) { test() }) fun Modifier.test4() = this.then(if (true) test() else TestModifier) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/SuspiciousModifierThenDetectorTest.kt) @@ -107,17 +107,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui-android:1.9.0-alpha01") +implementation("androidx.compose.ui:ui-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.ui:ui-android:1.9.0-alpha01' +implementation 'androidx.compose.ui:ui-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.ui.android) # libs.versions.toml [versions] -ui-android = "1.9.0-alpha01" +ui-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -129,11 +129,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.ui:ui-lint:1.9.0-alpha01`. +You can also use `androidx.compose.ui:ui-lint:1.11.0-alpha06`. [Additional details about androidx.compose.ui:ui-android](androidx_compose_ui_ui-android.md.html). diff --git a/docs/checks/SwitchIntDef.md.html b/docs/checks/SwitchIntDef.md.html index 936a0ece..a261b53a 100644 --- a/docs/checks/SwitchIntDef.md.html +++ b/docs/checks/SwitchIntDef.md.html @@ -68,7 +68,12 @@ associated constant missing case X.LENGTH_SHORT [SwitchIntDef] switch (X.getDuration()) { ------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src/test/pkg/X.java:158:Warning: Switch statement on an int with known +associated constant missing case LENGTH_INDEFINITE, LENGTH_LONG +[SwitchIntDef] + return switch(duration) { // not ok + ^ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -202,11 +207,45 @@ break; } } + + public static void testDefaultOk(@Duration int duration) { + switch (duration) { // ok + case LENGTH_SHORT -> { + System.out.println("Short!"); + } + default -> { + System.out.println("Default!"); + } + } + } + + public static int testSwitchExprDefaultOk(@Duration int duration) { + return switch (duration) { // ok + case LENGTH_SHORT -> 1; + case LENGTH_INDEFINITE -> 3; + case LENGTH_LONG -> 2; + default -> throw new IllegalStateException("Unreachable"); + }; + } + + public static int testSwitchExprDefaultAlsoOk(@Duration int duration) { + return switch (duration) { // ok + case LENGTH_SHORT -> 1; + default -> 2; + }; + } + + public static int testSwitchExprDefaultNotOk(@Duration int duration) { + return switch(duration) { // not ok + case LENGTH_SHORT -> 1; + default -> throw new IllegalStateException("Unreachable"); + }; + } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AnnotationDetectorTest.kt) +You can also visit the source code ([AnnotationDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AnnotationDetectorTest.kt) +[ProjectInitializerTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/ProjectInitializerTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/SyntheticAccessor.md.html b/docs/checks/SyntheticAccessor.md.html index 94975430..9cc993cb 100644 --- a/docs/checks/SyntheticAccessor.md.html +++ b/docs/checks/SyntheticAccessor.md.html @@ -80,7 +80,7 @@ [SyntheticAccessor] method1(); // ERROR ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -175,7 +175,7 @@ // int f = o.field1; } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/SyntheticAccessorDetectorTest.kt) diff --git a/docs/checks/SystemPermissionTypo.md.html b/docs/checks/SystemPermissionTypo.md.html index fc3b6de6..3b2f0833 100644 --- a/docs/checks/SystemPermissionTypo.md.html +++ b/docs/checks/SystemPermissionTypo.md.html @@ -52,25 +52,25 @@ ----------------------------------- AndroidManifest.xml:9:Warning: Did you mean android.permission.BIND_NFC_SERVICE? [SystemPermissionTypo] - <activity android:permission="android.permission.BIND_NCF_SERVICE" /> - ----------------------------------- + <activity android:name="name3" android:permission="android.permission.BIND_NCF_SERVICE" /> + ----------------------------------- AndroidManifest.xml:10:Warning: Did you mean android.permission.BIND_NFC_SERVICE? [SystemPermissionTypo] - <activity-alias android:permission="android.permission.BIND_NCF_SERVICE" /> - ----------------------------------- + <activity-alias android:name="name4" android:permission="android.permission.BIND_NCF_SERVICE" /> + ----------------------------------- AndroidManifest.xml:11:Warning: Did you mean android.permission.BIND_NFC_SERVICE? [SystemPermissionTypo] - <receiver android:permission="android.permission.BIND_NCF_SERVICE" /> - ----------------------------------- + <receiver android:name="name5" android:permission="android.permission.BIND_NCF_SERVICE" /> + ----------------------------------- AndroidManifest.xml:12:Warning: Did you mean android.permission.BIND_NFC_SERVICE? [SystemPermissionTypo] - <service android:permission="android.permission.BIND_NCF_SERVICE" /> - ----------------------------------- + <service android:name="name6" android:permission="android.permission.BIND_NCF_SERVICE" /> + ----------------------------------- AndroidManifest.xml:13:Warning: Did you mean android.permission.BIND_NFC_SERVICE? [SystemPermissionTypo] - <provider android:permission="android.permission.BIND_NCF_SERVICE" /> - ----------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + <provider android:name="name7" android:permission="android.permission.BIND_NCF_SERVICE" /> + ----------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -82,16 +82,16 @@ package="com.example.helloworld"> <uses-permission android:name="android.permission.BIND_NCF_SERVICE" /> <application android:name="App" android:permission="android.permission.BIND_NCF_SERVICE"> - <activity /> - <activity android:permission="android.permission.BIND_NFC_SERVICE" /> - <activity android:permission="android.permission.BIND_NCF_SERVICE" /> - <activity-alias android:permission="android.permission.BIND_NCF_SERVICE" /> - <receiver android:permission="android.permission.BIND_NCF_SERVICE" /> - <service android:permission="android.permission.BIND_NCF_SERVICE" /> - <provider android:permission="android.permission.BIND_NCF_SERVICE" /> + <activity android:name="name1" /> + <activity android:name="name2" android:permission="android.permission.BIND_NFC_SERVICE" /> + <activity android:name="name3" android:permission="android.permission.BIND_NCF_SERVICE" /> + <activity-alias android:name="name4" android:permission="android.permission.BIND_NCF_SERVICE" /> + <receiver android:name="name5" android:permission="android.permission.BIND_NCF_SERVICE" /> + <service android:name="name6" android:permission="android.permission.BIND_NCF_SERVICE" /> + <provider android:name="name7" android:permission="android.permission.BIND_NCF_SERVICE" /> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PermissionErrorDetectorTest.kt) diff --git a/docs/checks/TapjackingVulnerable.md.html b/docs/checks/TapjackingVulnerable.md.html index c6b64b5c..8b5b5557 100644 --- a/docs/checks/TapjackingVulnerable.md.html +++ b/docs/checks/TapjackingVulnerable.md.html @@ -27,7 +27,7 @@ Artifact : [com.android.security.lint:lint](com_android_security_lint_lint.md.html) Since -: 1.0.1 +: 1.0.0 Affects : Resource files Editing @@ -42,7 +42,7 @@ : 2023 Apps with sensitive UI elements should add the -`filterTouchesWithObscured` attribute to protect it from tapjacking / +`filterTouchesWhenObscured` attribute to protect it from tapjacking / overlay attacks. !!! Tip @@ -57,7 +57,7 @@ [TapjackingVulnerable] <Switch android:id='enable_setting'> ------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -68,7 +68,7 @@ <Switch android:id='enable_setting'> </Switch> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/TapjackingDetectorTest.kt) @@ -88,17 +88,17 @@ ``` // build.gradle.kts -lintChecks("com.android.security.lint:lint:1.0.3") +lintChecks("com.android.security.lint:lint:1.0.4") // build.gradle -lintChecks 'com.android.security.lint:lint:1.0.3' +lintChecks 'com.android.security.lint:lint:1.0.4' // build.gradle.kts with version catalogs: lintChecks(libs.com.android.security.lint.lint) # libs.versions.toml [versions] -com-android-security-lint-lint = "1.0.3" +com-android-security-lint-lint = "1.0.4" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -110,7 +110,7 @@ } ``` -1.0.3 is the version this documentation was generated from; +1.0.4 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.android.security.lint:lint](com_android_security_lint_lint.md.html). diff --git a/docs/checks/TestAppLink.md.html b/docs/checks/TestAppLink.md.html index 75a63b61..c6356c7b 100644 --- a/docs/checks/TestAppLink.md.html +++ b/docs/checks/TestAppLink.md.html @@ -44,7 +44,7 @@ [TestAppLink] <validation /> ---------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -69,7 +69,7 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AppLinksValidDetectorTest.kt) diff --git a/docs/checks/TestLifecycleOwnerInCoroutine.md.html b/docs/checks/TestLifecycleOwnerInCoroutine.md.html index 6e80a873..40afb9de 100644 --- a/docs/checks/TestLifecycleOwnerInCoroutine.md.html +++ b/docs/checks/TestLifecycleOwnerInCoroutine.md.html @@ -60,7 +60,7 @@ function. [TestLifecycleOwnerInCoroutine] fun testSetCurrentStateInRunTestWithTimeOut() = runTest(timeout = 5000) { ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -81,7 +81,7 @@ val owner = TestLifecycleOwner() owner.currentState = Lifecycle.State.RESUMED } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/lifecycle/lifecycle-runtime-testing-lint/src/test/java/androidx/lifecycle/runtime/testing/lint/TestLifecycleOwnerInCoroutineDetectorTest.kt) @@ -100,17 +100,17 @@ ``` // build.gradle.kts -implementation("androidx.lifecycle:lifecycle-runtime-testing:2.9.0-rc01") +implementation("androidx.lifecycle:lifecycle-runtime-testing:2.11.0-alpha01") // build.gradle -implementation 'androidx.lifecycle:lifecycle-runtime-testing:2.9.0-rc01' +implementation 'androidx.lifecycle:lifecycle-runtime-testing:2.11.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.lifecycle.runtime.testing) # libs.versions.toml [versions] -lifecycle-runtime-testing = "2.9.0-rc01" +lifecycle-runtime-testing = "2.11.0-alpha01" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -122,7 +122,7 @@ } ``` -2.9.0-rc01 is the version this documentation was generated from; +2.11.0-alpha01 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.lifecycle:lifecycle-runtime-testing](androidx_lifecycle_lifecycle-runtime-testing.md.html). diff --git a/docs/checks/TestManifestGradleConfiguration.md.html b/docs/checks/TestManifestGradleConfiguration.md.html index 50fa5185..935c611d 100644 --- a/docs/checks/TestManifestGradleConfiguration.md.html +++ b/docs/checks/TestManifestGradleConfiguration.md.html @@ -78,7 +78,7 @@ [TestManifestGradleConfiguration] lintPublish("androidx.compose.ui:ui-test-manifest:1.2.0-beta02") ---------------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -93,7 +93,7 @@ lintChecks("androidx.compose.ui:ui-test-manifest:1.2.0-beta02") lintPublish("androidx.compose.ui:ui-test-manifest:1.2.0-beta02") } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/ui/ui-test-manifest-lint/src/test/java/androix/compose/ui/test/manifest/lint/GradleDebugConfigurationDetectorTest.kt) @@ -112,17 +112,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui-test-manifest:1.9.0-alpha01") +implementation("androidx.compose.ui:ui-test-manifest:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.ui:ui-test-manifest:1.9.0-alpha01' +implementation 'androidx.compose.ui:ui-test-manifest:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.ui.test.manifest) # libs.versions.toml [versions] -ui-test-manifest = "1.9.0-alpha01" +ui-test-manifest = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -134,11 +134,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.ui:ui-test-manifest-lint:1.9.0-alpha01`. +You can also use `androidx.compose.ui:ui-test-manifest-lint:1.11.0-alpha06`. [Additional details about androidx.compose.ui:ui-test-manifest](androidx_compose_ui_ui-test-manifest.md.html). diff --git a/docs/checks/TestParameterSiteTarget.md.html b/docs/checks/TestParameterSiteTarget.md.html index 78612d1d..a560c8a5 100644 --- a/docs/checks/TestParameterSiteTarget.md.html +++ b/docs/checks/TestParameterSiteTarget.md.html @@ -54,7 +54,7 @@ target [TestParameterSiteTarget] @com.google.testing.junit.testparameterinjector.TestParameter val myParam: String ------------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -63,7 +63,7 @@ class MyTest( @com.google.testing.junit.testparameterinjector.TestParameter val myParam: String ) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/TestParameterSiteTargetDetectorTest.kt) diff --git a/docs/checks/TextConcatSpace.md.html b/docs/checks/TextConcatSpace.md.html new file mode 100644 index 00000000..ab4f359c --- /dev/null +++ b/docs/checks/TextConcatSpace.md.html @@ -0,0 +1,163 @@ + +(#) Missing space in text concatenation? + +!!! WARNING: Missing space in text concatenation? + This is a warning. + +Id +: `TextConcatSpace` +Summary +: Missing space in text concatenation? +Severity +: Warning +Category +: Correctness +Platform +: Any +Vendor +: Android Open Source Project +Feedback +: https://issuetracker.google.com/issues/new?component=192708 +Since +: 9.0.0 (January 2026) +Affects +: Kotlin and Java files +Editing +: This check runs on the fly in the IDE editor +Implementation +: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/TextConcatDetector.kt) +Tests +: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/TextConcatDetectorTest.kt) + +When splitting strings up across separate lines, it's easy to +accidentally miss a separating space. This lint check looks for cases of +string concatenation where a separating space may be missing. + +!!! Tip + This lint check has an associated quickfix available in the IDE. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/test/pkg/Test.java:6:Warning: Missing space between "is" on the +previous line and "a" here? Resulting string is "isa". +[TextConcatSpace] + "a second line"; // ERROR 1 + --------------- +src/test/pkg/Test.java:8:Warning: Missing space between "is" on the +previous line and "a" here? Resulting string is "isa". +[TextConcatSpace] + "a polyadic" // ERROR 2 + ------------ +src/test/pkg/Test.java:9:Warning: Missing space between "polyadic" on +the previous line and "expression" here? Resulting string is +"polyadicexpression". [TextConcatSpace] + + "expression"; // ERROR 3 + ------------ +src/test/pkg/test.kt:5:Warning: Missing space between "is" on the +previous line and "a" here? Resulting string is "isa". +[TextConcatSpace] + "a second line" // ERROR 4 + ------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here are the relevant source files: + +`src/test/pkg/Test.java`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers +package test.pkg; + +public class Test { + public void test() { + String s = "This is" + + "a second line"; // ERROR 1 + String s = "This is" + + "a polyadic" // ERROR 2 + + "expression"; // ERROR 3 + String t = "This is" + "same line"; // OK + } +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`src/test/pkg/test.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package test.pkg + +fun test() { + val s = "This is" + + "a second line" // ERROR 4 + val t = "This is" + "same line" // OK 2 +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/TextConcatDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Using a suppression annotation like this on the enclosing + element: + + ```kt + // Kotlin + @Suppress("TextConcatSpace") + fun method() { + problematicStatement() + } + ``` + + or + + ```java + // Java + @SuppressWarnings("TextConcatSpace") + void method() { + problematicStatement(); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection TextConcatSpace + problematicStatement() + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="TextConcatSpace" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'TextConcatSpace' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore TextConcatSpace ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/TextFields.md.html b/docs/checks/TextFields.md.html index 4cedca59..6464cbe2 100644 --- a/docs/checks/TextFields.md.html +++ b/docs/checks/TextFields.md.html @@ -59,7 +59,7 @@ inputType [TextFields] <EditText -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -143,7 +143,7 @@ </LinearLayout> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/TextFieldDetectorTest.java) diff --git a/docs/checks/TextViewEdits.md.html b/docs/checks/TextViewEdits.md.html index 8a8eb68a..9bd6a377 100644 --- a/docs/checks/TextViewEdits.md.html +++ b/docs/checks/TextViewEdits.md.html @@ -151,7 +151,7 @@ widgets [TextViewEdits] android:cursorVisible="true" /> ---------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -251,7 +251,7 @@ android:textIsSelectable="true" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/TextViewDetectorTest.java) diff --git a/docs/checks/ThreadConstraint.md.html b/docs/checks/ThreadConstraint.md.html new file mode 100644 index 00000000..8faec80c --- /dev/null +++ b/docs/checks/ThreadConstraint.md.html @@ -0,0 +1,148 @@ + +(#) Wrong Thread (with inference) + +!!! ERROR: Wrong Thread (with inference) + This is an error. + +Id +: `ThreadConstraint` +Summary +: Wrong Thread (with inference) +Note +: **This issue is disabled by default**; use `--enable ThreadConstraint` +Severity +: Error +Category +: Correctness +Platform +: Android +Vendor +: Android Open Source Project +Feedback +: https://issuetracker.google.com/issues/new?component=192708 +Since +: 8.12.0 (July 2025) +Affects +: Kotlin and Java files +Editing +: This check runs on the fly in the IDE editor +See +: https://developer.android.com/guide/components/processes-and-threads.html#Threads +Implementation +: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/InferredThreadDetector.kt) +Tests +: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/InferredThreadDetectorTest.kt) + +Ensures that a method which expects to be called on a specific thread, +is actually called from that thread. For example, calls on methods in +widgets should always be made on the UI thread. This new issue subsumes +`WrongThreadInterprocedural`, accompanied by a check aiming to be more +reliable and scalable. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/test/pkg/test.kt:10:Error: Call must be from @{Main,Ui}Thread, but +context is allowing @AnyThread [ThreadConstraint] + f() + --- +src/test/pkg/test.kt:11:Error: Call must be from @{Main,Ui}Thread, but +context is allowing @AnyThread [ThreadConstraint] + g() + --- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/test/pkg/test.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package test.pkg +import androidx.annotation.AnyThread +import androidx.annotation.UiThread + +@UiThread fun f(): UInt = 42 + +@UiThread fun g() = 45UL + +@AnyThread fun h() { + f() + g() +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the source code ([InferredThreadDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/InferredThreadDetectorTest.kt) +[MainTest.java](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/MainTest.java) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `InferredThreadDetector.testUnsignedLiteral`. +To report a problem with this extracted sample, visit +https://issuetracker.google.com/issues/new?component=192708. + +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Using a suppression annotation like this on the enclosing + element: + + ```kt + // Kotlin + @Suppress("ThreadConstraint") + fun method() { + problematicStatement() + } + ``` + + or + + ```java + // Java + @SuppressWarnings("ThreadConstraint") + void method() { + problematicStatement(); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection ThreadConstraint + problematicStatement() + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="ThreadConstraint" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'ThreadConstraint' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore ThreadConstraint ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/ThrowableNotAtBeginning.md.html b/docs/checks/ThrowableNotAtBeginning.md.html index 367ec4a4..831984e5 100644 --- a/docs/checks/ThrowableNotAtBeginning.md.html +++ b/docs/checks/ThrowableNotAtBeginning.md.html @@ -50,7 +50,7 @@ [ThrowableNotAtBeginning] Timber.d("%s", e); ----------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -64,7 +64,7 @@ Timber.d("%s", e); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/foo/Example.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -76,7 +76,7 @@ Timber.d("%s", e) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/JakeWharton/timber/tree/trunk/timber-lint/src/test/java/timber/lint/WrongTimberUsageDetectorTest.kt) diff --git a/docs/checks/TilePreviewImageFormat.md.html b/docs/checks/TilePreviewImageFormat.md.html index f7745bf6..023b41d0 100644 --- a/docs/checks/TilePreviewImageFormat.md.html +++ b/docs/checks/TilePreviewImageFormat.md.html @@ -42,7 +42,7 @@ [TilePreviewImageFormat] android:resource="@drawable/ic_walk" /> ----------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -63,7 +63,7 @@ android:resource="@drawable/ic_walk" /> </service> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/TileProviderDetectorTest.kt) diff --git a/docs/checks/TileProviderPermissions.md.html b/docs/checks/TileProviderPermissions.md.html index 5891f645..9906d9bb 100644 --- a/docs/checks/TileProviderPermissions.md.html +++ b/docs/checks/TileProviderPermissions.md.html @@ -44,7 +44,7 @@ BIND_TILE_PROVIDER permission [TileProviderPermissions] <service ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -64,7 +64,7 @@ </intent-filter> </service> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/TileProviderDetectorTest.kt) diff --git a/docs/checks/TimberArgCount.md.html b/docs/checks/TimberArgCount.md.html index 8b53555f..f9629e9e 100644 --- a/docs/checks/TimberArgCount.md.html +++ b/docs/checks/TimberArgCount.md.html @@ -48,7 +48,7 @@ requires 2 but format call supplies 1 [TimberArgCount] Timber.d("%s %s", "arg1"); ------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -61,7 +61,7 @@ Timber.d("%s %s", "arg1"); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/foo/Example.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -72,7 +72,7 @@ Timber.d("%s %s", "arg1") } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/JakeWharton/timber/tree/trunk/timber-lint/src/test/java/timber/lint/WrongTimberUsageDetectorTest.kt) diff --git a/docs/checks/TimberArgTypes.md.html b/docs/checks/TimberArgTypes.md.html index 5603f17d..689e782e 100644 --- a/docs/checks/TimberArgTypes.md.html +++ b/docs/checks/TimberArgTypes.md.html @@ -50,7 +50,7 @@ method call) [TimberArgTypes] Timber.d("%d", "arg1"); ------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -63,7 +63,7 @@ Timber.d("%d", "arg1"); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/foo/Example.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -74,7 +74,7 @@ Timber.d("%d", "arg1") } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/JakeWharton/timber/tree/trunk/timber-lint/src/test/java/timber/lint/WrongTimberUsageDetectorTest.kt) diff --git a/docs/checks/TimberExceptionLogging.md.html b/docs/checks/TimberExceptionLogging.md.html index b17a7638..92776683 100644 --- a/docs/checks/TimberExceptionLogging.md.html +++ b/docs/checks/TimberExceptionLogging.md.html @@ -51,7 +51,7 @@ redundant [TimberExceptionLogging] Timber.d(e.getMessage()); ------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -65,7 +65,7 @@ Timber.d(e.getMessage()); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/foo/Example.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -77,7 +77,7 @@ Timber.d(e.message) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/JakeWharton/timber/tree/trunk/timber-lint/src/test/java/timber/lint/WrongTimberUsageDetectorTest.kt) diff --git a/docs/checks/TimberTagLength.md.html b/docs/checks/TimberTagLength.md.html index 61bf4515..f84dbeba 100644 --- a/docs/checks/TimberTagLength.md.html +++ b/docs/checks/TimberTagLength.md.html @@ -47,7 +47,7 @@ characters, was 24 (abcdefghijklmnopqrstuvwx) [TimberTagLength] Timber.tag("abcdefghijklmnopqrstuvwx"); -------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -60,7 +60,7 @@ Timber.tag("abcdefghijklmnopqrstuvwx"); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/foo/Example.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -71,7 +71,7 @@ Timber.tag("abcdefghijklmnopqrstuvwx") } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/JakeWharton/timber/tree/trunk/timber-lint/src/test/java/timber/lint/WrongTimberUsageDetectorTest.kt) diff --git a/docs/checks/Todo.md.html b/docs/checks/Todo.md.html index 0fe6c583..18a50868 100644 --- a/docs/checks/Todo.md.html +++ b/docs/checks/Todo.md.html @@ -46,7 +46,7 @@ src/foo/Example.java:4:Error: Contains todo [Todo] // TODO something ---- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -57,7 +57,7 @@ class Example { // TODO something } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/TodoDetectorTest.kt) diff --git a/docs/checks/TooDeepLayout.md.html b/docs/checks/TooDeepLayout.md.html index 433555c1..fc7d5338 100644 --- a/docs/checks/TooDeepLayout.md.html +++ b/docs/checks/TooDeepLayout.md.html @@ -44,7 +44,7 @@ levels, bad for performance [TooDeepLayout] <LinearLayout ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -122,7 +122,7 @@ </LinearLayout> </LinearLayout> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/TooManyViewsDetectorTest.kt) diff --git a/docs/checks/TooManyViews.md.html b/docs/checks/TooManyViews.md.html index fe63e93a..4bda6200 100644 --- a/docs/checks/TooManyViews.md.html +++ b/docs/checks/TooManyViews.md.html @@ -46,7 +46,7 @@ views, bad for performance [TooManyViews] <Button ------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -463,7 +463,7 @@ </LinearLayout> </FrameLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/TooManyViewsDetectorTest.kt) diff --git a/docs/checks/TranslucentOrientation.md.html b/docs/checks/TranslucentOrientation.md.html index e8d7c074..c3d0fd5a 100644 --- a/docs/checks/TranslucentOrientation.md.html +++ b/docs/checks/TranslucentOrientation.md.html @@ -51,7 +51,7 @@ with translucent or floating theme [TranslucentOrientation] <item name="android:windowIsFloating">true</item> ------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -69,7 +69,7 @@ android:theme="@style/AppTheme" /> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/styles.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -87,7 +87,7 @@ </style> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/TranslucentViewDetectorTest.kt) diff --git a/docs/checks/TrimLambda.md.html b/docs/checks/TrimLambda.md.html index b9947a4d..b5fd6cd2 100644 --- a/docs/checks/TrimLambda.md.html +++ b/docs/checks/TrimLambda.md.html @@ -74,7 +74,7 @@ [TrimLambda] val to = s.trim { it <= ' ' }.substring(2) ------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -91,7 +91,7 @@ s.trim() { it <= ' ' || c == '.' } // OK val to = s.trim { it <= ' ' }.substring(2) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/TrimDetectorTest.kt) diff --git a/docs/checks/TrulyRandom.md.html b/docs/checks/TrulyRandom.md.html index ebb283d9..e986897c 100644 --- a/docs/checks/TrulyRandom.md.html +++ b/docs/checks/TrulyRandom.md.html @@ -59,7 +59,7 @@ for more info. [TrulyRandom] KeyGenerator generator = KeyGenerator.getInstance("AES", "BC"); ----------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -91,10 +91,10 @@ random.nextBytes(bytes); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/SecureRandomGeneratorDetectorTest.java) +You can also visit the source code ([SecureRandomGeneratorDetectorTest.java](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/SecureRandomGeneratorDetectorTest.java) +[MainTest.java](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/MainTest.java) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/TrustAllX509TrustManager.md.html b/docs/checks/TrustAllX509TrustManager.md.html index 490237d5..56d60ce8 100644 --- a/docs/checks/TrustAllX509TrustManager.md.html +++ b/docs/checks/TrustAllX509TrustManager.md.html @@ -53,7 +53,7 @@ [TrustAllX509TrustManager] public void checkServerTrusted(java.security.cert.X509Certificate[] certs, String authType) throws CertificateException { ------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -103,7 +103,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/X509TrustManagerDetectorTest.kt) diff --git a/docs/checks/TypographyDashes.md.html b/docs/checks/TypographyDashes.md.html index 47896196..0b263014 100644 --- a/docs/checks/TypographyDashes.md.html +++ b/docs/checks/TypographyDashes.md.html @@ -61,7 +61,7 @@ character (–, –) ? [TypographyDashes] <item>Ages 3-5</item> -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -97,8 +97,7 @@ <string name="ga_trackingId">UA-0000-0</string> <string>something somthing d\'avoir something something l\'écran.</string> </resources> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/TypographyDetectorTest.kt) diff --git a/docs/checks/TypographyEllipsis.md.html b/docs/checks/TypographyEllipsis.md.html index 830106bc..ea91cf34 100644 --- a/docs/checks/TypographyEllipsis.md.html +++ b/docs/checks/TypographyEllipsis.md.html @@ -48,7 +48,7 @@ character (…, …) ? [TypographyEllipsis] <string name="ellipsis">40 times...</string> ----------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -84,8 +84,7 @@ <string name="ga_trackingId">UA-0000-0</string> <string>something somthing d\'avoir something something l\'écran.</string> </resources> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/TypographyDetectorTest.kt) diff --git a/docs/checks/TypographyFractions.md.html b/docs/checks/TypographyFractions.md.html index f45f898b..1658c91a 100644 --- a/docs/checks/TypographyFractions.md.html +++ b/docs/checks/TypographyFractions.md.html @@ -56,7 +56,7 @@ instead of 1/2? [TypographyFractions] <item>Age 5 1/2</item> --------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -92,8 +92,7 @@ <string name="ga_trackingId">UA-0000-0</string> <string>something somthing d\'avoir something something l\'écran.</string> </resources> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/TypographyDetectorTest.kt) diff --git a/docs/checks/TypographyOther.md.html b/docs/checks/TypographyOther.md.html index 6d01fb8c..13a7e4bd 100644 --- a/docs/checks/TypographyOther.md.html +++ b/docs/checks/TypographyOther.md.html @@ -46,7 +46,7 @@ (©) ? [TypographyOther] <string name="copyright">(c) 2011</string> -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -82,8 +82,7 @@ <string name="ga_trackingId">UA-0000-0</string> <string>something somthing d\'avoir something something l\'écran.</string> </resources> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/TypographyDetectorTest.kt) diff --git a/docs/checks/TypographyQuotes.md.html b/docs/checks/TypographyQuotes.md.html index 999c59ed..ecbfee55 100644 --- a/docs/checks/TypographyQuotes.md.html +++ b/docs/checks/TypographyQuotes.md.html @@ -85,7 +85,7 @@ typographic apostrophe (’, ’) ? [TypographyQuotes] <string>something somthing d\'avoir something something l\'écran.</string> --------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -121,8 +121,7 @@ <string name="ga_trackingId">UA-0000-0</string> <string>something somthing d\'avoir something something l\'écran.</string> </resources> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/TypographyDetectorTest.kt) diff --git a/docs/checks/Typos.md.html b/docs/checks/Typos.md.html index 8ef2c2f0..6356e10e 100644 --- a/docs/checks/Typos.md.html +++ b/docs/checks/Typos.md.html @@ -44,28 +44,28 @@ res/values/strings.xml:6:Warning: "activites" is a common misspelling; did you mean "activities"? [Typos] <string name="s2">Andriod activites!</string> - ^ + --------- res/values/strings.xml:8:Warning: "Cmoputer" is a common misspelling; did you mean "Computer"? [Typos] <string name="s3"> (Cmoputer </string> - ^ + -------- res/values/strings.xml:10:Warning: "throught" is a common misspelling; did you mean "thought" or "through" or "throughout"? [Typos] <string name="s4"><b>throught</b></string> - ^ + -------- res/values/strings.xml:12:Warning: "Seach" is a common misspelling; did you mean "Search"? [Typos] <string name="s5">Seach</string> - ^ + ----- res/values/strings.xml:16:Warning: "Tuscon" is a common misspelling; did you mean "Tucson"? [Typos] <string name="s7">Tuscon tuscon</string> - ^ + ------ res/values/strings.xml:20:Warning: "Ok" is usually capitalized as "OK" [Typos] <string name="dlg_button_ok">Ok</string> - ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + -- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -101,7 +101,7 @@ <string name="issue77269_1">@android:string/ok</string> <string name="issue77269_2"> @string/cmoputer </string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/TypoDetectorTest.java) diff --git a/docs/checks/UElementAsPsi.md.html b/docs/checks/UElementAsPsi.md.html index 90f49a19..2dbf5ae1 100644 --- a/docs/checks/UElementAsPsi.md.html +++ b/docs/checks/UElementAsPsi.md.html @@ -69,7 +69,7 @@ PsiElement [UElementAsPsi] PsiTreeUtil.getParentOfType(method, PsiClass::class.java) // ERROR 8 ------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -125,7 +125,7 @@ PsiTreeUtil.getParentOfType(method, PsiClass.class); // ERROR 4 } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/MyKotlinLintDetector.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -190,7 +190,7 @@ ) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/UElementAsPsiDetectorTest.kt) diff --git a/docs/checks/UastImplementation.md.html b/docs/checks/UastImplementation.md.html index d25aecff..17fec043 100644 --- a/docs/checks/UastImplementation.md.html +++ b/docs/checks/UastImplementation.md.html @@ -39,78 +39,78 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/test/pkg/UastImplementationDetectorTestInput.kt:18:Warning: +src/test/pkg/UastImplementationDetectorTestInput.kt:19:Warning: org.jetbrains.uast.kotlin.KotlinUField is UAST implementation. Consider using one of its corresponding UAST interfaces: UVariableEx, UVariable, UDeclaration, UAnnotated, UDeclarationEx, UAnchorOwner, UFieldEx, UField [UastImplementation] import org.jetbrains.uast.kotlin.KotlinUField // ERROR 1 -------------------------------------------------------- -src/test/pkg/UastImplementationDetectorTestInput.kt:19:Warning: +src/test/pkg/UastImplementationDetectorTestInput.kt:20:Warning: org.jetbrains.uast.kotlin.KotlinUImportStatement is UAST implementation. Consider using one of its corresponding UAST interfaces: UImportStatement, UResolvable [UastImplementation] import org.jetbrains.uast.kotlin.KotlinUImportStatement // ERROR 2 ------------------------------------------------------------------ -src/test/pkg/UastImplementationDetectorTestInput.kt:20:Warning: +src/test/pkg/UastImplementationDetectorTestInput.kt:21:Warning: org.jetbrains.uast.kotlin.KotlinUThisExpression is UAST implementation. Consider using one of its corresponding UAST interfaces: UExpression, UAnnotated, UThisExpression, UInstanceExpression, ULabeled, UResolvable [UastImplementation] import org.jetbrains.uast.kotlin.KotlinUThisExpression // ERROR 3 ----------------------------------------------------------------- -src/test/pkg/UastImplementationDetectorTestInput.kt:21:Warning: +src/test/pkg/UastImplementationDetectorTestInput.kt:22:Warning: org.jetbrains.uast.kotlin.KotlinUastResolveProviderService is UAST implementation. Consider using one of its corresponding UAST interfaces: BaseKotlinUastResolveProviderService [UastImplementation] import org.jetbrains.uast.kotlin.KotlinUastResolveProviderService // ERROR 4 ---------------------------------------------------------------------------- -src/test/pkg/UastImplementationDetectorTestInput.kt:22:Warning: +src/test/pkg/UastImplementationDetectorTestInput.kt:23:Warning: org.jetbrains.uast.kotlin.UnknownKotlinExpression is UAST implementation. Consider using one of its corresponding UAST interfaces: UExpression, UAnnotated, UUnknownExpression [UastImplementation] import org.jetbrains.uast.kotlin.UnknownKotlinExpression // ERROR 5 ------------------------------------------------------------------- -src/test/pkg/UastImplementationDetectorTestInput.kt:45:Warning: +src/test/pkg/UastImplementationDetectorTestInput.kt:47:Warning: org.jetbrains.uast.kotlin.KotlinUField is UAST implementation. Consider using one of its corresponding UAST interfaces: UVariableEx, UVariable, UDeclaration, UAnnotated, UDeclarationEx, UAnchorOwner, UFieldEx, UField [UastImplementation] val delegateType = (field as? KotlinUField)?.type // ERROR 6 ------------ -src/test/pkg/UastImplementationDetectorTestInput.kt:57:Warning: +src/test/pkg/UastImplementationDetectorTestInput.kt:59:Warning: org.jetbrains.uast.kotlin.KotlinUImportStatement is UAST implementation. Consider using one of its corresponding UAST interfaces: UImportStatement, UResolvable [UastImplementation] val alias = (node as? KotlinUImportStatement)?.sourcePsi?.alias // ERROR 7 ---------------------- -src/test/pkg/UastImplementationDetectorTestInput.kt:63:Warning: +src/test/pkg/UastImplementationDetectorTestInput.kt:65:Warning: org.jetbrains.uast.kotlin.KotlinUThisExpression is UAST implementation. Consider using one of its corresponding UAST interfaces: UExpression, UAnnotated, UThisExpression, UInstanceExpression, ULabeled, UResolvable [UastImplementation] class MockKtThisChecker : AbstractDetector(KotlinUThisExpression::class) { // ERROR 8 ---------------------------- -src/test/pkg/UastImplementationDetectorTestInput.kt:76:Warning: +src/test/pkg/UastImplementationDetectorTestInput.kt:79:Warning: org.jetbrains.uast.kotlin.KotlinUThisExpression is UAST implementation. Consider using one of its corresponding UAST interfaces: UExpression, UAnnotated, UThisExpression, UInstanceExpression, ULabeled, UResolvable [UastImplementation] firstElement is KotlinUThisExpression && firstElement.label != null -> { // ERROR 9 --------------------- -src/test/pkg/UastImplementationDetectorTestInput.kt:87:Warning: +src/test/pkg/UastImplementationDetectorTestInput.kt:90:Warning: org.jetbrains.uast.kotlin.KotlinUastResolveProviderService is UAST implementation. Consider using one of its corresponding UAST interfaces: BaseKotlinUastResolveProviderService [UastImplementation] ServiceManager.getService(this.project, KotlinUastResolveProviderService::class.java) // ERROR 10 --------------------------------------- -src/test/pkg/UastImplementationDetectorTestInput.kt:93:Warning: +src/test/pkg/UastImplementationDetectorTestInput.kt:96:Warning: org.jetbrains.uast.kotlin.UnknownKotlinExpression is UAST implementation. Consider using one of its corresponding UAST interfaces: UExpression, UAnnotated, UUnknownExpression [UastImplementation] return if (this !is UnknownKotlinExpression) this else null // ERROR 11 ----------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -126,6 +126,7 @@ import com.android.tools.lint.detector.api.Severity import com.intellij.openapi.components.ServiceManager import org.jetbrains.kotlin.psi.KtElement +import org.jetbrains.kotlin.psi.KtExpression import org.jetbrains.kotlin.resolve.BindingContext import org.jetbrains.uast.UClass import org.jetbrains.uast.UElement @@ -138,6 +139,7 @@ import org.jetbrains.uast.kotlin.KotlinUThisExpression // ERROR 3 import org.jetbrains.uast.kotlin.KotlinUastResolveProviderService // ERROR 4 import org.jetbrains.uast.kotlin.UnknownKotlinExpression // ERROR 5 +import org.jetbrains.uast.kotlin.readWriteAccess class UastImplementationDetectorTestInput { @@ -152,7 +154,7 @@ } class MockSafetyDetector : AbstractDetector(UClass::class) { - override fun createUastHandler(context: JavaContext): UElementHandler? { + override fun createUastHandler(context: JavaContext): UElementHandler { return object : UElementHandler() { override fun visitClass(node: UClass) { node.fields.forEach { field -> checkFieldSafety(field) } @@ -169,7 +171,7 @@ } class MockCoroutineChecker : AbstractDetector(UImportStatement::class) { - override fun createUastHandler(context: JavaContext): UElementHandler? { + override fun createUastHandler(context: JavaContext): UElementHandler { return object : UElementHandler() { override fun visitImportStatement(node: UImportStatement) { val alias = (node as? KotlinUImportStatement)?.sourcePsi?.alias // ERROR 7 @@ -179,7 +181,7 @@ } class MockKtThisChecker : AbstractDetector(KotlinUThisExpression::class) { // ERROR 8 - override fun createUastHandler(context: JavaContext): UElementHandler? { + override fun createUastHandler(context: JavaContext): UElementHandler { return object : UElementHandler() { override fun visitElement(node: UElement) { } @@ -188,6 +190,7 @@ } private fun trimTrivialThisExpr(expr: UExpression): UExpression? { + (expr.sourcePsi as? KtExpression)?.readWriteAccess() var firstElement = expr return when { @@ -211,7 +214,7 @@ return if (this !is UnknownKotlinExpression) this else null // ERROR 11 } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/UastImplementationDetectorTest.kt) diff --git a/docs/checks/UnclosedTrace.md.html b/docs/checks/UnclosedTrace.md.html index 1bf3a8f5..550229a3 100644 --- a/docs/checks/UnclosedTrace.md.html +++ b/docs/checks/UnclosedTrace.md.html @@ -104,7 +104,7 @@ <option name="strict" value="false" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (##) Example @@ -120,7 +120,7 @@ throw an exception [UnclosedTrace] Trace.beginSection("Wrong-2") ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -160,7 +160,7 @@ } suspend fun suspendingCall() { } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/TraceSectionDetectorTest.kt) diff --git a/docs/checks/UnintendedExposedUrl.md.html b/docs/checks/UnintendedExposedUrl.md.html index 1302d15a..5408eb18 100644 --- a/docs/checks/UnintendedExposedUrl.md.html +++ b/docs/checks/UnintendedExposedUrl.md.html @@ -27,7 +27,7 @@ Artifact : [com.android.security.lint:lint](com_android_security_lint_lint.md.html) Since -: 1.0.1 +: 1.0.0 Affects : Resource files Editing @@ -67,7 +67,7 @@ application and its resources [UnintendedExposedUrl] <domain>debug.io</domain> ------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -83,7 +83,7 @@ <domain>debug.io</domain> </domain-config> </network-security-config> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/UnintendedExposedUrlDetectorTest.kt) @@ -103,17 +103,17 @@ ``` // build.gradle.kts -lintChecks("com.android.security.lint:lint:1.0.3") +lintChecks("com.android.security.lint:lint:1.0.4") // build.gradle -lintChecks 'com.android.security.lint:lint:1.0.3' +lintChecks 'com.android.security.lint:lint:1.0.4' // build.gradle.kts with version catalogs: lintChecks(libs.com.android.security.lint.lint) # libs.versions.toml [versions] -com-android-security-lint-lint = "1.0.3" +com-android-security-lint-lint = "1.0.4" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -125,7 +125,7 @@ } ``` -1.0.3 is the version this documentation was generated from; +1.0.4 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.android.security.lint:lint](com_android_security_lint_lint.md.html). diff --git a/docs/checks/UnintendedPrivateIpAddress.md.html b/docs/checks/UnintendedPrivateIpAddress.md.html index 8e22100f..682f17eb 100644 --- a/docs/checks/UnintendedPrivateIpAddress.md.html +++ b/docs/checks/UnintendedPrivateIpAddress.md.html @@ -27,7 +27,7 @@ Artifact : [com.android.security.lint:lint](com_android_security_lint_lint.md.html) Since -: 1.0.1 +: 1.0.0 Affects : Resource files Editing @@ -68,7 +68,7 @@ [UnintendedPrivateIpAddress] <domain>8.0.0.28</domain> ------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -84,7 +84,7 @@ <domain>8.0.0.28</domain> </domain-config> </network-security-config> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/UnintendedExposedUrlDetectorTest.kt) @@ -104,17 +104,17 @@ ``` // build.gradle.kts -lintChecks("com.android.security.lint:lint:1.0.3") +lintChecks("com.android.security.lint:lint:1.0.4") // build.gradle -lintChecks 'com.android.security.lint:lint:1.0.3' +lintChecks 'com.android.security.lint:lint:1.0.4' // build.gradle.kts with version catalogs: lintChecks(libs.com.android.security.lint.lint) # libs.versions.toml [versions] -com-android-security-lint-lint = "1.0.3" +com-android-security-lint-lint = "1.0.4" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -126,7 +126,7 @@ } ``` -1.0.3 is the version this documentation was generated from; +1.0.4 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.android.security.lint:lint](com_android_security_lint_lint.md.html). diff --git a/docs/checks/UniqueConstants.md.html b/docs/checks/UniqueConstants.md.html index ef167090..8c89f15f 100644 --- a/docs/checks/UniqueConstants.md.html +++ b/docs/checks/UniqueConstants.md.html @@ -58,7 +58,7 @@ included [UniqueConstants] @IntDef({FLAG1, FLAG2, FLAG1}) ----- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -100,7 +100,7 @@ private @interface Flags1 {} } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AnnotationDetectorTest.kt) diff --git a/docs/checks/UniquePermission.md.html b/docs/checks/UniquePermission.md.html index ef216328..e4c38b7e 100644 --- a/docs/checks/UniquePermission.md.html +++ b/docs/checks/UniquePermission.md.html @@ -51,7 +51,7 @@ [UniquePermission] <permission android:name="bar.permission.SEND_SMS" -------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -77,7 +77,7 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -110,11 +110,10 @@ <!-- Wallpaper --> <string name="wallpaper_instructions">Tap picture to set portrait wallpaper</string> </resources> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ManifestDetectorTest.kt) +You can also visit the source code ([ManifestDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ManifestDetectorTest.kt) +[ProjectInitializerTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/ProjectInitializerTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/UnknownId.md.html b/docs/checks/UnknownId.md.html index 739c9343..aa26a4fd 100644 --- a/docs/checks/UnknownId.md.html +++ b/docs/checks/UnknownId.md.html @@ -53,7 +53,7 @@ anywhere. Did you mean one of {my_id0, my_id1, my_id2} ? [UnknownId] android:layout_alignRight="@+id/my_id3" --------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -104,7 +104,7 @@ android:text="Button" /> </RelativeLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout/layout2.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -120,7 +120,7 @@ android:text="Button" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/ids.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -131,7 +131,7 @@ <item name="my_id1" type="id"/> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WrongIdDetectorTest.kt) diff --git a/docs/checks/UnknownIdInLayout.md.html b/docs/checks/UnknownIdInLayout.md.html index 5db6a8d4..968faa08 100644 --- a/docs/checks/UnknownIdInLayout.md.html +++ b/docs/checks/UnknownIdInLayout.md.html @@ -49,7 +49,7 @@ any views in this layout [UnknownIdInLayout] android:layout_alignLeft="@+id/my_id2" -------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -100,7 +100,7 @@ android:text="Button" /> </RelativeLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout/layout2.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -116,7 +116,7 @@ android:text="Button" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/ids.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -127,7 +127,7 @@ <item name="my_id1" type="id"/> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WrongIdDetectorTest.kt) diff --git a/docs/checks/UnknownNullness.md.html b/docs/checks/UnknownNullness.md.html index 4c143af2..5077383f 100644 --- a/docs/checks/UnknownNullness.md.html +++ b/docs/checks/UnknownNullness.md.html @@ -58,7 +58,7 @@ <option name="ignore-deprecated" value="false" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (##) Example @@ -100,7 +100,7 @@ [UnknownNullness] public Float error8; ----- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -141,10 +141,10 @@ @Deprecated public Float error8; } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/InteroperabilityDetectorTest.kt) +You can also visit the source code ([InteroperabilityDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/InteroperabilityDetectorTest.kt) +[TextReporterTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/TextReporterTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/UnlocalizedSms.md.html b/docs/checks/UnlocalizedSms.md.html index 6635d4fe..51c13ba5 100644 --- a/docs/checks/UnlocalizedSms.md.html +++ b/docs/checks/UnlocalizedSms.md.html @@ -45,7 +45,7 @@ the country you are targeting [UnlocalizedSms] sms.sendMultipartTextMessage("001234567890", null, null, null, null); -------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -71,7 +71,7 @@ sms.sendMultipartTextMessage("001234567890", null, null, null, null); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/NonInternationalizedSmsDetectorTest.java) diff --git a/docs/checks/UnnecessaryArrayInit.md.html b/docs/checks/UnnecessaryArrayInit.md.html index 914c3615..bb24454d 100644 --- a/docs/checks/UnnecessaryArrayInit.md.html +++ b/docs/checks/UnnecessaryArrayInit.md.html @@ -44,7 +44,7 @@ unnecessary and is less efficient [UnnecessaryArrayInit] val startPoints = remember { IntArray(4) { 0 } } ----- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -56,7 +56,7 @@ // Mutable Array to keep track of bound changes -- example from MotionLayout val startPoints = remember { IntArray(4) { 0 } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ArrayInitDetectorTest.kt) diff --git a/docs/checks/UnnecessaryComposedModifier.md.html b/docs/checks/UnnecessaryComposedModifier.md.html index 8f0300ae..27012f9e 100644 --- a/docs/checks/UnnecessaryComposedModifier.md.html +++ b/docs/checks/UnnecessaryComposedModifier.md.html @@ -67,7 +67,7 @@ [UnnecessaryComposedModifier] fun Modifier.test4(): Modifier = composed({}, { this@test4}) -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -94,7 +94,7 @@ }) fun Modifier.test4(): Modifier = composed({}, { this@test4}) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/ui/ui-lint/src/test/java/androidx/compose/ui/lint/ComposedModifierDetectorTest.kt) @@ -113,17 +113,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui-android:1.9.0-alpha01") +implementation("androidx.compose.ui:ui-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.ui:ui-android:1.9.0-alpha01' +implementation 'androidx.compose.ui:ui-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.ui.android) # libs.versions.toml [versions] -ui-android = "1.9.0-alpha01" +ui-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -135,11 +135,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.ui:ui-lint:1.9.0-alpha01`. +You can also use `androidx.compose.ui:ui-lint:1.11.0-alpha06`. [Additional details about androidx.compose.ui:ui-android](androidx_compose_ui_ui-android.md.html). diff --git a/docs/checks/UnnecessaryRequiredFeature.md.html b/docs/checks/UnnecessaryRequiredFeature.md.html index 6ef19568..5f6c5f4f 100644 --- a/docs/checks/UnnecessaryRequiredFeature.md.html +++ b/docs/checks/UnnecessaryRequiredFeature.md.html @@ -105,7 +105,7 @@ feature is used but not required [UnnecessaryRequiredFeature] <uses-feature android:name="android.hardware.screen.portrait" android:required="true" /> <!-- WARN 10 --> -------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -143,7 +143,7 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/RequiredFeatureDetectorTest.kt) diff --git a/docs/checks/UnprotectedSMSBroadcastReceiver.md.html b/docs/checks/UnprotectedSMSBroadcastReceiver.md.html index 5854cc7c..ff352860 100644 --- a/docs/checks/UnprotectedSMSBroadcastReceiver.md.html +++ b/docs/checks/UnprotectedSMSBroadcastReceiver.md.html @@ -49,7 +49,7 @@ malicious actors to spoof intents [UnprotectedSMSBroadcastReceiver] <receiver -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -76,8 +76,7 @@ </application> </manifest> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/UnsafeBroadcastReceiverDetectorTest.java) diff --git a/docs/checks/UnrememberedGetBackStackEntry.md.html b/docs/checks/UnrememberedGetBackStackEntry.md.html index 3683d9af..ff755512 100644 --- a/docs/checks/UnrememberedGetBackStackEntry.md.html +++ b/docs/checks/UnrememberedGetBackStackEntry.md.html @@ -90,7 +90,7 @@ [UnrememberedGetBackStackEntry] val entry = navController.getBackStackEntry("test") ----------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -151,7 +151,7 @@ val entry = navController.getBackStackEntry("test") } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/UnrememberedGetBackStackEntryDetectorTest.kt) @@ -170,17 +170,17 @@ ``` // build.gradle.kts -implementation("androidx.navigation:navigation-compose:2.9.0-rc01") +implementation("androidx.navigation:navigation-compose:2.9.7") // build.gradle -implementation 'androidx.navigation:navigation-compose:2.9.0-rc01' +implementation 'androidx.navigation:navigation-compose:2.9.7' // build.gradle.kts with version catalogs: implementation(libs.navigation.compose) # libs.versions.toml [versions] -navigation-compose = "2.9.0-rc01" +navigation-compose = "2.9.7" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -192,7 +192,7 @@ } ``` -2.9.0-rc01 is the version this documentation was generated from; +2.9.7 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.navigation:navigation-compose](androidx_navigation_navigation-compose.md.html). diff --git a/docs/checks/UnrememberedMutableState.md.html b/docs/checks/UnrememberedMutableState.md.html index 44e1f17a..d08c643d 100644 --- a/docs/checks/UnrememberedMutableState.md.html +++ b/docs/checks/UnrememberedMutableState.md.html @@ -176,7 +176,7 @@ during composition without using remember [UnrememberedMutableState] val derived = derivedStateOf { foo.value } -------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -252,7 +252,7 @@ val derived = derivedStateOf { foo.value } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/runtime/runtime-lint/src/test/java/androidx/compose/runtime/lint/UnrememberedStateDetectorTest.kt) @@ -271,17 +271,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime-android:1.9.0-alpha01") +implementation("androidx.compose.runtime:runtime-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.runtime:runtime-android:1.9.0-alpha01' +implementation 'androidx.compose.runtime:runtime-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.runtime.android) # libs.versions.toml [versions] -runtime-android = "1.9.0-alpha01" +runtime-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -293,11 +293,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.runtime:runtime-lint:1.9.0-alpha01`. +You can also use `androidx.compose.runtime:runtime-lint:1.11.0-alpha06`. [Additional details about androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html). diff --git a/docs/checks/UnsafeCryptoAlgorithmUsage.md.html b/docs/checks/UnsafeCryptoAlgorithmUsage.md.html index 96ed0b66..98595713 100644 --- a/docs/checks/UnsafeCryptoAlgorithmUsage.md.html +++ b/docs/checks/UnsafeCryptoAlgorithmUsage.md.html @@ -27,7 +27,7 @@ Artifact : [com.android.security.lint:lint](com_android_security_lint_lint.md.html) Since -: 1.0.1 +: 1.0.0 Affects : Kotlin and Java files Editing @@ -57,7 +57,7 @@ attacks [UnsafeCryptoAlgorithmUsage] Cipher.getInstance(algo + "/" + mode + "/" + padding) ----------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -76,7 +76,7 @@ Cipher.getInstance(algo + "/" + mode + "/" + padding) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/BadCryptographyUsageDetectorTest.kt) @@ -96,17 +96,17 @@ ``` // build.gradle.kts -lintChecks("com.android.security.lint:lint:1.0.3") +lintChecks("com.android.security.lint:lint:1.0.4") // build.gradle -lintChecks 'com.android.security.lint:lint:1.0.3' +lintChecks 'com.android.security.lint:lint:1.0.4' // build.gradle.kts with version catalogs: lintChecks(libs.com.android.security.lint.lint) # libs.versions.toml [versions] -com-android-security-lint-lint = "1.0.3" +com-android-security-lint-lint = "1.0.4" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -118,7 +118,7 @@ } ``` -1.0.3 is the version this documentation was generated from; +1.0.4 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.android.security.lint:lint](com_android_security_lint_lint.md.html). diff --git a/docs/checks/UnsafeDynamicallyLoadedCode.md.html b/docs/checks/UnsafeDynamicallyLoadedCode.md.html index 165cc9b7..7d2c6bd1 100644 --- a/docs/checks/UnsafeDynamicallyLoadedCode.md.html +++ b/docs/checks/UnsafeDynamicallyLoadedCode.md.html @@ -52,7 +52,7 @@ [UnsafeDynamicallyLoadedCode] System.load("/data/data/test.pkg/files/libhello.so"); ---------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -79,7 +79,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/UnsafeNativeCodeDetectorTest.kt) diff --git a/docs/checks/UnsafeImplicitIntentLaunch.md.html b/docs/checks/UnsafeImplicitIntentLaunch.md.html index 0035f001..7d545fe7 100644 --- a/docs/checks/UnsafeImplicitIntentLaunch.md.html +++ b/docs/checks/UnsafeImplicitIntentLaunch.md.html @@ -51,7 +51,7 @@ Intent.set{Component,Class,ClassName}. [UnsafeImplicitIntentLaunch] Intent intent = new Intent("some.fake.action.LAUNCH"); ------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -70,7 +70,7 @@ startActivity(intent); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/AndroidManifest.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -85,7 +85,7 @@ </activity> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/UnsafeImplicitIntentDetectorTest.kt) diff --git a/docs/checks/UnsafeIntentLaunch.md.html b/docs/checks/UnsafeIntentLaunch.md.html index 6148e5e1..53b2129a 100644 --- a/docs/checks/UnsafeIntentLaunch.md.html +++ b/docs/checks/UnsafeIntentLaunch.md.html @@ -45,7 +45,7 @@ androidx.core.content.IntentSanitizer. [UnsafeIntentLaunch] Intent intent = getIntent().getParcelableExtra(Intent.EXTRA_INTENT); --------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -64,7 +64,7 @@ startActivity(intent); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/TestService.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -80,7 +80,7 @@ stopService(intent); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/TestReceiver.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -97,7 +97,7 @@ context.sendOrderedBroadcast(intent, "qwerty"); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/AndroidManifest.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -109,7 +109,7 @@ <receiver android:name=".TestReceiver" android:exported="true" /> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/UnsafeIntentLaunchDetectorTest.kt) diff --git a/docs/checks/UnsafeLifecycleWhenUsage-2.md.html b/docs/checks/UnsafeLifecycleWhenUsage-2.md.html index ecc37505..96080a00 100644 --- a/docs/checks/UnsafeLifecycleWhenUsage-2.md.html +++ b/docs/checks/UnsafeLifecycleWhenUsage-2.md.html @@ -35,7 +35,7 @@ Implementation : [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/lifecycle/lifecycle-runtime-lint/src/main/java/androidx/lifecycle/lint/LifecycleWhenChecks.kt) Tests -: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/lifecycle/lifecycle-runtime-lint/src/test/java/androidx/lifecycle/runtime/lint/LifecycleWhenChecksTest.kt) +: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/lifecycle/lifecycle-runtime-lint/src/test/java/androidx/lifecycle/runtime/lint/WhenMethodsTest.kt) Copyright Year : 2019 @@ -58,7 +58,7 @@ well. Issue id's must be unique, so you cannot combine these libraries. Also defined in: * UnsafeLifecycleWhenUsage: Unsafe UI operation in finally/catch of Lifecycle.whenStarted of similar method (this issue) -* [UnsafeLifecycleWhenUsage from androidx.lifecycle:lifecycle-runtime-android:2.9.0-rc01](UnsafeLifecycleWhenUsage.md.html) +* [UnsafeLifecycleWhenUsage from androidx.lifecycle:lifecycle-runtime-android:2.11.0-alpha01](UnsafeLifecycleWhenUsage.md.html) * [UnsafeLifecycleWhenUsage from androidx.lifecycle:lifecycle-runtime-ktx:2.8.0-alpha01](UnsafeLifecycleWhenUsage-2.md.html) diff --git a/docs/checks/UnsafeLifecycleWhenUsage.md.html b/docs/checks/UnsafeLifecycleWhenUsage.md.html index 2beb8e3d..a5a0fccd 100644 --- a/docs/checks/UnsafeLifecycleWhenUsage.md.html +++ b/docs/checks/UnsafeLifecycleWhenUsage.md.html @@ -35,7 +35,7 @@ Implementation : [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/lifecycle/lifecycle-runtime-lint/src/main/java/androidx/lifecycle/lint/LifecycleWhenChecks.kt) Tests -: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/lifecycle/lifecycle-runtime-lint/src/test/java/androidx/lifecycle/runtime/lint/LifecycleWhenChecksTest.kt) +: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/lifecycle/lifecycle-runtime-lint/src/test/java/androidx/lifecycle/runtime/lint/WhenMethodsTest.kt) Copyright Year : 2019 @@ -58,7 +58,7 @@ well. Issue id's must be unique, so you cannot combine these libraries. Also defined in: * UnsafeLifecycleWhenUsage: Unsafe UI operation in finally/catch of Lifecycle.whenStarted of similar method (this issue) -* [UnsafeLifecycleWhenUsage from androidx.lifecycle:lifecycle-runtime-android:2.9.0-rc01](UnsafeLifecycleWhenUsage.md.html) +* [UnsafeLifecycleWhenUsage from androidx.lifecycle:lifecycle-runtime-android:2.11.0-alpha01](UnsafeLifecycleWhenUsage.md.html) * [UnsafeLifecycleWhenUsage from androidx.lifecycle:lifecycle-runtime-ktx:2.8.0-alpha01](UnsafeLifecycleWhenUsage-2.md.html) @@ -70,17 +70,17 @@ ``` // build.gradle.kts -implementation("androidx.lifecycle:lifecycle-runtime-android:2.9.0-rc01") +implementation("androidx.lifecycle:lifecycle-runtime-android:2.11.0-alpha01") // build.gradle -implementation 'androidx.lifecycle:lifecycle-runtime-android:2.9.0-rc01' +implementation 'androidx.lifecycle:lifecycle-runtime-android:2.11.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.lifecycle.runtime.android) # libs.versions.toml [versions] -lifecycle-runtime-android = "2.9.0-rc01" +lifecycle-runtime-android = "2.11.0-alpha01" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -92,7 +92,7 @@ } ``` -2.9.0-rc01 is the version this documentation was generated from; +2.11.0-alpha01 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.lifecycle:lifecycle-runtime-android](androidx_lifecycle_lifecycle-runtime-android.md.html). diff --git a/docs/checks/UnsafeOptInUsageError.md.html b/docs/checks/UnsafeOptInUsageError.md.html index 65b8f5e1..84608e97 100644 --- a/docs/checks/UnsafeOptInUsageError.md.html +++ b/docs/checks/UnsafeOptInUsageError.md.html @@ -74,17 +74,17 @@ ``` // build.gradle.kts -implementation("androidx.annotation:annotation-experimental:1.5.0-rc01") +implementation("androidx.annotation:annotation-experimental:1.6.0-rc01") // build.gradle -implementation 'androidx.annotation:annotation-experimental:1.5.0-rc01' +implementation 'androidx.annotation:annotation-experimental:1.6.0-rc01' // build.gradle.kts with version catalogs: implementation(libs.annotation.experimental) # libs.versions.toml [versions] -annotation-experimental = "1.5.0-rc01" +annotation-experimental = "1.6.0-rc01" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -96,7 +96,7 @@ } ``` -1.5.0-rc01 is the version this documentation was generated from; +1.6.0-rc01 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.annotation:annotation-experimental](androidx_annotation_annotation-experimental.md.html). diff --git a/docs/checks/UnsafeOptInUsageWarning.md.html b/docs/checks/UnsafeOptInUsageWarning.md.html index 9728ea06..b7888901 100644 --- a/docs/checks/UnsafeOptInUsageWarning.md.html +++ b/docs/checks/UnsafeOptInUsageWarning.md.html @@ -71,17 +71,17 @@ ``` // build.gradle.kts -implementation("androidx.annotation:annotation-experimental:1.5.0-rc01") +implementation("androidx.annotation:annotation-experimental:1.6.0-rc01") // build.gradle -implementation 'androidx.annotation:annotation-experimental:1.5.0-rc01' +implementation 'androidx.annotation:annotation-experimental:1.6.0-rc01' // build.gradle.kts with version catalogs: implementation(libs.annotation.experimental) # libs.versions.toml [versions] -annotation-experimental = "1.5.0-rc01" +annotation-experimental = "1.6.0-rc01" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -93,7 +93,7 @@ } ``` -1.5.0-rc01 is the version this documentation was generated from; +1.6.0-rc01 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.annotation:annotation-experimental](androidx_annotation_annotation-experimental.md.html). diff --git a/docs/checks/UnsafeProtectedBroadcastReceiver.md.html b/docs/checks/UnsafeProtectedBroadcastReceiver.md.html index 26161254..297b2b60 100644 --- a/docs/checks/UnsafeProtectedBroadcastReceiver.md.html +++ b/docs/checks/UnsafeProtectedBroadcastReceiver.md.html @@ -50,7 +50,7 @@ cause undesired behavior. [UnsafeProtectedBroadcastReceiver] public void onReceive(Context context, Intent intent) { --------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -77,8 +77,7 @@ </application> </manifest> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/TestReceiver.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -103,7 +102,7 @@ }; } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/UnsafeBroadcastReceiverDetectorTest.java) diff --git a/docs/checks/UnsafeRepeatOnLifecycleDetector.md.html b/docs/checks/UnsafeRepeatOnLifecycleDetector.md.html index a6e0dd07..6832fb39 100644 --- a/docs/checks/UnsafeRepeatOnLifecycleDetector.md.html +++ b/docs/checks/UnsafeRepeatOnLifecycleDetector.md.html @@ -50,17 +50,17 @@ ``` // build.gradle.kts -implementation("androidx.fragment:fragment:1.8.6") +implementation("androidx.fragment:fragment:1.8.9") // build.gradle -implementation 'androidx.fragment:fragment:1.8.6' +implementation 'androidx.fragment:fragment:1.8.9' // build.gradle.kts with version catalogs: implementation(libs.fragment) # libs.versions.toml [versions] -fragment = "1.8.6" +fragment = "1.8.9" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -72,7 +72,7 @@ } ``` -1.8.6 is the version this documentation was generated from; +1.8.9 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.fragment:fragment](androidx_fragment_fragment.md.html). diff --git a/docs/checks/UnsanitizedFilenameFromContentProvider.md.html b/docs/checks/UnsanitizedFilenameFromContentProvider.md.html index b1380cd2..8dfde414 100644 --- a/docs/checks/UnsanitizedFilenameFromContentProvider.md.html +++ b/docs/checks/UnsanitizedFilenameFromContentProvider.md.html @@ -52,7 +52,7 @@ [UnsanitizedFilenameFromContentProvider] val fileObject = File("./", fileName) -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -70,7 +70,7 @@ File fileObject = new File("./", fileName); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/TestClass.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -86,7 +86,7 @@ val fileObject = File("./", fileName) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/UnsafeFilenameDetectorTest.kt) diff --git a/docs/checks/UnspecifiedImmutableFlag.md.html b/docs/checks/UnspecifiedImmutableFlag.md.html index 41e9a78a..98f5fd1c 100644 --- a/docs/checks/UnspecifiedImmutableFlag.md.html +++ b/docs/checks/UnspecifiedImmutableFlag.md.html @@ -58,7 +58,7 @@ mutability flag [UnspecifiedImmutableFlag] PendingIntent.getActivities(null, 0, null, 0); - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -74,8 +74,7 @@ PendingIntent.getActivities(null, 0, null, 0); } } - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PendingIntentMutableFlagDetectorTest.kt) diff --git a/docs/checks/UnspecifiedRegisterReceiverFlag.md.html b/docs/checks/UnspecifiedRegisterReceiverFlag.md.html index 7d21214b..5039b5ad 100644 --- a/docs/checks/UnspecifiedRegisterReceiverFlag.md.html +++ b/docs/checks/UnspecifiedRegisterReceiverFlag.md.html @@ -54,7 +54,7 @@ lint [UnspecifiedRegisterReceiverFlag] mContext.registerReceiver(receiver, myIntentFilter); --------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -78,7 +78,7 @@ mContext.registerReceiver(receiver, myIntentFilter); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/RegisterReceiverFlagDetectorTest.kt) diff --git a/docs/checks/UnsupportedChromeOsCameraSystemFeature.md.html b/docs/checks/UnsupportedChromeOsCameraSystemFeature.md.html index 16546f55..56c52451 100644 --- a/docs/checks/UnsupportedChromeOsCameraSystemFeature.md.html +++ b/docs/checks/UnsupportedChromeOsCameraSystemFeature.md.html @@ -50,7 +50,7 @@ [UnsupportedChromeOsCameraSystemFeature] getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA); ------------------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -73,7 +73,7 @@ getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ChromeOsSourceDetectorTest.kt) diff --git a/docs/checks/UnsupportedChromeOsHardware.md.html b/docs/checks/UnsupportedChromeOsHardware.md.html index cc6d4dab..1a1c328b 100644 --- a/docs/checks/UnsupportedChromeOsHardware.md.html +++ b/docs/checks/UnsupportedChromeOsHardware.md.html @@ -52,7 +52,7 @@ [UnsupportedChromeOsHardware] android:name="android.hardware.touchscreen" android:required="true"/> ----------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -65,7 +65,7 @@ android:name="android.hardware.touchscreen" android:required="true"/> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ChromeOsDetectorTest.java) diff --git a/docs/checks/UnsupportedLayoutAttribute.md.html b/docs/checks/UnsupportedLayoutAttribute.md.html index 3074ae74..a2e89d2e 100644 --- a/docs/checks/UnsupportedLayoutAttribute.md.html +++ b/docs/checks/UnsupportedLayoutAttribute.md.html @@ -51,7 +51,7 @@ RelativeLayout [UnsupportedLayoutAttribute] android:orientation="vertical"/> ------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -60,7 +60,7 @@ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical"/> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/UnsupportedLayoutAttributeDetectorTest.kt) diff --git a/docs/checks/UnsupportedTvHardware.md.html b/docs/checks/UnsupportedTvHardware.md.html index 4aabe575..135374fa 100644 --- a/docs/checks/UnsupportedTvHardware.md.html +++ b/docs/checks/UnsupportedTvHardware.md.html @@ -49,7 +49,7 @@ [UnsupportedTvHardware] android:name="android.hardware.touchscreen" android:required="true"/> ----------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -63,7 +63,7 @@ android:name="android.hardware.touchscreen" android:required="true"/> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AndroidTvDetectorTest.java) diff --git a/docs/checks/Untranslatable.md.html b/docs/checks/Untranslatable.md.html index ef4ade3f..99886bcf 100644 --- a/docs/checks/Untranslatable.md.html +++ b/docs/checks/Untranslatable.md.html @@ -51,7 +51,7 @@ [Untranslatable] <string name="sample">Ignore Me</string> ------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -60,15 +60,14 @@ <resources> <string name="sample" translatable="false">Ignore Me</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-nb/nontranslatable.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> <string name="sample">Ignore Me</string> </resources> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/TranslationDetectorTest.kt) diff --git a/docs/checks/UnusedAttribute.md.html b/docs/checks/UnusedAttribute.md.html index 40b2dcf4..0c11dfb0 100644 --- a/docs/checks/UnusedAttribute.md.html +++ b/docs/checks/UnusedAttribute.md.html @@ -59,7 +59,7 @@ [UnusedAttribute] android:theme="@android:style/Theme.Holo" /> ----------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -70,7 +70,7 @@ android:minSdkVersion="21" android:targetSdkVersion="30" /> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout/linear.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -87,10 +87,10 @@ android:theme="@android:style/Theme.Holo" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ApiDetectorTest.java) +You can also visit the source code ([ApiDetectorTest.java](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ApiDetectorTest.java) +[ProjectInitializerTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/ProjectInitializerTest.kt) for the unit tests for this check to see additional scenarios. (##) Suppressing diff --git a/docs/checks/UnusedBoxWithConstraintsScope.md.html b/docs/checks/UnusedBoxWithConstraintsScope.md.html index f56bc5ec..dcd3da73 100644 --- a/docs/checks/UnusedBoxWithConstraintsScope.md.html +++ b/docs/checks/UnusedBoxWithConstraintsScope.md.html @@ -64,7 +64,7 @@ [UnusedBoxWithConstraintsScope] BoxWithConstraints(propagateMinConstraints = false, content = { /**/ }) -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -83,7 +83,7 @@ BoxWithConstraints(content = { /**/ }) BoxWithConstraints(propagateMinConstraints = false, content = { /**/ }) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/foundation/foundation-lint/src/test/java/androidx/compose/foundation/lint/BoxWithConstraintsDetectorTest.kt) @@ -102,17 +102,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.foundation:foundation-android:1.9.0-alpha01") +implementation("androidx.compose.foundation:foundation-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.foundation:foundation-android:1.9.0-alpha01' +implementation 'androidx.compose.foundation:foundation-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.foundation.android) # libs.versions.toml [versions] -foundation-android = "1.9.0-alpha01" +foundation-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -124,11 +124,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.foundation:foundation-lint:1.9.0-alpha01`. +You can also use `androidx.compose.foundation:foundation-lint:1.11.0-alpha06`. [Additional details about androidx.compose.foundation:foundation-android](androidx_compose_foundation_foundation-android.md.html). diff --git a/docs/checks/UnusedContentLambdaTargetStateParameter.md.html b/docs/checks/UnusedContentLambdaTargetStateParameter.md.html index f0b3a594..8b667fb5 100644 --- a/docs/checks/UnusedContentLambdaTargetStateParameter.md.html +++ b/docs/checks/UnusedContentLambdaTargetStateParameter.md.html @@ -51,61 +51,61 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/foo/test.kt:14:Error: Target state parameter it is not used +src/test/foo/test.kt:14:Error: Target state parameter it is not used [UnusedContentLambdaTargetStateParameter] ) { if (foo) { /**/ } else { /**/ } } ----------------------------------- -src/foo/test.kt:18:Error: Target state parameter it is not used +src/test/foo/test.kt:18:Error: Target state parameter it is not used [UnusedContentLambdaTargetStateParameter] content = { if (foo) { /**/ } else { /**/ } } ----------------------------------- -src/foo/test.kt:23:Error: Target state parameter param is not used +src/test/foo/test.kt:23:Error: Target state parameter param is not used [UnusedContentLambdaTargetStateParameter] ) { param -> if (foo) { /**/ } else { /**/ } } ----- -src/foo/test.kt:27:Error: Target state parameter param is not used +src/test/foo/test.kt:27:Error: Target state parameter param is not used [UnusedContentLambdaTargetStateParameter] content = { param -> if (foo) { /**/ } else { /**/ } } ----- -src/foo/test.kt:32:Error: Target state parameter _ is not used +src/test/foo/test.kt:32:Error: Target state parameter _ is not used [UnusedContentLambdaTargetStateParameter] ) { _ -> if (foo) { /**/ } else { /**/ } } - -src/foo/test.kt:36:Error: Target state parameter _ is not used +src/test/foo/test.kt:36:Error: Target state parameter _ is not used [UnusedContentLambdaTargetStateParameter] content = { _ -> if (foo) { /**/ } else { /**/ } } - -src/foo/test.kt:40:Error: Target state parameter it is not used +src/test/foo/test.kt:40:Error: Target state parameter it is not used [UnusedContentLambdaTargetStateParameter] ) { if (foo) { /**/ } else { /**/ } } ----------------------------------- -src/foo/test.kt:43:Error: Target state parameter it is not used +src/test/foo/test.kt:43:Error: Target state parameter it is not used [UnusedContentLambdaTargetStateParameter] content = { if (foo) { /**/ } else { /**/ } } ----------------------------------- -src/foo/test.kt:47:Error: Target state parameter param is not used +src/test/foo/test.kt:47:Error: Target state parameter param is not used [UnusedContentLambdaTargetStateParameter] ) { param -> if (foo) { /**/ } else { /**/ } } ----- -src/foo/test.kt:50:Error: Target state parameter param is not used +src/test/foo/test.kt:50:Error: Target state parameter param is not used [UnusedContentLambdaTargetStateParameter] content = { param -> if (foo) { /**/ } else { /**/ } } ----- -src/foo/test.kt:54:Error: Target state parameter _ is not used +src/test/foo/test.kt:54:Error: Target state parameter _ is not used [UnusedContentLambdaTargetStateParameter] ) { _ -> if (foo) { /**/ } else { /**/ } } - -src/foo/test.kt:57:Error: Target state parameter _ is not used +src/test/foo/test.kt:57:Error: Target state parameter _ is not used [UnusedContentLambdaTargetStateParameter] content = { _ -> if (foo) { /**/ } else { /**/ } } - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: -`src/foo/test.kt`: +`src/test/foo/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers -package foo +package test.foo import androidx.compose.animation.* import androidx.compose.runtime.* @@ -163,7 +163,7 @@ content = { _ -> if (foo) { /**/ } else { /**/ } } ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/animation/animation-lint/src/test/java/androidx/compose/animation/lint/AnimatedContentDetectorTest.kt) @@ -182,17 +182,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.animation:animation-android:1.9.0-alpha01") +implementation("androidx.compose.animation:animation-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.animation:animation-android:1.9.0-alpha01' +implementation 'androidx.compose.animation:animation-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.animation.android) # libs.versions.toml [versions] -animation-android = "1.9.0-alpha01" +animation-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -204,11 +204,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.animation:animation-lint:1.9.0-alpha01`. +You can also use `androidx.compose.animation:animation-lint:1.11.0-alpha06`. [Additional details about androidx.compose.animation:animation-android](androidx_compose_animation_animation-android.md.html). diff --git a/docs/checks/UnusedCrossfadeTargetStateParameter.md.html b/docs/checks/UnusedCrossfadeTargetStateParameter.md.html index 8c83c31b..ca765f6b 100644 --- a/docs/checks/UnusedCrossfadeTargetStateParameter.md.html +++ b/docs/checks/UnusedCrossfadeTargetStateParameter.md.html @@ -51,37 +51,37 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/foo/test.kt:11:Error: Target state parameter it is not used +src/test/foo/test.kt:11:Error: Target state parameter it is not used [UnusedCrossfadeTargetStateParameter] Crossfade(foo) { if (foo) { /**/ } else { /**/ } } ----------------------------------- -src/foo/test.kt:12:Error: Target state parameter it is not used +src/test/foo/test.kt:12:Error: Target state parameter it is not used [UnusedCrossfadeTargetStateParameter] Crossfade(foo, content = { if (foo) { /**/ } else { /**/ } }) ----------------------------------- -src/foo/test.kt:13:Error: Target state parameter param is not used +src/test/foo/test.kt:13:Error: Target state parameter param is not used [UnusedCrossfadeTargetStateParameter] Crossfade(foo) { param -> if (foo) { /**/ } else { /**/ } } ----- -src/foo/test.kt:14:Error: Target state parameter param is not used +src/test/foo/test.kt:14:Error: Target state parameter param is not used [UnusedCrossfadeTargetStateParameter] Crossfade(foo, content = { param -> if (foo) { /**/ } else { /**/ } }) ----- -src/foo/test.kt:15:Error: Target state parameter _ is not used +src/test/foo/test.kt:15:Error: Target state parameter _ is not used [UnusedCrossfadeTargetStateParameter] Crossfade(foo) { _ -> if (foo) { /**/ } else { /**/ } } - -src/foo/test.kt:16:Error: Target state parameter _ is not used +src/test/foo/test.kt:16:Error: Target state parameter _ is not used [UnusedCrossfadeTargetStateParameter] Crossfade(foo, content = { _ -> if (foo) { /**/ } else { /**/ } }) - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: -`src/foo/test.kt`: +`src/test/foo/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers -package foo +package test.foo import androidx.compose.animation.* import androidx.compose.runtime.* @@ -97,7 +97,7 @@ Crossfade(foo) { _ -> if (foo) { /**/ } else { /**/ } } Crossfade(foo, content = { _ -> if (foo) { /**/ } else { /**/ } }) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/animation/animation-lint/src/test/java/androidx/compose/animation/lint/CrossfadeDetectorTest.kt) @@ -116,17 +116,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.animation:animation-android:1.9.0-alpha01") +implementation("androidx.compose.animation:animation-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.animation:animation-android:1.9.0-alpha01' +implementation 'androidx.compose.animation:animation-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.animation.android) # libs.versions.toml [versions] -animation-android = "1.9.0-alpha01" +animation-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -138,11 +138,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.animation:animation-lint:1.9.0-alpha01`. +You can also use `androidx.compose.animation:animation-lint:1.11.0-alpha06`. [Additional details about androidx.compose.animation:animation-android](androidx_compose_animation_animation-android.md.html). diff --git a/docs/checks/UnusedIds.md.html b/docs/checks/UnusedIds.md.html index 4bc0ad81..2e899582 100644 --- a/docs/checks/UnusedIds.md.html +++ b/docs/checks/UnusedIds.md.html @@ -29,7 +29,7 @@ Implementation : [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/UnusedResourceDetector.kt) Tests -: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/UnusedResourceDetectorTest.java) +: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/UnusedResourceDetectorTest.kt) Copyright Year : 2011 @@ -64,7 +64,7 @@ unused [UnusedIds] android:id="@+id/button1" ------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -76,7 +76,7 @@ android:id="@+id/button1" android:text="Button" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -84,7 +84,7 @@ <string name="app_name">Test</string> <string name="some_string">Some String</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/MyActivity.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -99,10 +99,10 @@ String name = getString(R.string.app_name); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/UnusedResourceDetectorTest.java) +[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/UnusedResourceDetectorTest.kt) for the unit tests for this check to see additional scenarios. (##) Suppressing diff --git a/docs/checks/UnusedMaterial3ScaffoldPaddingParameter.md.html b/docs/checks/UnusedMaterial3ScaffoldPaddingParameter.md.html index e7be7c5d..ea6f7500 100644 --- a/docs/checks/UnusedMaterial3ScaffoldPaddingParameter.md.html +++ b/docs/checks/UnusedMaterial3ScaffoldPaddingParameter.md.html @@ -48,37 +48,37 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/foo/test.kt:10:Error: Content padding parameter it is not used +src/test/foo/test.kt:10:Error: Content padding parameter it is not used [UnusedMaterial3ScaffoldPaddingParameter] Scaffold { /**/ } -------- -src/foo/test.kt:11:Error: Content padding parameter it is not used +src/test/foo/test.kt:11:Error: Content padding parameter it is not used [UnusedMaterial3ScaffoldPaddingParameter] Scaffold(Modifier) { /**/ } -------- -src/foo/test.kt:12:Error: Content padding parameter it is not used +src/test/foo/test.kt:12:Error: Content padding parameter it is not used [UnusedMaterial3ScaffoldPaddingParameter] Scaffold(Modifier, topBar = {}, bottomBar = {}) { /**/ } -------- -src/foo/test.kt:13:Error: Content padding parameter it is not used +src/test/foo/test.kt:13:Error: Content padding parameter it is not used [UnusedMaterial3ScaffoldPaddingParameter] Scaffold(Modifier, topBar = {}, bottomBar = {}, content = { /**/ }) -------- -src/foo/test.kt:14:Error: Content padding parameter _ is not used +src/test/foo/test.kt:14:Error: Content padding parameter _ is not used [UnusedMaterial3ScaffoldPaddingParameter] Scaffold(Modifier, topBar = {}, bottomBar = {}) { _ -> /**/ } - -src/foo/test.kt:15:Error: Content padding parameter innerPadding is not -used [UnusedMaterial3ScaffoldPaddingParameter] +src/test/foo/test.kt:15:Error: Content padding parameter innerPadding is +not used [UnusedMaterial3ScaffoldPaddingParameter] Scaffold(Modifier, topBar = {}, bottomBar = {}) { innerPadding -> /**/ } ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: -`src/foo/test.kt`: +`src/test/foo/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers -package foo +package test.foo import androidx.compose.material3.* import androidx.compose.runtime.* @@ -93,7 +93,7 @@ Scaffold(Modifier, topBar = {}, bottomBar = {}) { _ -> /**/ } Scaffold(Modifier, topBar = {}, bottomBar = {}) { innerPadding -> /**/ } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/material3/material3-lint/src/test/java/androidx/compose/material3/lint/ScaffoldPaddingDetectorTest.kt) @@ -112,17 +112,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.material3:material3-android:1.4.0-alpha13") +implementation("androidx.compose.material3:material3-android:1.5.0-alpha15") // build.gradle -implementation 'androidx.compose.material3:material3-android:1.4.0-alpha13' +implementation 'androidx.compose.material3:material3-android:1.5.0-alpha15' // build.gradle.kts with version catalogs: implementation(libs.material3.android) # libs.versions.toml [versions] -material3-android = "1.4.0-alpha13" +material3-android = "1.5.0-alpha15" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -134,11 +134,11 @@ } ``` -1.4.0-alpha13 is the version this documentation was generated from; +1.5.0-alpha15 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.material3:material3-lint:1.4.0-alpha13`. +You can also use `androidx.compose.material3:material3-lint:1.5.0-alpha15`. [Additional details about androidx.compose.material3:material3-android](androidx_compose_material3_material3-android.md.html). diff --git a/docs/checks/UnusedMaterialScaffoldPaddingParameter.md.html b/docs/checks/UnusedMaterialScaffoldPaddingParameter.md.html index 17582cd4..b10d9c55 100644 --- a/docs/checks/UnusedMaterialScaffoldPaddingParameter.md.html +++ b/docs/checks/UnusedMaterialScaffoldPaddingParameter.md.html @@ -48,37 +48,37 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/foo/test.kt:10:Error: Content padding parameter it is not used +src/test/foo/test.kt:10:Error: Content padding parameter it is not used [UnusedMaterialScaffoldPaddingParameter] Scaffold { /**/ } -------- -src/foo/test.kt:11:Error: Content padding parameter it is not used +src/test/foo/test.kt:11:Error: Content padding parameter it is not used [UnusedMaterialScaffoldPaddingParameter] Scaffold(Modifier) { /**/ } -------- -src/foo/test.kt:12:Error: Content padding parameter it is not used +src/test/foo/test.kt:12:Error: Content padding parameter it is not used [UnusedMaterialScaffoldPaddingParameter] Scaffold(Modifier, topBar = {}, bottomBar = {}) { /**/ } -------- -src/foo/test.kt:13:Error: Content padding parameter it is not used +src/test/foo/test.kt:13:Error: Content padding parameter it is not used [UnusedMaterialScaffoldPaddingParameter] Scaffold(Modifier, topBar = {}, bottomBar = {}, content = { /**/ }) -------- -src/foo/test.kt:14:Error: Content padding parameter _ is not used +src/test/foo/test.kt:14:Error: Content padding parameter _ is not used [UnusedMaterialScaffoldPaddingParameter] Scaffold(Modifier, topBar = {}, bottomBar = {}) { _ -> /**/ } - -src/foo/test.kt:15:Error: Content padding parameter innerPadding is not -used [UnusedMaterialScaffoldPaddingParameter] +src/test/foo/test.kt:15:Error: Content padding parameter innerPadding is +not used [UnusedMaterialScaffoldPaddingParameter] Scaffold(Modifier, topBar = {}, bottomBar = {}) { innerPadding -> /**/ } ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: -`src/foo/test.kt`: +`src/test/foo/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers -package foo +package test.foo import androidx.compose.material.* import androidx.compose.runtime.* @@ -93,7 +93,7 @@ Scaffold(Modifier, topBar = {}, bottomBar = {}) { _ -> /**/ } Scaffold(Modifier, topBar = {}, bottomBar = {}) { innerPadding -> /**/ } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/material/material-lint/src/test/java/androidx/compose/material/lint/ScaffoldPaddingDetectorTest.kt) @@ -112,17 +112,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.material:material-android:1.9.0-alpha01") +implementation("androidx.compose.material:material-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.material:material-android:1.9.0-alpha01' +implementation 'androidx.compose.material:material-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.material.android) # libs.versions.toml [versions] -material-android = "1.9.0-alpha01" +material-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -134,11 +134,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.material:material-lint:1.9.0-alpha01`. +You can also use `androidx.compose.material:material-lint:1.11.0-alpha06`. [Additional details about androidx.compose.material:material-android](androidx_compose_material_material-android.md.html). diff --git a/docs/checks/UnusedMergeAttributes.md.html b/docs/checks/UnusedMergeAttributes.md.html index 545f8a1d..94162b5d 100644 --- a/docs/checks/UnusedMergeAttributes.md.html +++ b/docs/checks/UnusedMergeAttributes.md.html @@ -49,7 +49,7 @@ [UnusedMergeAttributes] android:layout_marginTop="64dp" ------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -61,7 +61,7 @@ android:layout_marginTop="64dp" tools:parentTag="LinearLayout" /> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/UnusedMergeAttributesDetectorTest.kt) diff --git a/docs/checks/UnusedNamespace.md.html b/docs/checks/UnusedNamespace.md.html index 0e7c8ad2..8498ba92 100644 --- a/docs/checks/UnusedNamespace.md.html +++ b/docs/checks/UnusedNamespace.md.html @@ -46,7 +46,7 @@ [UnusedNamespace] xmlns:unused2="http://schemas.android.com/apk/res/unused1" ---------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -66,10 +66,10 @@ </foo.bar.Button> </foo.bar.LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/NamespaceDetectorTest.kt) +You can also visit the source code ([NamespaceDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/NamespaceDetectorTest.kt) +[MissingPrefixDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/MissingPrefixDetectorTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/UnusedQuantity.md.html b/docs/checks/UnusedQuantity.md.html index b9015514..8cdc3a55 100644 --- a/docs/checks/UnusedQuantity.md.html +++ b/docs/checks/UnusedQuantity.md.html @@ -59,7 +59,7 @@ the following quantities are not relevant: one [UnusedQuantity] <plurals name="title_day_dialog_content"> ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -76,7 +76,7 @@ <item quantity="other">"天"</item> </plurals> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-cs/plurals3.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -87,7 +87,7 @@ <item quantity="other">"Koncepty"</item> </plurals> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-fr/plurals.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -98,7 +98,7 @@ <item quantity="other">"brouillons"</item> </plurals> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PluralsDetectorTest.java) diff --git a/docs/checks/UnusedResources.md.html b/docs/checks/UnusedResources.md.html index 0ca94fbd..64b93df1 100644 --- a/docs/checks/UnusedResources.md.html +++ b/docs/checks/UnusedResources.md.html @@ -27,7 +27,7 @@ Implementation : [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/UnusedResourceDetector.kt) Tests -: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/UnusedResourceDetectorTest.java) +: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/UnusedResourceDetectorTest.kt) Copyright Year : 2011 @@ -68,7 +68,7 @@ <option name="skip-libraries" value="true" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (##) Example @@ -78,7 +78,7 @@ appears to be unused [UnusedResources] <string name="some_string">Some String</string> ------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -90,7 +90,7 @@ android:id="@+id/button1" android:text="Button" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -98,7 +98,7 @@ <string name="app_name">Test</string> <string name="some_string">Some String</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/MyActivity.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -113,10 +113,11 @@ String name = getString(R.string.app_name); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/UnusedResourceDetectorTest.java) +You can also visit the source code ([UnusedResourceDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/UnusedResourceDetectorTest.kt) +[ProjectInitializerTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/ProjectInitializerTest.kt) +[MainTest.java](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/MainTest.java) for the unit tests for this check to see additional scenarios. (##) Suppressing diff --git a/docs/checks/UnusedSharedTransitionModifierParameter.md.html b/docs/checks/UnusedSharedTransitionModifierParameter.md.html index 6c367af0..68c5ab17 100644 --- a/docs/checks/UnusedSharedTransitionModifierParameter.md.html +++ b/docs/checks/UnusedSharedTransitionModifierParameter.md.html @@ -56,7 +56,7 @@ SharedTransitionLayout. [UnusedSharedTransitionModifierParameter] SharedTransitionScope { ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -74,7 +74,7 @@ // Do nothing } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/animation/animation-lint/src/test/java/androidx/compose/animation/lint/SharedTransitionScopeDetectorTest.kt) @@ -93,17 +93,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.animation:animation-android:1.9.0-alpha01") +implementation("androidx.compose.animation:animation-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.animation:animation-android:1.9.0-alpha01' +implementation 'androidx.compose.animation:animation-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.animation.android) # libs.versions.toml [versions] -animation-android = "1.9.0-alpha01" +animation-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -115,11 +115,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.animation:animation-lint:1.9.0-alpha01`. +You can also use `androidx.compose.animation:animation-lint:1.11.0-alpha06`. [Additional details about androidx.compose.animation:animation-android](androidx_compose_animation_animation-android.md.html). diff --git a/docs/checks/UnusedTargetStateInContentKeyLambda.md.html b/docs/checks/UnusedTargetStateInContentKeyLambda.md.html index d219fb29..2c117edf 100644 --- a/docs/checks/UnusedTargetStateInContentKeyLambda.md.html +++ b/docs/checks/UnusedTargetStateInContentKeyLambda.md.html @@ -49,61 +49,61 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/foo/test.kt:13:Error: Target state parameter it is not used +src/test/foo/test.kt:13:Error: Target state parameter it is not used [UnusedTargetStateInContentKeyLambda] contentKey = { if (foo) { /**/ } else { /**/ } } ----------------------------------- -src/foo/test.kt:17:Error: Target state parameter it is not used +src/test/foo/test.kt:17:Error: Target state parameter it is not used [UnusedTargetStateInContentKeyLambda] contentKey = { if (foo) { /**/ } else { /**/ } }, ----------------------------------- -src/foo/test.kt:22:Error: Target state parameter param is not used +src/test/foo/test.kt:22:Error: Target state parameter param is not used [UnusedTargetStateInContentKeyLambda] contentKey = { param -> if (foo) { /**/ } else { /**/ } } ----- -src/foo/test.kt:26:Error: Target state parameter param is not used +src/test/foo/test.kt:26:Error: Target state parameter param is not used [UnusedTargetStateInContentKeyLambda] contentKey = { param -> if (foo) { /**/ } else { /**/ } }, ----- -src/foo/test.kt:31:Error: Target state parameter _ is not used +src/test/foo/test.kt:31:Error: Target state parameter _ is not used [UnusedTargetStateInContentKeyLambda] contentKey = { _ -> if (foo) { /**/ } else { /**/ } } - -src/foo/test.kt:35:Error: Target state parameter _ is not used +src/test/foo/test.kt:35:Error: Target state parameter _ is not used [UnusedTargetStateInContentKeyLambda] contentKey = { _ -> if (foo) { /**/ } else { /**/ } }, - -src/foo/test.kt:39:Error: Target state parameter it is not used +src/test/foo/test.kt:39:Error: Target state parameter it is not used [UnusedTargetStateInContentKeyLambda] contentKey = { if (foo) { /**/ } else { /**/ } } ----------------------------------- -src/foo/test.kt:42:Error: Target state parameter it is not used +src/test/foo/test.kt:42:Error: Target state parameter it is not used [UnusedTargetStateInContentKeyLambda] contentKey = { if (foo) { /**/ } else { /**/ } }, ----------------------------------- -src/foo/test.kt:46:Error: Target state parameter param is not used +src/test/foo/test.kt:46:Error: Target state parameter param is not used [UnusedTargetStateInContentKeyLambda] contentKey = { param -> if (foo) { /**/ } else { /**/ } } ----- -src/foo/test.kt:49:Error: Target state parameter param is not used +src/test/foo/test.kt:49:Error: Target state parameter param is not used [UnusedTargetStateInContentKeyLambda] contentKey = { param -> if (foo) { /**/ } else { /**/ } }, ----- -src/foo/test.kt:53:Error: Target state parameter _ is not used +src/test/foo/test.kt:53:Error: Target state parameter _ is not used [UnusedTargetStateInContentKeyLambda] contentKey = { _ -> if (foo) { /**/ } else { /**/ } } - -src/foo/test.kt:56:Error: Target state parameter _ is not used +src/test/foo/test.kt:56:Error: Target state parameter _ is not used [UnusedTargetStateInContentKeyLambda] contentKey = { _ -> if (foo) { /**/ } else { /**/ } }, - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: -`src/foo/test.kt`: +`src/test/foo/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers -package foo +package test.foo import androidx.compose.animation.* import androidx.compose.runtime.* @@ -161,7 +161,7 @@ content = { _ -> if (foo) { /**/ } else { /**/ } } ) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/animation/animation-lint/src/test/java/androidx/compose/animation/lint/AnimatedContentDetectorTest.kt) @@ -180,17 +180,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.animation:animation-android:1.9.0-alpha01") +implementation("androidx.compose.animation:animation-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.animation:animation-android:1.9.0-alpha01' +implementation 'androidx.compose.animation:animation-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.animation.android) # libs.versions.toml [versions] -animation-android = "1.9.0-alpha01" +animation-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -202,11 +202,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.animation:animation-lint:1.9.0-alpha01`. +You can also use `androidx.compose.animation:animation-lint:1.11.0-alpha06`. [Additional details about androidx.compose.animation:animation-android](androidx_compose_animation_animation-android.md.html). diff --git a/docs/checks/UnusedTransitionTargetStateParameter.md.html b/docs/checks/UnusedTransitionTargetStateParameter.md.html index 5e49a57e..7c421275 100644 --- a/docs/checks/UnusedTransitionTargetStateParameter.md.html +++ b/docs/checks/UnusedTransitionTargetStateParameter.md.html @@ -52,37 +52,37 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/foo/test.kt:13:Error: Target state parameter it is not used +src/test/foo/test.kt:13:Error: Target state parameter it is not used [UnusedTransitionTargetStateParameter] transition.animateFloat { if (foo) 1f else 0f } ----------------------- -src/foo/test.kt:14:Error: Target state parameter it is not used +src/test/foo/test.kt:14:Error: Target state parameter it is not used [UnusedTransitionTargetStateParameter] transition.animateFloat(targetValueByState = { if (foo) 1f else 0f }) ----------------------- -src/foo/test.kt:15:Error: Target state parameter param is not used +src/test/foo/test.kt:15:Error: Target state parameter param is not used [UnusedTransitionTargetStateParameter] transition.animateFloat { param -> if (foo) 1f else 0f } ----- -src/foo/test.kt:16:Error: Target state parameter param is not used +src/test/foo/test.kt:16:Error: Target state parameter param is not used [UnusedTransitionTargetStateParameter] transition.animateFloat(targetValueByState = { param -> if (foo) 1f else 0f }) ----- -src/foo/test.kt:17:Error: Target state parameter _ is not used +src/test/foo/test.kt:17:Error: Target state parameter _ is not used [UnusedTransitionTargetStateParameter] transition.animateFloat { _ -> if (foo) 1f else 0f } - -src/foo/test.kt:18:Error: Target state parameter _ is not used +src/test/foo/test.kt:18:Error: Target state parameter _ is not used [UnusedTransitionTargetStateParameter] transition.animateFloat(targetValueByState = { _ -> if (foo) 1f else 0f }) - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: -`src/foo/test.kt`: +`src/test/foo/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers -package foo +package test.foo import androidx.compose.animation.core.* import androidx.compose.runtime.* @@ -100,7 +100,7 @@ transition.animateFloat { _ -> if (foo) 1f else 0f } transition.animateFloat(targetValueByState = { _ -> if (foo) 1f else 0f }) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/animation/animation-core-lint/src/test/java/androidx/compose/animation/core/lint/TransitionDetectorTest.kt) @@ -119,17 +119,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.animation:animation-core-android:1.9.0-alpha01") +implementation("androidx.compose.animation:animation-core-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.animation:animation-core-android:1.9.0-alpha01' +implementation 'androidx.compose.animation:animation-core-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.animation.core.android) # libs.versions.toml [versions] -animation-core-android = "1.9.0-alpha01" +animation-core-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -141,11 +141,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.animation:animation-core-lint:1.9.0-alpha01`. +You can also use `androidx.compose.animation:animation-core-lint:1.11.0-alpha06`. [Additional details about androidx.compose.animation:animation-core-android](androidx_compose_animation_animation-core-android.md.html). diff --git a/docs/checks/UnusedTranslation.md.html b/docs/checks/UnusedTranslation.md.html index 6f5febe0..94ea08c8 100644 --- a/docs/checks/UnusedTranslation.md.html +++ b/docs/checks/UnusedTranslation.md.html @@ -49,7 +49,7 @@ [UnusedTranslation] <application android:localeConfig="@xml/locale_config"/> ------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -60,7 +60,7 @@ package="test.pkg"> <application android:localeConfig="@xml/locale_config"/> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/xml/locale_config.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -69,42 +69,42 @@ <locale android:name="nor-NOR"/> <locale android:name="pt"/> </locale-config> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-en/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> <string name="hello">Hello</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-ar/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> <string name="hello">أهلا</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-nb/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> <string name="hello">Hallo</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-b+es+419/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> <string name="hello">Hola</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-b+zh+Hans+SG/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> <string name="hello">你好</string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/LocaleConfigDetectorTest.kt) diff --git a/docs/checks/UsableSpace.md.html b/docs/checks/UsableSpace.md.html index b5c485db..5d18b6ac 100644 --- a/docs/checks/UsableSpace.md.html +++ b/docs/checks/UsableSpace.md.html @@ -55,7 +55,7 @@ clearable cached data [UsableSpace] return file.usableSpace ----------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -70,8 +70,7 @@ fun getFreeSpace(file: File): Long { return file.usableSpace } - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/StorageTest.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -85,7 +84,7 @@ return file.getUsableSpace(); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/StorageDetectorTest.kt) diff --git a/docs/checks/UseAlpha2.md.html b/docs/checks/UseAlpha2.md.html index 31a655eb..6f1a39a8 100644 --- a/docs/checks/UseAlpha2.md.html +++ b/docs/checks/UseAlpha2.md.html @@ -41,7 +41,7 @@ res/values-b+nor+NOR/strings.xml:Warning: For compatibility, should use 2-letter region codes when available; use NO instead of nor [UseAlpha2] 0 errors, 2 warnings -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -49,31 +49,31 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-no/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-b+kok+IN/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-b+nor+NOR/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-b+es+419/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/LocaleFolderDetectorTest.kt) diff --git a/docs/checks/UseAndroidAlpha.md.html b/docs/checks/UseAndroidAlpha.md.html index ebeebef3..8ad3ce16 100644 --- a/docs/checks/UseAndroidAlpha.md.html +++ b/docs/checks/UseAndroidAlpha.md.html @@ -52,17 +52,17 @@ ``` // build.gradle.kts -implementation("androidx.appcompat:appcompat:1.7.0") +implementation("androidx.appcompat:appcompat:1.7.1") // build.gradle -implementation 'androidx.appcompat:appcompat:1.7.0' +implementation 'androidx.appcompat:appcompat:1.7.1' // build.gradle.kts with version catalogs: implementation(libs.appcompat) # libs.versions.toml [versions] -appcompat = "1.7.0" +appcompat = "1.7.1" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -74,7 +74,7 @@ } ``` -1.7.0 is the version this documentation was generated from; +1.7.1 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.appcompat:appcompat](androidx_appcompat_appcompat.md.html). diff --git a/docs/checks/UseAppTint.md.html b/docs/checks/UseAppTint.md.html index 92fb0667..5f7e5daa 100644 --- a/docs/checks/UseAppTint.md.html +++ b/docs/checks/UseAppTint.md.html @@ -52,7 +52,7 @@ android:tint [UseAppTint] android:tint="#FF0000" /> ---------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -69,10 +69,10 @@ android:src="@android:drawable/ic_delete" android:tint="#FF0000" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/res/ImageViewTintDetectorTest.kt) +You can also visit the source code ([ImageViewTintDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/res/ImageViewTintDetectorTest.kt) +[ImageButtonTintDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/res/ImageButtonTintDetectorTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test @@ -88,17 +88,17 @@ ``` // build.gradle.kts -implementation("androidx.appcompat:appcompat:1.7.0") +implementation("androidx.appcompat:appcompat:1.7.1") // build.gradle -implementation 'androidx.appcompat:appcompat:1.7.0' +implementation 'androidx.appcompat:appcompat:1.7.1' // build.gradle.kts with version catalogs: implementation(libs.appcompat) # libs.versions.toml [versions] -appcompat = "1.7.0" +appcompat = "1.7.1" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -110,7 +110,7 @@ } ``` -1.7.0 is the version this documentation was generated from; +1.7.1 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.appcompat:appcompat](androidx_appcompat_appcompat.md.html). diff --git a/docs/checks/UseCheckPermission.md.html b/docs/checks/UseCheckPermission.md.html index ff2a4b5f..fc1e3efe 100644 --- a/docs/checks/UseCheckPermission.md.html +++ b/docs/checks/UseCheckPermission.md.html @@ -53,7 +53,7 @@ #enforcePermission(String,int,int,String)? [UseCheckPermission] context.checkPermission(Manifest.permission.INTERNET, 1, 1); ----------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -94,7 +94,7 @@ private void call(Bitmap bitmap) { } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/Intersect.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -107,7 +107,7 @@ rect.intersect(aLeft, aTop, aRight, aBottom); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/CheckResultDetectorTest.kt) diff --git a/docs/checks/UseCompatLoadingForColorStateLists.md.html b/docs/checks/UseCompatLoadingForColorStateLists.md.html index a68964f9..09d4dd61 100644 --- a/docs/checks/UseCompatLoadingForColorStateLists.md.html +++ b/docs/checks/UseCompatLoadingForColorStateLists.md.html @@ -49,7 +49,7 @@ ContextCompat.getColorStateList() [UseCompatLoadingForColorStateLists] getResources().getColorStateList(R.color.color_state_list) ---------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -65,7 +65,7 @@ getResources().getColorStateList(R.color.color_state_list) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/res/ColorStateListLoadingDetectorTest.kt) @@ -84,17 +84,17 @@ ``` // build.gradle.kts -implementation("androidx.appcompat:appcompat:1.7.0") +implementation("androidx.appcompat:appcompat:1.7.1") // build.gradle -implementation 'androidx.appcompat:appcompat:1.7.0' +implementation 'androidx.appcompat:appcompat:1.7.1' // build.gradle.kts with version catalogs: implementation(libs.appcompat) # libs.versions.toml [versions] -appcompat = "1.7.0" +appcompat = "1.7.1" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -106,7 +106,7 @@ } ``` -1.7.0 is the version this documentation was generated from; +1.7.1 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.appcompat:appcompat](androidx_appcompat_appcompat.md.html). diff --git a/docs/checks/UseCompatLoadingForDrawables.md.html b/docs/checks/UseCompatLoadingForDrawables.md.html index 0c46226d..ef0cad01 100644 --- a/docs/checks/UseCompatLoadingForDrawables.md.html +++ b/docs/checks/UseCompatLoadingForDrawables.md.html @@ -49,7 +49,7 @@ AppCompatResources.getDrawable() [UseCompatLoadingForDrawables] getDrawable(android.R.drawable.ic_delete) ----------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -66,7 +66,7 @@ getDrawable(android.R.drawable.ic_delete) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/res/DrawableLoadingDetectorTest.kt) @@ -85,17 +85,17 @@ ``` // build.gradle.kts -implementation("androidx.appcompat:appcompat:1.7.0") +implementation("androidx.appcompat:appcompat:1.7.1") // build.gradle -implementation 'androidx.appcompat:appcompat:1.7.0' +implementation 'androidx.appcompat:appcompat:1.7.1' // build.gradle.kts with version catalogs: implementation(libs.appcompat) # libs.versions.toml [versions] -appcompat = "1.7.0" +appcompat = "1.7.1" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -107,7 +107,7 @@ } ``` -1.7.0 is the version this documentation was generated from; +1.7.1 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.appcompat:appcompat](androidx_appcompat_appcompat.md.html). diff --git a/docs/checks/UseCompatTextViewDrawableApis.md.html b/docs/checks/UseCompatTextViewDrawableApis.md.html index 9cdda9a4..cf6a4952 100644 --- a/docs/checks/UseCompatTextViewDrawableApis.md.html +++ b/docs/checks/UseCompatTextViewDrawableApis.md.html @@ -50,7 +50,7 @@ [UseCompatTextViewDrawableApis] textView.setCompoundDrawableTintList(csl) ----------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -69,7 +69,7 @@ textView.setCompoundDrawableTintList(csl) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/widget/TextViewCompoundDrawablesApiDetectorTest.kt) @@ -88,17 +88,17 @@ ``` // build.gradle.kts -implementation("androidx.appcompat:appcompat:1.7.0") +implementation("androidx.appcompat:appcompat:1.7.1") // build.gradle -implementation 'androidx.appcompat:appcompat:1.7.0' +implementation 'androidx.appcompat:appcompat:1.7.1' // build.gradle.kts with version catalogs: implementation(libs.appcompat) # libs.versions.toml [versions] -appcompat = "1.7.0" +appcompat = "1.7.1" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -110,7 +110,7 @@ } ``` -1.7.0 is the version this documentation was generated from; +1.7.1 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.appcompat:appcompat](androidx_appcompat_appcompat.md.html). diff --git a/docs/checks/UseCompatTextViewDrawableXml.md.html b/docs/checks/UseCompatTextViewDrawableXml.md.html index 5d65bf62..6525c5c6 100644 --- a/docs/checks/UseCompatTextViewDrawableXml.md.html +++ b/docs/checks/UseCompatTextViewDrawableXml.md.html @@ -52,7 +52,7 @@ layout-v23/text_view.xml:9:Warning: Use app: instead of android: [UseCompatTextViewDrawableXml] android:="" /> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -68,7 +68,7 @@ android:layout_height="wrap_content" android:="" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/widget/TextViewCompoundDrawablesXmlDetectorTest.kt) @@ -87,17 +87,17 @@ ``` // build.gradle.kts -implementation("androidx.appcompat:appcompat:1.7.0") +implementation("androidx.appcompat:appcompat:1.7.1") // build.gradle -implementation 'androidx.appcompat:appcompat:1.7.0' +implementation 'androidx.appcompat:appcompat:1.7.1' // build.gradle.kts with version catalogs: implementation(libs.appcompat) # libs.versions.toml [versions] -appcompat = "1.7.0" +appcompat = "1.7.1" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -109,7 +109,7 @@ } ``` -1.7.0 is the version this documentation was generated from; +1.7.1 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.appcompat:appcompat](androidx_appcompat_appcompat.md.html). diff --git a/docs/checks/UseCompoundDrawables.md.html b/docs/checks/UseCompoundDrawables.md.html index f128793e..66132678 100644 --- a/docs/checks/UseCompoundDrawables.md.html +++ b/docs/checks/UseCompoundDrawables.md.html @@ -52,7 +52,7 @@ [UseCompoundDrawables] <LinearLayout ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -73,7 +73,7 @@ android:layout_height="wrap_content" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/UseCompoundDrawableDetectorTest.kt) diff --git a/docs/checks/UseGetLayoutInflater.md.html b/docs/checks/UseGetLayoutInflater.md.html index ce44567b..68c331e0 100644 --- a/docs/checks/UseGetLayoutInflater.md.html +++ b/docs/checks/UseGetLayoutInflater.md.html @@ -54,7 +54,7 @@ getLayoutInflater() instead [UseGetLayoutInflater] LayoutInflater li = LayoutInflater.from(requireContext()); ------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -81,10 +81,10 @@ return super.onCreateView(inflater, container, savedInstanceState); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/fragment/fragment-lint/src/test/java/androidx/fragment/lint/UseGetLayoutInflaterTest.kt) +You can also visit the source code ([UseGetLayoutInflaterTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/fragment/fragment-lint/src/test/java/androidx/fragment/lint/UseGetLayoutInflaterTest.kt) +[LintIssueDocGeneratorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/LintIssueDocGeneratorTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test @@ -100,17 +100,17 @@ ``` // build.gradle.kts -implementation("androidx.fragment:fragment:1.8.6") +implementation("androidx.fragment:fragment:1.8.9") // build.gradle -implementation 'androidx.fragment:fragment:1.8.6' +implementation 'androidx.fragment:fragment:1.8.9' // build.gradle.kts with version catalogs: implementation(libs.fragment) # libs.versions.toml [versions] -fragment = "1.8.6" +fragment = "1.8.9" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -122,7 +122,7 @@ } ``` -1.8.6 is the version this documentation was generated from; +1.8.9 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.fragment:fragment](androidx_fragment_fragment.md.html). diff --git a/docs/checks/UseKtx.md.html b/docs/checks/UseKtx.md.html index 65542d9e..ebcf69a1 100644 --- a/docs/checks/UseKtx.md.html +++ b/docs/checks/UseKtx.md.html @@ -74,7 +74,7 @@ <option name="remove-defaults" value="true" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (###) require-present @@ -91,7 +91,7 @@ <option name="require-present" value="true" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (##) Example @@ -101,7 +101,7 @@ String.htmlEncode instead? [UseKtx] val html = TextUtils.htmlEncode("Is x > y ?") ---------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -113,7 +113,7 @@ fun test() { val html = TextUtils.htmlEncode("Is x > y ?") } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/UseKtxDetectorTest.kt) diff --git a/docs/checks/UseOfBundledGooglePlayServices.md.html b/docs/checks/UseOfBundledGooglePlayServices.md.html index 3765f831..e20a29dd 100644 --- a/docs/checks/UseOfBundledGooglePlayServices.md.html +++ b/docs/checks/UseOfBundledGooglePlayServices.md.html @@ -46,7 +46,7 @@ services SDK. [UseOfBundledGooglePlayServices] compile 'com.google.android.gms:play-services:8.5.6' -------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -55,7 +55,7 @@ dependencies { compile 'com.google.android.gms:play-services:8.5.6' } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/UseOfNonLambdaOffsetOverload.md.html b/docs/checks/UseOfNonLambdaOffsetOverload.md.html index 022125f0..8c0749a8 100644 --- a/docs/checks/UseOfNonLambdaOffsetOverload.md.html +++ b/docs/checks/UseOfNonLambdaOffsetOverload.md.html @@ -43,6 +43,53 @@ to avoid unnecessary recompositions. `Modifier.offset{ }` is preferred in the cases where the arguments are backed by a `State`. +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/test/test.kt:17:Warning: State backed values should use the lambda +overload of Modifier.offset [UseOfNonLambdaOffsetOverload] + Modifier.offset(offsetStateful.value, yAxis) + ------ +src/test/test.kt:18:Warning: State backed values should use the lambda +overload of Modifier.offset [UseOfNonLambdaOffsetOverload] + Modifier.absoluteOffset(0.dp, offsetStateful.value) + -------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/test/test.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package test + +import androidx.compose.foundation.layout.absoluteOffset +import androidx.compose.foundation.layout.offset +import androidx.compose.runtime.Composable +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp + +@Composable +fun ComposableFunction() { + val offsetStateful = remember { mutableStateOf(0.dp) } + val yAxis = 10.dp + + Modifier.offset(offsetStateful.value, yAxis) + Modifier.absoluteOffset(0.dp, offsetStateful.value) +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/foundation/foundation-lint/src/test/java/androidx/compose/foundation/lint/NonLambdaOffsetModifierDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `NonLambdaOffsetModifierDetector.nonLambdaOffset_usingStateLocalVariable_shouldWarn`. +To report a problem with this extracted sample, visit +https://issuetracker.google.com/issues/new?component=612128. + (##) Including !!! @@ -51,17 +98,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.foundation:foundation-android:1.9.0-alpha01") +implementation("androidx.compose.foundation:foundation-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.foundation:foundation-android:1.9.0-alpha01' +implementation 'androidx.compose.foundation:foundation-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.foundation.android) # libs.versions.toml [versions] -foundation-android = "1.9.0-alpha01" +foundation-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -73,11 +120,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.foundation:foundation-lint:1.9.0-alpha01`. +You can also use `androidx.compose.foundation:foundation-lint:1.11.0-alpha06`. [Additional details about androidx.compose.foundation:foundation-android](androidx_compose_foundation_foundation-android.md.html). diff --git a/docs/checks/UseRequireInsteadOfGet.md.html b/docs/checks/UseRequireInsteadOfGet.md.html index 9c5e5aac..4121f8fa 100644 --- a/docs/checks/UseRequireInsteadOfGet.md.html +++ b/docs/checks/UseRequireInsteadOfGet.md.html @@ -81,7 +81,7 @@ checkNotNull(fragment.getView()) [UseRequireInsteadOfGet] checkNotNull(fragment.getView()); -------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -98,7 +98,7 @@ } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/foo/Test.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -147,10 +147,10 @@ checkNotNull(fragment.getView(), "getView"); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/fragment/fragment-lint/src/test/java/androidx/fragment/lint/UseRequireInsteadOfGetTest.kt) +You can also visit the source code ([UseRequireInsteadOfGetTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/fragment/fragment-lint/src/test/java/androidx/fragment/lint/UseRequireInsteadOfGetTest.kt) +[LintIssueDocGeneratorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/LintIssueDocGeneratorTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test @@ -166,17 +166,17 @@ ``` // build.gradle.kts -implementation("androidx.fragment:fragment:1.8.6") +implementation("androidx.fragment:fragment:1.8.9") // build.gradle -implementation 'androidx.fragment:fragment:1.8.6' +implementation 'androidx.fragment:fragment:1.8.9' // build.gradle.kts with version catalogs: implementation(libs.fragment) # libs.versions.toml [versions] -fragment = "1.8.6" +fragment = "1.8.9" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -188,7 +188,7 @@ } ``` -1.8.6 is the version this documentation was generated from; +1.8.9 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.fragment:fragment](androidx_fragment_fragment.md.html). diff --git a/docs/checks/UseRequiresApi.md.html b/docs/checks/UseRequiresApi.md.html index 928ad716..543d3215 100644 --- a/docs/checks/UseRequiresApi.md.html +++ b/docs/checks/UseRequiresApi.md.html @@ -63,7 +63,7 @@ testApi [UseRequiresApi] @TargetApi(value = 32) // ERROR 3 ---------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -81,7 +81,7 @@ @TargetApi(value = 32) // ERROR 3 public int testApi = 1; } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/WrongUsagesKotlin.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -99,7 +99,7 @@ fun testApi() { } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/AnnotationDetectorTest.kt) diff --git a/docs/checks/UseRxSetProgress2.md.html b/docs/checks/UseRxSetProgress2.md.html index 4afd6018..f4e9f230 100644 --- a/docs/checks/UseRxSetProgress2.md.html +++ b/docs/checks/UseRxSetProgress2.md.html @@ -55,7 +55,7 @@ setCompletableProgress instead. [UseRxSetProgress2] worker.setProgress() -------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -71,7 +71,7 @@ worker.setProgress() } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/work/work-lint/src/test/java/androidx/work/lint/RxWorkerSetProgressDetectorTest.kt) @@ -90,17 +90,17 @@ ``` // build.gradle.kts -implementation("androidx.work:work-runtime:2.10.1") +implementation("androidx.work:work-runtime:2.11.1") // build.gradle -implementation 'androidx.work:work-runtime:2.10.1' +implementation 'androidx.work:work-runtime:2.11.1' // build.gradle.kts with version catalogs: implementation(libs.work.runtime) # libs.versions.toml [versions] -work-runtime = "2.10.1" +work-runtime = "2.11.1" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -112,7 +112,7 @@ } ``` -2.10.1 is the version this documentation was generated from; +2.11.1 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.work:work-runtime](androidx_work_work-runtime.md.html). diff --git a/docs/checks/UseSdkSuppress.md.html b/docs/checks/UseSdkSuppress.md.html index 842cb23b..d8d92d4d 100644 --- a/docs/checks/UseSdkSuppress.md.html +++ b/docs/checks/UseSdkSuppress.md.html @@ -46,7 +46,7 @@ from tests; use @SdkSuppress on UnitTestKotlin instead [UseSdkSuppress] @RequiresApi(29) // ERROR: don't use in tests, use @SdkSuppress instead ---------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -62,7 +62,7 @@ @Test fun thisIsATest() = Unit } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `build.gradle`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~groovy linenumbers @@ -71,7 +71,7 @@ checkTestSources = true } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/SdkSuppressDetectorTest.kt) diff --git a/docs/checks/UseSparseArrays.md.html b/docs/checks/UseSparseArrays.md.html index 6ed85968..f7eea555 100644 --- a/docs/checks/UseSparseArrays.md.html +++ b/docs/checks/UseSparseArrays.md.html @@ -57,7 +57,7 @@ [UseSparseArrays] new SparseArray<Boolean>(); // Use SparseBooleanArray instead -------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -275,7 +275,7 @@ super(null); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/JavaPerformanceDetectorTest.java) diff --git a/docs/checks/UseSupportActionBar.md.html b/docs/checks/UseSupportActionBar.md.html index b85f4e94..654cff5a 100644 --- a/docs/checks/UseSupportActionBar.md.html +++ b/docs/checks/UseSupportActionBar.md.html @@ -49,7 +49,7 @@ AppCompatActivity.setSupportActionBar [UseSupportActionBar] setActionBar(Toolbar(this)) --------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -66,7 +66,7 @@ setActionBar(Toolbar(this)) } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/app/SetActionBarDetectorTest.kt) @@ -85,17 +85,17 @@ ``` // build.gradle.kts -implementation("androidx.appcompat:appcompat:1.7.0") +implementation("androidx.appcompat:appcompat:1.7.1") // build.gradle -implementation 'androidx.appcompat:appcompat:1.7.0' +implementation 'androidx.appcompat:appcompat:1.7.1' // build.gradle.kts with version catalogs: implementation(libs.appcompat) # libs.versions.toml [versions] -appcompat = "1.7.0" +appcompat = "1.7.1" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -107,7 +107,7 @@ } ``` -1.7.0 is the version this documentation was generated from; +1.7.1 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.appcompat:appcompat](androidx_appcompat_appcompat.md.html). diff --git a/docs/checks/UseSwitchCompatOrMaterialCode.md.html b/docs/checks/UseSwitchCompatOrMaterialCode.md.html index 6a9b9b60..c12da328 100644 --- a/docs/checks/UseSwitchCompatOrMaterialCode.md.html +++ b/docs/checks/UseSwitchCompatOrMaterialCode.md.html @@ -50,7 +50,7 @@ or MaterialSwitch from Material library [UseSwitchCompatOrMaterialCode] class CustomSwitch(context: Context): Switch(context) ------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -62,7 +62,7 @@ import android.widget.Switch class CustomSwitch(context: Context): Switch(context) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/widget/SwitchUsageCodeDetectorTest.kt) @@ -81,17 +81,17 @@ ``` // build.gradle.kts -implementation("androidx.appcompat:appcompat:1.7.0") +implementation("androidx.appcompat:appcompat:1.7.1") // build.gradle -implementation 'androidx.appcompat:appcompat:1.7.0' +implementation 'androidx.appcompat:appcompat:1.7.1' // build.gradle.kts with version catalogs: implementation(libs.appcompat) # libs.versions.toml [versions] -appcompat = "1.7.0" +appcompat = "1.7.1" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -103,7 +103,7 @@ } ``` -1.7.0 is the version this documentation was generated from; +1.7.1 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.appcompat:appcompat](androidx_appcompat_appcompat.md.html). diff --git a/docs/checks/UseSwitchCompatOrMaterialXml.md.html b/docs/checks/UseSwitchCompatOrMaterialXml.md.html index e2ea6743..c7547c12 100644 --- a/docs/checks/UseSwitchCompatOrMaterialXml.md.html +++ b/docs/checks/UseSwitchCompatOrMaterialXml.md.html @@ -50,7 +50,7 @@ MaterialSwitch from Material library [UseSwitchCompatOrMaterialXml] <Switch ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -65,7 +65,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/appcompat/appcompat-lint/src/test/kotlin/androidx/appcompat/lint/widget/SwitchUsageXmlDetectorTest.kt) @@ -84,17 +84,17 @@ ``` // build.gradle.kts -implementation("androidx.appcompat:appcompat:1.7.0") +implementation("androidx.appcompat:appcompat:1.7.1") // build.gradle -implementation 'androidx.appcompat:appcompat:1.7.0' +implementation 'androidx.appcompat:appcompat:1.7.1' // build.gradle.kts with version catalogs: implementation(libs.appcompat) # libs.versions.toml [versions] -appcompat = "1.7.0" +appcompat = "1.7.1" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -106,7 +106,7 @@ } ``` -1.7.0 is the version this documentation was generated from; +1.7.1 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.appcompat:appcompat](androidx_appcompat_appcompat.md.html). diff --git a/docs/checks/UseTomlInstead.md.html b/docs/checks/UseTomlInstead.md.html index a88573e1..8fefabb5 100644 --- a/docs/checks/UseTomlInstead.md.html +++ b/docs/checks/UseTomlInstead.md.html @@ -46,7 +46,7 @@ (libs.androidx.appCompat) instead [UseTomlInstead] implementation 'androidx.appcompat:appcompat:1.5.1' ------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -59,7 +59,7 @@ [libraries] androidx-appCompat = { module = "androidx.appcompat:appcompat", version.ref = "appCompat" } androidx-test-core = { module = "androidx.test:core", version.ref = "androidxTest" } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `build.gradle`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~groovy linenumbers @@ -67,7 +67,7 @@ implementation(libs.androidx.appCompat) // OK implementation 'androidx.appcompat:appcompat:1.5.1' } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/GradleDetectorTest.kt) diff --git a/docs/checks/UseValueOf.md.html b/docs/checks/UseValueOf.md.html index df0cce88..af0b8b7a 100644 --- a/docs/checks/UseValueOf.md.html +++ b/docs/checks/UseValueOf.md.html @@ -47,7 +47,7 @@ [UseValueOf] Double accuracy = new Double(1.0); --------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -58,10 +58,10 @@ public class MyClass { Double accuracy = new Double(1.0); } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/JavaPerformanceDetectorTest.java) +You can also visit the source code ([JavaPerformanceDetectorTest.java](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/JavaPerformanceDetectorTest.java) +[ConfigurationHierarchyTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/client/api/ConfigurationHierarchyTest.kt) for the unit tests for this check to see additional scenarios. (##) Suppressing diff --git a/docs/checks/UselessLeaf.md.html b/docs/checks/UselessLeaf.md.html index a9ac1627..f13bb9a2 100644 --- a/docs/checks/UselessLeaf.md.html +++ b/docs/checks/UselessLeaf.md.html @@ -46,7 +46,7 @@ (no children, no background, no id, no style) [UselessLeaf] <FrameLayout ----------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -141,7 +141,7 @@ android:layout_height="match_parent" > </FrameLayout> </merge> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/UselessViewDetectorTest.kt) diff --git a/docs/checks/UselessParent.md.html b/docs/checks/UselessParent.md.html index 36b6cdef..ab4dd818 100644 --- a/docs/checks/UselessParent.md.html +++ b/docs/checks/UselessParent.md.html @@ -54,7 +54,7 @@ the other view [UselessParent] <LinearLayout ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -149,7 +149,7 @@ android:layout_height="match_parent" > </FrameLayout> </merge> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/UselessViewDetectorTest.kt) diff --git a/docs/checks/UsingC2DM.md.html b/docs/checks/UsingC2DM.md.html index 18195382..52197680 100644 --- a/docs/checks/UsingC2DM.md.html +++ b/docs/checks/UsingC2DM.md.html @@ -44,7 +44,7 @@ ensure reliable message delivery [UsingC2DM] <receiver android:name="com.google.android.c2dm.C2DMBroadcastReceiver"> --------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -65,7 +65,7 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/C2dmDetectorTest.kt) diff --git a/docs/checks/UsingHttp.md.html b/docs/checks/UsingHttp.md.html index e91b540c..f4259f17 100644 --- a/docs/checks/UsingHttp.md.html +++ b/docs/checks/UsingHttp.md.html @@ -49,7 +49,7 @@ [UsingHttp] distributionUrl=http\://services.gradle.org/distributions/gradle-2.1-all.zip ---- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -60,7 +60,7 @@ zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=http\://services.gradle.org/distributions/gradle-2.1-all.zip -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/PropertyFileDetectorTest.kt) diff --git a/docs/checks/UsingMaterialAndMaterial3Libraries.md.html b/docs/checks/UsingMaterialAndMaterial3Libraries.md.html index dc754e3e..468e402e 100644 --- a/docs/checks/UsingMaterialAndMaterial3Libraries.md.html +++ b/docs/checks/UsingMaterialAndMaterial3Libraries.md.html @@ -53,7 +53,7 @@ material3 library [UsingMaterialAndMaterial3Libraries] import androidx.compose.material.Button -------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -69,7 +69,7 @@ import androidx.compose.material.pullrefresh.pullRefresh fun test() {} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/material3/material3-lint/src/test/java/androidx/compose/material3/lint/MaterialImportDetectorTest.kt) @@ -88,17 +88,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.material3:material3-android:1.4.0-alpha13") +implementation("androidx.compose.material3:material3-android:1.5.0-alpha15") // build.gradle -implementation 'androidx.compose.material3:material3-android:1.4.0-alpha13' +implementation 'androidx.compose.material3:material3-android:1.5.0-alpha15' // build.gradle.kts with version catalogs: implementation(libs.material3.android) # libs.versions.toml [versions] -material3-android = "1.4.0-alpha13" +material3-android = "1.5.0-alpha15" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -110,11 +110,11 @@ } ``` -1.4.0-alpha13 is the version this documentation was generated from; +1.5.0-alpha15 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.material3:material3-lint:1.4.0-alpha13`. +You can also use `androidx.compose.material3:material3-lint:1.5.0-alpha15`. [Additional details about androidx.compose.material3:material3-android](androidx_compose_material3_material3-android.md.html). diff --git a/docs/checks/UsingOnClickInXml.md.html b/docs/checks/UsingOnClickInXml.md.html index b08fe90d..61b7b9df 100644 --- a/docs/checks/UsingOnClickInXml.md.html +++ b/docs/checks/UsingOnClickInXml.md.html @@ -50,17 +50,17 @@ ``` // build.gradle.kts -implementation("androidx.appcompat:appcompat:1.7.0") +implementation("androidx.appcompat:appcompat:1.7.1") // build.gradle -implementation 'androidx.appcompat:appcompat:1.7.0' +implementation 'androidx.appcompat:appcompat:1.7.1' // build.gradle.kts with version catalogs: implementation(libs.appcompat) # libs.versions.toml [versions] -appcompat = "1.7.0" +appcompat = "1.7.1" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -72,7 +72,7 @@ } ``` -1.7.0 is the version this documentation was generated from; +1.7.1 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.appcompat:appcompat](androidx_appcompat_appcompat.md.html). diff --git a/docs/checks/ValidActionsXml.md.html b/docs/checks/ValidActionsXml.md.html index 16a1504e..6767e891 100644 --- a/docs/checks/ValidActionsXml.md.html +++ b/docs/checks/ValidActionsXml.md.html @@ -48,7 +48,7 @@ android:resource="@xml/my_actions" /> [ValidActionsXml] <actions> ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -65,7 +65,7 @@ </activity> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/xml/my_actions.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -74,7 +74,7 @@ <fulfillment urlTemplate="foo"/> </action> </actions> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ActionsXmlDetectorTest.kt) diff --git a/docs/checks/ValidFragment.md.html b/docs/checks/ValidFragment.md.html index 4d3bd93d..d41cbc67 100644 --- a/docs/checks/ValidFragment.md.html +++ b/docs/checks/ValidFragment.md.html @@ -77,7 +77,7 @@ Fragment#setArguments(Bundle) instead [ValidFragment] public Fragment5(int sample) { --------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -142,7 +142,7 @@ public static class Fragment7 extends Fragment { } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/FragmentDetectorTest.kt) diff --git a/docs/checks/ValidRestrictions.md.html b/docs/checks/ValidRestrictions.md.html index fd2d4550..d3e76ff4 100644 --- a/docs/checks/ValidRestrictions.md.html +++ b/docs/checks/ValidRestrictions.md.html @@ -43,7 +43,7 @@ android:title [ValidRestrictions] <restriction /> --------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -52,10 +52,10 @@ <restrictions xmlns:android="http://schemas.android.com/apk/res/android"> <restriction /> </restrictions> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/RestrictionsDetectorTest.kt) +You can also visit the source code ([RestrictionsDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/RestrictionsDetectorTest.kt) +[RestrictToDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/RestrictToDetectorTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/VectorDrawableCompat.md.html b/docs/checks/VectorDrawableCompat.md.html index c0d2ef0d..a8b96387 100644 --- a/docs/checks/VectorDrawableCompat.md.html +++ b/docs/checks/VectorDrawableCompat.md.html @@ -52,7 +52,7 @@ test_project-appbuild.gradle [VectorDrawableCompat] <ImageView app:srcCompat="@drawable/foo" /> ------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -64,7 +64,7 @@ } } android.defaultConfig.vectorDrawables.useSupportLibrary = false -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/main/res/drawable/foo.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -82,7 +82,7 @@ c5.207,-5.242,9,-7.97,9,-11.5 C25,11.432,23.043,9.5,20.5,9.5z" /> </vector> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/main/res/layout/main_activity.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -91,7 +91,7 @@ <ImageView app:srcCompat="@drawable/foo" /> <ImageView app:srcCompat="@drawable/bitmap" /> </RelativeLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/VectorDrawableCompatDetectorTest.kt) diff --git a/docs/checks/VectorPath.md.html b/docs/checks/VectorPath.md.html index 9b46b2cf..9159f8dd 100644 --- a/docs/checks/VectorPath.md.html +++ b/docs/checks/VectorPath.md.html @@ -40,17 +40,17 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -res/drawable/my_vector.xml:16:Warning: Very long vector path (1622 +res/drawable/my_vector.xml:16:Warning: Very long vector path (3786 characters), which is bad for performance. Considering reducing precision, removing minor details or rasterizing vector. [VectorPath] android:pathData="@string/airplane_mask_clip_path_enabled"/> --------------------------------------- -res/drawable/my_vector.xml:37:Warning: Very long vector path (1623 +res/drawable/my_vector.xml:37:Warning: Very long vector path (3787 characters), which is bad for performance. Considering reducing precision, removing minor details or rasterizing vector. [VectorPath] android:pathData="M 37.8337860107,-40.3974914551 c 0,0 -35.8077850342,31.5523681641 -35.8077850342,31.5523681641 c 0,0 40.9884796143,40.9278411865 40.9884796143,40.9278411865 c 0,0 -2.61700439453,2.093… ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------… -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -96,7 +96,7 @@ </group> </group> </vector> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/paths.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -106,19 +106,19 @@ M 37.8337860107,-40.3974914551 c 0,0 -35.8077850342,31.5523681641 -35.8077850342,31.5523681641 c 0,0 40.9884796143,40.9278411865 40.9884796143,40.9278411865 c 0,0 -2.61700439453,2.0938873291 -2.61700439453,2.0938873291 c 0,0 -41.1884460449,-40.9392852783 -41.1884460449,-40.9392852783 c 0,0 -34.6200408936,25.4699249268 -34.6200408936,25.4699249268 c 0,0 55.9664764404,69.742401123 55.9664764404,69.742401123 c 0,0 73.2448120117,-59.1047973633 73.2448120117,-59.1047973633 c 0,0 -55.9664916992,-69.7423400879 -55.9664916992,-69.7423400879 Z </string> <string name="airplane_cross_path">M 37.8337860107,-40.3974914551 c 0,0 -35.8077850342,31.5523681641 -35.8077850342,31.5523681641 c 0,0 40.9884796143,40.9278411865 40.9884796143,40.9278411865 c 0,0 -2.61700439453,2.0938873291 -2.61700439453,2.0938873291 c 0,0 -41.1884460449,-40.9392852783 -41.1884460449,-40.9392852783 c 0,0 -34.6200408936,25.4699249268 -34.6200408936,25.4699249268 c 0,0 55.9664764404,69.742401123 55.9664764404,69.742401123 c 0,0 73.2448120117,-59.1047973633 73.2448120117,-59.1047973633 c 0,0 -55.9664916992,-69.7423400879 -55.9664916992,-69.7423400879 Z </string> <string name="airplane_mask_clip_path_disabled"> -M 37.8337860107,-40.3974914551 c 0,0 -35.8077850342,31.5523681641 -35.8077850342,31.5523681641 c 0,0 40.9884796143,40.9278411865 40.9884796143,40.9278411865 c 0,0 -2.61700439453,2.0938873291 -2.61700439453,2.0938873291 c 0,0 -41.1884460449,-40.9392852783 -41.1884460449,-40.9392852783 c 0,0 -34.6200408936,25.4699249268 -34.6200408936,25.4699249268 c 0,0 55.9664764404,69.742401123 55.9664764404,69.742401123 c 0,0 73.2448120117,-59.1047973633 73.2448120117,-59.1047973633 c 0,0 -55.9664916992,-69.7423400879 -55.9664916992,-69.7423400879 Z M 37.8337860107,-40.3974914551 c 0,0 -35.8077850342,31.5523681641 -35.8077850342,31.5523681641 c 0,0 40.9884796143,40.9278411865 40.9884796143,40.9278411865 c 0,0 -2.61700439453,2.0938873291 -2.61700439453,2.0938873291 c 0,0 -41.1884460449,-40.9392852783 -41.1884460449,-40.9392852783 c 0,0 -34.6200408936,25.4699249268 -34.6200408936,25.4699249268 c 0,0 55.9664764404,69.742401123 55.9664764404,69.742401123 c 0,0 73.2448120117,-59.1047973633 73.2448120117,-59.1047973633 c 0,0 -55.9664916992,-69.7423400879 -55.9664916992,-69.7423400879 Z M 37.8337860107,-40.3974914551 c 0,0 -35.8077850342,31.5523681641 -35.8077850342,31.5523681641 c 0,0 40.9884796143,40.9278411865 40.9884796143,40.9278411865 c 0,0 -2.61700439453,2.0938873291 -2.61700439453,2.0938873291 c 0,0 -41.1884460449,-40.9392852783 -41.1884460449,-40.9392852783 c 0,0 -34.6200408936,25.4699249268 -34.6200408936,25.4699249268 c 0,0 55.9664764404,69.742401123 55.9664764404,69.742401123 c 0,0 73.2448120117,-59.1047973633 73.2448120117,-59.1047973633 c 0,0 -55.9664916992,-69.7423400879 -55.9664916992,-69.7423400879 Z </string> +M 37.8337860107,-40.3974914551 c 0,0 -35.8077850342,31.5523681641 -35.8077850342,31.5523681641 c 0,0 40.9884796143,40.9278411865 40.9884796143,40.9278411865 c 0,0 -2.61700439453,2.0938873291 -2.61700439453,2.0938873291 c 0,0 -41.1884460449,-40.9392852783 -41.1884460449,-40.9392852783 c 0,0 -34.6200408936,25.4699249268 -34.6200408936,25.4699249268 c 0,0 55.9664764404,69.742401123 55.9664764404,69.742401123 c 0,0 73.2448120117,-59.1047973633 73.2448120117,-59.1047973633 c 0,0 -55.9664916992,-69.7423400879 -55.9664916992,-69.7423400879 Z M 37.8337860107,-40.3974914551 c 0,0 -35.8077850342,31.5523681641 -35.8077850342,31.5523681641 c 0,0 40.9884796143,40.9278411865 40.9884796143,40.9278411865 c 0,0 -2.61700439453,2.0938873291 -2.61700439453,2.0938873291 c 0,0 -41.1884460449,-40.9392852783 -41.1884460449,-40.9392852783 c 0,0 -34.6200408936,25.4699249268 -34.6200408936,25.4699249268 c 0,0 55.9664764404,69.742401123 55.9664764404,69.742401123 c 0,0 73.2448120117,-59.1047973633 73.2448120117,-59.1047973633 c 0,0 -55.9664916992,-69.7423400879 -55.9664916992,-69.7423400879 Z M 37.8337860107,-40.3974914551 c 0,0 -35.8077850342,31.5523681641 -35.8077850342,31.5523681641 c 0,0 40.9884796143,40.9278411865 40.9884796143,40.9278411865 c 0,0 -2.61700439453,2.0938873291 -2.61700439453,2.0938873291 c 0,0 -41.1884460449,-40.9392852783 -41.1884460449,-40.9392852783 c 0,0 -34.6200408936,25.4699249268 -34.6200408936,25.4699249268 c 0,0 55.9664764404,69.742401123 55.9664764404,69.742401123 c 0,0 73.2448120117,-59.1047973633 73.2448120117,-59.1047973633 c 0,0 -55.9664916992,-69.7423400879 -55.9664916992,-69.7423400879 Z M 37.8337860107,-40.3974914551 c 0,0 -35.8077850342,31.5523681641 -35.8077850342,31.5523681641 c 0,0 40.9884796143,40.9278411865 40.9884796143,40.9278411865 c 0,0 -2.61700439453,2.0938873291 -2.61700439453,2.0938873291 c 0,0 -41.1884460449,-40.9392852783 -41.1884460449,-40.9392852783 c 0,0 -34.6200408936,25.4699249268 -34.6200408936,25.4699249268 c 0,0 55.9664764404,69.742401123 55.9664764404,69.742401123 c 0,0 73.2448120117,-59.1047973633 73.2448120117,-59.1047973633 c 0,0 -55.9664916992,-69.7423400879 -55.9664916992,-69.7423400879 Z M 37.8337860107,-40.3974914551 c 0,0 -35.8077850342,31.5523681641 -35.8077850342,31.5523681641 c 0,0 40.9884796143,40.9278411865 40.9884796143,40.9278411865 c 0,0 -2.61700439453,2.0938873291 -2.61700439453,2.0938873291 c 0,0 -41.1884460449,-40.9392852783 -41.1884460449,-40.9392852783 c 0,0 -34.6200408936,25.4699249268 -34.6200408936,25.4699249268 c 0,0 55.9664764404,69.742401123 55.9664764404,69.742401123 c 0,0 73.2448120117,-59.1047973633 73.2448120117,-59.1047973633 c 0,0 -55.9664916992,-69.7423400879 -55.9664916992,-69.7423400879 Z M 37.8337860107,-40.3974914551 c 0,0 -35.8077850342,31.5523681641 -35.8077850342,31.5523681641 c 0,0 40.9884796143,40.9278411865 40.9884796143,40.9278411865 c 0,0 -2.61700439453,2.0938873291 -2.61700439453,2.0938873291 c 0,0 -41.1884460449,-40.9392852783 -41.1884460449,-40.9392852783 c 0,0 -34.6200408936,25.4699249268 -34.6200408936,25.4699249268 c 0,0 55.9664764404,69.742401123 55.9664764404,69.742401123 c 0,0 73.2448120117,-59.1047973633 73.2448120117,-59.1047973633 c 0,0 -55.9664916992,-69.7423400879 -55.9664916992,-69.7423400879 Z M 37.8337860107,-40.3974914551 c 0,0 -35.8077850342,31.5523681641 -35.8077850342,31.5523681641 c 0,0 40.9884796143,40.9278411865 40.9884796143,40.9278411865 c 0,0 -2.61700439453,2.0938873291 -2.61700439453,2.0938873291 c 0,0 -41.1884460449,-40.9392852783 -41.1884460449,-40.9392852783 c 0,0 -34.6200408936,25.4699249268 -34.6200408936,25.4699249268 c 0,0 55.9664764404,69.742401123 55.9664764404,69.742401123 c 0,0 73.2448120117,-59.1047973633 73.2448120117,-59.1047973633 c 0,0 -55.9664916992,-69.7423400879 -55.9664916992,-69.7423400879 Z </string> <string name="airplane_mask_clip_path_enabled"> -M 37.8337860107,-40.3974914551 c 0,0 -35.8077850342,31.5523681641 -35.8077850342,31.5523681641 c 0,0 40.9884796143,40.9278411865 40.9884796143,40.9278411865 c 0,0 -2.61700439453,2.0938873291 -2.61700439453,2.0938873291 c 0,0 -41.1884460449,-40.9392852783 -41.1884460449,-40.9392852783 c 0,0 -34.6200408936,25.4699249268 -34.6200408936,25.4699249268 c 0,0 55.9664764404,69.742401123 55.9664764404,69.742401123 c 0,0 73.2448120117,-59.1047973633 73.2448120117,-59.1047973633 c 0,0 -55.9664916992,-69.7423400879 -55.9664916992,-69.7423400879 Z M 37.8337860107,-40.3974914551 c 0,0 -35.8077850342,31.5523681641 -35.8077850342,31.5523681641 c 0,0 40.9884796143,40.9278411865 40.9884796143,40.9278411865 c 0,0 -2.61700439453,2.0938873291 -2.61700439453,2.0938873291 c 0,0 -41.1884460449,-40.9392852783 -41.1884460449,-40.9392852783 c 0,0 -34.6200408936,25.4699249268 -34.6200408936,25.4699249268 c 0,0 55.9664764404,69.742401123 55.9664764404,69.742401123 c 0,0 73.2448120117,-59.1047973633 73.2448120117,-59.1047973633 c 0,0 -55.9664916992,-69.7423400879 -55.9664916992,-69.7423400879 Z M 37.8337860107,-40.3974914551 c 0,0 -35.8077850342,31.5523681641 -35.8077850342,31.5523681641 c 0,0 40.9884796143,40.9278411865 40.9884796143,40.9278411865 c 0,0 -2.61700439453,2.0938873291 -2.61700439453,2.0938873291 c 0,0 -41.1884460449,-40.9392852783 -41.1884460449,-40.9392852783 c 0,0 -34.6200408936,25.4699249268 -34.6200408936,25.4699249268 c 0,0 55.9664764404,69.742401123 55.9664764404,69.742401123 c 0,0 73.2448120117,-59.1047973633 73.2448120117,-59.1047973633 c 0,0 -55.9664916992,-69.7423400879 -55.9664916992,-69.7423400879 Z </string> +M 37.8337860107,-40.3974914551 c 0,0 -35.8077850342,31.5523681641 -35.8077850342,31.5523681641 c 0,0 40.9884796143,40.9278411865 40.9884796143,40.9278411865 c 0,0 -2.61700439453,2.0938873291 -2.61700439453,2.0938873291 c 0,0 -41.1884460449,-40.9392852783 -41.1884460449,-40.9392852783 c 0,0 -34.6200408936,25.4699249268 -34.6200408936,25.4699249268 c 0,0 55.9664764404,69.742401123 55.9664764404,69.742401123 c 0,0 73.2448120117,-59.1047973633 73.2448120117,-59.1047973633 c 0,0 -55.9664916992,-69.7423400879 -55.9664916992,-69.7423400879 Z M 37.8337860107,-40.3974914551 c 0,0 -35.8077850342,31.5523681641 -35.8077850342,31.5523681641 c 0,0 40.9884796143,40.9278411865 40.9884796143,40.9278411865 c 0,0 -2.61700439453,2.0938873291 -2.61700439453,2.0938873291 c 0,0 -41.1884460449,-40.9392852783 -41.1884460449,-40.9392852783 c 0,0 -34.6200408936,25.4699249268 -34.6200408936,25.4699249268 c 0,0 55.9664764404,69.742401123 55.9664764404,69.742401123 c 0,0 73.2448120117,-59.1047973633 73.2448120117,-59.1047973633 c 0,0 -55.9664916992,-69.7423400879 -55.9664916992,-69.7423400879 Z M 37.8337860107,-40.3974914551 c 0,0 -35.8077850342,31.5523681641 -35.8077850342,31.5523681641 c 0,0 40.9884796143,40.9278411865 40.9884796143,40.9278411865 c 0,0 -2.61700439453,2.0938873291 -2.61700439453,2.0938873291 c 0,0 -41.1884460449,-40.9392852783 -41.1884460449,-40.9392852783 c 0,0 -34.6200408936,25.4699249268 -34.6200408936,25.4699249268 c 0,0 55.9664764404,69.742401123 55.9664764404,69.742401123 c 0,0 73.2448120117,-59.1047973633 73.2448120117,-59.1047973633 c 0,0 -55.9664916992,-69.7423400879 -55.9664916992,-69.7423400879 Z M 37.8337860107,-40.3974914551 c 0,0 -35.8077850342,31.5523681641 -35.8077850342,31.5523681641 c 0,0 40.9884796143,40.9278411865 40.9884796143,40.9278411865 c 0,0 -2.61700439453,2.0938873291 -2.61700439453,2.0938873291 c 0,0 -41.1884460449,-40.9392852783 -41.1884460449,-40.9392852783 c 0,0 -34.6200408936,25.4699249268 -34.6200408936,25.4699249268 c 0,0 55.9664764404,69.742401123 55.9664764404,69.742401123 c 0,0 73.2448120117,-59.1047973633 73.2448120117,-59.1047973633 c 0,0 -55.9664916992,-69.7423400879 -55.9664916992,-69.7423400879 Z M 37.8337860107,-40.3974914551 c 0,0 -35.8077850342,31.5523681641 -35.8077850342,31.5523681641 c 0,0 40.9884796143,40.9278411865 40.9884796143,40.9278411865 c 0,0 -2.61700439453,2.0938873291 -2.61700439453,2.0938873291 c 0,0 -41.1884460449,-40.9392852783 -41.1884460449,-40.9392852783 c 0,0 -34.6200408936,25.4699249268 -34.6200408936,25.4699249268 c 0,0 55.9664764404,69.742401123 55.9664764404,69.742401123 c 0,0 73.2448120117,-59.1047973633 73.2448120117,-59.1047973633 c 0,0 -55.9664916992,-69.7423400879 -55.9664916992,-69.7423400879 Z M 37.8337860107,-40.3974914551 c 0,0 -35.8077850342,31.5523681641 -35.8077850342,31.5523681641 c 0,0 40.9884796143,40.9278411865 40.9884796143,40.9278411865 c 0,0 -2.61700439453,2.0938873291 -2.61700439453,2.0938873291 c 0,0 -41.1884460449,-40.9392852783 -41.1884460449,-40.9392852783 c 0,0 -34.6200408936,25.4699249268 -34.6200408936,25.4699249268 c 0,0 55.9664764404,69.742401123 55.9664764404,69.742401123 c 0,0 73.2448120117,-59.1047973633 73.2448120117,-59.1047973633 c 0,0 -55.9664916992,-69.7423400879 -55.9664916992,-69.7423400879 Z M 37.8337860107,-40.3974914551 c 0,0 -35.8077850342,31.5523681641 -35.8077850342,31.5523681641 c 0,0 40.9884796143,40.9278411865 40.9884796143,40.9278411865 c 0,0 -2.61700439453,2.0938873291 -2.61700439453,2.0938873291 c 0,0 -41.1884460449,-40.9392852783 -41.1884460449,-40.9392852783 c 0,0 -34.6200408936,25.4699249268 -34.6200408936,25.4699249268 c 0,0 55.9664764404,69.742401123 55.9664764404,69.742401123 c 0,0 73.2448120117,-59.1047973633 73.2448120117,-59.1047973633 c 0,0 -55.9664916992,-69.7423400879 -55.9664916992,-69.7423400879 Z </string> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/interpolator/my_interpolator.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <pathInterpolator xmlns:android="http://schemas.android.com/apk/res/android" android:pathData=""/> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/VectorPathDetectorTest.java) diff --git a/docs/checks/VectorRaster.md.html b/docs/checks/VectorRaster.md.html index 68543021..7f6ed3e6 100644 --- a/docs/checks/VectorRaster.md.html +++ b/docs/checks/VectorRaster.md.html @@ -80,7 +80,7 @@ generated icon to make sure it looks acceptable [VectorRaster] android:trimPathStart="0" /> --------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -114,7 +114,7 @@ </group> </vector> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `build.gradle`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~groovy linenumbers @@ -123,7 +123,7 @@ classpath 'com.android.tools.build:gradle:1.4.0-alpha2' } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/VectorDetectorTest.java) diff --git a/docs/checks/ViewBindingType.md.html b/docs/checks/ViewBindingType.md.html index cf64fa9e..e2c65c22 100644 --- a/docs/checks/ViewBindingType.md.html +++ b/docs/checks/ViewBindingType.md.html @@ -54,7 +54,7 @@ android.view.SurfaceView, android.widget.TextView [ViewBindingType] <EditText android:id="@+id/inconsistent" tools:viewBindingType="TextView" /> ---------------------------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -66,7 +66,7 @@ tools:keep="@layout/db"> <EditText android:id="@+id/test_view" tools:viewBindingType="TextView" /> </layout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout/vb.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -78,7 +78,7 @@ <include android:id="@+id/included" layout="@layout/included" tools:viewBindingType="TextView" /> <EditText android:id="@+id/inconsistent" tools:viewBindingType="TextView" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/layout-land/vb.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -88,7 +88,7 @@ tools:keep="@layout/vb"> <SurfaceView android:id="@+id/inconsistent" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ViewBindingTypeDetectorTest.kt) diff --git a/docs/checks/ViewConstructor.md.html b/docs/checks/ViewConstructor.md.html index bbe735dd..5343e573 100644 --- a/docs/checks/ViewConstructor.md.html +++ b/docs/checks/ViewConstructor.md.html @@ -51,7 +51,7 @@ or (Context,AttributeSet,int) [ViewConstructor] public class CustomView1 extends View { ----------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -66,7 +66,7 @@ super(null); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/bytecode/CustomView2.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -82,7 +82,7 @@ super(context, attrs, defStyle); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/bytecode/CustomView3.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -99,7 +99,7 @@ } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ViewConstructorDetectorTest.kt) diff --git a/docs/checks/ViewHolder.md.html b/docs/checks/ViewHolder.md.html index 73409ad1..f28eea54 100644 --- a/docs/checks/ViewHolder.md.html +++ b/docs/checks/ViewHolder.md.html @@ -48,7 +48,7 @@ smoother scrolling [ViewHolder] convertView = mInflater.inflate(R.layout.your_layout, null); --------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -222,7 +222,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ViewHolderDetectorTest.kt) diff --git a/docs/checks/ViewModelConstructorInComposable.md.html b/docs/checks/ViewModelConstructorInComposable.md.html index 5ba2286f..4224fd81 100644 --- a/docs/checks/ViewModelConstructorInComposable.md.html +++ b/docs/checks/ViewModelConstructorInComposable.md.html @@ -27,13 +27,15 @@ Artifact : [androidx.lifecycle:lifecycle-viewmodel-compose-android](androidx_lifecycle_lifecycle-viewmodel-compose-android.md.html) Since -: 2.9.0-alpha01 +: 2.9.0 Affects : Kotlin and Java files and test sources Editing : This check runs on the fly in the IDE editor Implementation : [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/lifecycle/lifecycle-viewmodel-compose-lint/src/main/java/androidx/lifecycle/lint/ViewModelConstructorInComposableDetector.kt) +Tests +: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/lifecycle/lifecycle-viewmodel-compose-lint/src/test/java/androidx/lifecycle/viewmodel/compose/lint/ViewModelConstructorInComposableTest.kt) Copyright Year : 2024 @@ -41,6 +43,48 @@ functions. Instead you should use the lifecycle viewmodel extensionfunctions e.g. viewModel() +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/com/example/MyViewModel.kt:10:Error: Constructing a view model in a +composable [ViewModelConstructorInComposable] + val viewModel = MyViewModel() + ----------- +src/com/example/MyViewModel.kt:12:Error: Constructing a view model in a +composable [ViewModelConstructorInComposable] + val vm = MyViewModel() + ----------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/com/example/MyViewModel.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package com.example + +import androidx.compose.runtime.* +import androidx.lifecycle.ViewModel + +class MyViewModel: ViewModel() +@Composable +fun Test() { + val viewModel = MyViewModel() + val composableLambda = @Composable { + val vm = MyViewModel() + } +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/lifecycle/lifecycle-viewmodel-compose-lint/src/test/java/androidx/lifecycle/viewmodel/compose/lint/ViewModelConstructorInComposableTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `ViewModelConstructorInComposableDetector.constructInComposableShouldFail`. +To report a problem with this extracted sample, visit +https://issuetracker.google.com/issues/new?component=413132. + (##) Including !!! @@ -49,17 +93,17 @@ ``` // build.gradle.kts -implementation("androidx.lifecycle:lifecycle-viewmodel-compose-android:2.9.0-rc01") +implementation("androidx.lifecycle:lifecycle-viewmodel-compose-android:2.11.0-alpha01") // build.gradle -implementation 'androidx.lifecycle:lifecycle-viewmodel-compose-android:2.9.0-rc01' +implementation 'androidx.lifecycle:lifecycle-viewmodel-compose-android:2.11.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.lifecycle.viewmodel.compose.android) # libs.versions.toml [versions] -lifecycle-viewmodel-compose-android = "2.9.0-rc01" +lifecycle-viewmodel-compose-android = "2.11.0-alpha01" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -71,7 +115,7 @@ } ``` -2.9.0-rc01 is the version this documentation was generated from; +2.11.0-alpha01 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.lifecycle:lifecycle-viewmodel-compose-android](androidx_lifecycle_lifecycle-viewmodel-compose-android.md.html). diff --git a/docs/checks/VisibleForTests.md.html b/docs/checks/VisibleForTests.md.html index 9b3c8b13..ebcfd6f5 100644 --- a/docs/checks/VisibleForTests.md.html +++ b/docs/checks/VisibleForTests.md.html @@ -58,7 +58,7 @@ within private scope [VisibleForTests] ProductionCode().initialize() // Not allowed; this method is intended to be private ---------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -75,7 +75,7 @@ fun initialize() { } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/Code.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -84,10 +84,10 @@ ProductionCode().initialize() // Not allowed; this method is intended to be private } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/RestrictToDetectorTest.kt) +You can also visit the source code ([RestrictToDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/RestrictToDetectorTest.kt) +[MainTest.java](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/MainTest.java) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/VpnServicePolicy.md.html b/docs/checks/VpnServicePolicy.md.html new file mode 100644 index 00000000..cb409b87 --- /dev/null +++ b/docs/checks/VpnServicePolicy.md.html @@ -0,0 +1,221 @@ + +(#) VPN Service Insights + +!!! WARNING: VPN Service Insights + This is a warning. + +Id +: `VpnServicePolicy` +Summary +: VPN Service Insights +Severity +: Warning +Category +: Play Policy +Platform +: Android +Vendor +: Play policy insights beta +Min +: Lint 8.2 to 8.6 +Compiled +: Lint 8.7+ +Artifact +: [com.google.play.policy.insights:insights-lint](com_google_play_policy_insights_insights-lint.md.html) +Since +: 0.1.3 +Affects +: Kotlin and Java files and manifest files +Editing +: This check runs on the fly in the IDE editor + +The `VpnService` base class allows developers to create secure VPN +solutions. Google Play permits its use only for apps with core VPN +functionality or those requiring a remote server for essential features +such as parental control, app usage tracking, device security, network +tools, web browsers, or carrier services. It is paramount that +`VpnService` is never used to collect personal or sensitive user data +without prominent disclosure and explicit consent. Furthermore, +redirecting or manipulating user traffic from other apps for +monetization is strictly prohibited. All apps using `VpnService` must +clearly document this in their Google Play listing and encrypt all data +from the device to the VPN tunnel endpoint. + +**Dos:** + +- Document use of the `VpnService` clearly in the Google Play listing. +- Must encrypt the data from the device to the VPN tunnel end point. +- Ensure your app's core functionality aligns with VPN use or permitted + exceptions. +- Provide prominent in-app disclosure and obtain explicit consent for + any sensitive data collection. + +**Don'ts:** + +- Use `VpnService` for purposes other than core VPN or specified + exceptions. +- Collect personal and sensitive user data without prominent disclosure + and consent. +- Redirect or manipulate user traffic from other apps on a device for + monetization purposes (for example, redirecting ads traffic through + a country different than that of the user). + +**Helpful Links:** + +See Policy page: https://goo.gle/play-policy-vpn +See developer guidance: https://goo.gle/dac-vpn +See Declaration form: https://goo.gle/play-permission-decl-form + +Always review the full policy in the Policy Center to ensure +compliance. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +AndroidManifest.xml:4:Warning: VpnService class enables apps with core +VPN functionality or those falling under specific exceptions to create +their own VPN solutions. [VpnServicePolicy] + android:permission="android.permission.BIND_VPN_SERVICE"> + -------------------------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`AndroidManifest.xml`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android"> + <service android:name=".MyVpnService" + android:permission="android.permission.BIND_VPN_SERVICE"> + <intent-filter> + <action android:name="android.net.VpnService"/> + </intent-filter> + </service> +</manifest> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](/policyinsights/src/test/java/com/google/play/policy/insights/VpnServicePolicyDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `VpnServicePolicyDetector.testFlagsServicesUsingBindVpnService`. +To report a problem with this extracted sample, contact +Play policy insights beta. + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("com.google.play.policy.insights:insights-lint:0.1.4") + +// build.gradle +implementation 'com.google.play.policy.insights:insights-lint:0.1.4' + +// build.gradle.kts with version catalogs: +implementation(libs.insights.lint) + +# libs.versions.toml +[versions] +insights-lint = "0.1.4" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +insights-lint = { + module = "com.google.play.policy.insights:insights-lint", + version.ref = "insights-lint" +} +``` + +0.1.4 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.google.play.policy.insights:insights-lint](com_google_play_policy_insights_insights-lint.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Adding the suppression attribute `tools:ignore="VpnServicePolicy"` + on the problematic XML element (or one of its enclosing elements). + You may also need to add the following namespace declaration on the + root element in the XML file if it's not already there: + `xmlns:tools="http://schemas.android.com/tools"`. + + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <manifest xmlns:tools="http://schemas.android.com/tools"> + ... + <service tools:ignore="VpnServicePolicy" .../> + ... + </manifest> + ``` + +* Using a suppression annotation like this on the enclosing + element: + + ```kt + // Kotlin + @Suppress("VpnServicePolicy") + fun method() { + problematicStatement() + } + ``` + + or + + ```java + // Java + @SuppressWarnings("VpnServicePolicy") + void method() { + problematicStatement(); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection VpnServicePolicy + problematicStatement() + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="VpnServicePolicy" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'VpnServicePolicy' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore VpnServicePolicy ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/VulnerableCordovaVersion.md.html b/docs/checks/VulnerableCordovaVersion.md.html index 58d443b3..679e35bc 100644 --- a/docs/checks/VulnerableCordovaVersion.md.html +++ b/docs/checks/VulnerableCordovaVersion.md.html @@ -43,7 +43,7 @@ assets/www/cordova.js:Warning: You are using a vulnerable version of Cordova: 3.7.1 [VulnerableCordovaVersion] 0 errors, 1 warnings -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -52,7 +52,7 @@ ;(function() { var CORDOVA_JS_BUILD_LABEL = '3.7.1-dev'; })(); -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/CordovaVersionDetectorTest.kt) diff --git a/docs/checks/VulnerableCryptoAlgorithm.md.html b/docs/checks/VulnerableCryptoAlgorithm.md.html index 75744a1b..fb14f865 100644 --- a/docs/checks/VulnerableCryptoAlgorithm.md.html +++ b/docs/checks/VulnerableCryptoAlgorithm.md.html @@ -27,7 +27,7 @@ Artifact : [com.android.security.lint:lint](com_android_security_lint_lint.md.html) Since -: 1.0.1 +: 1.0.0 Affects : Kotlin and Java files Editing @@ -57,7 +57,7 @@ [VulnerableCryptoAlgorithm] Cipher.getInstance(algo); ------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -73,7 +73,7 @@ Cipher.getInstance(algo); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/BadCryptographyUsageDetectorTest.kt) @@ -93,17 +93,17 @@ ``` // build.gradle.kts -lintChecks("com.android.security.lint:lint:1.0.3") +lintChecks("com.android.security.lint:lint:1.0.4") // build.gradle -lintChecks 'com.android.security.lint:lint:1.0.3' +lintChecks 'com.android.security.lint:lint:1.0.4' // build.gradle.kts with version catalogs: lintChecks(libs.com.android.security.lint.lint) # libs.versions.toml [versions] -com-android-security-lint-lint = "1.0.3" +com-android-security-lint-lint = "1.0.4" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -115,7 +115,7 @@ } ``` -1.0.3 is the version this documentation was generated from; +1.0.4 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.android.security.lint:lint](com_android_security_lint_lint.md.html). diff --git a/docs/checks/Wakelock.md.html b/docs/checks/Wakelock.md.html index e2ef967e..8660c401 100644 --- a/docs/checks/Wakelock.md.html +++ b/docs/checks/Wakelock.md.html @@ -53,7 +53,7 @@ always called) [Wakelock] lock.release(); // Should be in finally block ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -78,10 +78,10 @@ System.out.println("test"); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WakelockDetectorTest.kt) +You can also visit the source code ([WakelockDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WakelockDetectorTest.kt) +[SuppressibleTestModeTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/infrastructure/SuppressibleTestModeTest.kt) for the unit tests for this check to see additional scenarios. (##) Suppressing diff --git a/docs/checks/WakelockTimeout.md.html b/docs/checks/WakelockTimeout.md.html index 06f9ea6a..020aa03e 100644 --- a/docs/checks/WakelockTimeout.md.html +++ b/docs/checks/WakelockTimeout.md.html @@ -49,7 +49,7 @@ you intend, and will save your user's battery. [WakelockTimeout] wakeLock.acquire(); // ERROR ------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -76,7 +76,7 @@ return wakeLock; } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WakelockDetectorTest.kt) diff --git a/docs/checks/WatchFaceEditor.md.html b/docs/checks/WatchFaceEditor.md.html index b5bc3825..07253c83 100644 --- a/docs/checks/WatchFaceEditor.md.html +++ b/docs/checks/WatchFaceEditor.md.html @@ -45,7 +45,7 @@ launchMode="standard" [WatchFaceEditor] android:launchMode="singleTask"> ------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -64,7 +64,7 @@ </activity> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WatchFaceEditorDetectorTest.kt) diff --git a/docs/checks/WatchFaceForAndroidX.md.html b/docs/checks/WatchFaceForAndroidX.md.html index afbef8b9..603191f2 100644 --- a/docs/checks/WatchFaceForAndroidX.md.html +++ b/docs/checks/WatchFaceForAndroidX.md.html @@ -48,7 +48,7 @@ [WatchFaceForAndroidX] android:value="androidx.wear.watchface.editor.action.SOME_OTHER_EDITOR" ------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -59,7 +59,7 @@ dependencies { implementation "androidx.wear.watchface:watchface:1.2.3" } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/main/AndroidManifest.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -71,7 +71,7 @@ android:value="androidx.wear.watchface.editor.action.SOME_OTHER_EDITOR" /> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WatchFaceForAndroidXDetectorTest.kt) diff --git a/docs/checks/WatchFaceFormatDeclaresHasNoCode.md.html b/docs/checks/WatchFaceFormatDeclaresHasNoCode.md.html index c35320b3..aaa45716 100644 --- a/docs/checks/WatchFaceFormatDeclaresHasNoCode.md.html +++ b/docs/checks/WatchFaceFormatDeclaresHasNoCode.md.html @@ -19,7 +19,7 @@ Feedback : https://issuetracker.google.com/issues/new?component=192708 Since -: 8.11.0-alpha06 (April 2025) +: 8.11.0 (June 2025) Affects : Manifest files Editing diff --git a/docs/checks/WatchFaceFormatInvalidVersion.md.html b/docs/checks/WatchFaceFormatInvalidVersion.md.html new file mode 100644 index 00000000..d55cb43a --- /dev/null +++ b/docs/checks/WatchFaceFormatInvalidVersion.md.html @@ -0,0 +1,90 @@ + +(#) The Watch Face Format version is invalid + +!!! ERROR: The Watch Face Format version is invalid + This is an error. + +Id +: `WatchFaceFormatInvalidVersion` +Summary +: The Watch Face Format version is invalid +Severity +: Error +Category +: Correctness +Platform +: Android +Vendor +: Android Open Source Project +Feedback +: https://issuetracker.google.com/issues/new?component=192708 +Since +: 8.12.0 (July 2025) +Affects +: Manifest files +Editing +: This check runs on the fly in the IDE editor +See +: https://developer.android.com/training/wearables/wff/features +Implementation +: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/WatchFaceFormatVersionDetector.kt) +Tests +: [Source Code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WatchFaceFormatVersionDetectorTest.kt) + +The Watch Face Format version must be an integer literal or a +placeholder and cannot reference a resource. + +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Adding the suppression attribute + `tools:ignore="WatchFaceFormatInvalidVersion"` on the problematic + XML element (or one of its enclosing elements). You may also need to + add the following namespace declaration on the root element in the + XML file if it's not already there: + `xmlns:tools="http://schemas.android.com/tools"`. + + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <manifest xmlns:tools="http://schemas.android.com/tools"> + ... + <property tools:ignore="WatchFaceFormatInvalidVersion" .../> + ... + </manifest> + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="WatchFaceFormatInvalidVersion" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'WatchFaceFormatInvalidVersion' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore WatchFaceFormatInvalidVersion ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/WatchFaceFormatMissingVersion.md.html b/docs/checks/WatchFaceFormatMissingVersion.md.html index a2db98f5..22ba9f32 100644 --- a/docs/checks/WatchFaceFormatMissingVersion.md.html +++ b/docs/checks/WatchFaceFormatMissingVersion.md.html @@ -19,7 +19,7 @@ Feedback : https://issuetracker.google.com/issues/new?component=192708 Since -: 8.11.0-alpha07 (April 2025) +: 8.11.0 (June 2025) Affects : Manifest files Editing diff --git a/docs/checks/WeakPrng.md.html b/docs/checks/WeakPrng.md.html index 159827c8..94f13265 100644 --- a/docs/checks/WeakPrng.md.html +++ b/docs/checks/WeakPrng.md.html @@ -27,7 +27,7 @@ Artifact : [com.android.security.lint:lint](com_android_security_lint_lint.md.html) Since -: 1.0.1 +: 1.0.0 Affects : Kotlin and Java files Editing @@ -59,7 +59,7 @@ [WeakPrng] int random = Math.random() * 100; ------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -74,7 +74,7 @@ int random = Math.random() * 100; } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/WeakPrngDetectorTest.kt) @@ -94,17 +94,17 @@ ``` // build.gradle.kts -lintChecks("com.android.security.lint:lint:1.0.3") +lintChecks("com.android.security.lint:lint:1.0.4") // build.gradle -lintChecks 'com.android.security.lint:lint:1.0.3' +lintChecks 'com.android.security.lint:lint:1.0.4' // build.gradle.kts with version catalogs: lintChecks(libs.com.android.security.lint.lint) # libs.versions.toml [versions] -com-android-security-lint-lint = "1.0.3" +com-android-security-lint-lint = "1.0.4" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -116,7 +116,7 @@ } ``` -1.0.3 is the version this documentation was generated from; +1.0.4 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.android.security.lint:lint](com_android_security_lint_lint.md.html). diff --git a/docs/checks/WearBackNavigation.md.html b/docs/checks/WearBackNavigation.md.html index 88da6b85..2976bef4 100644 --- a/docs/checks/WearBackNavigation.md.html +++ b/docs/checks/WearBackNavigation.md.html @@ -48,7 +48,7 @@ generally not recommended for Wear applications [WearBackNavigation] <item name="android:windowSwipeToDismiss">false</item> ------------------------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -66,7 +66,7 @@ android:theme="@style/AppTheme" /> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values/styles.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -83,7 +83,7 @@ </style> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WearBackNavigationDetectorTest.kt) diff --git a/docs/checks/WearMaterialTheme.md.html b/docs/checks/WearMaterialTheme.md.html index 27510f44..ca44bd4c 100644 --- a/docs/checks/WearMaterialTheme.md.html +++ b/docs/checks/WearMaterialTheme.md.html @@ -42,7 +42,7 @@ [WearMaterialTheme] import androidx.compose.material.MaterialTheme; // ERROR -------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -55,7 +55,7 @@ public class BadImport { } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WearMaterialThemeDetectorTest.kt) diff --git a/docs/checks/WearPasswordInput.md.html b/docs/checks/WearPasswordInput.md.html index ced65bf0..d452691d 100644 --- a/docs/checks/WearPasswordInput.md.html +++ b/docs/checks/WearPasswordInput.md.html @@ -42,7 +42,7 @@ [WearPasswordInput] android:inputType="textPassword" -------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -60,7 +60,7 @@ android:inputType="textPassword" tools:ignore="LabelFor" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/AndroidManifest.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -72,7 +72,7 @@ <uses-feature android:name="android.hardware.type.watch" /> <application android:icon="@drawable/icon" android:label="@string/app_name" /> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WearPasswordInputDetectorTest.kt) diff --git a/docs/checks/WearRecents.md.html b/docs/checks/WearRecents.md.html index 1b150af1..a5d9f681 100644 --- a/docs/checks/WearRecents.md.html +++ b/docs/checks/WearRecents.md.html @@ -45,7 +45,7 @@ make them appear correctly in recents [WearRecents] <activity android:name=".MainActivity" /> ----------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -61,7 +61,7 @@ <activity android:name=".MainActivity" /> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WearRecentsDetectorTest.kt) diff --git a/docs/checks/WearSplashScreen.md.html b/docs/checks/WearSplashScreen.md.html index 72aa1bac..0efda667 100644 --- a/docs/checks/WearSplashScreen.md.html +++ b/docs/checks/WearSplashScreen.md.html @@ -46,12 +46,12 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -AndroidManifest.xml:16:Warning: Applications using splash screens are +AndroidManifest.xml:17:Warning: Applications using splash screens are strongly recommended to use the 'androidx.core:core-splashscreen' library [WearSplashScreen] <activity android:name=".SplashActivity" ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -66,14 +66,16 @@ android:icon="@mipmap/ic_launcher" android:label="@string/app_name"> <activity android:name=".MainActivity" - android:theme="@style/AppTheme"> + android:theme="@style/AppTheme" + android:exported="true"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name=".SplashActivity" - android:theme="@style/AppTheme"> + android:theme="@style/AppTheme" + android:exported="true"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> @@ -81,7 +83,7 @@ </activity> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WearSplashScreenDetectorTest.kt) diff --git a/docs/checks/WearStandaloneAppFlag.md.html b/docs/checks/WearStandaloneAppFlag.md.html index fcf8e956..19b1bf0c 100644 --- a/docs/checks/WearStandaloneAppFlag.md.html +++ b/docs/checks/WearStandaloneAppFlag.md.html @@ -52,7 +52,7 @@ [WearStandaloneAppFlag] <application> ----------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -66,7 +66,7 @@ <!-- Missing meta-data element --> </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WearStandaloneAppDetectorTest.java) diff --git a/docs/checks/WearableActionDuplicate.md.html b/docs/checks/WearableActionDuplicate.md.html index 0e606e57..70473a53 100644 --- a/docs/checks/WearableActionDuplicate.md.html +++ b/docs/checks/WearableActionDuplicate.md.html @@ -46,7 +46,7 @@ configuration activities found [WearableActionDuplicate] <action android:name="androidx.wear.watchface.editor.action.WATCH_FACE_EDITOR" /> --------------------------------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -57,7 +57,7 @@ dependencies { implementation "androidx.wear.watchface:watchface:1.2.3" } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/main/AndroidManifest.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -125,7 +125,7 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WearableConfigurationActionDetectorTest.kt) diff --git a/docs/checks/WearableBindListener.md.html b/docs/checks/WearableBindListener.md.html index ce01c0ac..85f2480c 100644 --- a/docs/checks/WearableBindListener.md.html +++ b/docs/checks/WearableBindListener.md.html @@ -49,7 +49,7 @@ [WearableBindListener] <action android:name="com.google.android.gms.wearable.BIND_LISTENER" /> ------------------------------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -70,7 +70,7 @@ </application> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `build.gradle`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~groovy linenumbers @@ -79,7 +79,7 @@ dependencies { compile 'com.google.android.gms:play-services-wearable:8.4.0' } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ManifestDetectorTest.kt) diff --git a/docs/checks/WearableConfigurationAction.md.html b/docs/checks/WearableConfigurationAction.md.html index 0f205518..ee9f552e 100644 --- a/docs/checks/WearableConfigurationAction.md.html +++ b/docs/checks/WearableConfigurationAction.md.html @@ -46,7 +46,7 @@ required [WearableConfigurationAction] <action android:name="androidx.wear.watchface.editor.action.WATCH_FACE_EDITOR" /> --------------------------------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -57,7 +57,7 @@ dependencies { implementation "androidx.wear.watchface:watchface:1.2.3" } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/main/AndroidManifest.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers @@ -87,7 +87,7 @@ </service> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WearableConfigurationActionDetectorTest.kt) diff --git a/docs/checks/WebViewApiAvailability.md.html b/docs/checks/WebViewApiAvailability.md.html index 758a9ca8..4311fba1 100644 --- a/docs/checks/WebViewApiAvailability.md.html +++ b/docs/checks/WebViewApiAvailability.md.html @@ -84,7 +84,7 @@ [WebViewApiAvailability] WebView.startSafeBrowsing(this, null); ------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -115,7 +115,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WebViewApiAvailabilityDetectorTest.kt) diff --git a/docs/checks/WebViewClientOnReceivedSslError.md.html b/docs/checks/WebViewClientOnReceivedSslError.md.html index 0343adc4..e2662fef 100644 --- a/docs/checks/WebViewClientOnReceivedSslError.md.html +++ b/docs/checks/WebViewClientOnReceivedSslError.md.html @@ -45,7 +45,7 @@ [WebViewClientOnReceivedSslError] handler.proceed(); ----------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -82,7 +82,7 @@ private void proceed() {} } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WebViewClientDetectorTest.kt) diff --git a/docs/checks/WebViewLayout.md.html b/docs/checks/WebViewLayout.md.html index eea67340..11744b12 100644 --- a/docs/checks/WebViewLayout.md.html +++ b/docs/checks/WebViewLayout.md.html @@ -44,7 +44,7 @@ match_parent instead [WebViewLayout] <WebView ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -79,7 +79,7 @@ </LinearLayout> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WebViewDetectorTest.kt) diff --git a/docs/checks/WebpUnsupported.md.html b/docs/checks/WebpUnsupported.md.html index 7e42737f..69d1b7c5 100644 --- a/docs/checks/WebpUnsupported.md.html +++ b/docs/checks/WebpUnsupported.md.html @@ -43,7 +43,7 @@ res/drawable-mdpi/my_lossy.webp:Error: WebP requires Android 4.0 (API 15); current minSdkVersion is 10 [WebpUnsupported] 4 errors, 0 warnings -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant test files: diff --git a/docs/checks/WeekBasedYear.md.html b/docs/checks/WeekBasedYear.md.html index d64a4d8f..7f3fe9b5 100644 --- a/docs/checks/WeekBasedYear.md.html +++ b/docs/checks/WeekBasedYear.md.html @@ -74,7 +74,7 @@ YY is the week-era-year; did you mean 'y'? [WeekBasedYear] val s7 = DateTimeFormatter.ofPattern("""dd-YY-MM""") // ERROR -- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -120,7 +120,7 @@ val s7 = DateTimeFormatter.ofPattern("YYYY-WW-FF") // OK No days or months } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/DateFormatDetectorTest.kt) diff --git a/docs/checks/WifiManagerLeak.md.html b/docs/checks/WifiManagerLeak.md.html index 2192b370..126be7da 100644 --- a/docs/checks/WifiManagerLeak.md.html +++ b/docs/checks/WifiManagerLeak.md.html @@ -101,7 +101,7 @@ getContext().getApplicationContext() [WifiManagerLeak] getContext().getSystemService(Context.WIFI_SERVICE); // ERROR: View context --------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -186,7 +186,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ServiceCastDetectorTest.kt) diff --git a/docs/checks/WifiManagerPotentialLeak.md.html b/docs/checks/WifiManagerPotentialLeak.md.html index 9690c3d7..fce967db 100644 --- a/docs/checks/WifiManagerPotentialLeak.md.html +++ b/docs/checks/WifiManagerPotentialLeak.md.html @@ -65,7 +65,7 @@ [WifiManagerPotentialLeak] ctx.getSystemService(Context.WIFI_SERVICE); // UNKNOWN (though likely) ------------------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -150,7 +150,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ServiceCastDetectorTest.kt) diff --git a/docs/checks/WithPluginClasspathUsage.md.html b/docs/checks/WithPluginClasspathUsage.md.html index a72bf379..55f82665 100644 --- a/docs/checks/WithPluginClasspathUsage.md.html +++ b/docs/checks/WithPluginClasspathUsage.md.html @@ -51,17 +51,17 @@ ``` // build.gradle.kts -implementation("androidx.lint:lint-gradle:1.0.0-alpha04") +implementation("androidx.lint:lint-gradle:1.0.0-alpha05") // build.gradle -implementation 'androidx.lint:lint-gradle:1.0.0-alpha04' +implementation 'androidx.lint:lint-gradle:1.0.0-alpha05' // build.gradle.kts with version catalogs: implementation(libs.lint.gradle) # libs.versions.toml [versions] -lint-gradle = "1.0.0-alpha04" +lint-gradle = "1.0.0-alpha05" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -73,7 +73,7 @@ } ``` -1.0.0-alpha04 is the version this documentation was generated from; +1.0.0-alpha05 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.lint:lint-gradle](androidx_lint_lint-gradle.md.html). diff --git a/docs/checks/WithTypeWithoutConfigureEach.md.html b/docs/checks/WithTypeWithoutConfigureEach.md.html index f6fe7f2b..8bcc0667 100644 --- a/docs/checks/WithTypeWithoutConfigureEach.md.html +++ b/docs/checks/WithTypeWithoutConfigureEach.md.html @@ -50,17 +50,17 @@ ``` // build.gradle.kts -implementation("androidx.lint:lint-gradle:1.0.0-alpha04") +implementation("androidx.lint:lint-gradle:1.0.0-alpha05") // build.gradle -implementation 'androidx.lint:lint-gradle:1.0.0-alpha04' +implementation 'androidx.lint:lint-gradle:1.0.0-alpha05' // build.gradle.kts with version catalogs: implementation(libs.lint.gradle) # libs.versions.toml [versions] -lint-gradle = "1.0.0-alpha04" +lint-gradle = "1.0.0-alpha05" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -72,7 +72,7 @@ } ``` -1.0.0-alpha04 is the version this documentation was generated from; +1.0.0-alpha05 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.lint:lint-gradle](androidx_lint_lint-gradle.md.html). diff --git a/docs/checks/WorkerHasAPublicModifier.md.html b/docs/checks/WorkerHasAPublicModifier.md.html index 399ee0c4..6238b3c7 100644 --- a/docs/checks/WorkerHasAPublicModifier.md.html +++ b/docs/checks/WorkerHasAPublicModifier.md.html @@ -53,7 +53,7 @@ [WorkerHasAPublicModifier] private class Worker: ListenableWorker() ------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -64,7 +64,7 @@ import androidx.work.ListenableWorker private class Worker: ListenableWorker() -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/work/work-lint/src/test/java/androidx/work/lint/WorkerHasPublicModifierDetectorTest.kt) @@ -83,17 +83,17 @@ ``` // build.gradle.kts -implementation("androidx.work:work-runtime:2.10.1") +implementation("androidx.work:work-runtime:2.11.1") // build.gradle -implementation 'androidx.work:work-runtime:2.10.1' +implementation 'androidx.work:work-runtime:2.11.1' // build.gradle.kts with version catalogs: implementation(libs.work.runtime) # libs.versions.toml [versions] -work-runtime = "2.10.1" +work-runtime = "2.11.1" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -105,7 +105,7 @@ } ``` -2.10.1 is the version this documentation was generated from; +2.11.1 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.work:work-runtime](androidx_work_work-runtime.md.html). diff --git a/docs/checks/WorldReadableFiles.md.html b/docs/checks/WorldReadableFiles.md.html index 17dc847d..b68aed2b 100644 --- a/docs/checks/WorldReadableFiles.md.html +++ b/docs/checks/WorldReadableFiles.md.html @@ -56,7 +56,7 @@ [WorldReadableFiles] dir = getDir(mFile.getName(), MODE_WORLD_READABLE); ------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -120,7 +120,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/SecurityDetectorTest.java) diff --git a/docs/checks/WorldWriteableFiles.md.html b/docs/checks/WorldWriteableFiles.md.html index 19562297..9c3c75cc 100644 --- a/docs/checks/WorldWriteableFiles.md.html +++ b/docs/checks/WorldWriteableFiles.md.html @@ -57,7 +57,7 @@ [WorldWriteableFiles] dir = getDir(mFile.getName(), MODE_WORLD_WRITEABLE); -------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -121,7 +121,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/SecurityDetectorTest.java) diff --git a/docs/checks/WrongAnnotationOrder.md.html b/docs/checks/WrongAnnotationOrder.md.html index 752d96ca..06abfe83 100644 --- a/docs/checks/WrongAnnotationOrder.md.html +++ b/docs/checks/WrongAnnotationOrder.md.html @@ -49,7 +49,7 @@ @Override @Test [WrongAnnotationOrder] @Test @Override int something; --------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -62,10 +62,10 @@ @Test @Override int something; } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/AnnotationOrderDetectorTest.kt) +You can also visit the source code ([AnnotationOrderDetectorTest.kt](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/AnnotationOrderDetectorTest.kt) +[SuppressibleTestModeTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/infrastructure/SuppressibleTestModeTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/WrongCall.md.html b/docs/checks/WrongCall.md.html index 6e7abd09..9f202a82 100644 --- a/docs/checks/WrongCall.md.html +++ b/docs/checks/WrongCall.md.html @@ -65,7 +65,7 @@ probably call "draw" rather than "onDraw" [WrongCall] child.onDraw(canvas); // Not OK ------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -150,7 +150,7 @@ android:text="Button" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/LayoutTest.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -220,7 +220,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WrongCallDetectorTest.java) diff --git a/docs/checks/WrongCase.md.html b/docs/checks/WrongCase.md.html index 7b97176e..8331e113 100644 --- a/docs/checks/WrongCase.md.html +++ b/docs/checks/WrongCase.md.html @@ -63,7 +63,7 @@ [WrongCase] <RequestFocus /> ------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -76,7 +76,7 @@ <RequestFocus /> </Merge> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WrongCaseDetectorTest.kt) diff --git a/docs/checks/WrongCommentType.md.html b/docs/checks/WrongCommentType.md.html index 9269057e..adea4a9c 100644 --- a/docs/checks/WrongCommentType.md.html +++ b/docs/checks/WrongCommentType.md.html @@ -59,7 +59,7 @@ to be a javadoc comment [WrongCommentType] /* @since 1.5 */ String text; ---------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -74,14 +74,14 @@ /* Ok, no tags */ open fun someMethod2(arg: Int) { } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/Test.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers public class Test { /* @since 1.5 */ String text; } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WrongCommentTypeDetectorTest.kt) diff --git a/docs/checks/WrongConstant.md.html b/docs/checks/WrongConstant.md.html index 45621a6b..867f9df4 100644 --- a/docs/checks/WrongConstant.md.html +++ b/docs/checks/WrongConstant.md.html @@ -48,7 +48,7 @@ DetailInfoTabKt.CONST_2, DetailInfoTabKt.CONST_3 [WrongConstant] test(UNRELATED) // ERROR - not part of the @DetailsInfoTab list --------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -82,10 +82,11 @@ test(CONST_1) // OK test(UNRELATED) // ERROR - not part of the @DetailsInfoTab list } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/TypedefDetectorTest.kt) +You can also visit the source code ([TypedefDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/TypedefDetectorTest.kt) +[RangeDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/RangeDetectorTest.kt) +[LintIssueDocGeneratorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/LintIssueDocGeneratorTest.kt) for the unit tests for this check to see additional scenarios. (##) Suppressing diff --git a/docs/checks/WrongConstraintLayoutUsage.md.html b/docs/checks/WrongConstraintLayoutUsage.md.html index 3bc050f5..8d2a13d9 100644 --- a/docs/checks/WrongConstraintLayoutUsage.md.html +++ b/docs/checks/WrongConstraintLayoutUsage.md.html @@ -49,7 +49,7 @@ [WrongConstraintLayoutUsage] app:layout_constraintLeft_toLeftOf="parent"/> ---------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -61,7 +61,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" app:layout_constraintLeft_toLeftOf="parent"/> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/WrongConstraintLayoutUsageDetectorTest.kt) diff --git a/docs/checks/WrongDrawableName.md.html b/docs/checks/WrongDrawableName.md.html index b184d172..c4ace68f 100644 --- a/docs/checks/WrongDrawableName.md.html +++ b/docs/checks/WrongDrawableName.md.html @@ -50,14 +50,14 @@ ic_, img_, notification_icon_, ripple_, selector_, shape_, vector_ [WrongDrawableName] 0 errors, 1 warnings -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: `res/drawable/random.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <merge/> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/WrongDrawableNameDetectorTest.kt) diff --git a/docs/checks/WrongFolder.md.html b/docs/checks/WrongFolder.md.html index 0e88a7b2..b002d52f 100644 --- a/docs/checks/WrongFolder.md.html +++ b/docs/checks/WrongFolder.md.html @@ -47,7 +47,7 @@ folder, not a layout/ folder [WrongFolder] <resources> --------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -67,8 +67,7 @@ <!-- Wallpaper --> <string name="wallpaper_instructions">Tap picture to set portrait wallpaper</string> </resources> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WrongLocationDetectorTest.kt) diff --git a/docs/checks/WrongGlobalIconColor.md.html b/docs/checks/WrongGlobalIconColor.md.html index f4fc3cd1..897818b4 100644 --- a/docs/checks/WrongGlobalIconColor.md.html +++ b/docs/checks/WrongGlobalIconColor.md.html @@ -50,7 +50,7 @@ [WrongGlobalIconColor] android:fillColor="#FF0000" ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -66,7 +66,7 @@ android:fillType="evenOdd" android:pathData="M18.364,5.636C18.7545,6.0266 18.7545,6.6597 18.364,7.0503L13.4135,11.9993L18.364,16.9497C18.7545,17.3403 18.7545,17.9734 18.364,18.364C17.9734,18.7545 17.3403,18.7545 16.9497,18.364L11.9993,13.4135L7.0503,18.364C6.6597,18.7545 6.0266,18.7545 5.636,18.364C5.2455,17.9734 5.2455,17.3403 5.636,16.9497L10.5858,11.9986L5.636,7.0503C5.2455,6.6597 5.2455,6.0266 5.636,5.636C6.0266,5.2455 6.6597,5.2455 7.0503,5.636L12,10.5844L16.9497,5.636C17.3403,5.2455 17.9734,5.2455 18.364,5.636Z" /> </vector> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/WrongGlobalIconColorDetectorTest.kt) diff --git a/docs/checks/WrongGradleMethod.md.html b/docs/checks/WrongGradleMethod.md.html index 6257dfe3..7fe46ca0 100644 --- a/docs/checks/WrongGradleMethod.md.html +++ b/docs/checks/WrongGradleMethod.md.html @@ -87,7 +87,7 @@ this file! [WrongGradleMethod] firebaseAppDistribution { ----------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -114,7 +114,7 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WrongGradleMethodDetectorTest.kt) diff --git a/docs/checks/WrongLayoutName.md.html b/docs/checks/WrongLayoutName.md.html index 07cfe707..e79ec3d7 100644 --- a/docs/checks/WrongLayoutName.md.html +++ b/docs/checks/WrongLayoutName.md.html @@ -48,14 +48,14 @@ following prefixes: activity_, view_, fragment_, dialog_, bottom_sheet_, adapter_item_, divider_, space_, popup_window_ [WrongLayoutName] 0 errors, 1 warnings -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: `res/layout/random.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <merge/> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/WrongLayoutNameDetectorTest.kt) diff --git a/docs/checks/WrongManifestParent.md.html b/docs/checks/WrongManifestParent.md.html index 43e9a87b..382a86ad 100644 --- a/docs/checks/WrongManifestParent.md.html +++ b/docs/checks/WrongManifestParent.md.html @@ -97,7 +97,7 @@ child of the element [WrongManifestParent] <activity android:name=".HelloWorld" -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -130,10 +130,12 @@ android:label="@string/app_name" /> </manifest> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ManifestDetectorTest.kt) +You can also visit the source code ([ManifestDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ManifestDetectorTest.kt) +[ProjectInitializerTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/ProjectInitializerTest.kt) +[ConfigurationHierarchyTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/client/api/ConfigurationHierarchyTest.kt) +[LintDriverCrashTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/client/api/LintDriverCrashTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/WrongMenuIdFormat.md.html b/docs/checks/WrongMenuIdFormat.md.html index dbbcf496..d0b42876 100644 --- a/docs/checks/WrongMenuIdFormat.md.html +++ b/docs/checks/WrongMenuIdFormat.md.html @@ -49,7 +49,7 @@ [WrongMenuIdFormat] <item android:id="@+id/CamelCase"/> -------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -58,7 +58,7 @@ <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/CamelCase"/> </menu> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/WrongMenuIdFormatDetectorTest.kt) diff --git a/docs/checks/WrongNavigateRouteType.md.html b/docs/checks/WrongNavigateRouteType.md.html index ed11425e..420acc55 100644 --- a/docs/checks/WrongNavigateRouteType.md.html +++ b/docs/checks/WrongNavigateRouteType.md.html @@ -46,67 +46,115 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/com/example/test.kt:7:Error: The route should be a destination class +src/com/example/test.kt:8:Error: The route should be a destination class instance or destination object. [WrongNavigateRouteType] navController.navigate(route = TestClass) --------- -src/com/example/test.kt:8:Error: The route should be a destination class +src/com/example/test.kt:9:Error: The route should be a destination class instance or destination object. [WrongNavigateRouteType] navController.navigate(route = TestClass::class) ---------------- -src/com/example/test.kt:9:Error: The route should be a destination class -instance or destination object. [WrongNavigateRouteType] +src/com/example/test.kt:10:Error: The route should be a destination +class instance or destination object. [WrongNavigateRouteType] navController.navigate(route = TestClassWithArg) ---------------- -src/com/example/test.kt:10:Error: The route should be a destination +src/com/example/test.kt:11:Error: The route should be a destination class instance or destination object. [WrongNavigateRouteType] navController.navigate(route = TestClassWithArg::class) ----------------------- -src/com/example/test.kt:11:Error: The route should be a destination +src/com/example/test.kt:12:Error: The route should be a destination class instance or destination object. [WrongNavigateRouteType] navController.navigate(route = TestInterface) ------------- -src/com/example/test.kt:12:Error: The route should be a destination +src/com/example/test.kt:13:Error: The route should be a destination class instance or destination object. [WrongNavigateRouteType] navController.navigate(route = TestInterface::class) -------------------- -src/com/example/test.kt:13:Error: The route should be a destination +src/com/example/test.kt:14:Error: The route should be a destination class instance or destination object. [WrongNavigateRouteType] navController.navigate(route = InterfaceChildClass) ------------------- -src/com/example/test.kt:14:Error: The route should be a destination +src/com/example/test.kt:15:Error: The route should be a destination class instance or destination object. [WrongNavigateRouteType] navController.navigate(route = InterfaceChildClass::class) -------------------------- -src/com/example/test.kt:15:Error: The route should be a destination +src/com/example/test.kt:16:Error: The route should be a destination class instance or destination object. [WrongNavigateRouteType] navController.navigate(route = TestAbstract) ------------ -src/com/example/test.kt:16:Error: The route should be a destination +src/com/example/test.kt:17:Error: The route should be a destination class instance or destination object. [WrongNavigateRouteType] navController.navigate(route = TestAbstract::class) ------------------- -src/com/example/test.kt:17:Error: The route should be a destination +src/com/example/test.kt:18:Error: The route should be a destination class instance or destination object. [WrongNavigateRouteType] navController.navigate(route = AbstractChildClass) ------------------ -src/com/example/test.kt:18:Error: The route should be a destination +src/com/example/test.kt:19:Error: The route should be a destination class instance or destination object. [WrongNavigateRouteType] navController.navigate(route = AbstractChildClass::class) ------------------------- -src/com/example/test.kt:19:Error: The route should be a destination +src/com/example/test.kt:20:Error: The route should be a destination class instance or destination object. [WrongNavigateRouteType] navController.navigate(route = InterfaceChildClass::class) -------------------------- -src/com/example/test.kt:20:Error: The route should be a destination +src/com/example/test.kt:21:Error: The route should be a destination class instance or destination object. [WrongNavigateRouteType] navController.navigate(route = Outer.InnerClass) ---------------- -src/com/example/test.kt:21:Error: The route should be a destination +src/com/example/test.kt:22:Error: The route should be a destination class instance or destination object. [WrongNavigateRouteType] navController.navigate(route = Outer.InnerClass::class) ----------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src/com/example/test.kt:25:Error: The route should be a destination +class instance or destination object. [WrongNavigateRouteType] + navController.navigate(route = TestClassComp) + ------------- +src/com/example/test.kt:26:Error: The route should be a destination +class instance or destination object. [WrongNavigateRouteType] + navController.navigate(route = TestClassComp::class) + -------------------- +src/com/example/test.kt:27:Error: The route should be a destination +class instance or destination object. [WrongNavigateRouteType] + navController.navigate(route = TestClassWithArgComp) + -------------------- +src/com/example/test.kt:28:Error: The route should be a destination +class instance or destination object. [WrongNavigateRouteType] + navController.navigate(route = TestClassWithArgComp::class) + --------------------------- +src/com/example/test.kt:29:Error: The route should be a destination +class instance or destination object. [WrongNavigateRouteType] + navController.navigate(route = OuterComp.InnerClassComp) + ------------------------ +src/com/example/test.kt:30:Error: The route should be a destination +class instance or destination object. [WrongNavigateRouteType] + navController.navigate(route = OuterComp.InnerClassComp::class) + ------------------------------- +src/com/example/test.kt:31:Error: The route should be a destination +class instance or destination object. [WrongNavigateRouteType] + navController.navigate(route = InterfaceChildClassComp) + ----------------------- +src/com/example/test.kt:32:Error: The route should be a destination +class instance or destination object. [WrongNavigateRouteType] + navController.navigate(route = InterfaceChildClassComp::class) + ------------------------------ +src/com/example/test.kt:33:Error: The route should be a destination +class instance or destination object. [WrongNavigateRouteType] + navController.navigate(route = AbstractChildClassComp) + ---------------------- +src/com/example/test.kt:34:Error: The route should be a destination +class instance or destination object. [WrongNavigateRouteType] + navController.navigate(route = AbstractChildClassComp::class) + ----------------------------- +src/com/example/test.kt:35:Error: The route should be a destination +class instance or destination object. [WrongNavigateRouteType] + navController.navigate(route = TestAbstractComp) + ---------------- +src/com/example/test.kt:36:Error: The route should be a destination +class instance or destination object. [WrongNavigateRouteType] + navController.navigate(route = TestAbstractComp::class) + ----------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -114,7 +162,8 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers package com.example -import androidx.navigation.* +import androidx.navigation.NavController +import androidx.test.* fun createGraph() { val navController = NavController() @@ -133,8 +182,22 @@ navController.navigate(route = InterfaceChildClass::class) navController.navigate(route = Outer.InnerClass) navController.navigate(route = Outer.InnerClass::class) + + //classes with companion object to simulate marked with @Serializable + navController.navigate(route = TestClassComp) + navController.navigate(route = TestClassComp::class) + navController.navigate(route = TestClassWithArgComp) + navController.navigate(route = TestClassWithArgComp::class) + navController.navigate(route = OuterComp.InnerClassComp) + navController.navigate(route = OuterComp.InnerClassComp::class) + navController.navigate(route = InterfaceChildClassComp) + navController.navigate(route = InterfaceChildClassComp::class) + navController.navigate(route = AbstractChildClassComp) + navController.navigate(route = AbstractChildClassComp::class) + navController.navigate(route = TestAbstractComp) + navController.navigate(route = TestAbstractComp::class) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/WrongNavigateRouteDetectorTest.kt) @@ -153,17 +216,17 @@ ``` // build.gradle.kts -implementation("androidx.navigation:navigation-runtime:2.9.0-rc01") +implementation("androidx.navigation:navigation-runtime:2.9.7") // build.gradle -implementation 'androidx.navigation:navigation-runtime:2.9.0-rc01' +implementation 'androidx.navigation:navigation-runtime:2.9.7' // build.gradle.kts with version catalogs: implementation(libs.navigation.runtime) # libs.versions.toml [versions] -navigation-runtime = "2.9.0-rc01" +navigation-runtime = "2.9.7" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -175,7 +238,7 @@ } ``` -2.9.0-rc01 is the version this documentation was generated from; +2.9.7 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.navigation:navigation-runtime](androidx_navigation_navigation-runtime.md.html). diff --git a/docs/checks/WrongRegion.md.html b/docs/checks/WrongRegion.md.html index 8cd32d18..0dab56f5 100644 --- a/docs/checks/WrongRegion.md.html +++ b/docs/checks/WrongRegion.md.html @@ -56,7 +56,7 @@ combination nb (Norwegian Bokmål) with SE (Sweden): language nb is usually paired with: NO (Norway), SJ (Svalbard & Jan Mayen) [WrongRegion] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -64,49 +64,49 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-no/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-nb-rNO/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-nb-rSJ/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-nb-rSE/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-sv-rSV/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-en-rXA/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `res/values-ff-rNO/strings.xml`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <resources> </resources> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/LocaleFolderDetectorTest.kt) diff --git a/docs/checks/WrongRequiresOptIn.md.html b/docs/checks/WrongRequiresOptIn.md.html index 25287a17..5669631b 100644 --- a/docs/checks/WrongRequiresOptIn.md.html +++ b/docs/checks/WrongRequiresOptIn.md.html @@ -53,17 +53,17 @@ ``` // build.gradle.kts -implementation("androidx.annotation:annotation-experimental:1.5.0-rc01") +implementation("androidx.annotation:annotation-experimental:1.6.0-rc01") // build.gradle -implementation 'androidx.annotation:annotation-experimental:1.5.0-rc01' +implementation 'androidx.annotation:annotation-experimental:1.6.0-rc01' // build.gradle.kts with version catalogs: implementation(libs.annotation.experimental) # libs.versions.toml [versions] -annotation-experimental = "1.5.0-rc01" +annotation-experimental = "1.6.0-rc01" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -75,7 +75,7 @@ } ``` -1.5.0-rc01 is the version this documentation was generated from; +1.6.0-rc01 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.annotation:annotation-experimental](androidx_annotation_annotation-experimental.md.html). diff --git a/docs/checks/WrongResourceImportAlias.md.html b/docs/checks/WrongResourceImportAlias.md.html index 9f7f69b2..21a1dcc3 100644 --- a/docs/checks/WrongResourceImportAlias.md.html +++ b/docs/checks/WrongResourceImportAlias.md.html @@ -67,7 +67,7 @@ <option name="import-aliases" value="some string" /> </issue> </lint> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (##) Example @@ -77,7 +77,7 @@ alias here [WrongResourceImportAlias] import slack.l10n.R as L10R --------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -88,7 +88,7 @@ import slack.l10n.R as L10R class MyClass -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/resources/WrongResourceImportAliasDetectorTest.kt) diff --git a/docs/checks/WrongSdkInt.md.html b/docs/checks/WrongSdkInt.md.html index 91aa34ff..80adb613 100644 --- a/docs/checks/WrongSdkInt.md.html +++ b/docs/checks/WrongSdkInt.md.html @@ -58,7 +58,7 @@ SDK_INT_FULL, not SDK_INT [WrongSdkInt] if (SDK_INT_FULL > Build.VERSION_CODES.VANILLA_ICE_CREAM) { // ERROR 2 ---------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -83,7 +83,7 @@ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.CUR_DEVELOPMENT) { // OK 3 } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ApiDetectorTest.java) diff --git a/docs/checks/WrongStartDestinationType-2.md.html b/docs/checks/WrongStartDestinationType-2.md.html index c87bd2b6..3282cda3 100644 --- a/docs/checks/WrongStartDestinationType-2.md.html +++ b/docs/checks/WrongStartDestinationType-2.md.html @@ -150,7 +150,7 @@ [WrongStartDestinationType] navController.createGraph(startDestination = TestAbstractComp) ---------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -179,10 +179,11 @@ navController.createGraph(startDestination = AbstractChildClassComp) navController.createGraph(startDestination = TestAbstractComp) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/WrongStartDestinationTypeDetectorTest.kt) +You can also visit the source code ([WrongStartDestinationTypeDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/WrongStartDestinationTypeDetectorTest.kt) +[WrongStartDestinationTypeDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/WrongStartDestinationTypeDetectorTest.kt) +[WrongStartDestinationTypeDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-common-lint/src/test/java/androidx/navigation/common/lint/WrongStartDestinationTypeDetectorTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test @@ -196,8 +197,8 @@ id's must be unique, so you cannot combine these libraries. Also defined in: * WrongStartDestinationType: If the startDestination points to a Class with arguments, the startDestination must be an instance of that class. If it points to a Class without arguments, startDestination can be a KClass literal, such as StartClass::class. (this issue) -* [WrongStartDestinationType from androidx.navigation:navigation-common:2.9.0-rc01](WrongStartDestinationType.md.html) -* [WrongStartDestinationType from androidx.navigation:navigation-runtime:2.9.0-rc01](WrongStartDestinationType-3.md.html) +* [WrongStartDestinationType from androidx.navigation:navigation-common:2.9.7](WrongStartDestinationType.md.html) +* [WrongStartDestinationType from androidx.navigation:navigation-runtime:2.9.7](WrongStartDestinationType-3.md.html) (##) Including @@ -208,17 +209,17 @@ ``` // build.gradle.kts -implementation("androidx.navigation:navigation-compose:2.9.0-rc01") +implementation("androidx.navigation:navigation-compose:2.9.7") // build.gradle -implementation 'androidx.navigation:navigation-compose:2.9.0-rc01' +implementation 'androidx.navigation:navigation-compose:2.9.7' // build.gradle.kts with version catalogs: implementation(libs.navigation.compose) # libs.versions.toml [versions] -navigation-compose = "2.9.0-rc01" +navigation-compose = "2.9.7" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -230,7 +231,7 @@ } ``` -2.9.0-rc01 is the version this documentation was generated from; +2.9.7 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.navigation:navigation-compose](androidx_navigation_navigation-compose.md.html). diff --git a/docs/checks/WrongStartDestinationType-3.md.html b/docs/checks/WrongStartDestinationType-3.md.html index 82e751ca..126ae4b9 100644 --- a/docs/checks/WrongStartDestinationType-3.md.html +++ b/docs/checks/WrongStartDestinationType-3.md.html @@ -152,7 +152,7 @@ [WrongStartDestinationType] navController.createGraph(startDestination = TestAbstractComp) ---------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -181,10 +181,11 @@ navController.createGraph(startDestination = AbstractChildClassComp) navController.createGraph(startDestination = TestAbstractComp) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/WrongStartDestinationTypeDetectorTest.kt) +You can also visit the source code ([WrongStartDestinationTypeDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/WrongStartDestinationTypeDetectorTest.kt) +[WrongStartDestinationTypeDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/WrongStartDestinationTypeDetectorTest.kt) +[WrongStartDestinationTypeDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-common-lint/src/test/java/androidx/navigation/common/lint/WrongStartDestinationTypeDetectorTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test @@ -198,8 +199,8 @@ id's must be unique, so you cannot combine these libraries. Also defined in: * WrongStartDestinationType: If the startDestination points to a Class with arguments, the startDestination must be an instance of that class. If it points to a Class without arguments, startDestination can be a KClass literal, such as StartClass::class. (this issue) -* [WrongStartDestinationType from androidx.navigation:navigation-common:2.9.0-rc01](WrongStartDestinationType.md.html) -* [WrongStartDestinationType from androidx.navigation:navigation-compose:2.9.0-rc01](WrongStartDestinationType-2.md.html) +* [WrongStartDestinationType from androidx.navigation:navigation-common:2.9.7](WrongStartDestinationType.md.html) +* [WrongStartDestinationType from androidx.navigation:navigation-compose:2.9.7](WrongStartDestinationType-2.md.html) (##) Including @@ -210,17 +211,17 @@ ``` // build.gradle.kts -implementation("androidx.navigation:navigation-runtime:2.9.0-rc01") +implementation("androidx.navigation:navigation-runtime:2.9.7") // build.gradle -implementation 'androidx.navigation:navigation-runtime:2.9.0-rc01' +implementation 'androidx.navigation:navigation-runtime:2.9.7' // build.gradle.kts with version catalogs: implementation(libs.navigation.runtime) # libs.versions.toml [versions] -navigation-runtime = "2.9.0-rc01" +navigation-runtime = "2.9.7" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -232,7 +233,7 @@ } ``` -2.9.0-rc01 is the version this documentation was generated from; +2.9.7 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.navigation:navigation-runtime](androidx_navigation_navigation-runtime.md.html). diff --git a/docs/checks/WrongStartDestinationType.md.html b/docs/checks/WrongStartDestinationType.md.html index 2a36245e..b18ea9ad 100644 --- a/docs/checks/WrongStartDestinationType.md.html +++ b/docs/checks/WrongStartDestinationType.md.html @@ -152,7 +152,7 @@ [WrongStartDestinationType] navController.createGraph(startDestination = TestAbstractComp) ---------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -181,10 +181,11 @@ navController.createGraph(startDestination = AbstractChildClassComp) navController.createGraph(startDestination = TestAbstractComp) } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/WrongStartDestinationTypeDetectorTest.kt) +You can also visit the source code ([WrongStartDestinationTypeDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-runtime-lint/src/test/java/androidx/navigation/runtime/lint/WrongStartDestinationTypeDetectorTest.kt) +[WrongStartDestinationTypeDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-compose-lint/src/test/java/androidx/navigation/compose/lint/WrongStartDestinationTypeDetectorTest.kt) +[WrongStartDestinationTypeDetectorTest.kt](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/navigation/navigation-common-lint/src/test/java/androidx/navigation/common/lint/WrongStartDestinationTypeDetectorTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test @@ -198,8 +199,8 @@ id's must be unique, so you cannot combine these libraries. Also defined in: * WrongStartDestinationType: If the startDestination points to a Class with arguments, the startDestination must be an instance of that class. If it points to a Class without arguments, startDestination can be a KClass literal, such as StartClass::class. (this issue) -* [WrongStartDestinationType from androidx.navigation:navigation-compose:2.9.0-rc01](WrongStartDestinationType-2.md.html) -* [WrongStartDestinationType from androidx.navigation:navigation-runtime:2.9.0-rc01](WrongStartDestinationType-3.md.html) +* [WrongStartDestinationType from androidx.navigation:navigation-compose:2.9.7](WrongStartDestinationType-2.md.html) +* [WrongStartDestinationType from androidx.navigation:navigation-runtime:2.9.7](WrongStartDestinationType-3.md.html) (##) Including @@ -210,17 +211,17 @@ ``` // build.gradle.kts -implementation("androidx.navigation:navigation-common:2.9.0-rc01") +implementation("androidx.navigation:navigation-common:2.9.7") // build.gradle -implementation 'androidx.navigation:navigation-common:2.9.0-rc01' +implementation 'androidx.navigation:navigation-common:2.9.7' // build.gradle.kts with version catalogs: implementation(libs.navigation.common) # libs.versions.toml [versions] -navigation-common = "2.9.0-rc01" +navigation-common = "2.9.7" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -232,7 +233,7 @@ } ``` -2.9.0-rc01 is the version this documentation was generated from; +2.9.7 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.navigation:navigation-common](androidx_navigation_navigation-common.md.html). diff --git a/docs/checks/WrongTestMethodName.md.html b/docs/checks/WrongTestMethodName.md.html index a32d1582..a7521ca0 100644 --- a/docs/checks/WrongTestMethodName.md.html +++ b/docs/checks/WrongTestMethodName.md.html @@ -49,7 +49,7 @@ [WrongTestMethodName] @Test public void testSomething() { } ------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -62,7 +62,7 @@ public class MyTest { @Test public void testSomething() { } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/WrongTestMethodNameDetectorTest.kt) diff --git a/docs/checks/WrongThread.md.html b/docs/checks/WrongThread.md.html index 288b6e2a..c42fc886 100644 --- a/docs/checks/WrongThread.md.html +++ b/docs/checks/WrongThread.md.html @@ -53,7 +53,7 @@ [WrongThread] publishProgress(); // ERROR ----------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -123,10 +123,12 @@ } } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can also visit the -[source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ThreadDetectorTest.kt) +You can also visit the source code ([ThreadDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ThreadDetectorTest.kt) +[ProjectInitializerTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/ProjectInitializerTest.kt) +[IntellijThreadDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/studio-checks/src/test/java/com/android/tools/lint/checks/studio/IntellijThreadDetectorTest.kt) +[IntellijInferredThreadDetectorTest.kt](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/studio-checks/src/test/java/com/android/tools/lint/checks/studio/IntellijInferredThreadDetectorTest.kt) for the unit tests for this check to see additional scenarios. The above example was automatically extracted from the first unit test diff --git a/docs/checks/WrongThreadInterprocedural.md.html b/docs/checks/WrongThreadInterprocedural.md.html index 6f1a1ec7..1a2d2179 100644 --- a/docs/checks/WrongThreadInterprocedural.md.html +++ b/docs/checks/WrongThreadInterprocedural.md.html @@ -80,7 +80,7 @@ [WrongThreadInterprocedural] invokeInBackground(() -> d()); --- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -165,7 +165,7 @@ invokeInBackground(() -> c()); // Ok. } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/WrongThreadInterproceduralDetectorTest.kt) diff --git a/docs/checks/WrongViewCast.md.html b/docs/checks/WrongViewCast.md.html index 3b855257..4d46a7ae 100644 --- a/docs/checks/WrongViewCast.md.html +++ b/docs/checks/WrongViewCast.md.html @@ -46,7 +46,7 @@ ToggleButton: layout tag was Button [WrongViewCast] ToggleButton toggleButton = (ToggleButton) findViewById(R.id.button); ---------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here are the relevant source files: @@ -76,7 +76,7 @@ android:layout_height="wrap_content" /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test/pkg/WrongCastActivity.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers @@ -96,7 +96,7 @@ TextView textView = (TextView) findViewById(R.id.edittext); } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/ViewTypeDetectorTest.kt) diff --git a/docs/checks/WrongViewIdFormat.md.html b/docs/checks/WrongViewIdFormat.md.html index b7b744c3..1d4def28 100644 --- a/docs/checks/WrongViewIdFormat.md.html +++ b/docs/checks/WrongViewIdFormat.md.html @@ -49,7 +49,7 @@ [WrongViewIdFormat] android:id="@+id/CamelCase"/> -------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -57,7 +57,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/CamelCase"/> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/WrongViewIdFormatDetectorTest.kt) diff --git a/docs/checks/XmlEscapeNeeded.md.html b/docs/checks/XmlEscapeNeeded.md.html index a4f76117..c1618154 100644 --- a/docs/checks/XmlEscapeNeeded.md.html +++ b/docs/checks/XmlEscapeNeeded.md.html @@ -47,7 +47,7 @@ attribute values [XmlEscapeNeeded] android:text="@{calc.a < calc.b ? calc.textA : calc.textB}"/> ---------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -71,8 +71,7 @@ android:text="@{calc.a < calc.b ? calc.textA : calc.textB}"/> </androidx.constraintlayout.widget.ConstraintLayout> </layout> - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://cs.android.com/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-tests/src/test/java/com/android/tools/lint/checks/DataBindingDetectorTest.kt) diff --git a/docs/checks/XmlSpacing.md.html b/docs/checks/XmlSpacing.md.html index f69faee4..b896e994 100644 --- a/docs/checks/XmlSpacing.md.html +++ b/docs/checks/XmlSpacing.md.html @@ -57,7 +57,7 @@ res/layout/activity_home.xml:9:Warning: Unnecessary new line at line 9 [XmlSpacing] ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -73,7 +73,7 @@ /> </LinearLayout> -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the [source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/kotlin/com/vanniktech/lintrules/android/XmlSpacingDetectorTest.kt) diff --git a/docs/checks/ZeroBluetoothDiscoveryDuration.md.html b/docs/checks/ZeroBluetoothDiscoveryDuration.md.html new file mode 100644 index 00000000..12fe9fb8 --- /dev/null +++ b/docs/checks/ZeroBluetoothDiscoveryDuration.md.html @@ -0,0 +1,180 @@ + +(#) The EXTRA_DISCOVERABLE_DURATION parameter is set to zero + +!!! ERROR: The EXTRA_DISCOVERABLE_DURATION parameter is set to zero + This is an error. + +Id +: `ZeroBluetoothDiscoveryDuration` +Summary +: The EXTRA_DISCOVERABLE_DURATION parameter is set to zero +Severity +: Error +Category +: Security +Platform +: Any +Vendor +: Google - Android 3P Vulnerability Research +Contact +: https://github.com/google/android-security-lints +Feedback +: https://github.com/google/android-security-lints/issues +Min +: Lint 4.1 +Compiled +: Lint 8.0 and 8.1 +Artifact +: [com.android.security.lint:lint](com_android_security_lint_lint.md.html) +Since +: 1.0.4 +Affects +: Kotlin and Java files +Editing +: This check runs on the fly in the IDE editor +See +: https://goo.gle/ZeroBluetoothDiscoveryDuration +Implementation +: [Source Code](https://github.com/google/android-security-lints/tree/main/checks/src/main/java/com/example/lint/checks/BluetoothAdapterDetector.kt) +Tests +: [Source Code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/BluetoothAdapterDetectorTest.kt) +Copyright Year +: 2024 + +Setting the EXTRA_DISCOVERABLE_DURATION parameter to zero + will cause the device to be discoverable as long as the application +is running in the background or foreground. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/MainActivity.java:6:Error: The EXTRA_DISCOVERABLE_DURATION time +should never be set to zero [ZeroBluetoothDiscoveryDuration] + private Intent discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE).putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 0); + ------------------------------------------------------------------------------------------------------------------ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/MainActivity.java`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers +import android.app.Activity; + import android.bluetooth.BluetoothAdapter; + import android.content.Intent; + + public class MainActivity extends Activity { + private Intent discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE).putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 0); +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://github.com/google/android-security-lints/tree/main/checks/src/test/java/com/example/lint/checks/BluetoothAdapterDetectorTest.kt) +for the unit tests for this check to see additional scenarios. + +The above example was automatically extracted from the first unit test +found for this lint check, `BluetoothAdapterDetector.extraDiscoverableDurationIsZero_showsWarning`. +To report a problem with this extracted sample, visit +https://github.com/google/android-security-lints/issues. + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. This lint check is included in the lint documentation, + but the Android team may or may not agree with its recommendations. + +``` +// build.gradle.kts +lintChecks("com.android.security.lint:lint:1.0.4") + +// build.gradle +lintChecks 'com.android.security.lint:lint:1.0.4' + +// build.gradle.kts with version catalogs: +lintChecks(libs.com.android.security.lint.lint) + +# libs.versions.toml +[versions] +com-android-security-lint-lint = "1.0.4" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +com-android-security-lint-lint = { + module = "com.android.security.lint:lint", + version.ref = "com-android-security-lint-lint" +} +``` + +1.0.4 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.android.security.lint:lint](com_android_security_lint_lint.md.html). +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Using a suppression annotation like this on the enclosing + element: + + ```kt + // Kotlin + @Suppress("ZeroBluetoothDiscoveryDuration") + fun method() { + putExtra(...) + } + ``` + + or + + ```java + // Java + @SuppressWarnings("ZeroBluetoothDiscoveryDuration") + void method() { + putExtra(...); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection ZeroBluetoothDiscoveryDuration + problematicStatement() + ``` + +* Using a special `lint.xml` file in the source tree which turns off + the check in that folder and any sub folder. A simple file might look + like this: + ```xml + <?xml version="1.0" encoding="UTF-8"?> + <lint> + <issue id="ZeroBluetoothDiscoveryDuration" severity="ignore" /> + </lint> + ``` + Instead of `ignore` you can also change the severity here, for + example from `error` to `warning`. You can find additional + documentation on how to filter issues by path, regular expression and + so on + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/lintxml.md.html). + +* In Gradle projects, using the DSL syntax to configure lint. For + example, you can use something like + ```gradle + lintOptions { + disable 'ZeroBluetoothDiscoveryDuration' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore ZeroBluetoothDiscoveryDuration ...` + ``` + +* Last, but not least, using baselines, as discussed + [here](https://googlesamples.github.io/android-custom-lint-rules/usage/baselines.md.html). + + \ No newline at end of file diff --git a/docs/checks/androidx_activity_activity-compose.md.html b/docs/checks/androidx_activity_activity-compose.md.html index 7f570bcd..196291fa 100644 --- a/docs/checks/androidx_activity_activity-compose.md.html +++ b/docs/checks/androidx_activity_activity-compose.md.html @@ -17,7 +17,7 @@ Compiled : Lint 8.7+ Artifact -: androidx.activity:activity-compose:1.11.0-rc01 +: androidx.activity:activity-compose:1.13.0-rc01 (##) Included Issues @@ -35,17 +35,17 @@ ``` // build.gradle.kts -implementation("androidx.activity:activity-compose:1.11.0-rc01") +implementation("androidx.activity:activity-compose:1.13.0-rc01") // build.gradle -implementation 'androidx.activity:activity-compose:1.11.0-rc01' +implementation 'androidx.activity:activity-compose:1.13.0-rc01' // build.gradle.kts with version catalogs: implementation(libs.activity.compose) # libs.versions.toml [versions] -activity-compose = "1.11.0-rc01" +activity-compose = "1.13.0-rc01" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -57,7 +57,7 @@ } ``` -1.11.0-rc01 is the version this documentation was generated from; +1.13.0-rc01 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -72,10 +72,14 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 1.11.0-rc01|2025/04/23| 3| Yes| 8.7+|8.0 and 8.1| -| 1.11.0-beta01|2025/04/09| 3| Yes| 8.0 and 8.1|8.0 and 8.1| -| 1.11.0-alpha02|2025/03/26| 3| Yes| 8.0 and 8.1|8.0 and 8.1| -| 1.11.0-alpha01|2025/03/12| 3| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.13.0-rc01|2026/02/25| 3| Yes| 8.7+|8.0 and 8.1| +| 1.13.0-alpha01|2026/01/14| 3| Yes| 8.7+|8.0 and 8.1| +| 1.12.4|2026/02/11| 3| Yes| 8.7+|8.0 and 8.1| +| 1.12.3|2026/01/29| 3| Yes| 8.7+|8.0 and 8.1| +| 1.12.2|2025/12/17| 3| Yes| 8.7+|8.0 and 8.1| +| 1.12.1|2025/12/03| 3| Yes| 8.7+|8.0 and 8.1| +| 1.12.0|2025/11/19| 3| Yes| 8.7+|8.0 and 8.1| +| 1.11.0|2025/09/10| 3| Yes| 8.7+|8.0 and 8.1| | 1.10.1|2025/02/26| 3| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.10.0|2025/01/15| 3| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.9.3|2024/10/16| 2| Yes| 8.0 and 8.1|8.0 and 8.1| diff --git a/docs/checks/androidx_activity_activity.md.html b/docs/checks/androidx_activity_activity.md.html index 47b19674..c4b8e949 100644 --- a/docs/checks/androidx_activity_activity.md.html +++ b/docs/checks/androidx_activity_activity.md.html @@ -18,7 +18,7 @@ Compiled : Lint 8.7+ Artifact -: androidx.activity:activity:1.11.0-rc01 +: androidx.activity:activity:1.13.0-rc01 (##) Included Issues @@ -35,17 +35,17 @@ ``` // build.gradle.kts -implementation("androidx.activity:activity:1.11.0-rc01") +implementation("androidx.activity:activity:1.13.0-rc01") // build.gradle -implementation 'androidx.activity:activity:1.11.0-rc01' +implementation 'androidx.activity:activity:1.13.0-rc01' // build.gradle.kts with version catalogs: implementation(libs.activity) # libs.versions.toml [versions] -activity = "1.11.0-rc01" +activity = "1.13.0-rc01" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -57,7 +57,7 @@ } ``` -1.11.0-rc01 is the version this documentation was generated from; +1.13.0-rc01 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -72,10 +72,14 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 1.11.0-rc01|2025/04/23| 2| Yes| 8.7+|8.0 and 8.1| -| 1.11.0-beta01|2025/04/09| 2| Yes| 8.0 and 8.1|8.0 and 8.1| -| 1.11.0-alpha02|2025/03/26| 2| Yes| 8.0 and 8.1|8.0 and 8.1| -| 1.11.0-alpha01|2025/03/12| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.13.0-rc01|2026/02/25| 2| Yes| 8.7+|8.0 and 8.1| +| 1.13.0-alpha01|2026/01/14| 2| Yes| 8.7+|8.0 and 8.1| +| 1.12.4|2026/02/11| 2| Yes| 8.7+|8.0 and 8.1| +| 1.12.3|2026/01/29| 2| Yes| 8.7+|8.0 and 8.1| +| 1.12.2|2025/12/17| 2| Yes| 8.7+|8.0 and 8.1| +| 1.12.1|2025/12/03| 2| Yes| 8.7+|8.0 and 8.1| +| 1.12.0|2025/11/19| 2| Yes| 8.7+|8.0 and 8.1| +| 1.11.0|2025/09/10| 2| Yes| 8.7+|8.0 and 8.1| | 1.10.1|2025/02/26| 2| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.10.0|2025/01/15| 2| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.9.3|2024/10/16| 2| Yes| 8.0 and 8.1|8.0 and 8.1| diff --git a/docs/checks/androidx_annotation_annotation-experimental.md.html b/docs/checks/androidx_annotation_annotation-experimental.md.html index 9685c384..6e243163 100644 --- a/docs/checks/androidx_annotation_annotation-experimental.md.html +++ b/docs/checks/androidx_annotation_annotation-experimental.md.html @@ -20,7 +20,7 @@ Compiled : Lint 8.7+ Artifact -: androidx.annotation:annotation-experimental:1.5.0-rc01 +: androidx.annotation:annotation-experimental:1.6.0-rc01 (##) Included Issues @@ -39,17 +39,17 @@ ``` // build.gradle.kts -implementation("androidx.annotation:annotation-experimental:1.5.0-rc01") +implementation("androidx.annotation:annotation-experimental:1.6.0-rc01") // build.gradle -implementation 'androidx.annotation:annotation-experimental:1.5.0-rc01' +implementation 'androidx.annotation:annotation-experimental:1.6.0-rc01' // build.gradle.kts with version catalogs: implementation(libs.annotation.experimental) # libs.versions.toml [versions] -annotation-experimental = "1.5.0-rc01" +annotation-experimental = "1.6.0-rc01" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -61,7 +61,7 @@ } ``` -1.5.0-rc01 is the version this documentation was generated from; +1.6.0-rc01 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -79,9 +79,10 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 1.5.0-rc01|2025/04/23| 4| Yes| 8.7+| 8.7+| -| 1.5.0-beta01|2025/04/09| 4| Yes| 8.7+| 8.7+| -| 1.5.0-alpha01|2024/08/21| 4| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.6.0-rc01|2026/02/11| 4| Yes| 8.7+| 8.7+| +| 1.6.0-alpha01|2025/10/22| 4| Yes| 8.7+| 8.7+| +| 1.5.1|2025/07/16| 4| Yes| 8.7+| 8.7+| +| 1.5.0|2025/05/07| 4| Yes| 8.7+| 8.7+| | 1.4.1|2024/04/03| 4| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.4.0|2024/01/24| 4| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.3.1|2023/06/21| 4| Yes| 7.3 and 7.4| 7.0| diff --git a/docs/checks/androidx_appcompat_appcompat.md.html b/docs/checks/androidx_appcompat_appcompat.md.html index 37e8c359..25a8b052 100644 --- a/docs/checks/androidx_appcompat_appcompat.md.html +++ b/docs/checks/androidx_appcompat_appcompat.md.html @@ -18,7 +18,7 @@ Compiled : Lint 8.0 and 8.1 Artifact -: androidx.appcompat:appcompat:1.7.0 +: androidx.appcompat:appcompat:1.7.1 (##) Included Issues @@ -43,17 +43,17 @@ ``` // build.gradle.kts -implementation("androidx.appcompat:appcompat:1.7.0") +implementation("androidx.appcompat:appcompat:1.7.1") // build.gradle -implementation 'androidx.appcompat:appcompat:1.7.0' +implementation 'androidx.appcompat:appcompat:1.7.1' // build.gradle.kts with version catalogs: implementation(libs.appcompat) # libs.versions.toml [versions] -appcompat = "1.7.0" +appcompat = "1.7.1" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -65,7 +65,7 @@ } ``` -1.7.0 is the version this documentation was generated from; +1.7.1 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -82,6 +82,7 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| +| 1.7.1|2025/06/04| 10| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.7.0|2024/05/29| 10| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.6.1|2023/02/08| 10| Yes| 7.3 and 7.4| 7.0| | 1.6.0|2023/01/11| 10| Yes| 7.3 and 7.4| 7.0| diff --git a/docs/checks/androidx_compose_animation_animation-android.md.html b/docs/checks/androidx_compose_animation_animation-android.md.html index 62da0824..80d0bad6 100644 --- a/docs/checks/androidx_compose_animation_animation-android.md.html +++ b/docs/checks/androidx_compose_animation_animation-android.md.html @@ -17,17 +17,18 @@ Compiled : Lint 8.7+ Artifact -: androidx.compose.animation:animation-android:1.9.0-alpha01 +: androidx.compose.animation:animation-android:1.11.0-alpha06 (##) Included Issues -|Issue Id |Issue Description | -|------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------| -|[UnusedCrossfadeTargetStateParameter](UnusedCrossfadeTargetStateParameter.md.html) |Crossfade calls should use the provided `T` parameter in the content lambda | -|[UnusedContentLambdaTargetStateParameter](UnusedContentLambdaTargetStateParameter.md.html)|AnimatedContent calls should use the provided `T` parameter in the content lambda | -|[UnusedTargetStateInContentKeyLambda](UnusedTargetStateInContentKeyLambda.md.html) |`contentKey` lambda in AnimatedContent should always use the provided `T` parameter| -|[UnusedSharedTransitionModifierParameter](UnusedSharedTransitionModifierParameter.md.html)|SharedTransitionScope calls should use the provided Modifier parameter | -|[ConstantContentStateKeyInItemsCall](ConstantContentStateKeyInItemsCall.md.html) |Composables within an LazyList `items` call should have unique content state keys | +|Issue Id |Issue Description | +|------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------| +|[UnusedCrossfadeTargetStateParameter](UnusedCrossfadeTargetStateParameter.md.html) |Crossfade calls should use the provided `T` parameter in the content lambda | +|[UnusedContentLambdaTargetStateParameter](UnusedContentLambdaTargetStateParameter.md.html)|AnimatedContent calls should use the provided `T` parameter in the content lambda | +|[UnusedTargetStateInContentKeyLambda](UnusedTargetStateInContentKeyLambda.md.html) |`contentKey` lambda in AnimatedContent should always use the provided `T` parameter | +|[UnusedSharedTransitionModifierParameter](UnusedSharedTransitionModifierParameter.md.html)|SharedTransitionScope calls should use the provided Modifier parameter | +|[ConstantContentStateKeyInItemsCall](ConstantContentStateKeyInItemsCall.md.html) |Composables within an LazyList `items` call should have unique content state keys | +|[DisallowLookaheadAnimationVisualDebug](DisallowLookaheadAnimationVisualDebug.md.html) |LookaheadAnimationVisualDebugging and CustomizedLookaheadAnimationVisualDebugging are disallowed in production code| (##) Including @@ -37,17 +38,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.animation:animation-android:1.9.0-alpha01") +implementation("androidx.compose.animation:animation-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.animation:animation-android:1.9.0-alpha01' +implementation 'androidx.compose.animation:animation-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.animation.android) # libs.versions.toml [versions] -animation-android = "1.9.0-alpha01" +animation-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -59,11 +60,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.animation:animation-lint:1.9.0-alpha01`. +You can also use `androidx.compose.animation:animation-lint:1.11.0-alpha06`. (##) Changes @@ -73,6 +74,7 @@ * 1.8.0: Adds ConstantContentStateKeyInItemsCall, UnusedSharedTransitionModifierParameter, UnusedTargetStateInContentKeyLambda. +* 1.11.0-alpha03: Adds DisallowLookaheadAnimationVisualDebug. (##) Version Compatibility @@ -80,7 +82,26 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 1.9.0-alpha01|2025/04/23| 5| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha06|2026/02/25| 6| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha05|2026/02/11| 6| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha04|2026/01/29| 6| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha03|2026/01/14| 6| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha02|2025/12/17| 5| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha01|2025/12/03| 5| Yes| 8.7+|8.0 and 8.1| +| 1.10.4|2026/02/25| 5| Yes| 8.7+|8.0 and 8.1| +| 1.10.3|2026/02/11| 5| Yes| 8.7+|8.0 and 8.1| +| 1.10.2|2026/01/29| 5| Yes| 8.7+|8.0 and 8.1| +| 1.10.1|2026/01/14| 5| Yes| 8.7+|8.0 and 8.1| +| 1.10.0|2025/12/03| 5| Yes| 8.7+|8.0 and 8.1| +| 1.9.5|2025/11/19| 5| Yes| 8.7+|8.0 and 8.1| +| 1.9.4|2025/10/22| 5| Yes| 8.7+|8.0 and 8.1| +| 1.9.3|2025/10/08| 5| Yes| 8.7+|8.0 and 8.1| +| 1.9.2|2025/09/24| 5| Yes| 8.7+|8.0 and 8.1| +| 1.9.1|2025/09/10| 5| Yes| 8.7+|8.0 and 8.1| +| 1.9.0|2025/08/13| 5| Yes| 8.7+|8.0 and 8.1| +| 1.8.3|2025/06/18| 5| Yes| 8.7+|8.0 and 8.1| +| 1.8.2|2025/05/20| 5| Yes| 8.7+|8.0 and 8.1| +| 1.8.1|2025/05/07| 5| Yes| 8.7+|8.0 and 8.1| | 1.8.0|2025/04/23| 5| Yes| 8.7+|8.0 and 8.1| | 1.7.8|2025/02/12| 2| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.7.7|2025/01/29| 2| Yes| 8.0 and 8.1|8.0 and 8.1| diff --git a/docs/checks/androidx_compose_animation_animation-core-android.md.html b/docs/checks/androidx_compose_animation_animation-core-android.md.html index 75ef3c51..5a78446c 100644 --- a/docs/checks/androidx_compose_animation_animation-core-android.md.html +++ b/docs/checks/androidx_compose_animation_animation-core-android.md.html @@ -18,7 +18,7 @@ Compiled : Lint 8.7+ Artifact -: androidx.compose.animation:animation-core-android:1.9.0-alpha01 +: androidx.compose.animation:animation-core-android:1.11.0-alpha06 (##) Included Issues @@ -35,17 +35,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.animation:animation-core-android:1.9.0-alpha01") +implementation("androidx.compose.animation:animation-core-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.animation:animation-core-android:1.9.0-alpha01' +implementation 'androidx.compose.animation:animation-core-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.animation.core.android) # libs.versions.toml [versions] -animation-core-android = "1.9.0-alpha01" +animation-core-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -57,11 +57,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.animation:animation-core-lint:1.9.0-alpha01`. +You can also use `androidx.compose.animation:animation-core-lint:1.11.0-alpha06`. (##) Changes @@ -69,7 +69,7 @@ * 1.5.0: First version includes UnrememberedAnimatable, UnusedTransitionTargetStateParameter. * 1.7.0: Adds ArcAnimationSpecTypeIssue. -* 1.9.0-alpha01: Removes UnrememberedAnimatable. +* 1.9.0: Removes UnrememberedAnimatable. (##) Version Compatibility @@ -77,7 +77,26 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 1.9.0-alpha01|2025/04/23| 2| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha06|2026/02/25| 2| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha05|2026/02/11| 2| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha04|2026/01/29| 2| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha03|2026/01/14| 2| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha02|2025/12/17| 2| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha01|2025/12/03| 2| Yes| 8.7+|8.0 and 8.1| +| 1.10.4|2026/02/25| 2| Yes| 8.7+|8.0 and 8.1| +| 1.10.3|2026/02/11| 2| Yes| 8.7+|8.0 and 8.1| +| 1.10.2|2026/01/29| 2| Yes| 8.7+|8.0 and 8.1| +| 1.10.1|2026/01/14| 2| Yes| 8.7+|8.0 and 8.1| +| 1.10.0|2025/12/03| 2| Yes| 8.7+|8.0 and 8.1| +| 1.9.5|2025/11/19| 2| Yes| 8.7+|8.0 and 8.1| +| 1.9.4|2025/10/22| 2| Yes| 8.7+|8.0 and 8.1| +| 1.9.3|2025/10/08| 2| Yes| 8.7+|8.0 and 8.1| +| 1.9.2|2025/09/24| 2| Yes| 8.7+|8.0 and 8.1| +| 1.9.1|2025/09/10| 2| Yes| 8.7+|8.0 and 8.1| +| 1.9.0|2025/08/13| 2| Yes| 8.7+|8.0 and 8.1| +| 1.8.3|2025/06/18| 3| Yes| 8.7+|8.0 and 8.1| +| 1.8.2|2025/05/20| 3| Yes| 8.7+|8.0 and 8.1| +| 1.8.1|2025/05/07| 3| Yes| 8.7+|8.0 and 8.1| | 1.8.0|2025/04/23| 3| Yes| 8.7+|8.0 and 8.1| | 1.7.8|2025/02/12| 3| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.7.7|2025/01/29| 3| Yes| 8.0 and 8.1|8.0 and 8.1| diff --git a/docs/checks/androidx_compose_foundation_foundation-android.md.html b/docs/checks/androidx_compose_foundation_foundation-android.md.html index 65da8a90..2b9441a5 100644 --- a/docs/checks/androidx_compose_foundation_foundation-android.md.html +++ b/docs/checks/androidx_compose_foundation_foundation-android.md.html @@ -19,7 +19,7 @@ Compiled : Lint 8.7+ Artifact -: androidx.compose.foundation:foundation-android:1.9.0-alpha01 +: androidx.compose.foundation:foundation-android:1.11.0-alpha06 (##) Included Issues @@ -36,17 +36,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.foundation:foundation-android:1.9.0-alpha01") +implementation("androidx.compose.foundation:foundation-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.foundation:foundation-android:1.9.0-alpha01' +implementation 'androidx.compose.foundation:foundation-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.foundation.android) # libs.versions.toml [versions] -foundation-android = "1.9.0-alpha01" +foundation-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -58,11 +58,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.foundation:foundation-lint:1.9.0-alpha01`. +You can also use `androidx.compose.foundation:foundation-lint:1.11.0-alpha06`. (##) Changes @@ -71,7 +71,7 @@ UseOfNonLambdaOffsetOverload. * 1.6.0: Adds UnrememberedMutableInteractionSource, UnusedBoxWithConstraintsScope. -* 1.9.0-alpha01: Removes FrequentlyChangedStateReadInComposition, +* 1.9.0: Removes FrequentlyChangedStateReadInComposition, UnrememberedMutableInteractionSource. (##) Version Compatibility @@ -80,7 +80,26 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 1.9.0-alpha01|2025/04/23| 2| Yes| 8.7+| 8.7+| +| 1.11.0-alpha06|2026/02/25| 2| Yes| 8.7+| 8.7+| +| 1.11.0-alpha05|2026/02/11| 2| Yes| 8.7+| 8.7+| +| 1.11.0-alpha04|2026/01/29| 2| Yes| 8.7+| 8.7+| +| 1.11.0-alpha03|2026/01/14| 2| Yes| 8.7+| 8.7+| +| 1.11.0-alpha02|2025/12/17| 2| Yes| 8.7+| 8.7+| +| 1.11.0-alpha01|2025/12/03| 2| Yes| 8.7+| 8.7+| +| 1.10.4|2026/02/25| 2| Yes| 8.7+| 8.7+| +| 1.10.3|2026/02/11| 2| Yes| 8.7+| 8.7+| +| 1.10.2|2026/01/29| 2| Yes| 8.7+| 8.7+| +| 1.10.1|2026/01/14| 2| Yes| 8.7+| 8.7+| +| 1.10.0|2025/12/03| 2| Yes| 8.7+| 8.7+| +| 1.9.5|2025/11/19| 2| Yes| 8.7+| 8.7+| +| 1.9.4|2025/10/22| 2| Yes| 8.7+| 8.7+| +| 1.9.3|2025/10/08| 2| Yes| 8.7+| 8.7+| +| 1.9.2|2025/09/24| 2| Yes| 8.7+| 8.7+| +| 1.9.1|2025/09/10| 2| Yes| 8.7+| 8.7+| +| 1.9.0|2025/08/13| 2| Yes| 8.7+| 8.7+| +| 1.8.3|2025/06/18| 4| Yes| 8.7+|8.0 and 8.1| +| 1.8.2|2025/05/20| 4| Yes| 8.7+|8.0 and 8.1| +| 1.8.1|2025/05/07| 4| Yes| 8.7+|8.0 and 8.1| | 1.8.0|2025/04/23| 4| Yes| 8.7+|8.0 and 8.1| | 1.7.8|2025/02/12| 4| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.7.7|2025/01/29| 4| Yes| 8.0 and 8.1|8.0 and 8.1| diff --git a/docs/checks/androidx_compose_material3_material3-android.md.html b/docs/checks/androidx_compose_material3_material3-android.md.html index 2c076afa..6e534834 100644 --- a/docs/checks/androidx_compose_material3_material3-android.md.html +++ b/docs/checks/androidx_compose_material3_material3-android.md.html @@ -17,7 +17,7 @@ Compiled : Lint 8.7+ Artifact -: androidx.compose.material3:material3-android:1.4.0-alpha13 +: androidx.compose.material3:material3-android:1.5.0-alpha15 (##) Included Issues @@ -34,17 +34,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.material3:material3-android:1.4.0-alpha13") +implementation("androidx.compose.material3:material3-android:1.5.0-alpha15") // build.gradle -implementation 'androidx.compose.material3:material3-android:1.4.0-alpha13' +implementation 'androidx.compose.material3:material3-android:1.5.0-alpha15' // build.gradle.kts with version catalogs: implementation(libs.material3.android) # libs.versions.toml [versions] -material3-android = "1.4.0-alpha13" +material3-android = "1.5.0-alpha15" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -56,11 +56,11 @@ } ``` -1.4.0-alpha13 is the version this documentation was generated from; +1.5.0-alpha15 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.material3:material3-lint:1.4.0-alpha13`. +You can also use `androidx.compose.material3:material3-lint:1.5.0-alpha15`. (##) Changes @@ -74,19 +74,21 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 1.4.0-alpha13|2025/04/23| 2| Yes| 8.7+|8.0 and 8.1| -| 1.4.0-alpha12|2025/04/09| 2| Yes| 8.7+|8.0 and 8.1| -| 1.4.0-alpha11|2025/03/26| 2| Yes| 8.7+|8.0 and 8.1| -| 1.4.0-alpha10|2025/03/12| 2| Yes| 8.7+|8.0 and 8.1| -| 1.4.0-alpha09|2025/02/26| 2| Yes| 8.7+|8.0 and 8.1| -| 1.4.0-alpha08|2025/02/12| 2| Yes| 8.7+|8.0 and 8.1| -| 1.4.0-alpha07|2025/01/29| 2| Yes| 8.7+|8.0 and 8.1| -| 1.4.0-alpha06|2025/01/15| 2| Yes| 8.7+|8.0 and 8.1| -| 1.4.0-alpha05|2024/12/12| 2| Yes| 8.7+|8.0 and 8.1| -| 1.4.0-alpha04|2024/11/13| 2| Yes| 8.7+|8.0 and 8.1| -| 1.4.0-alpha03|2024/10/30| 2| Yes| 8.7+|8.0 and 8.1| -| 1.4.0-alpha02|2024/10/16| 2| Yes| 8.7+|8.0 and 8.1| -| 1.4.0-alpha01|2024/10/02| 2| Yes| 8.7+|8.0 and 8.1| +| 1.5.0-alpha15|2026/02/25| 2| Yes| 8.7+|8.0 and 8.1| +| 1.5.0-alpha14|2026/02/11| 2| Yes| 8.7+|8.0 and 8.1| +| 1.5.0-alpha13|2026/01/29| 2| Yes| 8.7+|8.0 and 8.1| +| 1.5.0-alpha12|2026/01/14| 2| Yes| 8.7+|8.0 and 8.1| +| 1.5.0-alpha11|2025/12/17| 2| Yes| 8.7+|8.0 and 8.1| +| 1.5.0-alpha10|2025/12/03| 2| Yes| 8.7+|8.0 and 8.1| +| 1.5.0-alpha09|2025/11/19| 2| Yes| 8.7+|8.0 and 8.1| +| 1.5.0-alpha08|2025/11/05| 2| Yes| 8.7+|8.0 and 8.1| +| 1.5.0-alpha07|2025/10/22| 2| Yes| 8.7+|8.0 and 8.1| +| 1.5.0-alpha06|2025/10/08| 2| Yes| 8.7+|8.0 and 8.1| +| 1.5.0-alpha04|2025/09/10| 2| Yes| 8.7+|8.0 and 8.1| +| 1.5.0-alpha03|2025/08/27| 2| Yes| 8.7+|8.0 and 8.1| +| 1.5.0-alpha02|2025/08/13| 2| Yes| 8.7+|8.0 and 8.1| +| 1.5.0-alpha01|2025/07/30| 2| Yes| 8.7+|8.0 and 8.1| +| 1.4.0|2025/09/24| 2| Yes| 8.7+|8.0 and 8.1| | 1.3.2|2025/04/09| 2| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.3.1|2024/10/30| 2| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.3.0|2024/09/04| 2| Yes| 8.0 and 8.1|8.0 and 8.1| diff --git a/docs/checks/androidx_compose_material_material-android.md.html b/docs/checks/androidx_compose_material_material-android.md.html index e9314d66..8d98ab5d 100644 --- a/docs/checks/androidx_compose_material_material-android.md.html +++ b/docs/checks/androidx_compose_material_material-android.md.html @@ -17,7 +17,7 @@ Compiled : Lint 8.7+ Artifact -: androidx.compose.material:material-android:1.9.0-alpha01 +: androidx.compose.material:material-android:1.11.0-alpha06 (##) Included Issues @@ -34,17 +34,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.material:material-android:1.9.0-alpha01") +implementation("androidx.compose.material:material-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.material:material-android:1.9.0-alpha01' +implementation 'androidx.compose.material:material-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.material.android) # libs.versions.toml [versions] -material-android = "1.9.0-alpha01" +material-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -56,11 +56,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.material:material-lint:1.9.0-alpha01`. +You can also use `androidx.compose.material:material-lint:1.11.0-alpha06`. (##) Changes @@ -74,7 +74,26 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 1.9.0-alpha01|2025/04/23| 2| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha06|2026/02/25| 2| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha05|2026/02/11| 2| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha04|2026/01/29| 2| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha03|2026/01/14| 2| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha02|2025/12/17| 2| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha01|2025/12/03| 2| Yes| 8.7+|8.0 and 8.1| +| 1.10.4|2026/02/25| 2| Yes| 8.7+|8.0 and 8.1| +| 1.10.3|2026/02/11| 2| Yes| 8.7+|8.0 and 8.1| +| 1.10.2|2026/01/29| 2| Yes| 8.7+|8.0 and 8.1| +| 1.10.1|2026/01/14| 2| Yes| 8.7+|8.0 and 8.1| +| 1.10.0|2025/12/03| 2| Yes| 8.7+|8.0 and 8.1| +| 1.9.5|2025/11/19| 2| Yes| 8.7+|8.0 and 8.1| +| 1.9.4|2025/10/22| 2| Yes| 8.7+|8.0 and 8.1| +| 1.9.3|2025/10/08| 2| Yes| 8.7+|8.0 and 8.1| +| 1.9.2|2025/09/24| 2| Yes| 8.7+|8.0 and 8.1| +| 1.9.1|2025/09/10| 2| Yes| 8.7+|8.0 and 8.1| +| 1.9.0|2025/08/13| 2| Yes| 8.7+|8.0 and 8.1| +| 1.8.3|2025/06/18| 2| Yes| 8.7+|8.0 and 8.1| +| 1.8.2|2025/05/20| 2| Yes| 8.7+|8.0 and 8.1| +| 1.8.1|2025/05/07| 2| Yes| 8.7+|8.0 and 8.1| | 1.8.0|2025/04/23| 2| Yes| 8.7+|8.0 and 8.1| | 1.7.8|2025/02/12| 2| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.7.7|2025/01/29| 2| Yes| 8.0 and 8.1|8.0 and 8.1| diff --git a/docs/checks/androidx_compose_runtime_runtime-android.md.html b/docs/checks/androidx_compose_runtime_runtime-android.md.html index 147f14f9..74b4682c 100644 --- a/docs/checks/androidx_compose_runtime_runtime-android.md.html +++ b/docs/checks/androidx_compose_runtime_runtime-android.md.html @@ -18,7 +18,7 @@ Compiled : Lint 8.7+ Artifact -: androidx.compose.runtime:runtime-android:1.9.0-alpha01 +: androidx.compose.runtime:runtime-android:1.11.0-alpha06 (##) Included Issues @@ -49,17 +49,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime-android:1.9.0-alpha01") +implementation("androidx.compose.runtime:runtime-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.runtime:runtime-android:1.9.0-alpha01' +implementation 'androidx.compose.runtime:runtime-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.runtime.android) # libs.versions.toml [versions] -runtime-android = "1.9.0-alpha01" +runtime-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -71,11 +71,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.runtime:runtime-lint:1.9.0-alpha01`. +You can also use `androidx.compose.runtime:runtime-lint:1.11.0-alpha06`. (##) Changes @@ -87,7 +87,7 @@ FlowOperatorInvokedInComposition, MutableCollectionMutableState, OpaqueUnitKey, ProduceStateDoesNotAssignValue, RememberReturnType, StateFlowValueCalledInComposition, UnrememberedMutableState. -* 1.9.0-alpha01: Adds FrequentlyChangingValue, RememberInComposition. +* 1.9.0: Adds FrequentlyChangingValue, RememberInComposition. (##) Version Compatibility @@ -95,7 +95,26 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 1.9.0-alpha01|2025/04/23| 16| Yes| 8.7+| 8.7+| +| 1.11.0-alpha06|2026/02/25| 16| Yes| 8.7+| 8.7+| +| 1.11.0-alpha05|2026/02/11| 16| Yes| 8.7+| 8.7+| +| 1.11.0-alpha04|2026/01/29| 16| Yes| 8.7+| 8.7+| +| 1.11.0-alpha03|2026/01/14| 16| Yes| 8.7+| 8.7+| +| 1.11.0-alpha02|2025/12/17| 16| Yes| 8.7+| 8.7+| +| 1.11.0-alpha01|2025/12/03| 16| Yes| 8.7+| 8.7+| +| 1.10.4|2026/02/25| 16| Yes| 8.7+| 8.7+| +| 1.10.3|2026/02/11| 16| Yes| 8.7+| 8.7+| +| 1.10.2|2026/01/29| 16| Yes| 8.7+| 8.7+| +| 1.10.1|2026/01/14| 16| Yes| 8.7+| 8.7+| +| 1.10.0|2025/12/03| 16| Yes| 8.7+| 8.7+| +| 1.9.5|2025/11/19| 16| Yes| 8.7+| 8.7+| +| 1.9.4|2025/10/22| 16| Yes| 8.7+| 8.7+| +| 1.9.3|2025/10/08| 16| Yes| 8.7+| 8.7+| +| 1.9.2|2025/09/24| 16| Yes| 8.7+| 8.7+| +| 1.9.1|2025/09/10| 16| Yes| 8.7+| 8.7+| +| 1.9.0|2025/08/13| 16| Yes| 8.7+| 8.7+| +| 1.8.3|2025/06/18| 14| No[^1]| 8.0 and 8.1|8.0 and 8.1| +| 1.8.2|2025/05/20| 14| No[^1]| 8.0 and 8.1|8.0 and 8.1| +| 1.8.1|2025/05/07| 14| No[^1]| 8.0 and 8.1|8.0 and 8.1| | 1.8.0|2025/04/23| 14| No[^1]| 8.0 and 8.1|8.0 and 8.1| | 1.7.8|2025/02/12| 14| No[^2]| 8.0 and 8.1|8.0 and 8.1| | 1.7.7|2025/01/29| 14| No[^2]| 8.0 and 8.1|8.0 and 8.1| diff --git a/docs/checks/androidx_compose_runtime_runtime-retain-android.md.html b/docs/checks/androidx_compose_runtime_runtime-retain-android.md.html new file mode 100644 index 00000000..2b1cae76 --- /dev/null +++ b/docs/checks/androidx_compose_runtime_runtime-retain-android.md.html @@ -0,0 +1,92 @@ +(#) androidx.compose.runtime:runtime-retain-android + +Name +: Compose Runtime Retain +Description +: Preserve state in composable methods across configuration changes and +: other transient content destruction scenarios +License +: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +Vendor +: Jetpack Compose +Identifier +: androidx.compose.runtime.retain +Feedback +: https://issuetracker.google.com/issues/new?component=612128 +Min +: Lint 8.7+ +Compiled +: Lint 8.7+ +Artifact +: androidx.compose.runtime:runtime-retain-android:1.11.0-alpha06 + +(##) Included Issues + +|Issue Id |Issue Description | +|------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------| +|[RetainUnitType](RetainUnitType.md.html) |`retain` calls must not return `Unit` | +|[RetainRememberObserver](RetainRememberObserver.md.html) |Values returned by `retain { ... }` must not implement RememberObserver unless they also implement RetainObserver. | +|[RetainingDoNotRetainType](RetainingDoNotRetainType.md.html)|Types annotated with `@DoNotRetain` should not be returned as the result of `retain`, either directly or transitively| +|[RetainLeaksContext](RetainLeaksContext.md.html) |Using `retain { ... }` to store a value that extends from or references `Context` will cause a memory leak. | + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("androidx.compose.runtime:runtime-retain-android:1.11.0-alpha06") + +// build.gradle +implementation 'androidx.compose.runtime:runtime-retain-android:1.11.0-alpha06' + +// build.gradle.kts with version catalogs: +implementation(libs.runtime.retain.android) + +# libs.versions.toml +[versions] +runtime-retain-android = "1.11.0-alpha06" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +runtime-retain-android = { + module = "androidx.compose.runtime:runtime-retain-android", + version.ref = "runtime-retain-android" +} +``` + +1.11.0-alpha06 is the version this documentation was generated from; +there may be newer versions available. + +NOTE: These lint checks are **also** made available separate from the main library. +You can also use `androidx.compose.runtime:runtime-retain-lint:1.11.0-alpha06`. + + +(##) Changes + +* 1.10.0: First version includes RetainLeaksContext, + RetainRememberObserver, RetainUnitType, RetainingDoNotRetainType. + +(##) Version Compatibility + +There are multiple older versions available of this library: + +| Version | Date | Issues | Compatible | Compiled | Requires | +|-------------------:|----------|-------:|------------|--------------:|---------:| +| 1.11.0-alpha06|2026/02/25| 4| Yes| 8.7+| 8.7+| +| 1.11.0-alpha05|2026/02/11| 4| Yes| 8.7+| 8.7+| +| 1.11.0-alpha04|2026/01/29| 4| Yes| 8.7+| 8.7+| +| 1.11.0-alpha03|2026/01/14| 4| Yes| 8.7+| 8.7+| +| 1.11.0-alpha02|2025/12/17| 4| Yes| 8.7+| 8.7+| +| 1.11.0-alpha01|2025/12/03| 4| Yes| 8.7+| 8.7+| +| 1.10.4|2026/02/25| 4| Yes| 8.7+| 8.7+| +| 1.10.3|2026/02/11| 4| Yes| 8.7+| 8.7+| +| 1.10.2|2026/01/29| 4| Yes| 8.7+| 8.7+| +| 1.10.1|2026/01/14| 4| Yes| 8.7+| 8.7+| +| 1.10.0|2025/12/03| 4| Yes| 8.7+| 8.7+| + + \ No newline at end of file diff --git a/docs/checks/androidx_compose_runtime_runtime-saveable-android.md.html b/docs/checks/androidx_compose_runtime_runtime-saveable-android.md.html index 0bc2c735..7945a57d 100644 --- a/docs/checks/androidx_compose_runtime_runtime-saveable-android.md.html +++ b/docs/checks/androidx_compose_runtime_runtime-saveable-android.md.html @@ -17,7 +17,7 @@ Compiled : Lint 8.7+ Artifact -: androidx.compose.runtime:runtime-saveable-android:1.9.0-alpha01 +: androidx.compose.runtime:runtime-saveable-android:1.11.0-alpha06 (##) Included Issues @@ -33,17 +33,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime-saveable-android:1.9.0-alpha01") +implementation("androidx.compose.runtime:runtime-saveable-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.runtime:runtime-saveable-android:1.9.0-alpha01' +implementation 'androidx.compose.runtime:runtime-saveable-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.runtime.saveable.android) # libs.versions.toml [versions] -runtime-saveable-android = "1.9.0-alpha01" +runtime-saveable-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -55,11 +55,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.runtime:runtime-saveable-lint:1.9.0-alpha01`. +You can also use `androidx.compose.runtime:runtime-saveable-lint:1.11.0-alpha06`. (##) Changes @@ -72,7 +72,26 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 1.9.0-alpha01|2025/04/23| 1| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha06|2026/02/25| 1| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha05|2026/02/11| 1| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha04|2026/01/29| 1| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha03|2026/01/14| 1| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha02|2025/12/17| 1| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha01|2025/12/03| 1| Yes| 8.7+|8.0 and 8.1| +| 1.10.4|2026/02/25| 1| Yes| 8.7+|8.0 and 8.1| +| 1.10.3|2026/02/11| 1| Yes| 8.7+|8.0 and 8.1| +| 1.10.2|2026/01/29| 1| Yes| 8.7+|8.0 and 8.1| +| 1.10.1|2026/01/14| 1| Yes| 8.7+|8.0 and 8.1| +| 1.10.0|2025/12/03| 1| Yes| 8.7+|8.0 and 8.1| +| 1.9.5|2025/11/19| 1| Yes| 8.7+|8.0 and 8.1| +| 1.9.4|2025/10/22| 1| Yes| 8.7+|8.0 and 8.1| +| 1.9.3|2025/10/08| 1| Yes| 8.7+|8.0 and 8.1| +| 1.9.2|2025/09/24| 1| Yes| 8.7+|8.0 and 8.1| +| 1.9.1|2025/09/10| 1| Yes| 8.7+|8.0 and 8.1| +| 1.9.0|2025/08/13| 1| Yes| 8.7+|8.0 and 8.1| +| 1.8.3|2025/06/18| 1| Yes| 8.7+|8.0 and 8.1| +| 1.8.2|2025/05/20| 1| Yes| 8.7+|8.0 and 8.1| +| 1.8.1|2025/05/07| 1| Yes| 8.7+|8.0 and 8.1| | 1.8.0|2025/04/23| 1| Yes| 8.7+|8.0 and 8.1| | 1.7.8|2025/02/12| 1| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.7.7|2025/01/29| 1| Yes| 8.0 and 8.1|8.0 and 8.1| diff --git a/docs/checks/androidx_compose_ui_ui-android.md.html b/docs/checks/androidx_compose_ui_ui-android.md.html index f0ffd86a..59112dda 100644 --- a/docs/checks/androidx_compose_ui_ui-android.md.html +++ b/docs/checks/androidx_compose_ui_ui-android.md.html @@ -18,7 +18,7 @@ Compiled : Lint 8.7+ Artifact -: androidx.compose.ui:ui-android:1.9.0-alpha01 +: androidx.compose.ui:ui-android:1.11.0-alpha06 (##) Included Issues @@ -26,8 +26,10 @@ |----------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------| |[UnnecessaryComposedModifier](UnnecessaryComposedModifier.md.html) |Modifier.composed should only be used for modifiers that invoke @Composable functions | |[LocalContextConfigurationRead](LocalContextConfigurationRead.md.html) |Reading Configuration using LocalContext.current.resources.configuration | +|[LocalContextGetResourceValueCall](LocalContextGetResourceValueCall.md.html) |Querying resource properties using LocalContext.current | |[LocalContextResourcesRead](LocalContextResourcesRead.md.html) |Reading Resources using LocalContext.current.resources | |[ConfigurationScreenWidthHeight](ConfigurationScreenWidthHeight.md.html) |Using Configuration.screenWidthDp/screenHeightDp instead of LocalWindowInfo.current.containerSize | +|[NonObservableLocale](NonObservableLocale.md.html) |Reading locale in a non-observable way in a composable function | |[ModifierFactoryExtensionFunction](ModifierFactoryExtensionFunction.md.html) |Modifier factory functions should be extensions on Modifier | |[ModifierFactoryReturnType](ModifierFactoryReturnType.md.html) |Modifier factory functions should return Modifier | |[ModifierFactoryUnreferencedReceiver](ModifierFactoryUnreferencedReceiver.md.html) |Modifier factory functions must use the receiver Modifier instance | @@ -46,17 +48,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui-android:1.9.0-alpha01") +implementation("androidx.compose.ui:ui-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.ui:ui-android:1.9.0-alpha01' +implementation 'androidx.compose.ui:ui-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.ui.android) # libs.versions.toml [versions] -ui-android = "1.9.0-alpha01" +ui-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -68,11 +70,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.ui:ui-lint:1.9.0-alpha01`. +You can also use `androidx.compose.ui:ui-lint:1.11.0-alpha06`. (##) Changes @@ -88,7 +90,9 @@ * 1.7.0: Adds SuspiciousModifierThen. * 1.8.0: Adds ConfigurationScreenWidthHeight, LocalContextConfigurationRead. -* 1.9.0-alpha01: Adds LocalContextResourcesRead. +* 1.9.0: Adds LocalContextResourcesRead. +* 1.10.0: Adds LocalContextGetResourceValueCall. +* 1.11.0-alpha03: Adds NonObservableLocale. (##) Version Compatibility @@ -96,7 +100,26 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 1.9.0-alpha01|2025/04/23| 13| Yes| 8.7+| 8.7+| +| 1.11.0-alpha06|2026/02/25| 15| Yes| 8.7+| 8.7+| +| 1.11.0-alpha05|2026/02/11| 15| Yes| 8.7+| 8.7+| +| 1.11.0-alpha04|2026/01/29| 15| Yes| 8.7+| 8.7+| +| 1.11.0-alpha03|2026/01/14| 15| Yes| 8.7+| 8.7+| +| 1.11.0-alpha02|2025/12/17| 14| Yes| 8.7+| 8.7+| +| 1.11.0-alpha01|2025/12/03| 14| Yes| 8.7+| 8.7+| +| 1.10.4|2026/02/25| 14| Yes| 8.7+| 8.7+| +| 1.10.3|2026/02/11| 14| Yes| 8.7+| 8.7+| +| 1.10.2|2026/01/29| 14| Yes| 8.7+| 8.7+| +| 1.10.1|2026/01/14| 14| Yes| 8.7+| 8.7+| +| 1.10.0|2025/12/03| 14| Yes| 8.7+| 8.7+| +| 1.9.5|2025/11/19| 13| Yes| 8.7+| 8.7+| +| 1.9.4|2025/10/22| 13| Yes| 8.7+| 8.7+| +| 1.9.3|2025/10/08| 13| Yes| 8.7+| 8.7+| +| 1.9.2|2025/09/24| 13| Yes| 8.7+| 8.7+| +| 1.9.1|2025/09/10| 13| Yes| 8.7+| 8.7+| +| 1.9.0|2025/08/13| 13| Yes| 8.7+| 8.7+| +| 1.8.3|2025/06/18| 12| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.8.2|2025/05/20| 12| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.8.1|2025/05/07| 12| No[^1]| 8.0 and 8.1|8.0 and 8.1| | 1.8.0|2025/04/23| 12| No[^1]| 8.0 and 8.1|8.0 and 8.1| | 1.7.8|2025/02/12| 10| No[^2]| 8.0 and 8.1|8.0 and 8.1| | 1.7.7|2025/01/29| 10| No[^2]| 8.0 and 8.1|8.0 and 8.1| diff --git a/docs/checks/androidx_compose_ui_ui-graphics-android.md.html b/docs/checks/androidx_compose_ui_ui-graphics-android.md.html index 3f63f311..1d371f4d 100644 --- a/docs/checks/androidx_compose_ui_ui-graphics-android.md.html +++ b/docs/checks/androidx_compose_ui_ui-graphics-android.md.html @@ -17,7 +17,7 @@ Compiled : Lint 8.7+ Artifact -: androidx.compose.ui:ui-graphics-android:1.9.0-alpha01 +: androidx.compose.ui:ui-graphics-android:1.11.0-alpha06 (##) Included Issues @@ -34,17 +34,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui-graphics-android:1.9.0-alpha01") +implementation("androidx.compose.ui:ui-graphics-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.ui:ui-graphics-android:1.9.0-alpha01' +implementation 'androidx.compose.ui:ui-graphics-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.ui.graphics.android) # libs.versions.toml [versions] -ui-graphics-android = "1.9.0-alpha01" +ui-graphics-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -56,11 +56,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.ui:ui-graphics-lint:1.9.0-alpha01`. +You can also use `androidx.compose.ui:ui-graphics-lint:1.11.0-alpha06`. (##) Changes @@ -74,7 +74,25 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 1.9.0-alpha01|2025/04/23| 2| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha06|2026/02/25| 2| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha05|2026/02/11| 2| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha04|2026/01/29| 2| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha03|2026/01/14| 2| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha02|2025/12/17| 2| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha01|2025/12/03| 2| Yes| 8.7+|8.0 and 8.1| +| 1.10.4|2026/02/25| 2| Yes| 8.7+|8.0 and 8.1| +| 1.10.3|2026/02/11| 2| Yes| 8.7+|8.0 and 8.1| +| 1.10.2|2026/01/29| 2| Yes| 8.7+|8.0 and 8.1| +| 1.10.1|2026/01/14| 2| Yes| 8.7+|8.0 and 8.1| +| 1.10.0|2025/12/03| 2| Yes| 8.7+|8.0 and 8.1| +| 1.9.5|2025/11/19| 2| Yes| 8.7+|8.0 and 8.1| +| 1.9.4|2025/10/22| 2| Yes| 8.7+|8.0 and 8.1| +| 1.9.3|2025/10/08| 2| Yes| 8.7+|8.0 and 8.1| +| 1.9.2|2025/09/24| 2| Yes| 8.7+|8.0 and 8.1| +| 1.9.1|2025/09/10| 2| Yes| 8.7+|8.0 and 8.1| +| 1.9.0|2025/08/13| 2| Yes| 8.7+|8.0 and 8.1| +| 1.8.3|2025/06/18| 2| Yes| 8.7+|8.0 and 8.1| +| 1.8.2|2025/05/20| 2| Yes| 8.7+|8.0 and 8.1| | 1.8.0|2025/04/23| 2| Yes| 8.7+|8.0 and 8.1| | 1.7.8|2025/02/12| 2| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.7.7|2025/01/29| 2| Yes| 8.0 and 8.1|8.0 and 8.1| diff --git a/docs/checks/androidx_compose_ui_ui-test-manifest.md.html b/docs/checks/androidx_compose_ui_ui-test-manifest.md.html index 0bf21375..6338dc25 100644 --- a/docs/checks/androidx_compose_ui_ui-test-manifest.md.html +++ b/docs/checks/androidx_compose_ui_ui-test-manifest.md.html @@ -19,7 +19,7 @@ Compiled : Lint 8.7+ Artifact -: androidx.compose.ui:ui-test-manifest:1.9.0-alpha01 +: androidx.compose.ui:ui-test-manifest:1.11.0-alpha06 (##) Included Issues @@ -35,17 +35,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui-test-manifest:1.9.0-alpha01") +implementation("androidx.compose.ui:ui-test-manifest:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.ui:ui-test-manifest:1.9.0-alpha01' +implementation 'androidx.compose.ui:ui-test-manifest:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.ui.test.manifest) # libs.versions.toml [versions] -ui-test-manifest = "1.9.0-alpha01" +ui-test-manifest = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -57,11 +57,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.ui:ui-test-manifest-lint:1.9.0-alpha01`. +You can also use `androidx.compose.ui:ui-test-manifest-lint:1.11.0-alpha06`. (##) Changes @@ -74,7 +74,26 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 1.9.0-alpha01|2025/04/23| 1| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha06|2026/02/25| 1| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha05|2026/02/11| 1| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha04|2026/01/29| 1| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha03|2026/01/14| 1| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha02|2025/12/17| 1| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha01|2025/12/03| 1| Yes| 8.7+|8.0 and 8.1| +| 1.10.4|2026/02/25| 1| Yes| 8.7+|8.0 and 8.1| +| 1.10.3|2026/02/11| 1| Yes| 8.7+|8.0 and 8.1| +| 1.10.2|2026/01/29| 1| Yes| 8.7+|8.0 and 8.1| +| 1.10.1|2026/01/14| 1| Yes| 8.7+|8.0 and 8.1| +| 1.10.0|2025/12/03| 1| Yes| 8.7+|8.0 and 8.1| +| 1.9.5|2025/11/19| 1| Yes| 8.7+|8.0 and 8.1| +| 1.9.4|2025/10/22| 1| Yes| 8.7+|8.0 and 8.1| +| 1.9.3|2025/10/08| 1| Yes| 8.7+|8.0 and 8.1| +| 1.9.2|2025/09/24| 1| Yes| 8.7+|8.0 and 8.1| +| 1.9.1|2025/09/10| 1| Yes| 8.7+|8.0 and 8.1| +| 1.9.0|2025/08/13| 1| Yes| 8.7+|8.0 and 8.1| +| 1.8.3|2025/06/18| 1| Yes| 8.7+|8.0 and 8.1| +| 1.8.2|2025/05/20| 1| Yes| 8.7+|8.0 and 8.1| +| 1.8.1|2025/05/07| 1| Yes| 8.7+|8.0 and 8.1| | 1.8.0|2025/04/23| 1| Yes| 8.7+|8.0 and 8.1| | 1.7.8|2025/02/12| 1| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.7.7|2025/01/29| 1| Yes| 8.0 and 8.1|8.0 and 8.1| diff --git a/docs/checks/androidx_compose_ui_ui-text-android.md.html b/docs/checks/androidx_compose_ui_ui-text-android.md.html index e9b7661f..165bb930 100644 --- a/docs/checks/androidx_compose_ui_ui-text-android.md.html +++ b/docs/checks/androidx_compose_ui_ui-text-android.md.html @@ -17,7 +17,7 @@ Compiled : Lint 8.7+ Artifact -: androidx.compose.ui:ui-text-android:1.9.0-alpha01 +: androidx.compose.ui:ui-text-android:1.11.0-alpha06 (##) Included Issues @@ -33,17 +33,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui-text-android:1.9.0-alpha01") +implementation("androidx.compose.ui:ui-text-android:1.11.0-alpha06") // build.gradle -implementation 'androidx.compose.ui:ui-text-android:1.9.0-alpha01' +implementation 'androidx.compose.ui:ui-text-android:1.11.0-alpha06' // build.gradle.kts with version catalogs: implementation(libs.ui.text.android) # libs.versions.toml [versions] -ui-text-android = "1.9.0-alpha01" +ui-text-android = "1.11.0-alpha06" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -55,11 +55,11 @@ } ``` -1.9.0-alpha01 is the version this documentation was generated from; +1.11.0-alpha06 is the version this documentation was generated from; there may be newer versions available. NOTE: These lint checks are **also** made available separate from the main library. -You can also use `androidx.compose.ui:ui-text-lint:1.9.0-alpha01`. +You can also use `androidx.compose.ui:ui-text-lint:1.11.0-alpha06`. (##) Changes @@ -72,7 +72,26 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 1.9.0-alpha01|2025/04/23| 1| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha06|2026/02/25| 1| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha05|2026/02/11| 1| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha04|2026/01/29| 1| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha03|2026/01/14| 1| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha02|2025/12/17| 1| Yes| 8.7+|8.0 and 8.1| +| 1.11.0-alpha01|2025/12/03| 1| Yes| 8.7+|8.0 and 8.1| +| 1.10.4|2026/02/25| 1| Yes| 8.7+|8.0 and 8.1| +| 1.10.3|2026/02/11| 1| Yes| 8.7+|8.0 and 8.1| +| 1.10.2|2026/01/29| 1| Yes| 8.7+|8.0 and 8.1| +| 1.10.1|2026/01/14| 1| Yes| 8.7+|8.0 and 8.1| +| 1.10.0|2025/12/03| 1| Yes| 8.7+|8.0 and 8.1| +| 1.9.5|2025/11/19| 1| Yes| 8.7+|8.0 and 8.1| +| 1.9.4|2025/10/22| 1| Yes| 8.7+|8.0 and 8.1| +| 1.9.3|2025/10/08| 1| Yes| 8.7+|8.0 and 8.1| +| 1.9.2|2025/09/24| 1| Yes| 8.7+|8.0 and 8.1| +| 1.9.1|2025/09/10| 1| Yes| 8.7+|8.0 and 8.1| +| 1.9.0|2025/08/13| 1| Yes| 8.7+|8.0 and 8.1| +| 1.8.3|2025/06/18| 1| Yes| 8.7+| 8.7+| +| 1.8.2|2025/05/20| 1| Yes| 8.7+| 8.7+| +| 1.8.1|2025/05/07| 1| Yes| 8.7+| 8.7+| | 1.8.0|2025/04/23| 1| Yes| 8.7+| 8.7+| | 1.7.8|2025/02/12| 1| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.7.7|2025/01/29| 1| Yes| 8.0 and 8.1|8.0 and 8.1| diff --git a/docs/checks/androidx_fragment_fragment-testing-manifest.md.html b/docs/checks/androidx_fragment_fragment-testing-manifest.md.html index 204a26cb..4876470f 100644 --- a/docs/checks/androidx_fragment_fragment-testing-manifest.md.html +++ b/docs/checks/androidx_fragment_fragment-testing-manifest.md.html @@ -19,7 +19,7 @@ Compiled : Lint 8.0 and 8.1 Artifact -: androidx.fragment:fragment-testing-manifest:1.8.6 +: androidx.fragment:fragment-testing-manifest:1.8.9 (##) Included Issues @@ -35,17 +35,17 @@ ``` // build.gradle.kts -implementation("androidx.fragment:fragment-testing-manifest:1.8.6") +implementation("androidx.fragment:fragment-testing-manifest:1.8.9") // build.gradle -implementation 'androidx.fragment:fragment-testing-manifest:1.8.6' +implementation 'androidx.fragment:fragment-testing-manifest:1.8.9' // build.gradle.kts with version catalogs: implementation(libs.fragment.testing.manifest) # libs.versions.toml [versions] -fragment-testing-manifest = "1.8.6" +fragment-testing-manifest = "1.8.9" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -57,7 +57,7 @@ } ``` -1.8.6 is the version this documentation was generated from; +1.8.9 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -70,6 +70,9 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| +| 1.8.9|2025/08/13| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.8.8|2025/06/04| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.8.7|2025/05/20| 1| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.8.6|2025/02/12| 1| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.8.5|2024/10/30| 1| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.8.4|2024/10/02| 1| Yes| 8.0 and 8.1|8.0 and 8.1| diff --git a/docs/checks/androidx_fragment_fragment-testing.md.html b/docs/checks/androidx_fragment_fragment-testing.md.html index e7adf1c0..da40f804 100644 --- a/docs/checks/androidx_fragment_fragment-testing.md.html +++ b/docs/checks/androidx_fragment_fragment-testing.md.html @@ -17,7 +17,7 @@ Compiled : Lint 8.0 and 8.1 Artifact -: androidx.fragment:fragment-testing:1.8.6 +: androidx.fragment:fragment-testing:1.8.9 (##) Included Issues @@ -33,17 +33,17 @@ ``` // build.gradle.kts -implementation("androidx.fragment:fragment-testing:1.8.6") +implementation("androidx.fragment:fragment-testing:1.8.9") // build.gradle -implementation 'androidx.fragment:fragment-testing:1.8.6' +implementation 'androidx.fragment:fragment-testing:1.8.9' // build.gradle.kts with version catalogs: implementation(libs.fragment.testing) # libs.versions.toml [versions] -fragment-testing = "1.8.6" +fragment-testing = "1.8.9" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -55,7 +55,7 @@ } ``` -1.8.6 is the version this documentation was generated from; +1.8.9 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -68,6 +68,9 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| +| 1.8.9|2025/08/13| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.8.8|2025/06/04| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.8.7|2025/05/20| 1| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.8.6|2025/02/12| 1| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.8.5|2024/10/30| 1| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.8.4|2024/10/02| 1| Yes| 8.0 and 8.1|8.0 and 8.1| diff --git a/docs/checks/androidx_fragment_fragment.md.html b/docs/checks/androidx_fragment_fragment.md.html index 220c5d45..c0b229c7 100644 --- a/docs/checks/androidx_fragment_fragment.md.html +++ b/docs/checks/androidx_fragment_fragment.md.html @@ -20,7 +20,7 @@ Compiled : Lint 8.0 and 8.1 Artifact -: androidx.fragment:fragment:1.8.6 +: androidx.fragment:fragment:1.8.9 (##) Included Issues @@ -44,17 +44,17 @@ ``` // build.gradle.kts -implementation("androidx.fragment:fragment:1.8.6") +implementation("androidx.fragment:fragment:1.8.9") // build.gradle -implementation 'androidx.fragment:fragment:1.8.6' +implementation 'androidx.fragment:fragment:1.8.9' // build.gradle.kts with version catalogs: implementation(libs.fragment) # libs.versions.toml [versions] -fragment = "1.8.6" +fragment = "1.8.9" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -66,7 +66,7 @@ } ``` -1.8.6 is the version this documentation was generated from; +1.8.9 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -84,6 +84,9 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| +| 1.8.9|2025/08/13| 9| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.8.8|2025/06/04| 9| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.8.7|2025/05/20| 9| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.8.6|2025/02/12| 9| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.8.5|2024/10/30| 9| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.8.4|2024/10/02| 9| Yes| 8.0 and 8.1|8.0 and 8.1| diff --git a/docs/checks/androidx_lifecycle_lifecycle-livedata-core.md.html b/docs/checks/androidx_lifecycle_lifecycle-livedata-core.md.html index d6c7ee56..5a7b69b6 100644 --- a/docs/checks/androidx_lifecycle_lifecycle-livedata-core.md.html +++ b/docs/checks/androidx_lifecycle_lifecycle-livedata-core.md.html @@ -17,7 +17,7 @@ Compiled : Lint 8.7+ Artifact -: androidx.lifecycle:lifecycle-livedata-core:2.9.0-rc01 +: androidx.lifecycle:lifecycle-livedata-core:2.11.0-alpha01 (##) Included Issues @@ -33,17 +33,17 @@ ``` // build.gradle.kts -implementation("androidx.lifecycle:lifecycle-livedata-core:2.9.0-rc01") +implementation("androidx.lifecycle:lifecycle-livedata-core:2.11.0-alpha01") // build.gradle -implementation 'androidx.lifecycle:lifecycle-livedata-core:2.9.0-rc01' +implementation 'androidx.lifecycle:lifecycle-livedata-core:2.11.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.lifecycle.livedata.core) # libs.versions.toml [versions] -lifecycle-livedata-core = "2.9.0-rc01" +lifecycle-livedata-core = "2.11.0-alpha01" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -55,7 +55,7 @@ } ``` -2.9.0-rc01 is the version this documentation was generated from; +2.11.0-alpha01 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -68,33 +68,24 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 2.9.0-rc01|2025/04/23| 1| Yes| 8.7+| 8.7+| -| 2.9.0-beta01|2025/04/09| 1| Yes| 8.0 and 8.1|8.0 and 8.1| -| 2.9.0-alpha13|2025/03/26| 1| No[^1]| 8.0 and 8.1|8.0 and 8.1| -| 2.9.0-alpha12|2025/03/12| 1| No[^1]| 8.0 and 8.1|8.0 and 8.1| -| 2.9.0-alpha11|2025/02/26| 1| No[^1]| 8.0 and 8.1|8.0 and 8.1| -| 2.9.0-alpha10|2025/02/12| 1| No[^1]| 8.0 and 8.1|8.0 and 8.1| -| 2.9.0-alpha09|2025/01/29| 1| No[^2]| 8.0 and 8.1|8.0 and 8.1| -| 2.9.0-alpha08|2024/12/11| 1| No[^2]| 8.0 and 8.1|8.0 and 8.1| -| 2.9.0-alpha07|2024/11/13| 1| No[^2]| 8.0 and 8.1|8.0 and 8.1| -| 2.9.0-alpha06|2024/10/30| 1| No[^2]| 8.0 and 8.1|8.0 and 8.1| -| 2.9.0-alpha05|2024/10/16| 1| No[^2]| 8.0 and 8.1|8.0 and 8.1| -| 2.9.0-alpha04|2024/10/02| 1| No[^2]| 8.0 and 8.1|8.0 and 8.1| -| 2.9.0-alpha03|2024/09/18| 1| No[^2]| 8.0 and 8.1|8.0 and 8.1| -| 2.9.0-alpha02|2024/09/04| 1| No[^2]| 8.0 and 8.1|8.0 and 8.1| -| 2.9.0-alpha01|2024/08/07| 1| No[^2]| 8.0 and 8.1|8.0 and 8.1| -| 2.8.7|2024/10/30| 1| No[^2]| 8.0 and 8.1|8.0 and 8.1| -| 2.8.6|2024/09/18| 1| No[^2]| 8.0 and 8.1|8.0 and 8.1| -| 2.8.5|2024/09/04| 1| No[^2]| 8.0 and 8.1|8.0 and 8.1| -| 2.8.4|2024/07/24| 1| No[^2]| 8.0 and 8.1|8.0 and 8.1| -| 2.8.3|2024/07/01| 1| No[^2]| 8.0 and 8.1|8.0 and 8.1| -| 2.8.2|2024/06/12| 1| No[^2]| 8.0 and 8.1|8.0 and 8.1| -| 2.8.1|2024/05/29| 1| No[^2]| 8.0 and 8.1|8.0 and 8.1| -| 2.8.0|2024/05/14| 1| No[^2]| 8.0 and 8.1|8.0 and 8.1| +| 2.11.0-alpha01|2026/02/25| 1| Yes| 8.7+| 8.7+| +| 2.10.0|2025/11/19| 1| Yes| 8.7+| 8.7+| +| 2.9.4|2025/09/17| 1| Yes| 8.7+| 8.7+| +| 2.9.3|2025/08/27| 1| Yes| 8.7+| 8.7+| +| 2.9.2|2025/07/16| 1| Yes| 8.7+| 8.7+| +| 2.9.1|2025/06/04| 1| Yes| 8.7+| 8.7+| +| 2.9.0|2025/05/07| 1| Yes| 8.7+| 8.7+| +| 2.8.7|2024/10/30| 1| No[^1]| 8.0 and 8.1|8.0 and 8.1| +| 2.8.6|2024/09/18| 1| No[^1]| 8.0 and 8.1|8.0 and 8.1| +| 2.8.5|2024/09/04| 1| No[^1]| 8.0 and 8.1|8.0 and 8.1| +| 2.8.4|2024/07/24| 1| No[^1]| 8.0 and 8.1|8.0 and 8.1| +| 2.8.3|2024/07/01| 1| No[^1]| 8.0 and 8.1|8.0 and 8.1| +| 2.8.2|2024/06/12| 1| No[^1]| 8.0 and 8.1|8.0 and 8.1| +| 2.8.1|2024/05/29| 1| No[^1]| 8.0 and 8.1|8.0 and 8.1| +| 2.8.0|2024/05/14| 1| No[^1]| 8.0 and 8.1|8.0 and 8.1| Compatibility Problems: -[^1]: org.jetbrains.kotlin.analysis.api.calls.KaCallKt#getCalls(org.jetbrains.kotlin.analysis.api.resolution.KaCallInfo): java.util.List is not available -[^2]: org.jetbrains.kotlin.analysis.api.KaSession#resolveCall(org.jetbrains.kotlin.psi.KtElement): org.jetbrains.kotlin.analysis.api.resolution.KaCallInfo is not available +[^1]: org.jetbrains.kotlin.analysis.api.KaSession#resolveCall(org.jetbrains.kotlin.psi.KtElement): org.jetbrains.kotlin.analysis.api.resolution.KaCallInfo is not available \ No newline at end of file diff --git a/docs/checks/androidx_lifecycle_lifecycle-runtime-android.md.html b/docs/checks/androidx_lifecycle_lifecycle-runtime-android.md.html index c2a421bd..5fadbff4 100644 --- a/docs/checks/androidx_lifecycle_lifecycle-runtime-android.md.html +++ b/docs/checks/androidx_lifecycle_lifecycle-runtime-android.md.html @@ -17,7 +17,7 @@ Compiled : Lint 8.7+ Artifact -: androidx.lifecycle:lifecycle-runtime-android:2.9.0-rc01 +: androidx.lifecycle:lifecycle-runtime-android:2.11.0-alpha01 (##) Included Issues @@ -34,17 +34,17 @@ ``` // build.gradle.kts -implementation("androidx.lifecycle:lifecycle-runtime-android:2.9.0-rc01") +implementation("androidx.lifecycle:lifecycle-runtime-android:2.11.0-alpha01") // build.gradle -implementation 'androidx.lifecycle:lifecycle-runtime-android:2.9.0-rc01' +implementation 'androidx.lifecycle:lifecycle-runtime-android:2.11.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.lifecycle.runtime.android) # libs.versions.toml [versions] -lifecycle-runtime-android = "2.9.0-rc01" +lifecycle-runtime-android = "2.11.0-alpha01" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -56,7 +56,7 @@ } ``` -2.9.0-rc01 is the version this documentation was generated from; +2.11.0-alpha01 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -70,21 +70,13 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 2.9.0-rc01|2025/04/23| 2| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-beta01|2025/04/09| 2| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha13|2025/03/26| 2| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha12|2025/03/12| 2| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha11|2025/02/26| 2| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha10|2025/02/12| 2| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha09|2025/01/29| 2| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha08|2024/12/11| 2| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha07|2024/11/13| 2| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha06|2024/10/30| 2| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha05|2024/10/16| 2| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha04|2024/10/02| 2| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha03|2024/09/18| 2| Yes| 8.0 and 8.1|8.0 and 8.1| -| 2.9.0-alpha02|2024/09/04| 2| Yes| 8.0 and 8.1|8.0 and 8.1| -| 2.9.0-alpha01|2024/08/07| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.11.0-alpha01|2026/02/25| 2| Yes| 8.7+|8.0 and 8.1| +| 2.10.0|2025/11/19| 2| Yes| 8.7+|8.0 and 8.1| +| 2.9.4|2025/09/17| 2| Yes| 8.7+|8.0 and 8.1| +| 2.9.3|2025/08/27| 2| Yes| 8.7+|8.0 and 8.1| +| 2.9.2|2025/07/16| 2| Yes| 8.7+|8.0 and 8.1| +| 2.9.1|2025/06/04| 2| Yes| 8.7+|8.0 and 8.1| +| 2.9.0|2025/05/07| 2| Yes| 8.7+|8.0 and 8.1| | 2.8.7|2024/10/30| 2| Yes| 8.0 and 8.1|8.0 and 8.1| | 2.8.6|2024/09/18| 2| Yes| 8.0 and 8.1|8.0 and 8.1| | 2.8.5|2024/09/04| 2| Yes| 8.0 and 8.1|8.0 and 8.1| diff --git a/docs/checks/androidx_lifecycle_lifecycle-runtime-compose-android.md.html b/docs/checks/androidx_lifecycle_lifecycle-runtime-compose-android.md.html index 9c23dec7..d97b1682 100644 --- a/docs/checks/androidx_lifecycle_lifecycle-runtime-compose-android.md.html +++ b/docs/checks/androidx_lifecycle_lifecycle-runtime-compose-android.md.html @@ -17,7 +17,7 @@ Compiled : Lint 8.7+ Artifact -: androidx.lifecycle:lifecycle-runtime-compose-android:2.9.0-rc01 +: androidx.lifecycle:lifecycle-runtime-compose-android:2.11.0-alpha01 (##) Included Issues @@ -33,17 +33,17 @@ ``` // build.gradle.kts -implementation("androidx.lifecycle:lifecycle-runtime-compose-android:2.9.0-rc01") +implementation("androidx.lifecycle:lifecycle-runtime-compose-android:2.11.0-alpha01") // build.gradle -implementation 'androidx.lifecycle:lifecycle-runtime-compose-android:2.9.0-rc01' +implementation 'androidx.lifecycle:lifecycle-runtime-compose-android:2.11.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.lifecycle.runtime.compose.android) # libs.versions.toml [versions] -lifecycle-runtime-compose-android = "2.9.0-rc01" +lifecycle-runtime-compose-android = "2.11.0-alpha01" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -55,13 +55,12 @@ } ``` -2.9.0-rc01 is the version this documentation was generated from; +2.11.0-alpha01 is the version this documentation was generated from; there may be newer versions available. (##) Changes -* 2.9.0-alpha10: First version includes - LifecycleCurrentStateInComposition. +* 2.9.0: First version includes LifecycleCurrentStateInComposition. (##) Version Compatibility @@ -69,11 +68,12 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 2.9.0-rc01|2025/04/23| 1| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-beta01|2025/04/09| 1| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha13|2025/03/26| 1| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha12|2025/03/12| 1| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha11|2025/02/26| 1| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha10|2025/02/12| 1| Yes| 8.7+|8.0 and 8.1| +| 2.11.0-alpha01|2026/02/25| 1| Yes| 8.7+|8.0 and 8.1| +| 2.10.0|2025/11/19| 1| Yes| 8.7+|8.0 and 8.1| +| 2.9.4|2025/09/17| 1| Yes| 8.7+|8.0 and 8.1| +| 2.9.3|2025/08/27| 1| Yes| 8.7+|8.0 and 8.1| +| 2.9.2|2025/07/16| 1| Yes| 8.7+|8.0 and 8.1| +| 2.9.1|2025/06/04| 1| Yes| 8.7+|8.0 and 8.1| +| 2.9.0|2025/05/07| 1| Yes| 8.7+|8.0 and 8.1| \ No newline at end of file diff --git a/docs/checks/androidx_lifecycle_lifecycle-runtime-testing.md.html b/docs/checks/androidx_lifecycle_lifecycle-runtime-testing.md.html index c340d8c4..f8e93bbd 100644 --- a/docs/checks/androidx_lifecycle_lifecycle-runtime-testing.md.html +++ b/docs/checks/androidx_lifecycle_lifecycle-runtime-testing.md.html @@ -17,7 +17,7 @@ Compiled : Lint 8.7+ Artifact -: androidx.lifecycle:lifecycle-runtime-testing:2.9.0-rc01 +: androidx.lifecycle:lifecycle-runtime-testing:2.11.0-alpha01 (##) Included Issues @@ -33,17 +33,17 @@ ``` // build.gradle.kts -implementation("androidx.lifecycle:lifecycle-runtime-testing:2.9.0-rc01") +implementation("androidx.lifecycle:lifecycle-runtime-testing:2.11.0-alpha01") // build.gradle -implementation 'androidx.lifecycle:lifecycle-runtime-testing:2.9.0-rc01' +implementation 'androidx.lifecycle:lifecycle-runtime-testing:2.11.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.lifecycle.runtime.testing) # libs.versions.toml [versions] -lifecycle-runtime-testing = "2.9.0-rc01" +lifecycle-runtime-testing = "2.11.0-alpha01" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -55,7 +55,7 @@ } ``` -2.9.0-rc01 is the version this documentation was generated from; +2.11.0-alpha01 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -68,21 +68,13 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 2.9.0-rc01|2025/04/23| 1| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-beta01|2025/04/09| 1| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha13|2025/03/26| 1| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha12|2025/03/12| 1| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha11|2025/02/26| 1| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha10|2025/02/12| 1| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha09|2025/01/29| 1| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha08|2024/12/11| 1| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha07|2024/11/13| 1| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha06|2024/10/30| 1| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha05|2024/10/16| 1| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha04|2024/10/02| 1| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha03|2024/09/18| 1| Yes| 8.0 and 8.1|8.0 and 8.1| -| 2.9.0-alpha02|2024/09/04| 1| Yes| 8.0 and 8.1|8.0 and 8.1| -| 2.9.0-alpha01|2024/08/07| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.11.0-alpha01|2026/02/25| 1| Yes| 8.7+|8.0 and 8.1| +| 2.10.0|2025/11/19| 1| Yes| 8.7+|8.0 and 8.1| +| 2.9.4|2025/09/17| 1| Yes| 8.7+|8.0 and 8.1| +| 2.9.3|2025/08/27| 1| Yes| 8.7+|8.0 and 8.1| +| 2.9.2|2025/07/16| 1| Yes| 8.7+|8.0 and 8.1| +| 2.9.1|2025/06/04| 1| Yes| 8.7+|8.0 and 8.1| +| 2.9.0|2025/05/07| 1| Yes| 8.7+|8.0 and 8.1| | 2.8.3|2024/07/01| 1| Yes| 8.0 and 8.1|8.0 and 8.1| | 2.8.2|2024/06/12| 1| Yes| 8.0 and 8.1|8.0 and 8.1| | 2.8.1|2024/05/29| 1| Yes| 8.0 and 8.1|8.0 and 8.1| diff --git a/docs/checks/androidx_lifecycle_lifecycle-viewmodel-compose-android.md.html b/docs/checks/androidx_lifecycle_lifecycle-viewmodel-compose-android.md.html index a6a396e0..a702fbe3 100644 --- a/docs/checks/androidx_lifecycle_lifecycle-viewmodel-compose-android.md.html +++ b/docs/checks/androidx_lifecycle_lifecycle-viewmodel-compose-android.md.html @@ -17,7 +17,7 @@ Compiled : Lint 8.7+ Artifact -: androidx.lifecycle:lifecycle-viewmodel-compose-android:2.9.0-rc01 +: androidx.lifecycle:lifecycle-viewmodel-compose-android:2.11.0-alpha01 (##) Included Issues @@ -33,17 +33,17 @@ ``` // build.gradle.kts -implementation("androidx.lifecycle:lifecycle-viewmodel-compose-android:2.9.0-rc01") +implementation("androidx.lifecycle:lifecycle-viewmodel-compose-android:2.11.0-alpha01") // build.gradle -implementation 'androidx.lifecycle:lifecycle-viewmodel-compose-android:2.9.0-rc01' +implementation 'androidx.lifecycle:lifecycle-viewmodel-compose-android:2.11.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.lifecycle.viewmodel.compose.android) # libs.versions.toml [versions] -lifecycle-viewmodel-compose-android = "2.9.0-rc01" +lifecycle-viewmodel-compose-android = "2.11.0-alpha01" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -55,13 +55,12 @@ } ``` -2.9.0-rc01 is the version this documentation was generated from; +2.11.0-alpha01 is the version this documentation was generated from; there may be newer versions available. (##) Changes -* 2.9.0-alpha01: First version includes - ViewModelConstructorInComposable. +* 2.9.0: First version includes ViewModelConstructorInComposable. (##) Version Compatibility @@ -69,20 +68,12 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 2.9.0-rc01|2025/04/23| 1| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-beta01|2025/04/09| 1| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha13|2025/03/26| 1| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha12|2025/03/12| 1| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha11|2025/02/26| 1| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha10|2025/02/12| 1| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha09|2025/01/29| 1| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha08|2024/12/11| 1| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha07|2024/11/13| 1| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha06|2024/10/30| 1| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha05|2024/10/16| 1| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha04|2024/10/02| 1| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha03|2024/09/18| 1| Yes| 8.0 and 8.1|8.0 and 8.1| -| 2.9.0-alpha02|2024/09/04| 1| Yes| 8.0 and 8.1|8.0 and 8.1| -| 2.9.0-alpha01|2024/08/07| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.11.0-alpha01|2026/02/25| 1| Yes| 8.7+|8.0 and 8.1| +| 2.10.0|2025/11/19| 1| Yes| 8.7+|8.0 and 8.1| +| 2.9.4|2025/09/17| 1| Yes| 8.7+|8.0 and 8.1| +| 2.9.3|2025/08/27| 1| Yes| 8.7+|8.0 and 8.1| +| 2.9.2|2025/07/16| 1| Yes| 8.7+|8.0 and 8.1| +| 2.9.1|2025/06/04| 1| Yes| 8.7+|8.0 and 8.1| +| 2.9.0|2025/05/07| 1| Yes| 8.7+|8.0 and 8.1| \ No newline at end of file diff --git a/docs/checks/androidx_lint_lint-gradle.md.html b/docs/checks/androidx_lint_lint-gradle.md.html index b2a547b5..594b4f99 100644 --- a/docs/checks/androidx_lint_lint-gradle.md.html +++ b/docs/checks/androidx_lint_lint-gradle.md.html @@ -11,7 +11,7 @@ Compiled : Lint 8.7+ Artifact -: androidx.lint:lint-gradle:1.0.0-alpha04 +: androidx.lint:lint-gradle:1.0.0-alpha05 (##) Included Issues @@ -23,6 +23,7 @@ |[FilePropertyDetector](FilePropertyDetector.md.html) |Avoid using Property | |[InternalGradleApiUsage](InternalGradleApiUsage.md.html) |Avoid using internal Gradle APIs | |[InternalAgpApiUsage](InternalAgpApiUsage.md.html) |Avoid using internal Android Gradle Plugin APIs | +|[InternalKgpApiUsage](InternalKgpApiUsage.md.html) |Avoid using internal Kotlin Gradle Plugin APIs | |[WithPluginClasspathUsage](WithPluginClasspathUsage.md.html) |Flags usage of GradleRunner#withPluginClasspath | |[WithTypeWithoutConfigureEach](WithTypeWithoutConfigureEach.md.html)|Flags usage of withType with a closure instead of configureEach| @@ -34,17 +35,17 @@ ``` // build.gradle.kts -implementation("androidx.lint:lint-gradle:1.0.0-alpha04") +implementation("androidx.lint:lint-gradle:1.0.0-alpha05") // build.gradle -implementation 'androidx.lint:lint-gradle:1.0.0-alpha04' +implementation 'androidx.lint:lint-gradle:1.0.0-alpha05' // build.gradle.kts with version catalogs: implementation(libs.lint.gradle) # libs.versions.toml [versions] -lint-gradle = "1.0.0-alpha04" +lint-gradle = "1.0.0-alpha05" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -56,7 +57,7 @@ } ``` -1.0.0-alpha04 is the version this documentation was generated from; +1.0.0-alpha05 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -66,6 +67,7 @@ WithPluginClasspathUsage, WithTypeWithoutConfigureEach. * 1.0.0-alpha03: Adds FilePropertyDetector. * 1.0.0-alpha04: Adds GradleLikelyBug. +* 1.0.0-alpha05: Adds InternalKgpApiUsage. (##) Version Compatibility @@ -73,6 +75,7 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| +| 1.0.0-alpha05| | 9| Yes| 8.7+| 8.7+| | 1.0.0-alpha04| | 8| Yes| 8.7+| 8.7+| | 1.0.0-alpha03| | 7| Yes| 8.7+| 8.7+| | 1.0.0-alpha02| | 6| Yes| 8.0 and 8.1|8.0 and 8.1| diff --git a/docs/checks/androidx_navigation_navigation-common.md.html b/docs/checks/androidx_navigation_navigation-common.md.html index 61eeb09a..36685b48 100644 --- a/docs/checks/androidx_navigation_navigation-common.md.html +++ b/docs/checks/androidx_navigation_navigation-common.md.html @@ -17,7 +17,7 @@ Compiled : Lint 8.7+ Artifact -: androidx.navigation:navigation-common:2.9.0-rc01 +: androidx.navigation:navigation-common:2.9.7 (##) Included Issues @@ -36,17 +36,17 @@ ``` // build.gradle.kts -implementation("androidx.navigation:navigation-common:2.9.0-rc01") +implementation("androidx.navigation:navigation-common:2.9.7") // build.gradle -implementation 'androidx.navigation:navigation-common:2.9.0-rc01' +implementation 'androidx.navigation:navigation-common:2.9.7' // build.gradle.kts with version catalogs: implementation(libs.navigation.common) # libs.versions.toml [versions] -navigation-common = "2.9.0-rc01" +navigation-common = "2.9.7" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -58,7 +58,7 @@ } ``` -2.9.0-rc01 is the version this documentation was generated from; +2.9.7 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -73,17 +73,14 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 2.9.0-rc01|2025/04/23| 4| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-beta01|2025/04/09| 4| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha09|2025/03/26| 4| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha08|2025/03/12| 4| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha07|2025/02/26| 4| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha06|2025/02/12| 4| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha05|2025/01/29| 4| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha04|2024/12/11| 4| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha03|2024/11/13| 4| Yes| 8.0 and 8.1|8.0 and 8.1| -| 2.9.0-alpha02|2024/10/30| 4| Yes| 8.0 and 8.1|8.0 and 8.1| -| 2.9.0-alpha01|2024/10/16| 4| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.9.7|2026/01/29| 4| Yes| 8.7+|8.0 and 8.1| +| 2.9.6|2025/11/05| 4| Yes| 8.7+|8.0 and 8.1| +| 2.9.5|2025/09/24| 4| Yes| 8.7+|8.0 and 8.1| +| 2.9.4|2025/09/10| 4| Yes| 8.7+|8.0 and 8.1| +| 2.9.3|2025/07/30| 4| Yes| 8.7+|8.0 and 8.1| +| 2.9.2|2025/07/16| 4| Yes| 8.7+|8.0 and 8.1| +| 2.9.1|2025/07/02| 4| Yes| 8.7+|8.0 and 8.1| +| 2.9.0|2025/05/07| 4| Yes| 8.7+|8.0 and 8.1| | 2.8.5|2024/12/11| 4| Yes| 8.0 and 8.1|8.0 and 8.1| | 2.8.4|2024/11/13| 4| Yes| 8.0 and 8.1|8.0 and 8.1| | 2.8.3|2024/10/16| 4| Yes| 8.0 and 8.1|8.0 and 8.1| diff --git a/docs/checks/androidx_navigation_navigation-compose.md.html b/docs/checks/androidx_navigation_navigation-compose.md.html index 8160479b..14d206cb 100644 --- a/docs/checks/androidx_navigation_navigation-compose.md.html +++ b/docs/checks/androidx_navigation_navigation-compose.md.html @@ -15,7 +15,7 @@ Compiled : Lint 8.7+ Artifact -: androidx.navigation:navigation-compose:2.9.0-rc01 +: androidx.navigation:navigation-compose:2.9.7 (##) Included Issues @@ -36,17 +36,17 @@ ``` // build.gradle.kts -implementation("androidx.navigation:navigation-compose:2.9.0-rc01") +implementation("androidx.navigation:navigation-compose:2.9.7") // build.gradle -implementation 'androidx.navigation:navigation-compose:2.9.0-rc01' +implementation 'androidx.navigation:navigation-compose:2.9.7' // build.gradle.kts with version catalogs: implementation(libs.navigation.compose) # libs.versions.toml [versions] -navigation-compose = "2.9.0-rc01" +navigation-compose = "2.9.7" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -58,7 +58,7 @@ } ``` -2.9.0-rc01 is the version this documentation was generated from; +2.9.7 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -74,15 +74,14 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 2.9.0-rc01|2025/04/23| 6| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-beta01|2025/04/09| 6| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha09|2025/03/26| 6| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha08|2025/03/12| 6| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha07|2025/02/26| 6| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha04|2024/12/11| 6| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha03|2024/11/13| 6| Yes| 8.0 and 8.1|8.0 and 8.1| -| 2.9.0-alpha02|2024/10/30| 6| Yes| 8.0 and 8.1|8.0 and 8.1| -| 2.9.0-alpha01|2024/10/16| 6| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.9.7|2026/01/29| 6| Yes| 8.7+|8.0 and 8.1| +| 2.9.6|2025/11/05| 6| Yes| 8.7+|8.0 and 8.1| +| 2.9.5|2025/09/24| 6| Yes| 8.7+|8.0 and 8.1| +| 2.9.4|2025/09/10| 6| Yes| 8.7+|8.0 and 8.1| +| 2.9.3|2025/07/30| 6| Yes| 8.7+|8.0 and 8.1| +| 2.9.2|2025/07/16| 6| Yes| 8.7+|8.0 and 8.1| +| 2.9.1|2025/07/02| 6| Yes| 8.7+|8.0 and 8.1| +| 2.9.0|2025/05/07| 6| Yes| 8.7+|8.0 and 8.1| | 2.8.5|2024/12/11| 6| Yes| 8.0 and 8.1|8.0 and 8.1| | 2.8.4|2024/11/13| 6| Yes| 8.0 and 8.1|8.0 and 8.1| | 2.8.3|2024/10/16| 6| Yes| 8.0 and 8.1|8.0 and 8.1| diff --git a/docs/checks/androidx_navigation_navigation-runtime.md.html b/docs/checks/androidx_navigation_navigation-runtime.md.html index 8c1a3df5..9f7f9950 100644 --- a/docs/checks/androidx_navigation_navigation-runtime.md.html +++ b/docs/checks/androidx_navigation_navigation-runtime.md.html @@ -17,7 +17,7 @@ Compiled : Lint 8.7+ Artifact -: androidx.navigation:navigation-runtime:2.9.0-rc01 +: androidx.navigation:navigation-runtime:2.9.7 (##) Included Issues @@ -37,17 +37,17 @@ ``` // build.gradle.kts -implementation("androidx.navigation:navigation-runtime:2.9.0-rc01") +implementation("androidx.navigation:navigation-runtime:2.9.7") // build.gradle -implementation 'androidx.navigation:navigation-runtime:2.9.0-rc01' +implementation 'androidx.navigation:navigation-runtime:2.9.7' // build.gradle.kts with version catalogs: implementation(libs.navigation.runtime) # libs.versions.toml [versions] -navigation-runtime = "2.9.0-rc01" +navigation-runtime = "2.9.7" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -59,7 +59,7 @@ } ``` -2.9.0-rc01 is the version this documentation was generated from; +2.9.7 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -74,17 +74,14 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 2.9.0-rc01|2025/04/23| 5| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-beta01|2025/04/09| 5| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha09|2025/03/26| 5| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha08|2025/03/12| 5| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha07|2025/02/26| 5| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha06|2025/02/12| 5| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha05|2025/01/29| 5| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha04|2024/12/11| 5| Yes| 8.7+|8.0 and 8.1| -| 2.9.0-alpha03|2024/11/13| 5| Yes| 8.0 and 8.1|8.0 and 8.1| -| 2.9.0-alpha02|2024/10/30| 5| Yes| 8.0 and 8.1|8.0 and 8.1| -| 2.9.0-alpha01|2024/10/16| 5| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.9.7|2026/01/29| 5| Yes| 8.7+|8.0 and 8.1| +| 2.9.6|2025/11/05| 5| Yes| 8.7+|8.0 and 8.1| +| 2.9.5|2025/09/24| 5| Yes| 8.7+|8.0 and 8.1| +| 2.9.4|2025/09/10| 5| Yes| 8.7+|8.0 and 8.1| +| 2.9.3|2025/07/30| 5| Yes| 8.7+|8.0 and 8.1| +| 2.9.2|2025/07/16| 5| Yes| 8.7+|8.0 and 8.1| +| 2.9.1|2025/07/02| 5| Yes| 8.7+|8.0 and 8.1| +| 2.9.0|2025/05/07| 5| Yes| 8.7+|8.0 and 8.1| | 2.8.5|2024/12/11| 5| Yes| 8.0 and 8.1|8.0 and 8.1| | 2.8.4|2024/11/13| 5| Yes| 8.0 and 8.1|8.0 and 8.1| | 2.8.3|2024/10/16| 5| Yes| 8.0 and 8.1|8.0 and 8.1| diff --git a/docs/checks/androidx_test_uiautomator_uiautomator.md.html b/docs/checks/androidx_test_uiautomator_uiautomator.md.html new file mode 100644 index 00000000..1c23e853 --- /dev/null +++ b/docs/checks/androidx_test_uiautomator_uiautomator.md.html @@ -0,0 +1,80 @@ +(#) androidx.test.uiautomator:uiautomator + +Name +: UIAutomator +Description +: UI testing framework suitable for cross-app functional UI testing +License +: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +Vendor +: Android Open Source Project +Identifier +: androidx.test.uiautomator +Feedback +: https://issuetracker.google.com/issues/new?component=1237242 +Min +: Lint 8.0 and 8.1 +Compiled +: Lint 8.7+ +Artifact +: androidx.test.uiautomator:uiautomator:2.4.0-beta01 + +(##) Included Issues + +|Issue Id |Issue Description | +|----------------------------------------------------------------------------------|------------------------------------------------------------------| +|[DontUseAccessibilityNodeInfoGetText](DontUseAccessibilityNodeInfoGetText.md.html)|Do not use AccessibilityNodeInfo#getText in a UiAutomatorTestScope| + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("androidx.test.uiautomator:uiautomator:2.4.0-beta01") + +// build.gradle +implementation 'androidx.test.uiautomator:uiautomator:2.4.0-beta01' + +// build.gradle.kts with version catalogs: +implementation(libs.uiautomator) + +# libs.versions.toml +[versions] +uiautomator = "2.4.0-beta01" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +uiautomator = { + module = "androidx.test.uiautomator:uiautomator", + version.ref = "uiautomator" +} +``` + +2.4.0-beta01 is the version this documentation was generated from; +there may be newer versions available. + +(##) Changes + +* 2.4.0-alpha02: First version includes + DontUseAccessibilityNodeInfoGetText. + +(##) Version Compatibility + +There are multiple older versions available of this library: + +| Version | Date | Issues | Compatible | Compiled | Requires | +|-------------------:|----------|-------:|------------|--------------:|---------:| +| 2.4.0-beta01|2026/02/11| 1| Yes| 8.7+|8.0 and 8.1| +| 2.4.0-alpha07|2025/12/03| 1| Yes| 8.7+|8.0 and 8.1| +| 2.4.0-alpha06|2025/08/13| 1| Yes| 8.7+|8.0 and 8.1| +| 2.4.0-alpha05|2025/06/18| 1| Yes| 8.7+|8.0 and 8.1| +| 2.4.0-alpha04|2025/06/04| 1| Yes| 8.7+|8.0 and 8.1| +| 2.4.0-alpha03|2025/05/20| 1| Yes| 8.7+|8.0 and 8.1| +| 2.4.0-alpha02|2025/05/07| 1| Yes| 8.7+|8.0 and 8.1| + + \ No newline at end of file diff --git a/docs/checks/androidx_wear_protolayout_protolayout-expression.md.html b/docs/checks/androidx_wear_protolayout_protolayout-expression.md.html new file mode 100644 index 00000000..4ff55219 --- /dev/null +++ b/docs/checks/androidx_wear_protolayout_protolayout-expression.md.html @@ -0,0 +1,87 @@ +(#) androidx.wear.protolayout:protolayout-expression + +Name +: ProtoLayout Expression +Description +: Create dynamic expressions (for late evaluation by a remote evaluator). +License +: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +Vendor +: Android Open Source Project +Identifier +: androidx.wear.protolayout +Feedback +: https://issuetracker.google.com/issues/new?component=1112273 +Min +: Lint 8.7+ +Compiled +: Lint 8.7+ +Artifact +: androidx.wear.protolayout:protolayout-expression:1.4.0-rc01 + +(##) Included Issues + +|Issue Id |Issue Description | +|----------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------| +|[ProtoLayoutMinSchema](ProtoLayoutMinSchema.md.html) |ProtoLayout feature is not guaranteed to be available on the target device API | +|[ProtoLayoutPrimaryLayoutResponsive](ProtoLayoutPrimaryLayoutResponsive.md.html) |ProtoLayout Material PrimaryLayout should be used with responsive behaviourto ensure the best behaviour across different screen sizes and locales | +|[ProtoLayoutEdgeContentLayoutResponsive](ProtoLayoutEdgeContentLayoutResponsive.md.html)|ProtoLayout Material EdgeContentLayout should be used with responsivebehaviour to ensure the best behaviour across different screen sizes andlocales| + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("androidx.wear.protolayout:protolayout-expression:1.4.0-rc01") + +// build.gradle +implementation 'androidx.wear.protolayout:protolayout-expression:1.4.0-rc01' + +// build.gradle.kts with version catalogs: +implementation(libs.protolayout.expression) + +# libs.versions.toml +[versions] +protolayout-expression = "1.4.0-rc01" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +protolayout-expression = { + module = "androidx.wear.protolayout:protolayout-expression", + version.ref = "protolayout-expression" +} +``` + +1.4.0-rc01 is the version this documentation was generated from; +there may be newer versions available. + +(##) Changes + +* 1.1.0: First version includes ProtoLayoutMinSchema. +* 1.2.0: Adds ProtoLayoutEdgeContentLayoutResponsive, + ProtoLayoutPrimaryLayoutResponsive. + +(##) Version Compatibility + +There are multiple older versions available of this library: + +| Version | Date | Issues | Compatible | Compiled | Requires | +|-------------------:|----------|-------:|------------|--------------:|---------:| +| 1.4.0-rc01|2026/02/25| 3| Yes| 8.7+| 8.7+| +| 1.4.0-beta01|2026/02/11| 3| Yes| 8.7+| 8.7+| +| 1.4.0-alpha05|2026/01/29| 3| Yes| 8.7+| 8.7+| +| 1.4.0-alpha04|2026/01/14| 3| Yes| 8.7+| 8.7+| +| 1.4.0-alpha03|2025/12/17| 3| Yes| 8.7+| 8.7+| +| 1.4.0-alpha02|2025/10/22| 3| Yes| 8.7+| 8.7+| +| 1.4.0-alpha01|2025/09/24| 3| Yes| 8.7+| 8.7+| +| 1.3.0|2025/06/04| 3| Yes| 8.7+| 8.7+| +| 1.2.1|2024/10/16| 3| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.2.0|2024/08/07| 3| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.1.0|2024/02/07| 1| Yes| 8.0 and 8.1|8.0 and 8.1| + + \ No newline at end of file diff --git a/docs/checks/androidx_wear_protolayout_protolayout.md.html b/docs/checks/androidx_wear_protolayout_protolayout.md.html index cd1d6eb1..2cd4875d 100644 --- a/docs/checks/androidx_wear_protolayout_protolayout.md.html +++ b/docs/checks/androidx_wear_protolayout_protolayout.md.html @@ -21,11 +21,11 @@ (##) Included Issues -|Issue Id |Issue Description | -|----------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------| -|[ProtoLayoutMinSchema](ProtoLayoutMinSchema.md.html) |ProtoLayout feature is not guaranteed to be available on the target device API | -|[ProtoLayoutPrimaryLayoutResponsive](ProtoLayoutPrimaryLayoutResponsive.md.html) |ProtoLayout Material PrimaryLayout should be used with responsive behaviourto ensure the best behaviour across different screen sizes and locales | -|[ProtoLayoutEdgeContentLayoutResponsive](ProtoLayoutEdgeContentLayoutResponsive.md.html)|ProtoLayout Material EdgeContentLayout should be used with responsivebehaviour to ensure the best behaviour across different screen sizes andlocales| +|Issue Id |Issue Description | +|------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------| +|[ProtoLayoutMinSchema](ProtoLayoutMinSchema-2.md.html) |ProtoLayout feature is not guaranteed to be available on the target device API | +|[ProtoLayoutPrimaryLayoutResponsive](ProtoLayoutPrimaryLayoutResponsive-2.md.html) |ProtoLayout Material PrimaryLayout should be used with responsive behaviourto ensure the best behaviour across different screen sizes and locales | +|[ProtoLayoutEdgeContentLayoutResponsive](ProtoLayoutEdgeContentLayoutResponsive-2.md.html)|ProtoLayout Material EdgeContentLayout should be used with responsivebehaviour to ensure the best behaviour across different screen sizes andlocales| (##) Including @@ -62,7 +62,6 @@ NOTE: These lint checks are **also** made available separate from the main library. Use one of the following artifacts: -* `androidx.wear.protolayout:protolayout-expression:1.3.0-beta01` * `androidx.wear.protolayout:protolayout-material3:1.3.0-beta01` * `androidx.wear.protolayout:protolayout-material:1.3.0-beta01` diff --git a/docs/checks/androidx_work_work-runtime.md.html b/docs/checks/androidx_work_work-runtime.md.html index a5aa0bfe..7193a54f 100644 --- a/docs/checks/androidx_work_work-runtime.md.html +++ b/docs/checks/androidx_work_work-runtime.md.html @@ -17,7 +17,7 @@ Compiled : Lint 8.7+ Artifact -: androidx.work:work-runtime:2.10.1 +: androidx.work:work-runtime:2.11.1 (##) Included Issues @@ -41,17 +41,17 @@ ``` // build.gradle.kts -implementation("androidx.work:work-runtime:2.10.1") +implementation("androidx.work:work-runtime:2.11.1") // build.gradle -implementation 'androidx.work:work-runtime:2.10.1' +implementation 'androidx.work:work-runtime:2.11.1' // build.gradle.kts with version catalogs: implementation(libs.work.runtime) # libs.versions.toml [versions] -work-runtime = "2.10.1" +work-runtime = "2.11.1" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -63,7 +63,7 @@ } ``` -2.10.1 is the version this documentation was generated from; +2.11.1 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -82,6 +82,12 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| +| 2.11.1|2026/01/29| 9| Yes| 8.7+|8.0 and 8.1| +| 2.11.0|2025/10/22| 9| Yes| 8.7+|8.0 and 8.1| +| 2.10.5|2025/09/24| 9| Yes| 8.7+|8.0 and 8.1| +| 2.10.4|2025/09/10| 9| Yes| 8.7+|8.0 and 8.1| +| 2.10.3|2025/07/30| 9| Yes| 8.7+|8.0 and 8.1| +| 2.10.2|2025/06/18| 9| Yes| 8.7+|8.0 and 8.1| | 2.10.1|2025/04/23| 9| Yes| 8.7+|8.0 and 8.1| | 2.10.0|2024/10/30| 9| Yes| 8.7+|8.0 and 8.1| | 2.9.1|2024/08/07| 9| Yes| 8.0 and 8.1|8.0 and 8.1| diff --git a/docs/checks/categories.md.html b/docs/checks/categories.md.html index 4ebcb6e6..255f59c5 100644 --- a/docs/checks/categories.md.html +++ b/docs/checks/categories.md.html @@ -3,7 +3,7 @@ Order: [Alphabetical](index.md.html) | By category | [By vendor](vendors.md.html) | [By severity](severity.md.html) | [By year](year.md.html) | [Libraries](libraries.md.html) -* Correctness (549) +* Correctness (572) - [AaptCrash: Potential AAPT crash](AaptCrash.md.html) - [AccidentalOctal: Accidental Octal](AccidentalOctal.md.html) @@ -89,6 +89,7 @@ - [DeviceAdmin: Malformed Device Admin](DeviceAdmin.md.html) - [DialogFragmentCallbacksDetector: Use onCancel() and onDismiss() instead of calling setOnCancelListener() and setOnDismissListener() from onCreateDialog()](DialogFragmentCallbacksDetector.md.html) - [DiffUtilEquals: Suspicious DiffUtil Equality](DiffUtilEquals.md.html) + - [DisallowLookaheadAnimationVisualDebug: LookaheadAnimationVisualDebugging and CustomizedLookaheadAnimationVisualDebugging are disallowed in production code](DisallowLookaheadAnimationVisualDebug.md.html) - [DiscouragedApi: Using discouraged APIs](DiscouragedApi.md.html) - [DiscouragedPrivateApi: Using Discouraged Private API](DiscouragedPrivateApi.md.html) - [DoNotCallProviders: Dagger provider methods should not be called directly by user code](DoNotCallProviders.md.html) @@ -101,6 +102,7 @@ - [DoNotMockPlatformTypes: platform types should not be mocked](DoNotMockPlatformTypes.md.html) - [DoNotMockRecordClass: record classes represent pure data classes, so mocking them should not be necessary](DoNotMockRecordClass.md.html) - [DoNotMockSealedClass: sealed classes have a restricted type hierarchy, use a subtype instead](DoNotMockSealedClass.md.html) + - [DontUseAccessibilityNodeInfoGetText: Do not use AccessibilityNodeInfo#getText in a UiAutomatorTestScope](DontUseAccessibilityNodeInfoGetText.md.html) - [DuplicateActivity: Activity registered more than once](DuplicateActivity.md.html) - [DuplicateDefinition: Duplicate definitions of resources](DuplicateDefinition.md.html) - [DuplicateIds: Duplicate ids within a single layout](DuplicateIds.md.html) @@ -143,6 +145,7 @@ - [FullyQualifiedResource: Resources should use an import alias instead of being fully qualified](FullyQualifiedResource.md.html) - [GestureBackNavigation: Usage of KeyEvent.KEYCODE_BACK](GestureBackNavigation.md.html) - [GetLocales: Locale crash](GetLocales.md.html) + - [GlobalOptionInConsumerRules: Library has global options in consumer rules](GlobalOptionInConsumerRules.md.html) - [GradleCompatible: Incompatible Gradle Versions](GradleCompatible.md.html) - [GradleDependency: Obsolete Gradle Dependency](GradleDependency.md.html) - [GradleDeprecated: Deprecated Gradle Construct](GradleDeprecated.md.html) @@ -180,12 +183,15 @@ - [InjectInJava: Only Kotlin classes should be injected in order for Anvil to work](InjectInJava.md.html) - [InlinedApi: Using inlined constants on older versions](InlinedApi.md.html) - [InnerclassSeparator: Inner classes should use `$` rather than `.`](InnerclassSeparator.md.html) + - [InstantAppCall: Instant App call](InstantAppCall.md.html) + - [InstantAppDeprecation: Instant App Deprecation](InstantAppDeprecation.md.html) - [Instantiatable: Registered class is not instantiatable](Instantiatable.md.html) - [IntentFilterUniqueDataAttributes: Data tags should only declare unique attributes](IntentFilterUniqueDataAttributes.md.html) - [IntentReset: Suspicious mix of `setType` and `setData`](IntentReset.md.html) - [InternalAgpApiUsage: Avoid using internal Android Gradle Plugin APIs](InternalAgpApiUsage.md.html) - [InternalGradleApiUsage: Avoid using internal Gradle APIs](InternalGradleApiUsage.md.html) - [InternalInsetResource: Using internal inset dimension resource](InternalInsetResource.md.html) + - [InternalKgpApiUsage: Avoid using internal Kotlin Gradle Plugin APIs](InternalKgpApiUsage.md.html) - [InvalidAccessibility: Marks invalid accessibility usages](InvalidAccessibility.md.html) - [InvalidAnalyticsName: Invalid Analytics Name](InvalidAnalyticsName.md.html) - [InvalidColorHexValue: Invalid Color hex value](InvalidColorHexValue.md.html) @@ -194,9 +200,11 @@ - [InvalidImeActionId: Invalid imeActionId declaration](InvalidImeActionId.md.html) - [InvalidImport: Flags invalid imports](InvalidImport.md.html) - [InvalidLanguageTagDelimiter: Underscore (`_`) is an unsupported delimiter for subtags](InvalidLanguageTagDelimiter.md.html) + - [InvalidManifestAttribute: Invalid manifest attribute](InvalidManifestAttribute.md.html) - [InvalidNavigation: No start destination specified](InvalidNavigation.md.html) - [InvalidPackage: Package not included in Android](InvalidPackage.md.html) - [InvalidPeriodicWorkRequestInterval: Invalid interval duration](InvalidPeriodicWorkRequestInterval.md.html) + - [InvalidPurposeString: Invalid purpose string for permission](InvalidPurposeString.md.html) - [InvalidResourceFolder: Invalid Resource Folder](InvalidResourceFolder.md.html) - [InvalidSetHasFixedSize: When using `setHasFixedSize()` in an `RecyclerView`, `wrap_content` cannot be used as a value for `size` in the scrolling direction.](InvalidSetHasFixedSize.md.html) - [InvalidSingleLineComment: Marks single line comments that are not sentences](InvalidSingleLineComment.md.html) @@ -219,6 +227,7 @@ - [LibraryCustomView: Custom views in libraries should use res-auto-namespace](LibraryCustomView.md.html) - [LifecycleCurrentStateInComposition: Lifecycle.currentState should not be called within composition](LifecycleCurrentStateInComposition.md.html) - [LocalContextConfigurationRead: Reading Configuration using LocalContext.current.resources.configuration](LocalContextConfigurationRead.md.html) + - [LocalContextGetResourceValueCall: Querying resource properties using LocalContext.current](LocalContextGetResourceValueCall.md.html) - [LocalContextResourcesRead: Reading Resources using LocalContext.current.resources](LocalContextResourcesRead.md.html) - [LocalSuppress: @SuppressLint on invalid element](LocalSuppress.md.html) - [LocaleFolder: Wrong locale name](LocaleFolder.md.html) @@ -253,6 +262,7 @@ - [MissingOnPlayFromSearch: Missing `onPlayFromSearch`](MissingOnPlayFromSearch.md.html) - [MissingPermission: Missing Permissions](MissingPermission.md.html) - [MissingPrefix: Missing Android XML namespace](MissingPrefix.md.html) + - [MissingPurpose: Missing purpose for permission](MissingPurpose.md.html) - [MissingResourceImportAlias: Missing import alias for R class](MissingResourceImportAlias.md.html) - [MissingResourcesProperties: Missing resources.properties file](MissingResourcesProperties.md.html) - [MissingScrollbars: Scroll views should declare a scrollbar](MissingScrollbars.md.html) @@ -333,6 +343,7 @@ - [NoCollectCallFound: You must call collect on the given progress flow when using PredictiveBackHandler](NoCollectCallFound.md.html) - [NoOp: NoOp Code](NoOp.md.html) - [NonConstantResourceId: Checks use of resource IDs in places requiring constants](NonConstantResourceId.md.html) + - [NonObservableLocale: Reading locale in a non-observable way in a composable function](NonObservableLocale.md.html) - [NonResizeableActivity: Activity is set to be non-resizeable](NonResizeableActivity.md.html) - [NotConstructor: Not a Constructor](NotConstructor.md.html) - [NotInterpolated: Incorrect Interpolation](NotInterpolated.md.html) @@ -364,12 +375,16 @@ - [PropertyEscape: Incorrect property escapes](PropertyEscape.md.html) - [ProtectedPermissions: Using system app permission](ProtectedPermissions.md.html) - [ProtoLayoutEdgeContentLayoutResponsive: ProtoLayout Material EdgeContentLayout should be used with responsivebehaviour to ensure the best behaviour across different screen sizes andlocales](ProtoLayoutEdgeContentLayoutResponsive.md.html) + - [ProtoLayoutEdgeContentLayoutResponsive: ProtoLayout Material EdgeContentLayout should be used with responsivebehaviour to ensure the best behaviour across different screen sizes andlocales](ProtoLayoutEdgeContentLayoutResponsive-2.md.html) - [ProtoLayoutMinSchema: ProtoLayout feature is not guaranteed to be available on the target device API](ProtoLayoutMinSchema.md.html) + - [ProtoLayoutMinSchema: ProtoLayout feature is not guaranteed to be available on the target device API](ProtoLayoutMinSchema-2.md.html) - [ProtoLayoutPrimaryLayoutResponsive: ProtoLayout Material PrimaryLayout should be used with responsive behaviourto ensure the best behaviour across different screen sizes and locales](ProtoLayoutPrimaryLayoutResponsive.md.html) + - [ProtoLayoutPrimaryLayoutResponsive: ProtoLayout Material PrimaryLayout should be used with responsive behaviourto ensure the best behaviour across different screen sizes and locales](ProtoLayoutPrimaryLayoutResponsive-2.md.html) - [ProvidesMustNotBeAbstract: @Provides functions cannot be abstract](ProvidesMustNotBeAbstract.md.html) - [PublicKeyCredential: Creating public key credential](PublicKeyCredential.md.html) - [PxUsage: Using 'px' dimension](PxUsage.md.html) - [QueryPermissionsNeeded: Using APIs affected by query permissions](QueryPermissionsNeeded.md.html) + - [R8GradualApi: R8 Gradual API can be used only with experimental flag](R8GradualApi.md.html) - [Range: Outside Range](Range.md.html) - [RawColor: Flags color that are not defined as resource](RawColor.md.html) - [RawDimen: Flags dimensions that are not defined as resource](RawDimen.md.html) @@ -379,6 +394,7 @@ - [RedundantBinds: @Binds functions should return a different type](RedundantBinds.md.html) - [RedundantLabel: Redundant label on activity](RedundantLabel.md.html) - [ReferenceType: Incorrect reference types](ReferenceType.md.html) + - [ReflectionAnnotation: Missing Reflection Annotation](ReflectionAnnotation.md.html) - [Registered: Class is not registered in the manifest](Registered.md.html) - [RememberInComposition: Calling a @RememberInComposition annotated declaration inside composition without using `remember`](RememberInComposition.md.html) - [RememberReturnType: `remember` calls must not return `Unit`](RememberReturnType.md.html) @@ -397,6 +413,10 @@ - [ResourceType: Wrong Resource Type](ResourceType.md.html) - [RestrictCallsTo: Methods annotated with @RestrictedCallsTo should only be called from the specified scope](RestrictCallsTo.md.html) - [RestrictedApi: Restricted API](RestrictedApi.md.html) + - [RetainLeaksContext: Using `retain { ... }` to store a value that extends from or references `Context` will cause a memory leak.](RetainLeaksContext.md.html) + - [RetainRememberObserver: Values returned by `retain { ... }` must not implement RememberObserver unless they also implement RetainObserver.](RetainRememberObserver.md.html) + - [RetainUnitType: `retain` calls must not return `Unit`](RetainUnitType.md.html) + - [RetainingDoNotRetainType: Types annotated with `@DoNotRetain` should not be returned as the result of `retain`, either directly or transitively](RetainingDoNotRetainType.md.html) - [RetrofitUsage: This is replaced by the caller](RetrofitUsage.md.html) - [ReturnFromAwaitPointerEventScope: Returning from awaitPointerEventScope may cause some input events to be dropped](ReturnFromAwaitPointerEventScope.md.html) - [ReturnThis: Method must return `this`](ReturnThis.md.html) @@ -452,7 +472,9 @@ - [TestLifecycleOwnerInCoroutine: Use the suspending function setCurrentState(), rather than directly accessing the currentState property](TestLifecycleOwnerInCoroutine.md.html) - [TestManifestGradleConfiguration: The ui-test-manifest library should be included using the debugImplementation configuration](TestManifestGradleConfiguration.md.html) - [TestParameterSiteTarget: `TestParameter` annotation has the wrong site target](TestParameterSiteTarget.md.html) + - [TextConcatSpace: Missing space in text concatenation?](TextConcatSpace.md.html) - [TextViewEdits: TextView should probably be an EditText instead](TextViewEdits.md.html) + - [ThreadConstraint: Wrong Thread (with inference)](ThreadConstraint.md.html) - [TimberExceptionLogging: Exception Logging](TimberExceptionLogging.md.html) - [TimberTagLength: Too Long Log Tags](TimberTagLength.md.html) - [Todo: Marks todos in any given file](Todo.md.html) @@ -514,6 +536,7 @@ - [WatchFaceEditor: Watch face editor must use launchMode="standard"](WatchFaceEditor.md.html) - [WatchFaceForAndroidX: AndroidX watch faces must use action `WATCH_FACE_EDITOR`](WatchFaceForAndroidX.md.html) - [WatchFaceFormatDeclaresHasNoCode: The `hasCode` attribute should be set to `false`](WatchFaceFormatDeclaresHasNoCode.md.html) + - [WatchFaceFormatInvalidVersion: The Watch Face Format version is invalid](WatchFaceFormatInvalidVersion.md.html) - [WatchFaceFormatMissingVersion: The Watch Face Format version is missing](WatchFaceFormatMissingVersion.md.html) - [WearMaterialTheme: Using not non-Wear `MaterialTheme` in a Wear OS project](WearMaterialTheme.md.html) - [WearStandaloneAppFlag: Invalid or missing Wear standalone app flag](WearStandaloneAppFlag.md.html) @@ -587,7 +610,7 @@ - [PermissionImpliesUnsupportedChromeOsHardware: Permission Implies Unsupported Chrome OS Hardware](PermissionImpliesUnsupportedChromeOsHardware.md.html) - [UnsupportedChromeOsHardware: Unsupported Chrome OS Hardware Feature](UnsupportedChromeOsHardware.md.html) -* Security (81) +* Security (87) - [AcceptsUserCertificates: Allowing User Certificates](AcceptsUserCertificates.md.html) - [AddJavascriptInterface: `addJavascriptInterface` Called](AddJavascriptInterface.md.html) @@ -605,18 +628,22 @@ - [DeprecatedProvider: Using BC Provider](DeprecatedProvider.md.html) - [DisabledAllSafeBrowsing: Application has disabled safe browsing for all WebView objects](DisabledAllSafeBrowsing.md.html) - [DoNotCallViewToString: Do not use `View.toString()`](DoNotCallViewToString.md.html) + - [DotPathAttribute: The "path" attribute should not be set to "." as a path](DotPathAttribute.md.html) - [EasterEgg: Code contains easter egg](EasterEgg.md.html) - [ExportedContentProvider: Content provider does not require permission](ExportedContentProvider.md.html) - [ExportedPreferenceActivity: PreferenceActivity should not be exported](ExportedPreferenceActivity.md.html) - [ExportedReceiver: Receiver does not require permission](ExportedReceiver.md.html) - [ExportedService: Exported service does not require permission](ExportedService.md.html) - [ExposedRootPath: Application specifies the device root directory](ExposedRootPath.md.html) + - [ExtendedBluetoothDiscoveryDuration: The EXTRA_DISCOVERABLE_DURATION parameter is unsafely high](ExtendedBluetoothDiscoveryDuration.md.html) - [GetInstance: Cipher.getInstance with ECB](GetInstance.md.html) - [GrantAllUris: Content provider shares everything](GrantAllUris.md.html) + - [HardcodedAbsolutePath: The "path" attribute should not be an absolute path](HardcodedAbsolutePath.md.html) - [HardcodedDebugMode: Hardcoded value of `android:debuggable` in the manifest](HardcodedDebugMode.md.html) - [HardwareIds: Hardware Id Usage](HardwareIds.md.html) - [InsecureBaseConfiguration: Insecure Base Configuration](InsecureBaseConfiguration.md.html) - [InsecureDnsSdkLevel: Application vulnerable to DNS spoofing attacks](InsecureDnsSdkLevel.md.html) + - [InsecureLegacyExternalStorage: The `requestLegacyExternalStorage` attribute is set to true, opting the app out of scoped storage](InsecureLegacyExternalStorage.md.html) - [InsecurePermissionProtectionLevel: Custom permission created with a normal `protectionLevel`](InsecurePermissionProtectionLevel.md.html) - [InsecureStickyBroadcastsMethod: Usage of insecure sticky broadcasts](InsecureStickyBroadcastsMethod.md.html) - [InsecureStickyBroadcastsPermission: Usage of insecure sticky broadcasts](InsecureStickyBroadcastsPermission.md.html) @@ -625,7 +652,8 @@ - [InvalidPermission: Invalid Permission Attribute](InvalidPermission.md.html) - [JavascriptInterface: Missing @JavascriptInterface on methods](JavascriptInterface.md.html) - [KnownPermissionError: Value specified for permission is a known error](KnownPermissionError.md.html) - - [MissingAutoVerifyAttribute: Application has custom scheme intent filters with missing `autoVerify` attributes](MissingAutoVerifyAttribute.md.html) + - [LogInfoDisclosure: Potentially sensitive information logged to Logcat](LogInfoDisclosure.md.html) + - [MissingAutoVerifyAttribute: Application has http/https scheme intent filters with missing `autoVerify` attributes](MissingAutoVerifyAttribute.md.html) - [MutableImplicitPendingIntent: Mutable Implicit PendingIntent is disallowed](MutableImplicitPendingIntent.md.html) - [PackagedPrivateKey: Packaged private key](PackagedPrivateKey.md.html) - [PermissionNamingConvention: Permission name does not follow recommended convention](PermissionNamingConvention.md.html) @@ -643,6 +671,7 @@ - [SetWorldReadable: `File.setReadable()` used to make file world-readable](SetWorldReadable.md.html) - [SetWorldWritable: `File.setWritable()` used to make file world-writable](SetWorldWritable.md.html) - [SignatureOrSystemPermissions: Declaring signatureOrSystem permissions](SignatureOrSystemPermissions.md.html) + - [SlashPathAttribute: The "path" attribute should not be set to "/" as a path](SlashPathAttribute.md.html) - [StrandhoggVulnerable: Application vulnerable to Strandhogg attacks](StrandhoggVulnerable.md.html) - [SystemPermissionTypo: Permission appears to be a standard permission with a typo](SystemPermissionTypo.md.html) - [TapjackingVulnerable: Application's UI is vulnerable to tapjacking attacks](TapjackingVulnerable.md.html) @@ -658,7 +687,6 @@ - [UnsafeIntentLaunch: Launched Unsafe Intent](UnsafeIntentLaunch.md.html) - [UnsafeNativeCodeLocation: Native code outside library directory](UnsafeNativeCodeLocation.md.html) - [UnsafeProtectedBroadcastReceiver: Unsafe Protected `BroadcastReceiver`](UnsafeProtectedBroadcastReceiver.md.html) - - [UnsanitizedContentProviderFilename: Trusting ContentProvider filenames without any sanitization](UnsanitizedContentProviderFilename.md.html) - [UnsanitizedFilenameFromContentProvider: Trusting ContentProvider filenames without any sanitization](UnsanitizedFilenameFromContentProvider.md.html) - [UnspecifiedImmutableFlag: Missing `PendingIntent` mutability flag](UnspecifiedImmutableFlag.md.html) - [UseCheckPermission: Using the result of check permission calls](UseCheckPermission.md.html) @@ -670,6 +698,7 @@ - [WebViewClientOnReceivedSslError: Proceeds with the HTTPS connection despite SSL errors](WebViewClientOnReceivedSslError.md.html) - [WorldReadableFiles: `openFileOutput()` with `MODE_WORLD_READABLE`](WorldReadableFiles.md.html) - [WorldWriteableFiles: `openFileOutput()` with `MODE_WORLD_WRITEABLE`](WorldWriteableFiles.md.html) + - [ZeroBluetoothDiscoveryDuration: The EXTRA_DISCOVERABLE_DURATION parameter is set to zero](ZeroBluetoothDiscoveryDuration.md.html) * Compliance (7) @@ -681,7 +710,23 @@ - [PlaySdkIndexVulnerability: Library has vulnerability issues in SDK Index](PlaySdkIndexVulnerability.md.html) - [QueryAllPackagesPermission: Using the QUERY_ALL_PACKAGES permission](QueryAllPackagesPermission.md.html) -* Performance (48) +* Play Policy (13) + + - [AccessibilityPolicy: Accessibility Insights](AccessibilityPolicy.md.html) + - [AdvertisingIdPolicy: Advertising Id Insights](AdvertisingIdPolicy.md.html) + - [AllFilesAccessPolicy: All Files Access Insights](AllFilesAccessPolicy.md.html) + - [BackgroundLocationPolicy: Background Location Insights](BackgroundLocationPolicy.md.html) + - [ExactAlarmPolicy: Exact Alarm Insights](ExactAlarmPolicy.md.html) + - [ForegroundServicesPolicy: Foreground Services Insights](ForegroundServicesPolicy.md.html) + - [FullScreenIntentPolicy: Full Screen Intent Insights](FullScreenIntentPolicy.md.html) + - [HealthConnectPolicy: Health Connect Insights](HealthConnectPolicy.md.html) + - [PackageVisibilityPolicy: Package/App Visibility Insights](PackageVisibilityPolicy.md.html) + - [PhotoAndVideoPolicy: Photos & Video Insights](PhotoAndVideoPolicy.md.html) + - [RequestInstallPackagesPolicy: Request Install Packages Insights](RequestInstallPackagesPolicy.md.html) + - [SmsAndCallLogPolicy: SMS/Call Log Insights](SmsAndCallLogPolicy.md.html) + - [VpnServicePolicy: VPN Service Insights](VpnServicePolicy.md.html) + +* Performance (49) - [AnimatorKeep: Missing @Keep for Animated Properties](AnimatorKeep.md.html) - [AnnotationProcessorOnCompilePath: Annotation Processor on Compile Classpath](AnnotationProcessorOnCompilePath.md.html) @@ -707,6 +752,7 @@ - [ObsoleteLayoutParam: Obsolete layout params](ObsoleteLayoutParam.md.html) - [ObsoleteSdkInt: Obsolete SDK_INT Version Check](ObsoleteSdkInt.md.html) - [Overdraw: Overdraw: Painting regions more than once](Overdraw.md.html) + - [ProguardAndroidTxtUsage: Use proguard-android-optimize.txt to enable optimizations](ProguardAndroidTxtUsage.md.html) - [Recycle: Missing `recycle()` calls](Recycle.md.html) - [RedundantNamespace: Redundant namespace](RedundantNamespace.md.html) - [StaticFieldLeak: Static Field Leaks](StaticFieldLeak.md.html) diff --git a/docs/checks/com_android_security_lint_lint.md.html b/docs/checks/com_android_security_lint_lint.md.html index 82cb4932..e9b8f705 100644 --- a/docs/checks/com_android_security_lint_lint.md.html +++ b/docs/checks/com_android_security_lint_lint.md.html @@ -13,30 +13,36 @@ Compiled : Lint 8.0 and 8.1 Artifact -: com.android.security.lint:lint:1.0.3 +: com.android.security.lint:lint:1.0.4 (##) Included Issues -|Issue Id |Issue Description | -|--------------------------------------------------------------------------------|---------------------------------------------------------------------------------| -|[VulnerableCryptoAlgorithm](VulnerableCryptoAlgorithm.md.html) |Application uses vulnerable cryptography algorithms | -|[UnsafeCryptoAlgorithmUsage](UnsafeCryptoAlgorithmUsage.md.html) |Application uses unsafe cipher modes or paddings with cryptographic algorithms | -|[MissingAutoVerifyAttribute](MissingAutoVerifyAttribute.md.html) |Application has custom scheme intent filters with missing `autoVerify` attributes| -|[InsecureDnsSdkLevel](InsecureDnsSdkLevel.md.html) |Application vulnerable to DNS spoofing attacks | -|[StrandhoggVulnerable](StrandhoggVulnerable.md.html) |Application vulnerable to Strandhogg attacks | -|[TapjackingVulnerable](TapjackingVulnerable.md.html) |Application's UI is vulnerable to tapjacking attacks | -|[DefaultCleartextTraffic](DefaultCleartextTraffic.md.html) |Application by default permits cleartext traffic | -|[DefaultTrustedUserCerts](DefaultTrustedUserCerts.md.html) |Application by default trusts user-added CA certificates | -|[UnintendedExposedUrl](UnintendedExposedUrl.md.html) |Application may have a debugging or development URL publicly exposed | -|[UnintendedPrivateIpAddress](UnintendedPrivateIpAddress.md.html) |Application may have a private IP address publicly exposed | -|[ExposedRootPath](ExposedRootPath.md.html) |Application specifies the device root directory | -|[SensitiveExternalPath](SensitiveExternalPath.md.html) |Application may expose sensitive info like PII by storing it in external storage | -|[WeakPrng](WeakPrng.md.html) |Application uses non-cryptographically secure pseudorandom number generators | -|[DisabledAllSafeBrowsing](DisabledAllSafeBrowsing.md.html) |Application has disabled safe browsing for all WebView objects | -|[InsecurePermissionProtectionLevel](InsecurePermissionProtectionLevel.md.html) |Custom permission created with a normal `protectionLevel` | -|[UnsanitizedContentProviderFilename](UnsanitizedContentProviderFilename.md.html)|Trusting ContentProvider filenames without any sanitization | -|[InsecureStickyBroadcastsMethod](InsecureStickyBroadcastsMethod.md.html) |Usage of insecure sticky broadcasts | -|[InsecureStickyBroadcastsPermission](InsecureStickyBroadcastsPermission.md.html)|Usage of insecure sticky broadcasts | +|Issue Id |Issue Description | +|--------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------| +|[VulnerableCryptoAlgorithm](VulnerableCryptoAlgorithm.md.html) |Application uses vulnerable cryptography algorithms | +|[UnsafeCryptoAlgorithmUsage](UnsafeCryptoAlgorithmUsage.md.html) |Application uses unsafe cipher modes or paddings with cryptographic algorithms | +|[InsecureDnsSdkLevel](InsecureDnsSdkLevel.md.html) |Application vulnerable to DNS spoofing attacks | +|[StrandhoggVulnerable](StrandhoggVulnerable.md.html) |Application vulnerable to Strandhogg attacks | +|[TapjackingVulnerable](TapjackingVulnerable.md.html) |Application's UI is vulnerable to tapjacking attacks | +|[DefaultCleartextTraffic](DefaultCleartextTraffic.md.html) |Application by default permits cleartext traffic | +|[DefaultTrustedUserCerts](DefaultTrustedUserCerts.md.html) |Application by default trusts user-added CA certificates | +|[UnintendedExposedUrl](UnintendedExposedUrl.md.html) |Application may have a debugging or development URL publicly exposed | +|[UnintendedPrivateIpAddress](UnintendedPrivateIpAddress.md.html) |Application may have a private IP address publicly exposed | +|[ExposedRootPath](ExposedRootPath.md.html) |Application specifies the device root directory | +|[SensitiveExternalPath](SensitiveExternalPath.md.html) |Application may expose sensitive info like PII by storing it in external storage | +|[DotPathAttribute](DotPathAttribute.md.html) |The "path" attribute should not be set to "." as a path | +|[SlashPathAttribute](SlashPathAttribute.md.html) |The "path" attribute should not be set to "/" as a path | +|[HardcodedAbsolutePath](HardcodedAbsolutePath.md.html) |The "path" attribute should not be an absolute path | +|[MissingAutoVerifyAttribute](MissingAutoVerifyAttribute.md.html) |Application has http/https scheme intent filters with missing `autoVerify` attributes | +|[WeakPrng](WeakPrng.md.html) |Application uses non-cryptographically secure pseudorandom number generators | +|[DisabledAllSafeBrowsing](DisabledAllSafeBrowsing.md.html) |Application has disabled safe browsing for all WebView objects | +|[InsecurePermissionProtectionLevel](InsecurePermissionProtectionLevel.md.html) |Custom permission created with a normal `protectionLevel` | +|[InsecureStickyBroadcastsMethod](InsecureStickyBroadcastsMethod.md.html) |Usage of insecure sticky broadcasts | +|[InsecureStickyBroadcastsPermission](InsecureStickyBroadcastsPermission.md.html)|Usage of insecure sticky broadcasts | +|[ZeroBluetoothDiscoveryDuration](ZeroBluetoothDiscoveryDuration.md.html) |The EXTRA_DISCOVERABLE_DURATION parameter is set to zero | +|[ExtendedBluetoothDiscoveryDuration](ExtendedBluetoothDiscoveryDuration.md.html)|The EXTRA_DISCOVERABLE_DURATION parameter is unsafely high | +|[LogInfoDisclosure](LogInfoDisclosure.md.html) |Potentially sensitive information logged to Logcat | +|[InsecureLegacyExternalStorage](InsecureLegacyExternalStorage.md.html) |The `requestLegacyExternalStorage` attribute is set to true, opting the app out of scoped storage| (##) Including @@ -47,17 +53,17 @@ ``` // build.gradle.kts -lintChecks("com.android.security.lint:lint:1.0.3") +lintChecks("com.android.security.lint:lint:1.0.4") // build.gradle -lintChecks 'com.android.security.lint:lint:1.0.3' +lintChecks 'com.android.security.lint:lint:1.0.4' // build.gradle.kts with version catalogs: lintChecks(libs.com.android.security.lint.lint) # libs.versions.toml [versions] -com-android-security-lint-lint = "1.0.3" +com-android-security-lint-lint = "1.0.4" [libraries] # For clarity and text wrapping purposes the following declaration is # shown split up across lines, but in TOML it needs to be on a single @@ -69,12 +75,12 @@ } ``` -1.0.3 is the version this documentation was generated from; +1.0.4 is the version this documentation was generated from; there may be newer versions available. (##) Changes -* 1.0.1: First version includes DefaultCleartextTraffic, +* 1.0.0: First version includes DefaultCleartextTraffic, DefaultTrustedUserCerts, DisabledAllSafeBrowsing, ExposedRootPath, InsecureDnsSdkLevel, InsecurePermissionProtectionLevel, MissingAutoVerifyAttribute, SensitiveExternalPath, @@ -86,6 +92,11 @@ UnsanitizedFilenameFromContentProvider. * 1.0.3: Adds UnsanitizedContentProviderFilename. Removes UnsanitizedFilenameFromContentProvider. +* 1.0.4: Adds DotPathAttribute, ExtendedBluetoothDiscoveryDuration, + HardcodedAbsolutePath, InsecureLegacyExternalStorage, + LogInfoDisclosure, SlashPathAttribute, + ZeroBluetoothDiscoveryDuration. Removes + UnsanitizedContentProviderFilename. (##) Version Compatibility @@ -93,8 +104,10 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| +| 1.0.4| | 24| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.0.3| | 18| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.0.2| | 18| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.0.1| | 15| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.0.0| | 15| Yes| 8.0 and 8.1|8.0 and 8.1| \ No newline at end of file diff --git a/docs/checks/com_google_play_policy_insights_insights-lint.md.html b/docs/checks/com_google_play_policy_insights_insights-lint.md.html new file mode 100644 index 00000000..311a93f2 --- /dev/null +++ b/docs/checks/com_google_play_policy_insights_insights-lint.md.html @@ -0,0 +1,81 @@ +(#) com.google.play.policy.insights:insights-lint + +Vendor +: Play policy insights beta +Min +: Lint 8.2 to 8.6 +Compiled +: Lint 8.7+ +Artifact +: com.google.play.policy.insights:insights-lint:0.1.4 + +(##) Included Issues + +|Issue Id |Issue Description | +|--------------------------------------------------------------------|---------------------------------| +|[AccessibilityPolicy](AccessibilityPolicy.md.html) |Accessibility Insights | +|[AdvertisingIdPolicy](AdvertisingIdPolicy.md.html) |Advertising Id Insights | +|[AllFilesAccessPolicy](AllFilesAccessPolicy.md.html) |All Files Access Insights | +|[ExactAlarmPolicy](ExactAlarmPolicy.md.html) |Exact Alarm Insights | +|[ForegroundServicesPolicy](ForegroundServicesPolicy.md.html) |Foreground Services Insights | +|[FullScreenIntentPolicy](FullScreenIntentPolicy.md.html) |Full Screen Intent Insights | +|[HealthConnectPolicy](HealthConnectPolicy.md.html) |Health Connect Insights | +|[BackgroundLocationPolicy](BackgroundLocationPolicy.md.html) |Background Location Insights | +|[PackageVisibilityPolicy](PackageVisibilityPolicy.md.html) |Package/App Visibility Insights | +|[PhotoAndVideoPolicy](PhotoAndVideoPolicy.md.html) |Photos & Video Insights | +|[RequestInstallPackagesPolicy](RequestInstallPackagesPolicy.md.html)|Request Install Packages Insights| +|[SmsAndCallLogPolicy](SmsAndCallLogPolicy.md.html) |SMS/Call Log Insights | +|[VpnServicePolicy](VpnServicePolicy.md.html) |VPN Service Insights | + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("com.google.play.policy.insights:insights-lint:0.1.4") + +// build.gradle +implementation 'com.google.play.policy.insights:insights-lint:0.1.4' + +// build.gradle.kts with version catalogs: +implementation(libs.insights.lint) + +# libs.versions.toml +[versions] +insights-lint = "0.1.4" +[libraries] +# For clarity and text wrapping purposes the following declaration is +# shown split up across lines, but in TOML it needs to be on a single +# line (see https://github.com/toml-lang/toml/issues/516) so adjust +# when pasting into libs.versions.toml: +insights-lint = { + module = "com.google.play.policy.insights:insights-lint", + version.ref = "insights-lint" +} +``` + +0.1.4 is the version this documentation was generated from; +there may be newer versions available. + +(##) Changes + +* 0.1.3: First version includes AccessibilityPolicy, + AdvertisingIdPolicy, AllFilesAccessPolicy, BackgroundLocationPolicy, + ExactAlarmPolicy, ForegroundServicesPolicy, FullScreenIntentPolicy, + HealthConnectPolicy, PackageVisibilityPolicy, PhotoAndVideoPolicy, + RequestInstallPackagesPolicy, SmsAndCallLogPolicy, + VpnServicePolicy. + +(##) Version Compatibility + +There are multiple older versions available of this library: + +| Version | Date | Issues | Compatible | Compiled | Requires | +|-------------------:|----------|-------:|------------|--------------:|---------:| +| 0.1.4| | 13| Yes| 8.7+|8.2 to 8.6| +| 0.1.3| | 13| Yes| 8.7+|8.2 to 8.6| + + \ No newline at end of file diff --git a/docs/checks/index.md.html b/docs/checks/index.md.html index 8cfb1c4c..6cd7bd8f 100644 --- a/docs/checks/index.md.html +++ b/docs/checks/index.md.html @@ -6,15 +6,18 @@ - [AaptCrash: Potential AAPT crash](AaptCrash.md.html) - [AcceptsUserCertificates: Allowing User Certificates](AcceptsUserCertificates.md.html) - [AccessibilityFocus: Forcing accessibility focus](AccessibilityFocus.md.html) + - [AccessibilityPolicy: Accessibility Insights](AccessibilityPolicy.md.html) - [AccessibilityScrollActions: Incomplete Scroll Action support](AccessibilityScrollActions.md.html) - [AccessibilityWindowStateChangedEvent: Use of accessibility window state change events](AccessibilityWindowStateChangedEvent.md.html) - [AccidentalOctal: Accidental Octal](AccidentalOctal.md.html) - [ActivityIconColor: Ongoing activity icon is not white](ActivityIconColor.md.html) - [AdapterViewChildren: `AdapterView` cannot have children in XML](AdapterViewChildren.md.html) - [AddJavascriptInterface: `addJavascriptInterface` Called](AddJavascriptInterface.md.html) + - [AdvertisingIdPolicy: Advertising Id Insights](AdvertisingIdPolicy.md.html) - [AlertDialogUsage: Use the support library AlertDialog instead of android.app.AlertDialog](AlertDialogUsage.md.html) - [Aligned16KB: Native library dependency not 16 KB aligned](Aligned16KB.md.html) - [AllCaps: Combining textAllCaps and markup](AllCaps.md.html) + - [AllFilesAccessPolicy: All Files Access Insights](AllFilesAccessPolicy.md.html) - [AllowAllHostnameVerifier: Insecure `HostnameVerifier`](AllowAllHostnameVerifier.md.html) - [AlwaysShowAction: Usage of `showAsAction=always`](AlwaysShowAction.md.html) - [AndroidGradlePluginVersion: Obsolete Android Gradle Plugin Version](AndroidGradlePluginVersion.md.html) @@ -43,6 +46,7 @@ - [Autofill: Use Autofill](Autofill.md.html) - [AvoidUsingNotNullOperator: Avoid using the !! operator in Kotlin](AvoidUsingNotNullOperator.md.html) - [BackButton: Back button](BackButton.md.html) + - [BackgroundLocationPolicy: Background Location Insights](BackgroundLocationPolicy.md.html) - [BadConfigurationProvider: Invalid WorkManager Configuration Provider](BadConfigurationProvider.md.html) - [BadHostnameVerifier: Insecure HostnameVerifier](BadHostnameVerifier.md.html) - [BadPeriodicWorkRequestEnqueue: Use `enqueueUniquePeriodicWork()` instead of `enqueue()`](BadPeriodicWorkRequestEnqueue.md.html) @@ -145,6 +149,7 @@ - [DiffUtilEquals: Suspicious DiffUtil Equality](DiffUtilEquals.md.html) - [DisableBaselineAlignment: Missing `baselineAligned` attribute](DisableBaselineAlignment.md.html) - [DisabledAllSafeBrowsing: Application has disabled safe browsing for all WebView objects](DisabledAllSafeBrowsing.md.html) + - [DisallowLookaheadAnimationVisualDebug: LookaheadAnimationVisualDebugging and CustomizedLookaheadAnimationVisualDebugging are disallowed in production code](DisallowLookaheadAnimationVisualDebug.md.html) - [DiscouragedApi: Using discouraged APIs](DiscouragedApi.md.html) - [DiscouragedPrivateApi: Using Discouraged Private API](DiscouragedPrivateApi.md.html) - [DoNotCallProviders: Dagger provider methods should not be called directly by user code](DoNotCallProviders.md.html) @@ -158,6 +163,8 @@ - [DoNotMockPlatformTypes: platform types should not be mocked](DoNotMockPlatformTypes.md.html) - [DoNotMockRecordClass: record classes represent pure data classes, so mocking them should not be necessary](DoNotMockRecordClass.md.html) - [DoNotMockSealedClass: sealed classes have a restricted type hierarchy, use a subtype instead](DoNotMockSealedClass.md.html) + - [DontUseAccessibilityNodeInfoGetText: Do not use AccessibilityNodeInfo#getText in a UiAutomatorTestScope](DontUseAccessibilityNodeInfoGetText.md.html) + - [DotPathAttribute: The "path" attribute should not be set to "." as a path](DotPathAttribute.md.html) - [DrawAllocation: Memory allocations within drawing code](DrawAllocation.md.html) - [DuplicateActivity: Activity registered more than once](DuplicateActivity.md.html) - [DuplicateDefinition: Duplicate definitions of resources](DuplicateDefinition.md.html) @@ -180,6 +187,7 @@ - [ErroneousLayoutAttribute: Layout attribute that's not applicable to a particular view](ErroneousLayoutAttribute.md.html) - [ErrorProneDoNotMockUsage: Use Slack's internal `@DoNotMock` annotation](ErrorProneDoNotMockUsage.md.html) - [ExactAlarm: Invalid Usage of Exact Alarms](ExactAlarm.md.html) + - [ExactAlarmPolicy: Exact Alarm Insights](ExactAlarmPolicy.md.html) - [ExceptionMessage: Please provide a string for the `lazyMessage` parameter](ExceptionMessage.md.html) - [ExifInterface: Using `android.media.ExifInterface`](ExifInterface.md.html) - [ExpensiveAssertion: Expensive Assertions](ExpensiveAssertion.md.html) @@ -191,6 +199,7 @@ - [ExportedReceiver: Receiver does not require permission](ExportedReceiver.md.html) - [ExportedService: Exported service does not require permission](ExportedService.md.html) - [ExposedRootPath: Application specifies the device root directory](ExposedRootPath.md.html) + - [ExtendedBluetoothDiscoveryDuration: The EXTRA_DISCOVERABLE_DURATION parameter is unsafely high](ExtendedBluetoothDiscoveryDuration.md.html) - [ExtraText: Extraneous text in resource files](ExtraText.md.html) - [ExtraTranslation: Extra translation](ExtraTranslation.md.html) - [FieldSiteTargetOnQualifierAnnotation: Redundant 'field:' used for Dagger qualifier annotation](FieldSiteTargetOnQualifierAnnotation.md.html) @@ -201,6 +210,7 @@ - [FontValidation: Validation of font files](FontValidation.md.html) - [ForegroundServicePermission: Missing permissions required by foregroundServiceType](ForegroundServicePermission.md.html) - [ForegroundServiceType: Missing `foregroundServiceType` attribute in manifest](ForegroundServiceType.md.html) + - [ForegroundServicesPolicy: Foreground Services Insights](ForegroundServicesPolicy.md.html) - [FormalGerman: Marks strings which contain formal German words](FormalGerman.md.html) - [FragmentAddMenuProvider: Use getViewLifecycleOwner() as the LifecycleOwner instead of a Fragment instance](FragmentAddMenuProvider.md.html) - [FragmentBackPressedCallback: Use getViewLifecycleOwner() as the LifecycleOwner instead of a Fragment instance](FragmentBackPressedCallback.md.html) @@ -212,12 +222,14 @@ - [FragmentTagUsage: Use FragmentContainerView instead of the tag](FragmentTagUsage.md.html) - [FrequentlyChangingValue: Reading a value annotated with @FrequentlyChangingValue inside composition](FrequentlyChangingValue.md.html) - [FullBackupContent: Valid Full Backup Content File](FullBackupContent.md.html) + - [FullScreenIntentPolicy: Full Screen Intent Insights](FullScreenIntentPolicy.md.html) - [FullyQualifiedResource: Resources should use an import alias instead of being fully qualified](FullyQualifiedResource.md.html) - [GestureBackNavigation: Usage of KeyEvent.KEYCODE_BACK](GestureBackNavigation.md.html) - [GetContentDescriptionOverride: Overriding `getContentDescription()` on a View](GetContentDescriptionOverride.md.html) - [GetInstance: Cipher.getInstance with ECB](GetInstance.md.html) - [GetLocales: Locale crash](GetLocales.md.html) - [GifUsage: Using `.gif` format for bitmaps is discouraged](GifUsage.md.html) + - [GlobalOptionInConsumerRules: Library has global options in consumer rules](GlobalOptionInConsumerRules.md.html) - [GradleCompatible: Incompatible Gradle Versions](GradleCompatible.md.html) - [GradleDependency: Obsolete Gradle Dependency](GradleDependency.md.html) - [GradleDeprecated: Deprecated Gradle Construct](GradleDeprecated.md.html) @@ -236,9 +248,11 @@ - [GuavaPreconditionsUsedInKotlin: Kotlin precondition checks should use the Kotlin standard library checks](GuavaPreconditionsUsedInKotlin.md.html) - [HalfFloat: Incorrect Half Float](HalfFloat.md.html) - [HandlerLeak: Handler reference leaks](HandlerLeak.md.html) + - [HardcodedAbsolutePath: The "path" attribute should not be an absolute path](HardcodedAbsolutePath.md.html) - [HardcodedDebugMode: Hardcoded value of `android:debuggable` in the manifest](HardcodedDebugMode.md.html) - [HardcodedText: Hardcoded text](HardcodedText.md.html) - [HardwareIds: Hardware Id Usage](HardwareIds.md.html) + - [HealthConnectPolicy: Health Connect Insights](HealthConnectPolicy.md.html) - [HighAppVersionCode: VersionCode too high](HighAppVersionCode.md.html) - [HighSamplingRate: High sensor sampling rate](HighSamplingRate.md.html) - [IconColors: Icon colors do not follow the recommended visual style](IconColors.md.html) @@ -279,9 +293,12 @@ - [InnerclassSeparator: Inner classes should use `$` rather than `.`](InnerclassSeparator.md.html) - [InsecureBaseConfiguration: Insecure Base Configuration](InsecureBaseConfiguration.md.html) - [InsecureDnsSdkLevel: Application vulnerable to DNS spoofing attacks](InsecureDnsSdkLevel.md.html) + - [InsecureLegacyExternalStorage: The `requestLegacyExternalStorage` attribute is set to true, opting the app out of scoped storage](InsecureLegacyExternalStorage.md.html) - [InsecurePermissionProtectionLevel: Custom permission created with a normal `protectionLevel`](InsecurePermissionProtectionLevel.md.html) - [InsecureStickyBroadcastsMethod: Usage of insecure sticky broadcasts](InsecureStickyBroadcastsMethod.md.html) - [InsecureStickyBroadcastsPermission: Usage of insecure sticky broadcasts](InsecureStickyBroadcastsPermission.md.html) + - [InstantAppCall: Instant App call](InstantAppCall.md.html) + - [InstantAppDeprecation: Instant App Deprecation](InstantAppDeprecation.md.html) - [Instantiatable: Registered class is not instantiatable](Instantiatable.md.html) - [IntentFilterExportedReceiver: Unspecified `android:exported` in manifest](IntentFilterExportedReceiver.md.html) - [IntentFilterUniqueDataAttributes: Data tags should only declare unique attributes](IntentFilterUniqueDataAttributes.md.html) @@ -290,6 +307,7 @@ - [InternalAgpApiUsage: Avoid using internal Android Gradle Plugin APIs](InternalAgpApiUsage.md.html) - [InternalGradleApiUsage: Avoid using internal Gradle APIs](InternalGradleApiUsage.md.html) - [InternalInsetResource: Using internal inset dimension resource](InternalInsetResource.md.html) + - [InternalKgpApiUsage: Avoid using internal Kotlin Gradle Plugin APIs](InternalKgpApiUsage.md.html) - [InvalidAccessibility: Marks invalid accessibility usages](InvalidAccessibility.md.html) - [InvalidAnalyticsName: Invalid Analytics Name](InvalidAnalyticsName.md.html) - [InvalidColorHexValue: Invalid Color hex value](InvalidColorHexValue.md.html) @@ -298,10 +316,12 @@ - [InvalidImeActionId: Invalid imeActionId declaration](InvalidImeActionId.md.html) - [InvalidImport: Flags invalid imports](InvalidImport.md.html) - [InvalidLanguageTagDelimiter: Underscore (`_`) is an unsupported delimiter for subtags](InvalidLanguageTagDelimiter.md.html) + - [InvalidManifestAttribute: Invalid manifest attribute](InvalidManifestAttribute.md.html) - [InvalidNavigation: No start destination specified](InvalidNavigation.md.html) - [InvalidPackage: Package not included in Android](InvalidPackage.md.html) - [InvalidPeriodicWorkRequestInterval: Invalid interval duration](InvalidPeriodicWorkRequestInterval.md.html) - [InvalidPermission: Invalid Permission Attribute](InvalidPermission.md.html) + - [InvalidPurposeString: Invalid purpose string for permission](InvalidPurposeString.md.html) - [InvalidResourceFolder: Invalid Resource Folder](InvalidResourceFolder.md.html) - [InvalidSetHasFixedSize: When using `setHasFixedSize()` in an `RecyclerView`, `wrap_content` cannot be used as a value for `size` in the scrolling direction.](InvalidSetHasFixedSize.md.html) - [InvalidSingleLineComment: Marks single line comments that are not sentences](InvalidSingleLineComment.md.html) @@ -347,11 +367,13 @@ - [LintImplUseKotlin: Non-Kotlin Lint Detectors](LintImplUseKotlin.md.html) - [LintImplUseUast: Using Wrong UAST Method](LintImplUseUast.md.html) - [LocalContextConfigurationRead: Reading Configuration using LocalContext.current.resources.configuration](LocalContextConfigurationRead.md.html) + - [LocalContextGetResourceValueCall: Querying resource properties using LocalContext.current](LocalContextGetResourceValueCall.md.html) - [LocalContextResourcesRead: Reading Resources using LocalContext.current.resources](LocalContextResourcesRead.md.html) - [LocalSuppress: @SuppressLint on invalid element](LocalSuppress.md.html) - [LocaleFolder: Wrong locale name](LocaleFolder.md.html) - [LockedOrientationActivity: Incompatible screenOrientation value](LockedOrientationActivity.md.html) - [LogConditional: Unconditional Logging Calls](LogConditional.md.html) + - [LogInfoDisclosure: Potentially sensitive information logged to Logcat](LogInfoDisclosure.md.html) - [LogNotTimber: Logging call to Log instead of Timber](LogNotTimber.md.html) - [LogTagMismatch: Mismatched Log Tags](LogTagMismatch.md.html) - [LongLogTag: Too Long Log Tags](LongLogTag.md.html) @@ -369,7 +391,7 @@ - [MinSdkTooLow: API Version Too Low](MinSdkTooLow.md.html) - [MipmapIcons: Use Mipmap Launcher Icons](MipmapIcons.md.html) - [MissingApplicationIcon: Missing application icon](MissingApplicationIcon.md.html) - - [MissingAutoVerifyAttribute: Application has custom scheme intent filters with missing `autoVerify` attributes](MissingAutoVerifyAttribute.md.html) + - [MissingAutoVerifyAttribute: Application has http/https scheme intent filters with missing `autoVerify` attributes](MissingAutoVerifyAttribute.md.html) - [MissingBackupPin: Missing Backup Pin](MissingBackupPin.md.html) - [MissingClass: Missing registered class](MissingClass.md.html) - [MissingColorAlphaChannel: Missing Color alpha channel](MissingColorAlphaChannel.md.html) @@ -388,6 +410,7 @@ - [MissingOnPlayFromSearch: Missing `onPlayFromSearch`](MissingOnPlayFromSearch.md.html) - [MissingPermission: Missing Permissions](MissingPermission.md.html) - [MissingPrefix: Missing Android XML namespace](MissingPrefix.md.html) + - [MissingPurpose: Missing purpose for permission](MissingPurpose.md.html) - [MissingQuantity: Missing quantity translation](MissingQuantity.md.html) - [MissingResourceImportAlias: Missing import alias for R class](MissingResourceImportAlias.md.html) - [MissingResourcesProperties: Missing resources.properties file](MissingResourcesProperties.md.html) @@ -476,6 +499,7 @@ - [NoHardKeywords: No Hard Kotlin Keywords](NoHardKeywords.md.html) - [NoOp: NoOp Code](NoOp.md.html) - [NonConstantResourceId: Checks use of resource IDs in places requiring constants](NonConstantResourceId.md.html) + - [NonObservableLocale: Reading locale in a non-observable way in a composable function](NonObservableLocale.md.html) - [NonResizeableActivity: Activity is set to be non-resizeable](NonResizeableActivity.md.html) - [NotConstructor: Not a Constructor](NotConstructor.md.html) - [NotInterpolated: Incorrect Interpolation](NotInterpolated.md.html) @@ -499,6 +523,7 @@ - [OutdatedLibrary: Outdated Library](OutdatedLibrary.md.html) - [Overdraw: Overdraw: Painting regions more than once](Overdraw.md.html) - [OverrideAbstract: Not overriding abstract methods on older platforms](OverrideAbstract.md.html) + - [PackageVisibilityPolicy: Package/App Visibility Insights](PackageVisibilityPolicy.md.html) - [PackagedPrivateKey: Packaged private key](PackagedPrivateKey.md.html) - [ParcelClassLoader: Default Parcel Class Loader](ParcelClassLoader.md.html) - [ParcelCreator: Missing Parcelable `CREATOR` field](ParcelCreator.md.html) @@ -507,6 +532,7 @@ - [PermissionImpliesUnsupportedChromeOsHardware: Permission Implies Unsupported Chrome OS Hardware](PermissionImpliesUnsupportedChromeOsHardware.md.html) - [PermissionImpliesUnsupportedHardware: Permission Implies Unsupported Hardware](PermissionImpliesUnsupportedHardware.md.html) - [PermissionNamingConvention: Permission name does not follow recommended convention](PermissionNamingConvention.md.html) + - [PhotoAndVideoPolicy: Photos & Video Insights](PhotoAndVideoPolicy.md.html) - [PictureInPictureIssue: Picture In Picture best practices not followed](PictureInPictureIssue.md.html) - [PinSetExpiry: Validate `` expiration attribute](PinSetExpiry.md.html) - [PlaySdkIndexDeprecated: Library is marked as deprecated in SDK Index](PlaySdkIndexDeprecated.md.html) @@ -519,12 +545,16 @@ - [PrivateResource: Using private resources](PrivateResource.md.html) - [ProduceStateDoesNotAssignValue: produceState calls should assign `value` inside the producer lambda](ProduceStateDoesNotAssignValue.md.html) - [Proguard: Using obsolete ProGuard configuration](Proguard.md.html) + - [ProguardAndroidTxtUsage: Use proguard-android-optimize.txt to enable optimizations](ProguardAndroidTxtUsage.md.html) - [ProguardSplit: Proguard.cfg file contains generic Android rules](ProguardSplit.md.html) - [PropertyEscape: Incorrect property escapes](PropertyEscape.md.html) - [ProtectedPermissions: Using system app permission](ProtectedPermissions.md.html) - - [ProtoLayoutEdgeContentLayoutResponsive: ProtoLayout Material EdgeContentLayout should be used with responsivebehaviour to ensure the best behaviour across different screen sizes andlocales](ProtoLayoutEdgeContentLayoutResponsive.md.html) - - [ProtoLayoutMinSchema: ProtoLayout feature is not guaranteed to be available on the target device API](ProtoLayoutMinSchema.md.html) - - [ProtoLayoutPrimaryLayoutResponsive: ProtoLayout Material PrimaryLayout should be used with responsive behaviourto ensure the best behaviour across different screen sizes and locales](ProtoLayoutPrimaryLayoutResponsive.md.html) + - [ProtoLayoutEdgeContentLayoutResponsive: ProtoLayout Material EdgeContentLayout should be used with responsivebehaviour to ensure the best behaviour across different screen sizes andlocales](ProtoLayoutEdgeContentLayoutResponsive.md.html) (from androidx.wear.protolayout:protolayout-expression:+) + - [ProtoLayoutEdgeContentLayoutResponsive: ProtoLayout Material EdgeContentLayout should be used with responsivebehaviour to ensure the best behaviour across different screen sizes andlocales](ProtoLayoutEdgeContentLayoutResponsive-2.md.html) (from androidx.wear.protolayout:protolayout:+) + - [ProtoLayoutMinSchema: ProtoLayout feature is not guaranteed to be available on the target device API](ProtoLayoutMinSchema.md.html) (from androidx.wear.protolayout:protolayout-expression:+) + - [ProtoLayoutMinSchema: ProtoLayout feature is not guaranteed to be available on the target device API](ProtoLayoutMinSchema-2.md.html) (from androidx.wear.protolayout:protolayout:+) + - [ProtoLayoutPrimaryLayoutResponsive: ProtoLayout Material PrimaryLayout should be used with responsive behaviourto ensure the best behaviour across different screen sizes and locales](ProtoLayoutPrimaryLayoutResponsive.md.html) (from androidx.wear.protolayout:protolayout-expression:+) + - [ProtoLayoutPrimaryLayoutResponsive: ProtoLayout Material PrimaryLayout should be used with responsive behaviourto ensure the best behaviour across different screen sizes and locales](ProtoLayoutPrimaryLayoutResponsive-2.md.html) (from androidx.wear.protolayout:protolayout:+) - [ProviderReadPermissionOnly: Provider with readPermission only and implemented write APIs](ProviderReadPermissionOnly.md.html) - [ProvidesMustNotBeAbstract: @Provides functions cannot be abstract](ProvidesMustNotBeAbstract.md.html) - [ProxyPassword: Proxy Password in Cleartext](ProxyPassword.md.html) @@ -532,6 +562,7 @@ - [PxUsage: Using 'px' dimension](PxUsage.md.html) - [QueryAllPackagesPermission: Using the QUERY_ALL_PACKAGES permission](QueryAllPackagesPermission.md.html) - [QueryPermissionsNeeded: Using APIs affected by query permissions](QueryPermissionsNeeded.md.html) + - [R8GradualApi: R8 Gradual API can be used only with experimental flag](R8GradualApi.md.html) - [Range: Outside Range](Range.md.html) - [RawColor: Flags color that are not defined as resource](RawColor.md.html) - [RawDimen: Flags dimensions that are not defined as resource](RawDimen.md.html) @@ -543,6 +574,7 @@ - [RedundantLabel: Redundant label on activity](RedundantLabel.md.html) - [RedundantNamespace: Redundant namespace](RedundantNamespace.md.html) - [ReferenceType: Incorrect reference types](ReferenceType.md.html) + - [ReflectionAnnotation: Missing Reflection Annotation](ReflectionAnnotation.md.html) - [Registered: Class is not registered in the manifest](Registered.md.html) - [RelativeOverlap: Overlapping items in RelativeLayout](RelativeOverlap.md.html) - [RememberInComposition: Calling a @RememberInComposition annotated declaration inside composition without using `remember`](RememberInComposition.md.html) @@ -553,6 +585,7 @@ - [RepeatOnLifecycleWrongUsage: Wrong usage of repeatOnLifecycle](RepeatOnLifecycleWrongUsage.md.html) (from androidx.lifecycle:lifecycle-runtime-android:+) - [RepeatOnLifecycleWrongUsage: Wrong usage of repeatOnLifecycle](RepeatOnLifecycleWrongUsage-2.md.html) (from androidx.lifecycle:lifecycle-runtime-ktx:+) - [ReportShortcutUsage: Report shortcut usage](ReportShortcutUsage.md.html) + - [RequestInstallPackagesPolicy: Request Install Packages Insights](RequestInstallPackagesPolicy.md.html) - [RequiredSize: Missing `layout_width` or `layout_height` attributes](RequiredSize.md.html) - [RequiresFeature: Requires Feature](RequiresFeature.md.html) - [RequiresWindowSdk: API requires a `WindowSdkExtensions.extensionVersion` check](RequiresWindowSdk.md.html) @@ -567,6 +600,10 @@ - [ResourcesGetDrawableCall: Marks usage of deprecated getDrawable() on Resources](ResourcesGetDrawableCall.md.html) - [RestrictCallsTo: Methods annotated with @RestrictedCallsTo should only be called from the specified scope](RestrictCallsTo.md.html) - [RestrictedApi: Restricted API](RestrictedApi.md.html) + - [RetainLeaksContext: Using `retain { ... }` to store a value that extends from or references `Context` will cause a memory leak.](RetainLeaksContext.md.html) + - [RetainRememberObserver: Values returned by `retain { ... }` must not implement RememberObserver unless they also implement RetainObserver.](RetainRememberObserver.md.html) + - [RetainUnitType: `retain` calls must not return `Unit`](RetainUnitType.md.html) + - [RetainingDoNotRetainType: Types annotated with `@DoNotRetain` should not be returned as the result of `retain`, either directly or transitively](RetainingDoNotRetainType.md.html) - [RetrofitUsage: This is replaced by the caller](RetrofitUsage.md.html) - [ReturnFromAwaitPointerEventScope: Returning from awaitPointerEventScope may cause some input events to be dropped](ReturnFromAwaitPointerEventScope.md.html) - [ReturnThis: Method must return `this`](ReturnThis.md.html) @@ -609,9 +646,11 @@ - [SignatureOrSystemPermissions: Declaring signatureOrSystem permissions](SignatureOrSystemPermissions.md.html) - [SimilarGradleDependency: Multiple Versions Gradle Dependency](SimilarGradleDependency.md.html) - [SimpleDateFormat: Implied locale in date format](SimpleDateFormat.md.html) + - [SlashPathAttribute: The "path" attribute should not be set to "/" as a path](SlashPathAttribute.md.html) - [Slices: Slices](Slices.md.html) - [SlotReused: Slots should be invoked in at most one place](SlotReused.md.html) - [SmallSp: Text size is too small](SmallSp.md.html) + - [SmsAndCallLogPolicy: SMS/Call Log Insights](SmsAndCallLogPolicy.md.html) - [SoonBlockedPrivateApi: Using Soon-to-Be Blocked Private API](SoonBlockedPrivateApi.md.html) - [SourceLockedOrientationActivity: Incompatible setRequestedOrientation value](SourceLockedOrientationActivity.md.html) - [SpUsage: Using `dp` instead of `sp` for text sizes](SpUsage.md.html) @@ -651,8 +690,10 @@ - [TestLifecycleOwnerInCoroutine: Use the suspending function setCurrentState(), rather than directly accessing the currentState property](TestLifecycleOwnerInCoroutine.md.html) - [TestManifestGradleConfiguration: The ui-test-manifest library should be included using the debugImplementation configuration](TestManifestGradleConfiguration.md.html) - [TestParameterSiteTarget: `TestParameter` annotation has the wrong site target](TestParameterSiteTarget.md.html) + - [TextConcatSpace: Missing space in text concatenation?](TextConcatSpace.md.html) - [TextFields: Missing `inputType`](TextFields.md.html) - [TextViewEdits: TextView should probably be an EditText instead](TextViewEdits.md.html) + - [ThreadConstraint: Wrong Thread (with inference)](ThreadConstraint.md.html) - [ThrowableNotAtBeginning: Exception in Timber not at the beginning](ThrowableNotAtBeginning.md.html) - [TilePreviewImageFormat: Tile preview is not compliant with standards](TilePreviewImageFormat.md.html) - [TileProviderPermissions: TileProvider does not set permission](TileProviderPermissions.md.html) @@ -701,7 +742,6 @@ - [UnsafeOptInUsageWarning: Unsafe opt-in usage intended to be warning-level severity](UnsafeOptInUsageWarning.md.html) - [UnsafeProtectedBroadcastReceiver: Unsafe Protected `BroadcastReceiver`](UnsafeProtectedBroadcastReceiver.md.html) - [UnsafeRepeatOnLifecycleDetector: RepeatOnLifecycle should be used with viewLifecycleOwner in Fragments](UnsafeRepeatOnLifecycleDetector.md.html) - - [UnsanitizedContentProviderFilename: Trusting ContentProvider filenames without any sanitization](UnsanitizedContentProviderFilename.md.html) - [UnsanitizedFilenameFromContentProvider: Trusting ContentProvider filenames without any sanitization](UnsanitizedFilenameFromContentProvider.md.html) - [UnspecifiedImmutableFlag: Missing `PendingIntent` mutability flag](UnspecifiedImmutableFlag.md.html) - [UnspecifiedRegisterReceiverFlag: Missing `registerReceiver()` exported flag](UnspecifiedRegisterReceiverFlag.md.html) @@ -766,6 +806,7 @@ - [ViewHolder: View Holder Candidates](ViewHolder.md.html) - [ViewModelConstructorInComposable: Constructing a view model in a composable](ViewModelConstructorInComposable.md.html) - [VisibleForTests: Visible Only For Tests](VisibleForTests.md.html) + - [VpnServicePolicy: VPN Service Insights](VpnServicePolicy.md.html) - [VulnerableCordovaVersion: Vulnerable Cordova Version](VulnerableCordovaVersion.md.html) - [VulnerableCryptoAlgorithm: Application uses vulnerable cryptography algorithms](VulnerableCryptoAlgorithm.md.html) - [Wakelock: Incorrect `WakeLock` usage](Wakelock.md.html) @@ -773,6 +814,7 @@ - [WatchFaceEditor: Watch face editor must use launchMode="standard"](WatchFaceEditor.md.html) - [WatchFaceForAndroidX: AndroidX watch faces must use action `WATCH_FACE_EDITOR`](WatchFaceForAndroidX.md.html) - [WatchFaceFormatDeclaresHasNoCode: The `hasCode` attribute should be set to `false`](WatchFaceFormatDeclaresHasNoCode.md.html) + - [WatchFaceFormatInvalidVersion: The Watch Face Format version is invalid](WatchFaceFormatInvalidVersion.md.html) - [WatchFaceFormatMissingVersion: The Watch Face Format version is missing](WatchFaceFormatMissingVersion.md.html) - [WeakPrng: Application uses non-cryptographically secure pseudorandom number generators](WeakPrng.md.html) - [WearBackNavigation: Wear: Disabling Back navigation](WearBackNavigation.md.html) @@ -824,6 +866,7 @@ - [WrongViewIdFormat: Flag view ids that are not in lowerCamelCase Format](WrongViewIdFormat.md.html) - [XmlEscapeNeeded: Missing XML Escape](XmlEscapeNeeded.md.html) - [XmlSpacing: XML files should not contain any new lines](XmlSpacing.md.html) + - [ZeroBluetoothDiscoveryDuration: The EXTRA_DISCOVERABLE_DURATION parameter is set to zero](ZeroBluetoothDiscoveryDuration.md.html) * Withdrawn or Obsolete Issues (21) diff --git a/docs/checks/libraries.md.html b/docs/checks/libraries.md.html index c4b505a9..6dc6b9d0 100644 --- a/docs/checks/libraries.md.html +++ b/docs/checks/libraries.md.html @@ -5,8 +5,9 @@ Lint-specific libraries: -* [androidx.lint:lint-gradle](androidx_lint_lint-gradle.md.html) (8 checks) -* [com.android.security.lint:lint](com_android_security_lint_lint.md.html) (18 checks) +* [androidx.lint:lint-gradle](androidx_lint_lint-gradle.md.html) (9 checks) +* [com.google.play.policy.insights:insights-lint](com_google_play_policy_insights_insights-lint.md.html) (13 checks) +* [com.android.security.lint:lint](com_android_security_lint_lint.md.html) (24 checks) * [com.uber.autodispose2:autodispose-lint](com_uber_autodispose2_autodispose-lint.md.html) (1 checks) * [com.google.dagger:dagger-lint](com_google_dagger_dagger-lint.md.html) (4 checks) * [com.vanniktech:lint-rules-rxjava2](com_vanniktech_lint-rules-rxjava2.md.html) (7 checks) @@ -17,16 +18,18 @@ Android archive libraries which also contain bundled lint checks: +* [androidx.test.uiautomator:uiautomator](androidx_test_uiautomator_uiautomator.md.html) (1 checks) * [androidx.activity:activity-compose](androidx_activity_activity-compose.md.html) (3 checks) * [androidx.activity:activity](androidx_activity_activity.md.html) (2 checks) * [androidx.compose.ui:ui-test-manifest](androidx_compose_ui_ui-test-manifest.md.html) (1 checks) -* [androidx.compose.ui:ui-android](androidx_compose_ui_ui-android.md.html) (13 checks) +* [androidx.compose.ui:ui-android](androidx_compose_ui_ui-android.md.html) (15 checks) * [androidx.compose.ui:ui-text-android](androidx_compose_ui_ui-text-android.md.html) (1 checks) * [androidx.compose.ui:ui-graphics-android](androidx_compose_ui_ui-graphics-android.md.html) (2 checks) * [androidx.compose.runtime:runtime-saveable-android](androidx_compose_runtime_runtime-saveable-android.md.html) (1 checks) * [androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html) (16 checks) +* [androidx.compose.runtime:runtime-retain-android](androidx_compose_runtime_runtime-retain-android.md.html) (4 checks) * [androidx.compose.animation:animation-core-android](androidx_compose_animation_animation-core-android.md.html) (2 checks) -* [androidx.compose.animation:animation-android](androidx_compose_animation_animation-android.md.html) (5 checks) +* [androidx.compose.animation:animation-android](androidx_compose_animation_animation-android.md.html) (6 checks) * [androidx.compose.foundation:foundation-android](androidx_compose_foundation_foundation-android.md.html) (2 checks) * [androidx.compose.material3:material3-android](androidx_compose_material3_material3-android.md.html) (2 checks) * [androidx.compose.material:material-android](androidx_compose_material_material-android.md.html) (2 checks) @@ -48,6 +51,7 @@ * [androidx.work:work-runtime](androidx_work_work-runtime.md.html) (9 checks) * [androidx.appcompat:appcompat](androidx_appcompat_appcompat.md.html) (10 checks) * [androidx.startup:startup-runtime](androidx_startup_startup-runtime.md.html) (2 checks) +* [androidx.wear.protolayout:protolayout-expression](androidx_wear_protolayout_protolayout-expression.md.html) (3 checks) * [androidx.wear.protolayout:protolayout](androidx_wear_protolayout_protolayout.md.html) (3 checks) * [androidx.constraintlayout:constraintlayout-compose](androidx_constraintlayout_constraintlayout-compose.md.html) (3 checks) * [com.jakewharton.timber:timber](com_jakewharton_timber_timber.md.html) (8 checks) diff --git a/docs/checks/severity.md.html b/docs/checks/severity.md.html index c7a05c4e..daeb44fa 100644 --- a/docs/checks/severity.md.html +++ b/docs/checks/severity.md.html @@ -3,11 +3,12 @@ Order: [Alphabetical](index.md.html) | [By category](categories.md.html) | [By vendor](vendors.md.html) | By severity | [By year](year.md.html) | [Libraries](libraries.md.html) -* Fatal (54) +* Fatal (57) - [AaptCrash: Potential AAPT crash](AaptCrash.md.html) - [BadConfigurationProvider: Invalid WorkManager Configuration Provider](BadConfigurationProvider.md.html) - [BlockedPrivateApi: Using Blocked Private API](BlockedPrivateApi.md.html) + - [DisallowLookaheadAnimationVisualDebug: LookaheadAnimationVisualDebugging and CustomizedLookaheadAnimationVisualDebugging are disallowed in production code](DisallowLookaheadAnimationVisualDebug.md.html) - [DuplicateActivity: Activity registered more than once](DuplicateActivity.md.html) - [DuplicateIds: Duplicate ids within a single layout](DuplicateIds.md.html) - [DuplicatePlatformClasses: Duplicate Platform Classes](DuplicatePlatformClasses.md.html) @@ -24,11 +25,13 @@ - [InvalidFragmentVersionForActivityResult: Update to Fragment 1.3.0 to use ActivityResult APIs](InvalidFragmentVersionForActivityResult.md.html) - [InvalidId: Invalid ID declaration](InvalidId.md.html) - [InvalidPeriodicWorkRequestInterval: Invalid interval duration](InvalidPeriodicWorkRequestInterval.md.html) + - [InvalidPurposeString: Invalid purpose string for permission](InvalidPurposeString.md.html) - [InvalidSetHasFixedSize: When using `setHasFixedSize()` in an `RecyclerView`, `wrap_content` cannot be used as a value for `size` in the scrolling direction.](InvalidSetHasFixedSize.md.html) - [LibraryCustomView: Custom views in libraries should use res-auto-namespace](LibraryCustomView.md.html) - [ManifestResource: Manifest Resource References](ManifestResource.md.html) - [ManifestTypo: Typos in manifest tags](ManifestTypo.md.html) - [MissingDefaultResource: Missing Default](MissingDefaultResource.md.html) + - [MissingPurpose: Missing purpose for permission](MissingPurpose.md.html) - [MockLocation: Using mock location provider in production](MockLocation.md.html) - [MultipleUsesSdk: Multiple `` elements in the manifest](MultipleUsesSdk.md.html) - [NamespaceTypo: Misspelled namespace declaration](NamespaceTypo.md.html) @@ -60,7 +63,7 @@ - [WrongFolder: Resource file in the wrong `res` folder](WrongFolder.md.html) - [WrongManifestParent: Wrong manifest parent](WrongManifestParent.md.html) -* Error (323) +* Error (334) - [AccidentalOctal: Accidental Octal](AccidentalOctal.md.html) - [AppCompatCustomView: Appcompat Custom Widgets](AppCompatCustomView.md.html) @@ -167,6 +170,7 @@ - [InjectInJava: Only Kotlin classes should be injected in order for Anvil to work](InjectInJava.md.html) - [InternalAgpApiUsage: Avoid using internal Android Gradle Plugin APIs](InternalAgpApiUsage.md.html) - [InternalGradleApiUsage: Avoid using internal Gradle APIs](InternalGradleApiUsage.md.html) + - [InternalKgpApiUsage: Avoid using internal Kotlin Gradle Plugin APIs](InternalKgpApiUsage.md.html) - [InvalidAnalyticsName: Invalid Analytics Name](InvalidAnalyticsName.md.html) - [InvalidImeActionId: Invalid imeActionId declaration](InvalidImeActionId.md.html) - [InvalidLanguageTagDelimiter: Underscore (`_`) is an unsupported delimiter for subtags](InvalidLanguageTagDelimiter.md.html) @@ -191,6 +195,7 @@ - [LintImplUnexpectedDomain: Unexpected URL Domain](LintImplUnexpectedDomain.md.html) - [LintImplUseUast: Using Wrong UAST Method](LintImplUseUast.md.html) - [LocalContextConfigurationRead: Reading Configuration using LocalContext.current.resources.configuration](LocalContextConfigurationRead.md.html) + - [LocalContextGetResourceValueCall: Querying resource properties using LocalContext.current](LocalContextGetResourceValueCall.md.html) - [LocalSuppress: @SuppressLint on invalid element](LocalSuppress.md.html) - [LogTagMismatch: Mismatched Log Tags](LogTagMismatch.md.html) - [LongLogTag: Too Long Log Tags](LongLogTag.md.html) @@ -259,6 +264,7 @@ - [NewApi: Calling new methods on older versions](NewApi.md.html) - [NioDesugaring: Unsupported `java.nio` operations](NioDesugaring.md.html) - [NoCollectCallFound: You must call collect on the given progress flow when using PredictiveBackHandler](NoCollectCallFound.md.html) + - [NonObservableLocale: Reading locale in a non-observable way in a composable function](NonObservableLocale.md.html) - [NotInterpolated: Incorrect Interpolation](NotInterpolated.md.html) - [NotificationId0: Notification Id is 0](NotificationId0.md.html) - [NotificationPermission: Notifications Without Permission](NotificationPermission.md.html) @@ -281,6 +287,7 @@ - [PropertyEscape: Incorrect property escapes](PropertyEscape.md.html) - [ProtectedPermissions: Using system app permission](ProtectedPermissions.md.html) - [ProtoLayoutMinSchema: ProtoLayout feature is not guaranteed to be available on the target device API](ProtoLayoutMinSchema.md.html) + - [ProtoLayoutMinSchema: ProtoLayout feature is not guaranteed to be available on the target device API](ProtoLayoutMinSchema-2.md.html) - [ProvidesMustNotBeAbstract: @Provides functions cannot be abstract](ProvidesMustNotBeAbstract.md.html) - [QueryAllPackagesPermission: Using the QUERY_ALL_PACKAGES permission](QueryAllPackagesPermission.md.html) - [Range: Outside Range](Range.md.html) @@ -301,6 +308,10 @@ - [ResourceType: Wrong Resource Type](ResourceType.md.html) - [RestrictCallsTo: Methods annotated with @RestrictedCallsTo should only be called from the specified scope](RestrictCallsTo.md.html) - [RestrictedApi: Restricted API](RestrictedApi.md.html) + - [RetainLeaksContext: Using `retain { ... }` to store a value that extends from or references `Context` will cause a memory leak.](RetainLeaksContext.md.html) + - [RetainRememberObserver: Values returned by `retain { ... }` must not implement RememberObserver unless they also implement RetainObserver.](RetainRememberObserver.md.html) + - [RetainUnitType: `retain` calls must not return `Unit`](RetainUnitType.md.html) + - [RetainingDoNotRetainType: Types annotated with `@DoNotRetain` should not be returned as the result of `retain`, either directly or transitively](RetainingDoNotRetainType.md.html) - [RetrofitUsage: This is replaced by the caller](RetrofitUsage.md.html) - [ReturnThis: Method must return `this`](ReturnThis.md.html) - [RtlCompat: Right-to-left text compatibility issues](RtlCompat.md.html) @@ -326,6 +337,7 @@ - [SuspiciousModifierThen: Using Modifier.then with a Modifier factory function with an implicit receiver](SuspiciousModifierThen.md.html) - [TestLifecycleOwnerInCoroutine: Use the suspending function setCurrentState(), rather than directly accessing the currentState property](TestLifecycleOwnerInCoroutine.md.html) - [TestParameterSiteTarget: `TestParameter` annotation has the wrong site target](TestParameterSiteTarget.md.html) + - [ThreadConstraint: Wrong Thread (with inference)](ThreadConstraint.md.html) - [TilePreviewImageFormat: Tile preview is not compliant with standards](TilePreviewImageFormat.md.html) - [TimberArgCount: Formatting argument types incomplete or inconsistent](TimberArgCount.md.html) - [TimberArgTypes: Formatting string doesn't match passed arguments](TimberArgTypes.md.html) @@ -361,6 +373,7 @@ - [ViewModelConstructorInComposable: Constructing a view model in a composable](ViewModelConstructorInComposable.md.html) - [VulnerableCryptoAlgorithm: Application uses vulnerable cryptography algorithms](VulnerableCryptoAlgorithm.md.html) - [WatchFaceFormatDeclaresHasNoCode: The `hasCode` attribute should be set to `false`](WatchFaceFormatDeclaresHasNoCode.md.html) + - [WatchFaceFormatInvalidVersion: The Watch Face Format version is invalid](WatchFaceFormatInvalidVersion.md.html) - [WatchFaceFormatMissingVersion: The Watch Face Format version is missing](WatchFaceFormatMissingVersion.md.html) - [WearMaterialTheme: Using not non-Wear `MaterialTheme` in a Wear OS project](WearMaterialTheme.md.html) - [WearPasswordInput: Wear: Using password input](WearPasswordInput.md.html) @@ -385,19 +398,23 @@ - [WrongThreadInterprocedural: Wrong Thread (Interprocedural)](WrongThreadInterprocedural.md.html) - [WrongViewCast: Mismatched view type](WrongViewCast.md.html) - [XmlEscapeNeeded: Missing XML Escape](XmlEscapeNeeded.md.html) + - [ZeroBluetoothDiscoveryDuration: The EXTRA_DISCOVERABLE_DURATION parameter is set to zero](ZeroBluetoothDiscoveryDuration.md.html) -* Warning (433) +* Warning (462) - [AcceptsUserCertificates: Allowing User Certificates](AcceptsUserCertificates.md.html) - [AccessibilityFocus: Forcing accessibility focus](AccessibilityFocus.md.html) + - [AccessibilityPolicy: Accessibility Insights](AccessibilityPolicy.md.html) - [AccessibilityScrollActions: Incomplete Scroll Action support](AccessibilityScrollActions.md.html) - [AccessibilityWindowStateChangedEvent: Use of accessibility window state change events](AccessibilityWindowStateChangedEvent.md.html) - [ActivityIconColor: Ongoing activity icon is not white](ActivityIconColor.md.html) - [AdapterViewChildren: `AdapterView` cannot have children in XML](AdapterViewChildren.md.html) - [AddJavascriptInterface: `addJavascriptInterface` Called](AddJavascriptInterface.md.html) + - [AdvertisingIdPolicy: Advertising Id Insights](AdvertisingIdPolicy.md.html) - [AlertDialogUsage: Use the support library AlertDialog instead of android.app.AlertDialog](AlertDialogUsage.md.html) - [Aligned16KB: Native library dependency not 16 KB aligned](Aligned16KB.md.html) - [AllCaps: Combining textAllCaps and markup](AllCaps.md.html) + - [AllFilesAccessPolicy: All Files Access Insights](AllFilesAccessPolicy.md.html) - [AllowAllHostnameVerifier: Insecure `HostnameVerifier`](AllowAllHostnameVerifier.md.html) - [AlwaysShowAction: Usage of `showAsAction=always`](AlwaysShowAction.md.html) - [AndroidGradlePluginVersion: Obsolete Android Gradle Plugin Version](AndroidGradlePluginVersion.md.html) @@ -417,6 +434,7 @@ - [Autofill: Use Autofill](Autofill.md.html) - [AvoidUsingNotNullOperator: Avoid using the !! operator in Kotlin](AvoidUsingNotNullOperator.md.html) - [BackButton: Back button](BackButton.md.html) + - [BackgroundLocationPolicy: Background Location Insights](BackgroundLocationPolicy.md.html) - [BadHostnameVerifier: Insecure HostnameVerifier](BadHostnameVerifier.md.html) - [BadPeriodicWorkRequestEnqueue: Use `enqueueUniquePeriodicWork()` instead of `enqueue()`](BadPeriodicWorkRequestEnqueue.md.html) - [BatteryLife: Battery Life Issues](BatteryLife.md.html) @@ -476,6 +494,8 @@ - [DisabledAllSafeBrowsing: Application has disabled safe browsing for all WebView objects](DisabledAllSafeBrowsing.md.html) - [DiscouragedApi: Using discouraged APIs](DiscouragedApi.md.html) - [DiscouragedPrivateApi: Using Discouraged Private API](DiscouragedPrivateApi.md.html) + - [DontUseAccessibilityNodeInfoGetText: Do not use AccessibilityNodeInfo#getText in a UiAutomatorTestScope](DontUseAccessibilityNodeInfoGetText.md.html) + - [DotPathAttribute: The "path" attribute should not be set to "." as a path](DotPathAttribute.md.html) - [DrawAllocation: Memory allocations within drawing code](DrawAllocation.md.html) - [DuplicateDivider: Unnecessary Divider Copy](DuplicateDivider.md.html) - [DuplicateIncludedIds: Duplicate ids across layouts combined with include tags](DuplicateIncludedIds.md.html) @@ -485,6 +505,7 @@ - [EmptySuperCall: Calling an empty super method](EmptySuperCall.md.html) - [EnqueueWork: WorkManager Enqueue](EnqueueWork.md.html) - [ErroneousLayoutAttribute: Layout attribute that's not applicable to a particular view](ErroneousLayoutAttribute.md.html) + - [ExactAlarmPolicy: Exact Alarm Insights](ExactAlarmPolicy.md.html) - [ExifInterface: Using `android.media.ExifInterface`](ExifInterface.md.html) - [ExpensiveAssertion: Expensive Assertions](ExpensiveAssertion.md.html) - [ExpiringTargetSdkVersion: TargetSdkVersion Soon Expiring](ExpiringTargetSdkVersion.md.html) @@ -493,15 +514,19 @@ - [ExportedReceiver: Receiver does not require permission](ExportedReceiver.md.html) - [ExportedService: Exported service does not require permission](ExportedService.md.html) - [ExposedRootPath: Application specifies the device root directory](ExposedRootPath.md.html) + - [ExtendedBluetoothDiscoveryDuration: The EXTRA_DISCOVERABLE_DURATION parameter is unsafely high](ExtendedBluetoothDiscoveryDuration.md.html) - [FieldSiteTargetOnQualifierAnnotation: Redundant 'field:' used for Dagger qualifier annotation](FieldSiteTargetOnQualifierAnnotation.md.html) - [FileEndsWithExt: File endsWith on file extensions](FileEndsWithExt.md.html) - [FindViewByIdCast: Add Explicit Cast](FindViewByIdCast.md.html) + - [ForegroundServicesPolicy: Foreground Services Insights](ForegroundServicesPolicy.md.html) - [FormalGerman: Marks strings which contain formal German words](FormalGerman.md.html) - [FragmentTagUsage: Use FragmentContainerView instead of the tag](FragmentTagUsage.md.html) - [FrequentlyChangingValue: Reading a value annotated with @FrequentlyChangingValue inside composition](FrequentlyChangingValue.md.html) + - [FullScreenIntentPolicy: Full Screen Intent Insights](FullScreenIntentPolicy.md.html) - [GestureBackNavigation: Usage of KeyEvent.KEYCODE_BACK](GestureBackNavigation.md.html) - [GetInstance: Cipher.getInstance with ECB](GetInstance.md.html) - [GifUsage: Using `.gif` format for bitmaps is discouraged](GifUsage.md.html) + - [GlobalOptionInConsumerRules: Library has global options in consumer rules](GlobalOptionInConsumerRules.md.html) - [GradleDependency: Obsolete Gradle Dependency](GradleDependency.md.html) - [GradleDeprecated: Deprecated Gradle Construct](GradleDeprecated.md.html) - [GradleDeprecatedConfiguration: Deprecated Gradle Configuration](GradleDeprecatedConfiguration.md.html) @@ -510,8 +535,10 @@ - [GradlePath: Gradle Path Issues](GradlePath.md.html) - [GrantAllUris: Content provider shares everything](GrantAllUris.md.html) - [HandlerLeak: Handler reference leaks](HandlerLeak.md.html) + - [HardcodedAbsolutePath: The "path" attribute should not be an absolute path](HardcodedAbsolutePath.md.html) - [HardcodedText: Hardcoded text](HardcodedText.md.html) - [HardwareIds: Hardware Id Usage](HardwareIds.md.html) + - [HealthConnectPolicy: Health Connect Insights](HealthConnectPolicy.md.html) - [HighSamplingRate: High sensor sampling rate](HighSamplingRate.md.html) - [IconColors: Icon colors do not follow the recommended visual style](IconColors.md.html) - [IconDensities: Icon densities validation](IconDensities.md.html) @@ -544,9 +571,12 @@ - [InnerclassSeparator: Inner classes should use `$` rather than `.`](InnerclassSeparator.md.html) - [InsecureBaseConfiguration: Insecure Base Configuration](InsecureBaseConfiguration.md.html) - [InsecureDnsSdkLevel: Application vulnerable to DNS spoofing attacks](InsecureDnsSdkLevel.md.html) + - [InsecureLegacyExternalStorage: The `requestLegacyExternalStorage` attribute is set to true, opting the app out of scoped storage](InsecureLegacyExternalStorage.md.html) - [InsecurePermissionProtectionLevel: Custom permission created with a normal `protectionLevel`](InsecurePermissionProtectionLevel.md.html) - [InsecureStickyBroadcastsMethod: Usage of insecure sticky broadcasts](InsecureStickyBroadcastsMethod.md.html) - [InsecureStickyBroadcastsPermission: Usage of insecure sticky broadcasts](InsecureStickyBroadcastsPermission.md.html) + - [InstantAppCall: Instant App call](InstantAppCall.md.html) + - [InstantAppDeprecation: Instant App Deprecation](InstantAppDeprecation.md.html) - [IntentFilterExportedReceiver: Unspecified `android:exported` in manifest](IntentFilterExportedReceiver.md.html) - [IntentFilterUniqueDataAttributes: Data tags should only declare unique attributes](IntentFilterUniqueDataAttributes.md.html) - [IntentReset: Suspicious mix of `setType` and `setData`](IntentReset.md.html) @@ -555,6 +585,7 @@ - [InvalidAccessibility: Marks invalid accessibility usages](InvalidAccessibility.md.html) - [InvalidColorHexValue: Invalid Color hex value](InvalidColorHexValue.md.html) - [InvalidImport: Flags invalid imports](InvalidImport.md.html) + - [InvalidManifestAttribute: Invalid manifest attribute](InvalidManifestAttribute.md.html) - [InvalidNavigation: No start destination specified](InvalidNavigation.md.html) - [InvalidSingleLineComment: Marks single line comments that are not sentences](InvalidSingleLineComment.md.html) - [InvalidString: Marks invalid translation strings](InvalidString.md.html) @@ -583,6 +614,7 @@ - [LocaleFolder: Wrong locale name](LocaleFolder.md.html) - [LockedOrientationActivity: Incompatible screenOrientation value](LockedOrientationActivity.md.html) - [LogConditional: Unconditional Logging Calls](LogConditional.md.html) + - [LogInfoDisclosure: Potentially sensitive information logged to Logcat](LogInfoDisclosure.md.html) - [LogNotTimber: Logging call to Log instead of Timber](LogNotTimber.md.html) - [ManifestOrder: Incorrect order of elements in manifest](ManifestOrder.md.html) - [MatchingMenuId: Flags menu ids that don't match with the file name](MatchingMenuId.md.html) @@ -592,7 +624,7 @@ - [MinSdkTooLow: API Version Too Low](MinSdkTooLow.md.html) - [MipmapIcons: Use Mipmap Launcher Icons](MipmapIcons.md.html) - [MissingApplicationIcon: Missing application icon](MissingApplicationIcon.md.html) - - [MissingAutoVerifyAttribute: Application has custom scheme intent filters with missing `autoVerify` attributes](MissingAutoVerifyAttribute.md.html) + - [MissingAutoVerifyAttribute: Application has http/https scheme intent filters with missing `autoVerify` attributes](MissingAutoVerifyAttribute.md.html) - [MissingBackupPin: Missing Backup Pin](MissingBackupPin.md.html) - [MissingColorAlphaChannel: Missing Color alpha channel](MissingColorAlphaChannel.md.html) - [MissingFirebaseInstanceTokenRefresh: Missing Firebase Messaging Callback](MissingFirebaseInstanceTokenRefresh.md.html) @@ -638,30 +670,38 @@ - [OpaqueUnitKey: Passing an expression which always returns `Unit` as a key argument](OpaqueUnitKey.md.html) - [OutdatedLibrary: Outdated Library](OutdatedLibrary.md.html) - [Overdraw: Overdraw: Painting regions more than once](Overdraw.md.html) + - [PackageVisibilityPolicy: Package/App Visibility Insights](PackageVisibilityPolicy.md.html) - [ParcelClassLoader: Default Parcel Class Loader](ParcelClassLoader.md.html) - [PermissionImpliesUnsupportedHardware: Permission Implies Unsupported Hardware](PermissionImpliesUnsupportedHardware.md.html) - [PermissionNamingConvention: Permission name does not follow recommended convention](PermissionNamingConvention.md.html) + - [PhotoAndVideoPolicy: Photos & Video Insights](PhotoAndVideoPolicy.md.html) - [PictureInPictureIssue: Picture In Picture best practices not followed](PictureInPictureIssue.md.html) - [PinSetExpiry: Validate `` expiration attribute](PinSetExpiry.md.html) - [PluralsCandidate: Potential Plurals](PluralsCandidate.md.html) - [PrivacySandboxBlockedCall: Call is blocked in the Privacy Sandbox](PrivacySandboxBlockedCall.md.html) - [PrivateApi: Using Private APIs](PrivateApi.md.html) - [PrivateResource: Using private resources](PrivateResource.md.html) + - [ProguardAndroidTxtUsage: Use proguard-android-optimize.txt to enable optimizations](ProguardAndroidTxtUsage.md.html) - [ProguardSplit: Proguard.cfg file contains generic Android rules](ProguardSplit.md.html) - [ProtoLayoutEdgeContentLayoutResponsive: ProtoLayout Material EdgeContentLayout should be used with responsivebehaviour to ensure the best behaviour across different screen sizes andlocales](ProtoLayoutEdgeContentLayoutResponsive.md.html) + - [ProtoLayoutEdgeContentLayoutResponsive: ProtoLayout Material EdgeContentLayout should be used with responsivebehaviour to ensure the best behaviour across different screen sizes andlocales](ProtoLayoutEdgeContentLayoutResponsive-2.md.html) - [ProtoLayoutPrimaryLayoutResponsive: ProtoLayout Material PrimaryLayout should be used with responsive behaviourto ensure the best behaviour across different screen sizes and locales](ProtoLayoutPrimaryLayoutResponsive.md.html) + - [ProtoLayoutPrimaryLayoutResponsive: ProtoLayout Material PrimaryLayout should be used with responsive behaviourto ensure the best behaviour across different screen sizes and locales](ProtoLayoutPrimaryLayoutResponsive-2.md.html) - [ProviderReadPermissionOnly: Provider with readPermission only and implemented write APIs](ProviderReadPermissionOnly.md.html) - [ProxyPassword: Proxy Password in Cleartext](ProxyPassword.md.html) - [PublicKeyCredential: Creating public key credential](PublicKeyCredential.md.html) - [PxUsage: Using 'px' dimension](PxUsage.md.html) - [QueryPermissionsNeeded: Using APIs affected by query permissions](QueryPermissionsNeeded.md.html) + - [R8GradualApi: R8 Gradual API can be used only with experimental flag](R8GradualApi.md.html) - [RawColor: Flags color that are not defined as resource](RawColor.md.html) - [RawDimen: Flags dimensions that are not defined as resource](RawDimen.md.html) - [Recycle: Missing `recycle()` calls](Recycle.md.html) - [RedundantLabel: Redundant label on activity](RedundantLabel.md.html) - [RedundantNamespace: Redundant namespace](RedundantNamespace.md.html) + - [ReflectionAnnotation: Missing Reflection Annotation](ReflectionAnnotation.md.html) - [Registered: Class is not registered in the manifest](Registered.md.html) - [RelativeOverlap: Overlapping items in RelativeLayout](RelativeOverlap.md.html) + - [RequestInstallPackagesPolicy: Request Install Packages Insights](RequestInstallPackagesPolicy.md.html) - [RequiresFeature: Requires Feature](RequiresFeature.md.html) - [ResourcesGetColorCall: Marks usage of deprecated getColor() on Resources](ResourcesGetColorCall.md.html) - [ResourcesGetColorStateListCall: Marks usage of deprecated getColorStateList() on Resources](ResourcesGetColorStateListCall.md.html) @@ -699,8 +739,10 @@ - [ShowToast: Toast created but not shown](ShowToast.md.html) - [SignatureOrSystemPermissions: Declaring signatureOrSystem permissions](SignatureOrSystemPermissions.md.html) - [SimpleDateFormat: Implied locale in date format](SimpleDateFormat.md.html) + - [SlashPathAttribute: The "path" attribute should not be set to "/" as a path](SlashPathAttribute.md.html) - [Slices: Slices](Slices.md.html) - [SmallSp: Text size is too small](SmallSp.md.html) + - [SmsAndCallLogPolicy: SMS/Call Log Insights](SmsAndCallLogPolicy.md.html) - [SourceLockedOrientationActivity: Incompatible setRequestedOrientation value](SourceLockedOrientationActivity.md.html) - [SpUsage: Using `dp` instead of `sp` for text sizes](SpUsage.md.html) - [SpecifyJobSchedulerIdRange: Specify a range of JobScheduler ids](SpecifyJobSchedulerIdRange.md.html) @@ -721,6 +763,7 @@ - [SystemPermissionTypo: Permission appears to be a standard permission with a typo](SystemPermissionTypo.md.html) - [TapjackingVulnerable: Application's UI is vulnerable to tapjacking attacks](TapjackingVulnerable.md.html) - [TestManifestGradleConfiguration: The ui-test-manifest library should be included using the debugImplementation configuration](TestManifestGradleConfiguration.md.html) + - [TextConcatSpace: Missing space in text concatenation?](TextConcatSpace.md.html) - [TextFields: Missing `inputType`](TextFields.md.html) - [TextViewEdits: TextView should probably be an EditText instead](TextViewEdits.md.html) - [ThrowableNotAtBeginning: Exception in Timber not at the beginning](ThrowableNotAtBeginning.md.html) @@ -754,7 +797,6 @@ - [UnsafeNativeCodeLocation: Native code outside library directory](UnsafeNativeCodeLocation.md.html) - [UnsafeOptInUsageWarning: Unsafe opt-in usage intended to be warning-level severity](UnsafeOptInUsageWarning.md.html) - [UnsafeProtectedBroadcastReceiver: Unsafe Protected `BroadcastReceiver`](UnsafeProtectedBroadcastReceiver.md.html) - - [UnsanitizedContentProviderFilename: Trusting ContentProvider filenames without any sanitization](UnsanitizedContentProviderFilename.md.html) - [UnsanitizedFilenameFromContentProvider: Trusting ContentProvider filenames without any sanitization](UnsanitizedFilenameFromContentProvider.md.html) - [UnsupportedChromeOsCameraSystemFeature: Looking for Rear Camera only feature](UnsupportedChromeOsCameraSystemFeature.md.html) - [Untranslatable: Translated Untranslatable](Untranslatable.md.html) @@ -794,6 +836,7 @@ - [ViewConstructor: Missing View constructors for XML inflation](ViewConstructor.md.html) - [ViewHolder: View Holder Candidates](ViewHolder.md.html) - [VisibleForTests: Visible Only For Tests](VisibleForTests.md.html) + - [VpnServicePolicy: VPN Service Insights](VpnServicePolicy.md.html) - [VulnerableCordovaVersion: Vulnerable Cordova Version](VulnerableCordovaVersion.md.html) - [Wakelock: Incorrect `WakeLock` usage](Wakelock.md.html) - [WakelockTimeout: Using wakeLock without timeout](WakelockTimeout.md.html) @@ -836,7 +879,7 @@ - [TrimLambda: Unnecessary lambda with `trim()`](TrimLambda.md.html) - [UnnecessaryArrayInit: Unnecessary array initialization](UnnecessaryArrayInit.md.html) -* Disabled By Default (43) +* Disabled By Default (45) - [AppCompatMethod](AppCompatMethod.md.html) - [AppLinksAutoVerify](AppLinksAutoVerify.md.html) @@ -868,12 +911,14 @@ - [NoOp](NoOp.md.html) - [PermissionNamingConvention](PermissionNamingConvention.md.html) - [PrivacySandboxBlockedCall](PrivacySandboxBlockedCall.md.html) + - [ReflectionAnnotation](ReflectionAnnotation.md.html) - [Registered](Registered.md.html) - [RequiredSize](RequiredSize.md.html) - [SelectableText](SelectableText.md.html) - [StopShip](StopShip.md.html) - [StringFormatTrivial](StringFormatTrivial.md.html) - [SyntheticAccessor](SyntheticAccessor.md.html) + - [ThreadConstraint](ThreadConstraint.md.html) - [TypographyQuotes](TypographyQuotes.md.html) - [UnknownNullness](UnknownNullness.md.html) - [UnsupportedChromeOsHardware](UnsupportedChromeOsHardware.md.html) diff --git a/docs/checks/vendors.md.html b/docs/checks/vendors.md.html index 51824c20..120337c1 100644 --- a/docs/checks/vendors.md.html +++ b/docs/checks/vendors.md.html @@ -3,7 +3,7 @@ Order: [Alphabetical](index.md.html) | [By category](categories.md.html) | By vendor | [By severity](severity.md.html) | [By year](year.md.html) | [Libraries](libraries.md.html) -* Built In (497) +* Built In (509) - [AaptCrash: Potential AAPT crash](AaptCrash.md.html) - [AcceptsUserCertificates: Allowing User Certificates](AcceptsUserCertificates.md.html) @@ -125,6 +125,7 @@ - [GetInstance: Cipher.getInstance with ECB](GetInstance.md.html) - [GetLocales: Locale crash](GetLocales.md.html) - [GifUsage: Using `.gif` format for bitmaps is discouraged](GifUsage.md.html) + - [GlobalOptionInConsumerRules: Library has global options in consumer rules](GlobalOptionInConsumerRules.md.html) - [GradleCompatible: Incompatible Gradle Versions](GradleCompatible.md.html) - [GradleDependency: Obsolete Gradle Dependency](GradleDependency.md.html) - [GradleDeprecated: Deprecated Gradle Construct](GradleDeprecated.md.html) @@ -172,6 +173,8 @@ - [InlinedApi: Using inlined constants on older versions](InlinedApi.md.html) - [InnerclassSeparator: Inner classes should use `$` rather than `.`](InnerclassSeparator.md.html) - [InsecureBaseConfiguration: Insecure Base Configuration](InsecureBaseConfiguration.md.html) + - [InstantAppCall: Instant App call](InstantAppCall.md.html) + - [InstantAppDeprecation: Instant App Deprecation](InstantAppDeprecation.md.html) - [Instantiatable: Registered class is not instantiatable](Instantiatable.md.html) - [IntentFilterExportedReceiver: Unspecified `android:exported` in manifest](IntentFilterExportedReceiver.md.html) - [IntentFilterUniqueDataAttributes: Data tags should only declare unique attributes](IntentFilterUniqueDataAttributes.md.html) @@ -181,9 +184,11 @@ - [InvalidAnalyticsName: Invalid Analytics Name](InvalidAnalyticsName.md.html) - [InvalidId: Invalid ID declaration](InvalidId.md.html) - [InvalidImeActionId: Invalid imeActionId declaration](InvalidImeActionId.md.html) + - [InvalidManifestAttribute: Invalid manifest attribute](InvalidManifestAttribute.md.html) - [InvalidNavigation: No start destination specified](InvalidNavigation.md.html) - [InvalidPackage: Package not included in Android](InvalidPackage.md.html) - [InvalidPermission: Invalid Permission Attribute](InvalidPermission.md.html) + - [InvalidPurposeString: Invalid purpose string for permission](InvalidPurposeString.md.html) - [InvalidResourceFolder: Invalid Resource Folder](InvalidResourceFolder.md.html) - [InvalidUsesTagAttribute: Invalid `name` attribute for `uses` element](InvalidUsesTagAttribute.md.html) - [InvalidVectorPath: Invalid vector paths](InvalidVectorPath.md.html) @@ -247,6 +252,7 @@ - [MissingOnPlayFromSearch: Missing `onPlayFromSearch`](MissingOnPlayFromSearch.md.html) - [MissingPermission: Missing Permissions](MissingPermission.md.html) - [MissingPrefix: Missing Android XML namespace](MissingPrefix.md.html) + - [MissingPurpose: Missing purpose for permission](MissingPurpose.md.html) - [MissingQuantity: Missing quantity translation](MissingQuantity.md.html) - [MissingResourcesProperties: Missing resources.properties file](MissingResourcesProperties.md.html) - [MissingSuperCall: Missing Super Call](MissingSuperCall.md.html) @@ -310,6 +316,7 @@ - [PrivateApi: Using Private APIs](PrivateApi.md.html) - [PrivateResource: Using private resources](PrivateResource.md.html) - [Proguard: Using obsolete ProGuard configuration](Proguard.md.html) + - [ProguardAndroidTxtUsage: Use proguard-android-optimize.txt to enable optimizations](ProguardAndroidTxtUsage.md.html) - [ProguardSplit: Proguard.cfg file contains generic Android rules](ProguardSplit.md.html) - [PropertyEscape: Incorrect property escapes](PropertyEscape.md.html) - [ProtectedPermissions: Using system app permission](ProtectedPermissions.md.html) @@ -319,12 +326,14 @@ - [PxUsage: Using 'px' dimension](PxUsage.md.html) - [QueryAllPackagesPermission: Using the QUERY_ALL_PACKAGES permission](QueryAllPackagesPermission.md.html) - [QueryPermissionsNeeded: Using APIs affected by query permissions](QueryPermissionsNeeded.md.html) + - [R8GradualApi: R8 Gradual API can be used only with experimental flag](R8GradualApi.md.html) - [Range: Outside Range](Range.md.html) - [Recycle: Missing `recycle()` calls](Recycle.md.html) - [RecyclerView: RecyclerView Problems](RecyclerView.md.html) - [RedundantLabel: Redundant label on activity](RedundantLabel.md.html) - [RedundantNamespace: Redundant namespace](RedundantNamespace.md.html) - [ReferenceType: Incorrect reference types](ReferenceType.md.html) + - [ReflectionAnnotation: Missing Reflection Annotation](ReflectionAnnotation.md.html) - [Registered: Class is not registered in the manifest](Registered.md.html) - [RelativeOverlap: Overlapping items in RelativeLayout](RelativeOverlap.md.html) - [RemoteViewLayout: Unsupported View in RemoteView](RemoteViewLayout.md.html) @@ -393,8 +402,10 @@ - [SyntheticAccessor: Synthetic Accessor](SyntheticAccessor.md.html) - [SystemPermissionTypo: Permission appears to be a standard permission with a typo](SystemPermissionTypo.md.html) - [TestAppLink: Unmatched URLs](TestAppLink.md.html) + - [TextConcatSpace: Missing space in text concatenation?](TextConcatSpace.md.html) - [TextFields: Missing `inputType`](TextFields.md.html) - [TextViewEdits: TextView should probably be an EditText instead](TextViewEdits.md.html) + - [ThreadConstraint: Wrong Thread (with inference)](ThreadConstraint.md.html) - [TilePreviewImageFormat: Tile preview is not compliant with standards](TilePreviewImageFormat.md.html) - [TileProviderPermissions: TileProvider does not set permission](TileProviderPermissions.md.html) - [TooDeepLayout: Layout hierarchy is too deep](TooDeepLayout.md.html) @@ -470,6 +481,7 @@ - [WatchFaceEditor: Watch face editor must use launchMode="standard"](WatchFaceEditor.md.html) - [WatchFaceForAndroidX: AndroidX watch faces must use action `WATCH_FACE_EDITOR`](WatchFaceForAndroidX.md.html) - [WatchFaceFormatDeclaresHasNoCode: The `hasCode` attribute should be set to `false`](WatchFaceFormatDeclaresHasNoCode.md.html) + - [WatchFaceFormatInvalidVersion: The Watch Face Format version is invalid](WatchFaceFormatInvalidVersion.md.html) - [WatchFaceFormatMissingVersion: The Watch Face Format version is missing](WatchFaceFormatMissingVersion.md.html) - [WearBackNavigation: Wear: Disabling Back navigation](WearBackNavigation.md.html) - [WearMaterialTheme: Using not non-Wear `MaterialTheme` in a Wear OS project](WearMaterialTheme.md.html) @@ -570,7 +582,7 @@ - [UnsafeLifecycleWhenUsage: Unsafe UI operation in finally/catch of Lifecycle.whenStarted of similar method](UnsafeLifecycleWhenUsage-2.md.html) - [ViewModelConstructorInComposable: Constructing a view model in a composable](ViewModelConstructorInComposable.md.html) -* Android Open Source Project (androidx.lint:lint-gradle) (8) +* Android Open Source Project (androidx.lint:lint-gradle) (9) - [EagerGradleConfiguration: Avoid using eager task APIs](EagerGradleConfiguration.md.html) - [FilePropertyDetector: Avoid using Property](FilePropertyDetector.md.html) @@ -578,6 +590,7 @@ - [GradleProjectIsolation: Avoid using APIs that are not project isolation safe](GradleProjectIsolation.md.html) - [InternalAgpApiUsage: Avoid using internal Android Gradle Plugin APIs](InternalAgpApiUsage.md.html) - [InternalGradleApiUsage: Avoid using internal Gradle APIs](InternalGradleApiUsage.md.html) + - [InternalKgpApiUsage: Avoid using internal Kotlin Gradle Plugin APIs](InternalKgpApiUsage.md.html) - [WithPluginClasspathUsage: Flags usage of GradleRunner#withPluginClasspath](WithPluginClasspathUsage.md.html) - [WithTypeWithoutConfigureEach: Flags usage of withType with a closure instead of configureEach](WithTypeWithoutConfigureEach.md.html) @@ -605,11 +618,18 @@ - [EnsureInitializerMetadata: Every Initializer needs to be accompanied by a corresponding entry in the AndroidManifest.xml file](EnsureInitializerMetadata.md.html) - [EnsureInitializerNoArgConstr: Missing Initializer no-arg constructor](EnsureInitializerNoArgConstr.md.html) -* Android Open Source Project (androidx.wear.protolayout) (3) +* Android Open Source Project (androidx.test.uiautomator) (1) + + - [DontUseAccessibilityNodeInfoGetText: Do not use AccessibilityNodeInfo#getText in a UiAutomatorTestScope](DontUseAccessibilityNodeInfoGetText.md.html) + +* Android Open Source Project (androidx.wear.protolayout) (6) - [ProtoLayoutEdgeContentLayoutResponsive: ProtoLayout Material EdgeContentLayout should be used with responsivebehaviour to ensure the best behaviour across different screen sizes andlocales](ProtoLayoutEdgeContentLayoutResponsive.md.html) + - [ProtoLayoutEdgeContentLayoutResponsive: ProtoLayout Material EdgeContentLayout should be used with responsivebehaviour to ensure the best behaviour across different screen sizes andlocales](ProtoLayoutEdgeContentLayoutResponsive-2.md.html) - [ProtoLayoutMinSchema: ProtoLayout feature is not guaranteed to be available on the target device API](ProtoLayoutMinSchema.md.html) + - [ProtoLayoutMinSchema: ProtoLayout feature is not guaranteed to be available on the target device API](ProtoLayoutMinSchema-2.md.html) - [ProtoLayoutPrimaryLayoutResponsive: ProtoLayout Material PrimaryLayout should be used with responsive behaviourto ensure the best behaviour across different screen sizes and locales](ProtoLayoutPrimaryLayoutResponsive.md.html) + - [ProtoLayoutPrimaryLayoutResponsive: ProtoLayout Material PrimaryLayout should be used with responsive behaviourto ensure the best behaviour across different screen sizes and locales](ProtoLayoutPrimaryLayoutResponsive-2.md.html) * Android Open Source Project (androidx.work) (9) @@ -630,26 +650,32 @@ - [ModuleCompanionObjects: Module companion objects should not be annotated with @Module](ModuleCompanionObjects.md.html) - [ModuleCompanionObjectsNotInModuleParent: Companion objects should not be annotated with @Module](ModuleCompanionObjectsNotInModuleParent.md.html) -* Google - Android 3P Vulnerability Research (18) +* Google - Android 3P Vulnerability Research (24) - [DefaultCleartextTraffic: Application by default permits cleartext traffic](DefaultCleartextTraffic.md.html) - [DefaultTrustedUserCerts: Application by default trusts user-added CA certificates](DefaultTrustedUserCerts.md.html) - [DisabledAllSafeBrowsing: Application has disabled safe browsing for all WebView objects](DisabledAllSafeBrowsing.md.html) + - [DotPathAttribute: The "path" attribute should not be set to "." as a path](DotPathAttribute.md.html) - [ExposedRootPath: Application specifies the device root directory](ExposedRootPath.md.html) + - [ExtendedBluetoothDiscoveryDuration: The EXTRA_DISCOVERABLE_DURATION parameter is unsafely high](ExtendedBluetoothDiscoveryDuration.md.html) + - [HardcodedAbsolutePath: The "path" attribute should not be an absolute path](HardcodedAbsolutePath.md.html) - [InsecureDnsSdkLevel: Application vulnerable to DNS spoofing attacks](InsecureDnsSdkLevel.md.html) + - [InsecureLegacyExternalStorage: The `requestLegacyExternalStorage` attribute is set to true, opting the app out of scoped storage](InsecureLegacyExternalStorage.md.html) - [InsecurePermissionProtectionLevel: Custom permission created with a normal `protectionLevel`](InsecurePermissionProtectionLevel.md.html) - [InsecureStickyBroadcastsMethod: Usage of insecure sticky broadcasts](InsecureStickyBroadcastsMethod.md.html) - [InsecureStickyBroadcastsPermission: Usage of insecure sticky broadcasts](InsecureStickyBroadcastsPermission.md.html) - - [MissingAutoVerifyAttribute: Application has custom scheme intent filters with missing `autoVerify` attributes](MissingAutoVerifyAttribute.md.html) + - [LogInfoDisclosure: Potentially sensitive information logged to Logcat](LogInfoDisclosure.md.html) + - [MissingAutoVerifyAttribute: Application has http/https scheme intent filters with missing `autoVerify` attributes](MissingAutoVerifyAttribute.md.html) - [SensitiveExternalPath: Application may expose sensitive info like PII by storing it in external storage](SensitiveExternalPath.md.html) + - [SlashPathAttribute: The "path" attribute should not be set to "/" as a path](SlashPathAttribute.md.html) - [StrandhoggVulnerable: Application vulnerable to Strandhogg attacks](StrandhoggVulnerable.md.html) - [TapjackingVulnerable: Application's UI is vulnerable to tapjacking attacks](TapjackingVulnerable.md.html) - [UnintendedExposedUrl: Application may have a debugging or development URL publicly exposed](UnintendedExposedUrl.md.html) - [UnintendedPrivateIpAddress: Application may have a private IP address publicly exposed](UnintendedPrivateIpAddress.md.html) - [UnsafeCryptoAlgorithmUsage: Application uses unsafe cipher modes or paddings with cryptographic algorithms](UnsafeCryptoAlgorithmUsage.md.html) - - [UnsanitizedContentProviderFilename: Trusting ContentProvider filenames without any sanitization](UnsanitizedContentProviderFilename.md.html) - [VulnerableCryptoAlgorithm: Application uses vulnerable cryptography algorithms](VulnerableCryptoAlgorithm.md.html) - [WeakPrng: Application uses non-cryptographically secure pseudorandom number generators](WeakPrng.md.html) + - [ZeroBluetoothDiscoveryDuration: The EXTRA_DISCOVERABLE_DURATION parameter is set to zero](ZeroBluetoothDiscoveryDuration.md.html) * JakeWharton/timber (com.jakewharton.timber:timber:{version}) (8) @@ -668,9 +694,10 @@ - [LaunchDuringComposition: Calls to `launch` should happen inside of a SideEffect and not during composition](LaunchDuringComposition.md.html) - [NoCollectCallFound: You must call collect on the given progress flow when using PredictiveBackHandler](NoCollectCallFound.md.html) -* Jetpack Compose (androidx.compose.animation) (5) +* Jetpack Compose (androidx.compose.animation) (6) - [ConstantContentStateKeyInItemsCall: Composables within an LazyList `items` call should have unique content state keys](ConstantContentStateKeyInItemsCall.md.html) + - [DisallowLookaheadAnimationVisualDebug: LookaheadAnimationVisualDebugging and CustomizedLookaheadAnimationVisualDebugging are disallowed in production code](DisallowLookaheadAnimationVisualDebug.md.html) - [UnusedContentLambdaTargetStateParameter: AnimatedContent calls should use the provided `T` parameter in the content lambda](UnusedContentLambdaTargetStateParameter.md.html) - [UnusedCrossfadeTargetStateParameter: Crossfade calls should use the provided `T` parameter in the content lambda](UnusedCrossfadeTargetStateParameter.md.html) - [UnusedSharedTransitionModifierParameter: SharedTransitionScope calls should use the provided Modifier parameter](UnusedSharedTransitionModifierParameter.md.html) @@ -715,14 +742,22 @@ - [StateFlowValueCalledInComposition: StateFlow.value should not be called within composition](StateFlowValueCalledInComposition.md.html) - [UnrememberedMutableState: Creating a state object during composition without using `remember`](UnrememberedMutableState.md.html) +* Jetpack Compose (androidx.compose.runtime.retain) (4) + + - [RetainLeaksContext: Using `retain { ... }` to store a value that extends from or references `Context` will cause a memory leak.](RetainLeaksContext.md.html) + - [RetainRememberObserver: Values returned by `retain { ... }` must not implement RememberObserver unless they also implement RetainObserver.](RetainRememberObserver.md.html) + - [RetainUnitType: `retain` calls must not return `Unit`](RetainUnitType.md.html) + - [RetainingDoNotRetainType: Types annotated with `@DoNotRetain` should not be returned as the result of `retain`, either directly or transitively](RetainingDoNotRetainType.md.html) + * Jetpack Compose (androidx.compose.runtime.saveable) (1) - [RememberSaveableSaverParameter: `Saver` objects should be passed to the saver parameter, not the vararg `inputs` parameter](RememberSaveableSaverParameter.md.html) -* Jetpack Compose (androidx.compose.ui) (13) +* Jetpack Compose (androidx.compose.ui) (15) - [ConfigurationScreenWidthHeight: Using Configuration.screenWidthDp/screenHeightDp instead of LocalWindowInfo.current.containerSize](ConfigurationScreenWidthHeight.md.html) - [LocalContextConfigurationRead: Reading Configuration using LocalContext.current.resources.configuration](LocalContextConfigurationRead.md.html) + - [LocalContextGetResourceValueCall: Querying resource properties using LocalContext.current](LocalContextGetResourceValueCall.md.html) - [LocalContextResourcesRead: Reading Resources using LocalContext.current.resources](LocalContextResourcesRead.md.html) - [ModifierFactoryExtensionFunction: Modifier factory functions should be extensions on Modifier](ModifierFactoryExtensionFunction.md.html) - [ModifierFactoryReturnType: Modifier factory functions should return Modifier](ModifierFactoryReturnType.md.html) @@ -730,6 +765,7 @@ - [ModifierNodeInspectableProperties: ModifierNodeElement missing inspectableProperties](ModifierNodeInspectableProperties.md.html) - [ModifierParameter: Guidelines for Modifier parameters in a Composable function](ModifierParameter.md.html) - [MultipleAwaitPointerEventScopes: Suspicious use of multiple awaitPointerEventScope blocks. Using multiple awaitPointerEventScope blocks may cause some input events to be dropped.](MultipleAwaitPointerEventScopes.md.html) + - [NonObservableLocale: Reading locale in a non-observable way in a composable function](NonObservableLocale.md.html) - [ReturnFromAwaitPointerEventScope: Returning from awaitPointerEventScope may cause some input events to be dropped](ReturnFromAwaitPointerEventScope.md.html) - [SuspiciousCompositionLocalModifierRead: CompositionLocals should not be read in Modifier.onAttach() or Modifier.onDetach()](SuspiciousCompositionLocalModifierRead.md.html) - [SuspiciousModifierThen: Using Modifier.then with a Modifier factory function with an implicit receiver](SuspiciousModifierThen.md.html) @@ -753,6 +789,22 @@ - [UnrememberedGetBackStackEntry: Calling getBackStackEntry during composition without using `remember`with a NavBackStackEntry key](UnrememberedGetBackStackEntry.md.html) - [WrongStartDestinationType: If the startDestination points to a Class with arguments, the startDestination must be an instance of that class. If it points to a Class without arguments, startDestination can be a KClass literal, such as StartClass::class.](WrongStartDestinationType-2.md.html) +* Play policy insights beta (13) + + - [AccessibilityPolicy: Accessibility Insights](AccessibilityPolicy.md.html) + - [AdvertisingIdPolicy: Advertising Id Insights](AdvertisingIdPolicy.md.html) + - [AllFilesAccessPolicy: All Files Access Insights](AllFilesAccessPolicy.md.html) + - [BackgroundLocationPolicy: Background Location Insights](BackgroundLocationPolicy.md.html) + - [ExactAlarmPolicy: Exact Alarm Insights](ExactAlarmPolicy.md.html) + - [ForegroundServicesPolicy: Foreground Services Insights](ForegroundServicesPolicy.md.html) + - [FullScreenIntentPolicy: Full Screen Intent Insights](FullScreenIntentPolicy.md.html) + - [HealthConnectPolicy: Health Connect Insights](HealthConnectPolicy.md.html) + - [PackageVisibilityPolicy: Package/App Visibility Insights](PackageVisibilityPolicy.md.html) + - [PhotoAndVideoPolicy: Photos & Video Insights](PhotoAndVideoPolicy.md.html) + - [RequestInstallPackagesPolicy: Request Install Packages Insights](RequestInstallPackagesPolicy.md.html) + - [SmsAndCallLogPolicy: SMS/Call Log Insights](SmsAndCallLogPolicy.md.html) + - [VpnServicePolicy: VPN Service Insights](VpnServicePolicy.md.html) + * slack (com.slack.lint.compose:compose-lints) (21) - [ComposeCompositionLocalGetter: CompositionLocals should not use getters](ComposeCompositionLocalGetter.md.html) diff --git a/docs/checks/year.md.html b/docs/checks/year.md.html index 0046e0fc..b3214fd0 100644 --- a/docs/checks/year.md.html +++ b/docs/checks/year.md.html @@ -3,7 +3,17 @@ Order: [Alphabetical](index.md.html) | [By category](categories.md.html) | [By vendor](vendors.md.html) | [By severity](severity.md.html) | By year | [Libraries](libraries.md.html) -* 2025 (30) +* 2026 (7) + + - [GlobalOptionInConsumerRules: Library has global options in consumer rules](GlobalOptionInConsumerRules.md.html) + - [InvalidManifestAttribute: Invalid manifest attribute](InvalidManifestAttribute.md.html) + - [InvalidPurposeString: Invalid purpose string for permission](InvalidPurposeString.md.html) + - [MissingPurpose: Missing purpose for permission](MissingPurpose.md.html) + - [ProguardAndroidTxtUsage: Use proguard-android-optimize.txt to enable optimizations](ProguardAndroidTxtUsage.md.html) + - [R8GradualApi: R8 Gradual API can be used only with experimental flag](R8GradualApi.md.html) + - [TextConcatSpace: Missing space in text concatenation?](TextConcatSpace.md.html) + +* 2025 (41) - [Aligned16KB: Native library dependency not 16 KB aligned](Aligned16KB.md.html) - [AppLinkSplitToWebAndCustom: Android App links should only use http(s) schemes](AppLinkSplitToWebAndCustom.md.html) @@ -13,18 +23,28 @@ - [CoreLibDesugaringV1: Android 15 requires `desugar_jdk_libs` 2.+](CoreLibDesugaringV1.md.html) - [CredentialManagerMisuse: Misuse of Credential Manager API](CredentialManagerMisuse.md.html) - [DefaultUncaughtExceptionDelegation: Missing default uncaught exception handler delegation](DefaultUncaughtExceptionDelegation.md.html) + - [DontUseAccessibilityNodeInfoGetText: Do not use AccessibilityNodeInfo#getText in a UiAutomatorTestScope](DontUseAccessibilityNodeInfoGetText.md.html) - [FrequentlyChangingValue: Reading a value annotated with @FrequentlyChangingValue inside composition](FrequentlyChangingValue.md.html) + - [InstantAppCall: Instant App call](InstantAppCall.md.html) + - [InstantAppDeprecation: Instant App Deprecation](InstantAppDeprecation.md.html) - [LifecycleCurrentStateInComposition: Lifecycle.currentState should not be called within composition](LifecycleCurrentStateInComposition.md.html) - [MemberExtensionConflict: Conflict applicable candidates of member and extension](MemberExtensionConflict.md.html) - [MissingResourcesProperties: Missing resources.properties file](MissingResourcesProperties.md.html) - [NioDesugaring: Unsupported `java.nio` operations](NioDesugaring.md.html) + - [NonObservableLocale: Reading locale in a non-observable way in a composable function](NonObservableLocale.md.html) - [NullableConcurrentHashMap: ConcurrentHashMap should not use nullable types](NullableConcurrentHashMap.md.html) - [PlaySdkIndexDeprecated: Library is marked as deprecated in SDK Index](PlaySdkIndexDeprecated.md.html) - [PlaySdkIndexVulnerability: Library has vulnerability issues in SDK Index](PlaySdkIndexVulnerability.md.html) - [PrivacySandboxBlockedCall: Call is blocked in the Privacy Sandbox](PrivacySandboxBlockedCall.md.html) + - [ReflectionAnnotation: Missing Reflection Annotation](ReflectionAnnotation.md.html) - [RememberInComposition: Calling a @RememberInComposition annotated declaration inside composition without using `remember`](RememberInComposition.md.html) - [RequiresWindowSdk: API requires a `WindowSdkExtensions.extensionVersion` check](RequiresWindowSdk.md.html) + - [RetainLeaksContext: Using `retain { ... }` to store a value that extends from or references `Context` will cause a memory leak.](RetainLeaksContext.md.html) + - [RetainRememberObserver: Values returned by `retain { ... }` must not implement RememberObserver unless they also implement RetainObserver.](RetainRememberObserver.md.html) + - [RetainUnitType: `retain` calls must not return `Unit`](RetainUnitType.md.html) + - [RetainingDoNotRetainType: Types annotated with `@DoNotRetain` should not be returned as the result of `retain`, either directly or transitively](RetainingDoNotRetainType.md.html) - [TestParameterSiteTarget: `TestParameter` annotation has the wrong site target](TestParameterSiteTarget.md.html) + - [ThreadConstraint: Wrong Thread (with inference)](ThreadConstraint.md.html) - [TrimLambda: Unnecessary lambda with `trim()`](TrimLambda.md.html) - [UElementAsPsi: Avoid using UElement as PsiElement](UElementAsPsi.md.html) - [UnnecessaryArrayInit: Unnecessary array initialization](UnnecessaryArrayInit.md.html) @@ -32,11 +52,12 @@ - [UseKtx: Use KTX extension function](UseKtx.md.html) - [UseRequiresApi: Use `@RequiresApi` instead of `@TargetApi`](UseRequiresApi.md.html) - [WatchFaceFormatDeclaresHasNoCode: The `hasCode` attribute should be set to `false`](WatchFaceFormatDeclaresHasNoCode.md.html) + - [WatchFaceFormatInvalidVersion: The Watch Face Format version is invalid](WatchFaceFormatInvalidVersion.md.html) - [WatchFaceFormatMissingVersion: The Watch Face Format version is missing](WatchFaceFormatMissingVersion.md.html) - [WrongGradleMethod: Wrong Gradle method invoked](WrongGradleMethod.md.html) - [WrongSdkInt: Mismatched SDK_INT or SDK_INT_FULL](WrongSdkInt.md.html) -* 2024 (58) +* 2024 (65) - [AccessibilityFocus: Forcing accessibility focus](AccessibilityFocus.md.html) - [AccessibilityScrollActions: Incomplete Scroll Action support](AccessibilityScrollActions.md.html) @@ -53,21 +74,26 @@ - [DisabledAllSafeBrowsing: Application has disabled safe browsing for all WebView objects](DisabledAllSafeBrowsing.md.html) - [DoNotCallViewToString: Do not use `View.toString()`](DoNotCallViewToString.md.html) - [EagerGradleConfiguration: Avoid using eager task APIs](EagerGradleConfiguration.md.html) + - [ExtendedBluetoothDiscoveryDuration: The EXTRA_DISCOVERABLE_DURATION parameter is unsafely high](ExtendedBluetoothDiscoveryDuration.md.html) - [FilePropertyDetector: Avoid using Property](FilePropertyDetector.md.html) - [GradleLikelyBug: Use of this API is likely a bug](GradleLikelyBug.md.html) - [GradleProjectIsolation: Avoid using APIs that are not project isolation safe](GradleProjectIsolation.md.html) - [InflationInItemDecoration: Avoid inflating a view to display text](InflationInItemDecoration.md.html) - [InsecureDnsSdkLevel: Application vulnerable to DNS spoofing attacks](InsecureDnsSdkLevel.md.html) + - [InsecureLegacyExternalStorage: The `requestLegacyExternalStorage` attribute is set to true, opting the app out of scoped storage](InsecureLegacyExternalStorage.md.html) - [InsecurePermissionProtectionLevel: Custom permission created with a normal `protectionLevel`](InsecurePermissionProtectionLevel.md.html) - [InsecureStickyBroadcastsMethod: Usage of insecure sticky broadcasts](InsecureStickyBroadcastsMethod.md.html) - [InsecureStickyBroadcastsPermission: Usage of insecure sticky broadcasts](InsecureStickyBroadcastsPermission.md.html) - [InternalAgpApiUsage: Avoid using internal Android Gradle Plugin APIs](InternalAgpApiUsage.md.html) - [InternalGradleApiUsage: Avoid using internal Gradle APIs](InternalGradleApiUsage.md.html) + - [InternalKgpApiUsage: Avoid using internal Kotlin Gradle Plugin APIs](InternalKgpApiUsage.md.html) - [InvalidLanguageTagDelimiter: Underscore (`_`) is an unsupported delimiter for subtags](InvalidLanguageTagDelimiter.md.html) - [InvalidUseOfOnBackPressed: Do not call onBackPressed() within OnBackPressedDisptacher](InvalidUseOfOnBackPressed.md.html) - [LocalContextConfigurationRead: Reading Configuration using LocalContext.current.resources.configuration](LocalContextConfigurationRead.md.html) + - [LocalContextGetResourceValueCall: Querying resource properties using LocalContext.current](LocalContextGetResourceValueCall.md.html) - [LocalContextResourcesRead: Reading Resources using LocalContext.current.resources](LocalContextResourcesRead.md.html) - - [MissingAutoVerifyAttribute: Application has custom scheme intent filters with missing `autoVerify` attributes](MissingAutoVerifyAttribute.md.html) + - [LogInfoDisclosure: Potentially sensitive information logged to Logcat](LogInfoDisclosure.md.html) + - [MissingAutoVerifyAttribute: Application has http/https scheme intent filters with missing `autoVerify` attributes](MissingAutoVerifyAttribute.md.html) - [MissingKeepAnnotation: In minified builds, Enum classes used as type-safe Navigation arguments should be annotated with @androidx.annotation.Keep](MissingKeepAnnotation.md.html) - [MissingKeepAnnotation: In minified builds, Enum classes used as type-safe Navigation arguments should be annotated with @androidx.annotation.Keep](MissingKeepAnnotation-2.md.html) - [MissingKeepAnnotation: In minified builds, Enum classes used as type-safe Navigation arguments should be annotated with @androidx.annotation.Keep](MissingKeepAnnotation-3.md.html) @@ -76,7 +102,9 @@ - [MissingSerializableAnnotation: Type-safe NavDestinations must be annotated with @kotlinx.serialization.Serializable](MissingSerializableAnnotation-3.md.html) - [PictureInPictureIssue: Picture In Picture best practices not followed](PictureInPictureIssue.md.html) - [ProtoLayoutEdgeContentLayoutResponsive: ProtoLayout Material EdgeContentLayout should be used with responsivebehaviour to ensure the best behaviour across different screen sizes andlocales](ProtoLayoutEdgeContentLayoutResponsive.md.html) + - [ProtoLayoutEdgeContentLayoutResponsive: ProtoLayout Material EdgeContentLayout should be used with responsivebehaviour to ensure the best behaviour across different screen sizes andlocales](ProtoLayoutEdgeContentLayoutResponsive-2.md.html) - [ProtoLayoutPrimaryLayoutResponsive: ProtoLayout Material PrimaryLayout should be used with responsive behaviourto ensure the best behaviour across different screen sizes and locales](ProtoLayoutPrimaryLayoutResponsive.md.html) + - [ProtoLayoutPrimaryLayoutResponsive: ProtoLayout Material PrimaryLayout should be used with responsive behaviourto ensure the best behaviour across different screen sizes and locales](ProtoLayoutPrimaryLayoutResponsive-2.md.html) - [PublicKeyCredential: Creating public key credential](PublicKeyCredential.md.html) - [SecretInSource: Secret in source code](SecretInSource.md.html) - [SelectedPhotoAccess: Behavior change when requesting photo library access](SelectedPhotoAccess.md.html) @@ -85,7 +113,6 @@ - [SuspiciousModifierThen: Using Modifier.then with a Modifier factory function with an implicit receiver](SuspiciousModifierThen.md.html) - [UnclosedTrace: Incorrect trace section usage](UnclosedTrace.md.html) - [UnnecessaryRequiredFeature: Potentially unnecessary required feature](UnnecessaryRequiredFeature.md.html) - - [UnsanitizedContentProviderFilename: Trusting ContentProvider filenames without any sanitization](UnsanitizedContentProviderFilename.md.html) - [UnusedSharedTransitionModifierParameter: SharedTransitionScope calls should use the provided Modifier parameter](UnusedSharedTransitionModifierParameter.md.html) - [UseSdkSuppress: Using `@SdkSuppress` instead of `@RequiresApi`](UseSdkSuppress.md.html) - [ViewModelConstructorInComposable: Constructing a view model in a composable](ViewModelConstructorInComposable.md.html) @@ -96,8 +123,9 @@ - [WrongStartDestinationType: If the startDestination points to a Class with arguments, the startDestination must be an instance of that class. If it points to a Class without arguments, startDestination can be a KClass literal, such as StartClass::class.](WrongStartDestinationType.md.html) - [WrongStartDestinationType: If the startDestination points to a Class with arguments, the startDestination must be an instance of that class. If it points to a Class without arguments, startDestination can be a KClass literal, such as StartClass::class.](WrongStartDestinationType-2.md.html) - [WrongStartDestinationType: If the startDestination points to a Class with arguments, the startDestination must be an instance of that class. If it points to a Class without arguments, startDestination can be a KClass literal, such as StartClass::class.](WrongStartDestinationType-3.md.html) + - [ZeroBluetoothDiscoveryDuration: The EXTRA_DISCOVERABLE_DURATION parameter is set to zero](ZeroBluetoothDiscoveryDuration.md.html) -* 2023 (84) +* 2023 (87) - [ArcAnimationSpecTypeIssue: ArcAnimationSpec is designed for 2D values. Particularly, for positional values such as Offset.](ArcAnimationSpecTypeIssue.md.html) - [AutoboxingStateCreation: `State` will autobox values assigned to this state. Use a specialized state type instead.](AutoboxingStateCreation.md.html) @@ -112,7 +140,6 @@ - [ComposeModifierComposed: Don't use Modifier.composed {}](ComposeModifierComposed.md.html) - [ComposeModifierMissing: Missing modifier parameter](ComposeModifierMissing.md.html) - [ComposeModifierReused: Modifiers should only be used once](ComposeModifierReused.md.html) - - [ComposeModifierWithoutDefault: Missing Modifier default value](ComposeModifierWithoutDefault.md.html) - [ComposeMultipleContentEmitters: Composables should only be emit from one source](ComposeMultipleContentEmitters.md.html) - [ComposeMutableParameters: Mutable objects in Compose will break state](ComposeMutableParameters.md.html) - [ComposeNamingLowercase: Value-returning Composables should be lowercase](ComposeNamingLowercase.md.html) @@ -128,6 +155,7 @@ - [CustomPermissionTypo: Permission appears to be a custom permission with a typo](CustomPermissionTypo.md.html) - [DefaultCleartextTraffic: Application by default permits cleartext traffic](DefaultCleartextTraffic.md.html) - [DefaultTrustedUserCerts: Application by default trusts user-added CA certificates](DefaultTrustedUserCerts.md.html) + - [DotPathAttribute: The "path" attribute should not be set to "." as a path](DotPathAttribute.md.html) - [EditedTargetSdkVersion: Manually Edited TargetSdkVersion](EditedTargetSdkVersion.md.html) - [ExactAlarm: Invalid Usage of Exact Alarms](ExactAlarm.md.html) - [ExceptionMessage: Please provide a string for the `lazyMessage` parameter](ExceptionMessage.md.html) @@ -135,6 +163,7 @@ - [ForegroundServicePermission: Missing permissions required by foregroundServiceType](ForegroundServicePermission.md.html) - [ForegroundServiceType: Missing `foregroundServiceType` attribute in manifest](ForegroundServiceType.md.html) - [GestureBackNavigation: Usage of KeyEvent.KEYCODE_BACK](GestureBackNavigation.md.html) + - [HardcodedAbsolutePath: The "path" attribute should not be an absolute path](HardcodedAbsolutePath.md.html) - [IntentWithNullActionLaunch: Unsafe intent launched with no action set](IntentWithNullActionLaunch.md.html) - [KaptUsageInsteadOfKsp: Kapt usage should be replaced with KSP](KaptUsageInsteadOfKsp.md.html) - [KnownPermissionError: Value specified for permission is a known error](KnownPermissionError.md.html) @@ -151,12 +180,14 @@ - [PermissionNamingConvention: Permission name does not follow recommended convention](PermissionNamingConvention.md.html) - [PlaySdkIndexGenericIssues: Library has issues in SDK Index](PlaySdkIndexGenericIssues.md.html) - [ProtoLayoutMinSchema: ProtoLayout feature is not guaranteed to be available on the target device API](ProtoLayoutMinSchema.md.html) + - [ProtoLayoutMinSchema: ProtoLayout feature is not guaranteed to be available on the target device API](ProtoLayoutMinSchema-2.md.html) - [ProviderReadPermissionOnly: Provider with readPermission only and implemented write APIs](ProviderReadPermissionOnly.md.html) - [ReportShortcutUsage: Report shortcut usage](ReportShortcutUsage.md.html) - [ReservedSystemPermission: Permission name is a reserved Android permission](ReservedSystemPermission.md.html) - [ScheduleExactAlarm: Scheduling Exact Alarms Without Required Permission](ScheduleExactAlarm.md.html) - [SensitiveExternalPath: Application may expose sensitive info like PII by storing it in external storage](SensitiveExternalPath.md.html) - [SetAndClearCommunicationDevice: Clearing communication device](SetAndClearCommunicationDevice.md.html) + - [SlashPathAttribute: The "path" attribute should not be set to "/" as a path](SlashPathAttribute.md.html) - [SquareAndRoundTilePreviews: TileProvider does not have round and square previews](SquareAndRoundTilePreviews.md.html) - [StartActivityAndCollapseDeprecated: TileService.startActivityAndCollapse(Intent) is deprecated](StartActivityAndCollapseDeprecated.md.html) - [StrandhoggVulnerable: Application vulnerable to Strandhogg attacks](StrandhoggVulnerable.md.html) @@ -362,7 +393,7 @@ - [WatchFaceEditor: Watch face editor must use launchMode="standard"](WatchFaceEditor.md.html) - [WrongRequiresOptIn: Experimental annotations defined in Kotlin must use kotlin.RequiresOptIn](WrongRequiresOptIn.md.html) -* 2020 (66) +* 2020 (62) - [AcceptsUserCertificates: Allowing User Certificates](AcceptsUserCertificates.md.html) - [AnnotationProcessorOnCompilePath: Annotation Processor on Compile Classpath](AnnotationProcessorOnCompilePath.md.html) @@ -374,13 +405,11 @@ - [EnsureInitializerMetadata: Every Initializer needs to be accompanied by a corresponding entry in the AndroidManifest.xml file](EnsureInitializerMetadata.md.html) - [EnsureInitializerNoArgConstr: Missing Initializer no-arg constructor](EnsureInitializerNoArgConstr.md.html) - [ExpensiveAssertion: Expensive Assertions](ExpensiveAssertion.md.html) - - [FieldSiteTargetOnQualifierAnnotation: Redundant 'field:' used for Dagger qualifier annotation](FieldSiteTargetOnQualifierAnnotation.md.html) - [IdleBatteryChargingConstraints: Constraints may not be met for some devices](IdleBatteryChargingConstraints.md.html) - [InvalidFragmentVersionForActivityResult: Update to Fragment 1.3.0 to use ActivityResult APIs](InvalidFragmentVersionForActivityResult.md.html) - [InvalidPeriodicWorkRequestInterval: Invalid interval duration](InvalidPeriodicWorkRequestInterval.md.html) - [InvalidSetHasFixedSize: When using `setHasFixedSize()` in an `RecyclerView`, `wrap_content` cannot be used as a value for `size` in the scrolling direction.](InvalidSetHasFixedSize.md.html) - [JavaOnlyDetector: Using @JavaOnly elements in Kotlin code](JavaOnlyDetector.md.html) - - [JvmStaticProvidesInObjectDetector: @JvmStatic used for @Provides function in an object class](JvmStaticProvidesInObjectDetector.md.html) - [KtxExtensionAvailable: KTX Extension Available](KtxExtensionAvailable.md.html) - [LaunchActivityFromNotification: Notification Launches Services or BroadcastReceivers](LaunchActivityFromNotification.md.html) - [LintImplBadUrl: Bad More Info Link](LintImplBadUrl.md.html) @@ -398,8 +427,6 @@ - [ModifierFactoryReturnType: Modifier factory functions should return Modifier](ModifierFactoryReturnType.md.html) - [ModifierFactoryUnreferencedReceiver: Modifier factory functions must use the receiver Modifier instance](ModifierFactoryUnreferencedReceiver.md.html) - [ModifierParameter: Guidelines for Modifier parameters in a Composable function](ModifierParameter.md.html) - - [ModuleCompanionObjects: Module companion objects should not be annotated with @Module](ModuleCompanionObjects.md.html) - - [ModuleCompanionObjectsNotInModuleParent: Companion objects should not be annotated with @Module](ModuleCompanionObjectsNotInModuleParent.md.html) - [MotionLayoutInvalidSceneFileReference: layoutDescription must specify a scene file](MotionLayoutInvalidSceneFileReference.md.html) - [MotionSceneFileValidationError: Validation errors in `MotionScene` files](MotionSceneFileValidationError.md.html) - [NonConstantResourceId: Checks use of resource IDs in places requiring constants](NonConstantResourceId.md.html) @@ -812,22 +839,34 @@ - [WrongManifestParent: Wrong manifest parent](WrongManifestParent.md.html) - [WrongViewCast: Mismatched view type](WrongViewCast.md.html) -* Unknown (57) +* Unknown (76) + - [AccessibilityPolicy: Accessibility Insights](AccessibilityPolicy.md.html) + - [AdvertisingIdPolicy: Advertising Id Insights](AdvertisingIdPolicy.md.html) - [AlertDialogUsage: Use the support library AlertDialog instead of android.app.AlertDialog](AlertDialogUsage.md.html) + - [AllFilesAccessPolicy: All Files Access Insights](AllFilesAccessPolicy.md.html) - [AssertjImport: Flags Java 6 incompatible imports](AssertjImport.md.html) + - [BackgroundLocationPolicy: Background Location Insights](BackgroundLocationPolicy.md.html) - [BinaryOperationInTimber: Use String#format()](BinaryOperationInTimber.md.html) - [ColorCasing: Raw colors should be defined with uppercase letters](ColorCasing.md.html) + - [ComposeModifierWithoutDefault: Missing Modifier default value](ComposeModifierWithoutDefault.md.html) - [ConstraintLayoutToolsEditorAttribute: Flags tools:layout_editor xml properties](ConstraintLayoutToolsEditorAttribute.md.html) - [DefaultLayoutAttribute: Flags default layout values](DefaultLayoutAttribute.md.html) + - [DisallowLookaheadAnimationVisualDebug: LookaheadAnimationVisualDebugging and CustomizedLookaheadAnimationVisualDebugging are disallowed in production code](DisallowLookaheadAnimationVisualDebug.md.html) - [ErroneousLayoutAttribute: Layout attribute that's not applicable to a particular view](ErroneousLayoutAttribute.md.html) + - [ExactAlarmPolicy: Exact Alarm Insights](ExactAlarmPolicy.md.html) + - [FieldSiteTargetOnQualifierAnnotation: Redundant 'field:' used for Dagger qualifier annotation](FieldSiteTargetOnQualifierAnnotation.md.html) + - [ForegroundServicesPolicy: Foreground Services Insights](ForegroundServicesPolicy.md.html) - [FormalGerman: Marks strings which contain formal German words](FormalGerman.md.html) + - [FullScreenIntentPolicy: Full Screen Intent Insights](FullScreenIntentPolicy.md.html) + - [HealthConnectPolicy: Health Connect Insights](HealthConnectPolicy.md.html) - [ImplicitStringPlaceholder: Marks implicit placeholders in strings without an index](ImplicitStringPlaceholder.md.html) - [InvalidAccessibility: Marks invalid accessibility usages](InvalidAccessibility.md.html) - [InvalidImport: Flags invalid imports](InvalidImport.md.html) - [InvalidSingleLineComment: Marks single line comments that are not sentences](InvalidSingleLineComment.md.html) - [InvalidString: Marks invalid translation strings](InvalidString.md.html) - [JCenter: Marks usage of the jcenter() repository](JCenter.md.html) + - [JvmStaticProvidesInObjectDetector: @JvmStatic used for @Provides function in an object class](JvmStaticProvidesInObjectDetector.md.html) - [KotlinRequireNotNullUseMessage: Marks usage of the requireNotNull method without lazy messages](KotlinRequireNotNullUseMessage.md.html) - [LayoutFileNameMatchesClass: Checks that the layout file matches the class name](LayoutFileNameMatchesClass.md.html) - [LogNotTimber: Logging call to Log instead of Timber](LogNotTimber.md.html) @@ -835,9 +874,14 @@ - [MatchingViewId: Flags view ids that don't match with the file name](MatchingViewId.md.html) - [MissingScrollbars: Scroll views should declare a scrollbar](MissingScrollbars.md.html) - [MissingXmlHeader: Flags xml files that don't have a header](MissingXmlHeader.md.html) + - [ModuleCompanionObjects: Module companion objects should not be annotated with @Module](ModuleCompanionObjects.md.html) + - [ModuleCompanionObjectsNotInModuleParent: Companion objects should not be annotated with @Module](ModuleCompanionObjectsNotInModuleParent.md.html) - [NamingPattern: Names should be well named](NamingPattern.md.html) + - [PackageVisibilityPolicy: Package/App Visibility Insights](PackageVisibilityPolicy.md.html) + - [PhotoAndVideoPolicy: Photos & Video Insights](PhotoAndVideoPolicy.md.html) - [RawColor: Flags color that are not defined as resource](RawColor.md.html) - [RawDimen: Flags dimensions that are not defined as resource](RawDimen.md.html) + - [RequestInstallPackagesPolicy: Request Install Packages Insights](RequestInstallPackagesPolicy.md.html) - [ResourcesGetColorCall: Marks usage of deprecated getColor() on Resources](ResourcesGetColorCall.md.html) - [ResourcesGetColorStateListCall: Marks usage of deprecated getColorStateList() on Resources](ResourcesGetColorStateListCall.md.html) - [ResourcesGetDrawableCall: Marks usage of deprecated getDrawable() on Resources](ResourcesGetDrawableCall.md.html) @@ -849,6 +893,7 @@ - [RxJava2SchedulersFactoryCall: Instead of calling the Schedulers factory methods directly inject the Schedulers](RxJava2SchedulersFactoryCall.md.html) - [RxJava2SubscribeMissingOnError: Flags a version of the subscribe() method without an error Consumer](RxJava2SubscribeMissingOnError.md.html) - [ShouldUseStaticImport: Flags declarations that should be statically imported](ShouldUseStaticImport.md.html) + - [SmsAndCallLogPolicy: SMS/Call Log Insights](SmsAndCallLogPolicy.md.html) - [StringFormatInTimber: Logging call with Timber contains String#format()](StringFormatInTimber.md.html) - [StringNotCapitalized: Marks strings which are not capitalized](StringNotCapitalized.md.html) - [SuperfluousMarginDeclaration: Flags margin declarations that can be simplified](SuperfluousMarginDeclaration.md.html) @@ -862,6 +907,7 @@ - [Todo: Marks todos in any given file](Todo.md.html) - [UnsupportedLayoutAttribute: Marks layout attributes which are not supported](UnsupportedLayoutAttribute.md.html) - [UnusedMergeAttributes: Flags android and app attributes that are used on a attribute for custom Views](UnusedMergeAttributes.md.html) + - [VpnServicePolicy: VPN Service Insights](VpnServicePolicy.md.html) - [WrongAnnotationOrder: Checks that Annotations comply with a certain order](WrongAnnotationOrder.md.html) - [WrongConstraintLayoutUsage: Marks a wrong usage of the Constraint Layout](WrongConstraintLayoutUsage.md.html) - [WrongDrawableName: Drawable names should be prefixed accordingly](WrongDrawableName.md.html) diff --git a/docs/internal/guidelines.md.html b/docs/internal/guidelines.md.html index 2cb0de16..460b419b 100644 --- a/docs/internal/guidelines.md.html +++ b/docs/internal/guidelines.md.html @@ -7,7 +7,8 @@ # Setup To develop lint, use a recent IntelliJ, check out the Android tools -repository and then open up the folder `tools/` as a Gradle project. +repository and then open up the folder `tools/adt/idea` as an IntelliJ +project. # Code diff --git a/docs/usage/agp-dsl.md.html b/docs/usage/agp-dsl.md.html index bf5c66a6..d304350d 100644 --- a/docs/usage/agp-dsl.md.html +++ b/docs/usage/agp-dsl.md.html @@ -16,7 +16,7 @@ htmlOutput = file("lint-report.html") textReport = true } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! Tip The lint options block was called `lintOptions` until 7.0. You can @@ -41,7 +41,7 @@ textReport = true } } -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ## Configuring Issues and Severity diff --git a/docs/usage/changes.md.html b/docs/usage/changes.md.html index 4280fa9c..61292fc6 100644 --- a/docs/usage/changes.md.html +++ b/docs/usage/changes.md.html @@ -13,6 +13,39 @@ `Aligned16KB` | Native library dependency not 16 KB aligned `TrimLambda` | Unnecessary lambda with `trim()` `UnnecessaryArrayInit` | Unnecessary array initialization + `CoreLibDesugaringV1` | Android 15 requires `desugar_jdk_libs` 2.+ + `RequiresWindowSdk` | API requires a `WindowSdkExtensions.extensionVersion` check + `WrongGradleKtsMethod` | Wrong Gradle method invoked + +* Normally, when analyzing test sources, lint only runs a + small set of lint checks -- those that specifically apply to tests, + such as `IgnoreWithoutReason` (using `@Ignore` without a reason + parameter in a test declaration). However, if you don't want to + turn on all lint checks on test sources (via the `checkTestSources` + flag or Gradle DSL option), you can opt in individual lint checks + via a [lint XML file](lintxml.md.html) option like the following: + + ```xml + + + + ``` + +* Lint now warns when there are newer versions of Gradle available for the + gradle wrapper properties file. Similarly, the + [NewerVersionAvailable](../checks/NewerVersionAvailable.md.html) + check is now enabled by default. + +* Lint now applies the same checks for `minSdkVersion`, `targetSdkVersion` and + `compileSdkVersion` that it already provides for `build.gradle` and `build.gradle.kts` + files to definitions of these values in version catalogs (`libs.versions.toml`), + provided they're using one of a few standard key names, such as + ```toml + [versions] + compileSdk = "34" + minSdk = "15" + targetSdk = "34" + ``` **8.9** diff --git a/docs/usage/lintxml.md.html b/docs/usage/lintxml.md.html index 62441636..6b95950a 100644 --- a/docs/usage/lintxml.md.html +++ b/docs/usage/lintxml.md.html @@ -25,6 +25,8 @@ the special value “all”, which will match all issue id's. And when configuring severity, the id is also allowed to be a category, such as “Security”. +- `severity`: The severity level (fatal, error, warning, ignore) to use + instead of whatever the default is - `in`: Specifies that this configuration only applies when lint runs in the given hosts. There are predefined names for various integrations of lint; “gradle” refers to lint running in the Gradle @@ -35,6 +37,15 @@ you can also add a “!” in front of each host to negate the check. For example, to enable a check anywhere except when running in Studio, use `in="!studio"`. +- `tests`: Normally, when analyzing test sources, lint only runs a + small set of lint checks -- those that specifically apply to tests, + such as `IgnoreWithoutReason` (using `@Ignore` without a reason + parameter in a test declaration). However, if you don't want to + turn on all lint checks on test sources, with the `checkTestSources` + attribute set to true on the root `` element (or via command + line flags or Gradle DSL options), you can individually opt in + specific issues with a `checks="true"` attribute, e.g. + ``. In addition, the element can specify one or more children: @@ -82,6 +93,21 @@ running in Studio and a configuration specifies “!gradle”, this will match after the other attempts. +!!! Tip + While you can place `lint.xml` files within your source folders + to apply to a specific file or directory, there are a couple of + restrictions where you can only set the configuration at the + project level. First, you cannot change the severity of a + disabled by default issue back to enabled, and similarly you + can't use the `tests` attribute below the project level either. + The reason for this is that lint configures the set of detectors + to be run at the project level. When issues are found, it will + check the nearest lint.xml file to see if there's a new severity + or ignore option to apply to override the current settings for + the issue, but this doesn't happen if the detector isn't running + at all (and lint doesn't run all detectors all the time, just + in case they're needed at the file level, for performance reasons.) + ## Sample lint.xml file Typically lint.xml files are pretty short and simple, but here's diff --git a/docs/usage/newer-lint.md.html b/docs/usage/newer-lint.md.html index 9ea16d94..d233f455 100644 --- a/docs/usage/newer-lint.md.html +++ b/docs/usage/newer-lint.md.html @@ -40,7 +40,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~properties android.experimental.lint.version = 7.1.0-beta01 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! Warning This feature flag is experimental and will change once the flag is @@ -82,6 +82,6 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~properties #noinspection GradleDependency android.experimental.lint.version=8.0.0 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 41d9927a4d4fb3f96a785543079b8df6723c946b..9bbc975c742b298b441bfb90dbc124400a3751b9 100644 GIT binary patch literal 43705 zcma&Obx`DOvL%eWOXJW;V64viP??$)@wHcsJ68)>bJS6*&iHnskXE8MjvIPVl|FrmV}Npeql07fCw6`pw`0s zGauF(<*@v{3t!qoUU*=j)6;|-(yg@jvDx&fV^trtZt27?4Tkn729qrItVh@PMwG5$ z+oXHSPM??iHZ!cVP~gYact-CwV`}~Q+R}PPNRy+T-geK+>fHrijpllon_F4N{@b-} z1M0=a!VbVmJM8Xk@NRv)m&aRYN}FSJ{LS;}2ArQ5baSjfy40l@T5)1r-^0fAU6f_} zzScst%$Nd-^ElV~H0TetQhMc%S{}Q4lssln=|;LG?Ulo}*mhg8YvBAUY7YFdXs~vv zv~{duzVw%C#GxkBwX=TYp1Dh*Uaum2?RmsvPaLlzO^fIJ`L?&OV?Y&kKj~^kWC`Ly zfL-}J^4a0Ojuz9O{jUbIS;^JatJ5+YNNHe}6nG9Yd6P-lJiK2ms)A^xq^H2fKrTF) zp!6=`Ece~57>^9(RA4OB9;f1FAhV%zVss%#rDq$9ZW3N2cXC7dMz;|UcRFecBm`DA z1pCO!#6zKp#@mx{2>Qcme8y$Qg_gnA%(`Vtg3ccwgb~D(&@y8#Jg8nNYW*-P{_M#E zZ|wCsQoO1(iIKd-2B9xzI}?l#Q@G5d$m1Lfh0q;iS5FDQ&9_2X-H)VDKA*fa{b(sV zL--krNCXibi1+*C2;4qVjb0KWUVGjjRT{A}Q*!cFmj0tRip2ra>WYJ>ZK4C|V~RYs z6;~+*)5F^x^aQqk9tjh)L;DOLlD8j+0<>kHc8MN|68PxQV`tJFbgxSfq-}b(_h`luA0&;Vk<@51i0 z_cu6{_*=vlvYbKjDawLw+t^H?OV00_73Cn3goU5?})UYFuoSX6Xqw;TKcrsc|r# z$sMWYl@cs#SVopO$hpHZ)cdU-+Ui%z&Sa#lMI~zWW@vE%QDh@bTe0&V9nL>4Et9`N zGT8(X{l@A~loDx}BDz`m6@tLv@$mTlVJ;4MGuj!;9Y=%;;_kj#o8n5tX%@M)2I@}u z_{I!^7N1BxW9`g&Z+K#lZ@7_dXdsqp{W9_`)zgZ=sD~%WS5s$`7z#XR!Lfy(4se(m zR@a3twgMs19!-c4jh`PfpJOSU;vShBKD|I0@rmv_x|+ogqslnLLOepJpPMOxhRb*i zGHkwf#?ylQ@k9QJL?!}MY4i7joSzMcEhrDKJH&?2v{-tgCqJe+Y0njl7HYff z{&~M;JUXVR$qM1FPucIEY(IBAuCHC@^~QG6O!dAjzQBxDOR~lJEr4KS9R*idQ^p{D zS#%NQADGbAH~6wAt}(1=Uff-1O#ITe)31zCL$e9~{w)gx)g>?zFE{Bc9nJT6xR!i8 z)l)~9&~zSZTHk{?iQL^MQo$wLi}`B*qnvUy+Y*jEraZMnEhuj`Fu+>b5xD1_Tp z)8|wedv42#3AZUL7x&G@p@&zcUvPkvg=YJS6?1B7ZEXr4b>M+9Gli$gK-Sgh{O@>q7TUg+H zNJj`6q#O@>4HpPJEHvNij`sYW&u%#=215HKNg;C!0#hH1vlO5+dFq9& zS)8{5_%hz?#D#wn&nm@aB?1_|@kpA@{%jYcs{K%$a4W{k@F zPyTav?jb;F(|GaZhm6&M#g|`ckO+|mCtAU)5_(hn&Ogd z9Ku}orOMu@K^Ac>eRh3+0-y^F`j^noa*OkS3p^tLV`TY$F$cPXZJ48!xz1d7%vfA( zUx2+sDPqHfiD-_wJDb38K^LtpN2B0w=$A10z%F9f_P2aDX63w7zDG5CekVQJGy18I zB!tI`6rZr7TK10L(8bpiaQ>S@b7r_u@lh^vakd0e6USWw7W%d_Ob%M!a`K>#I3r-w zo2^+9Y)Sb?P9)x0iA#^ns+Kp{JFF|$09jb6ZS2}_<-=$?^#IUo5;g`4ICZknr!_aJ zd73%QP^e-$%Xjt|28xM}ftD|V@76V_qvNu#?Mt*A-OV{E4_zC4Ymo|(cb+w^`Wv== z>)c%_U0w`d$^`lZQp@midD89ta_qTJW~5lRrIVwjRG_9aRiQGug%f3p@;*%Y@J5uQ|#dJ+P{Omc`d2VR)DXM*=ukjVqIpkb<9gn9{*+&#p)Ek zN=4zwNWHF~=GqcLkd!q0p(S2_K=Q`$whZ}r@ec_cb9hhg9a z6CE=1n8Q;hC?;ujo0numJBSYY6)GTq^=kB~`-qE*h%*V6-ip=c4+Yqs*7C@@b4YAi zuLjsmD!5M7r7d5ZPe>4$;iv|zq=9=;B$lI|xuAJwi~j~^Wuv!Qj2iEPWjh9Z&#+G>lZQpZ@(xfBrhc{rlLwOC;optJZDj4Xfu3$u6rt_=YY0~lxoy~fq=*L_&RmD7dZWBUmY&12S;(Ui^y zBpHR0?Gk|`U&CooNm_(kkO~pK+cC%uVh^cnNn)MZjF@l{_bvn4`Jc}8QwC5_)k$zs zM2qW1Zda%bIgY^3NcfL)9ug`05r5c%8ck)J6{fluBQhVE>h+IA&Kb}~$55m-^c1S3 zJMXGlOk+01qTQUFlh5Jc3xq|7McY$nCs$5=`8Y;|il#Ypb{O9}GJZD8!kYh{TKqs@ z-mQn1K4q$yGeyMcryHQgD6Ra<6^5V(>6_qg`3uxbl|T&cJVA*M_+OC#>w(xL`RoPQ zf1ZCI3G%;o-x>RzO!mc}K!XX{1rih0$~9XeczHgHdPfL}4IPi~5EV#ZcT9 zdgkB3+NPbybS-d;{8%bZW^U+x@Ak+uw;a5JrZH!WbNvl!b~r4*vs#he^bqz`W93PkZna2oYO9dBrKh2QCWt{dGOw)%Su%1bIjtp4dKjZ^ zWfhb$M0MQiDa4)9rkip9DaH0_tv=XxNm>6MKeWv>`KNk@QVkp$Lhq_~>M6S$oliq2 zU6i7bK;TY)m>-}X7hDTie>cc$J|`*}t=MAMfWIALRh2=O{L57{#fA_9LMnrV(HrN6 zG0K_P5^#$eKt{J|#l~U0WN_3)p^LLY(XEqes0OvI?3)GTNY&S13X+9`6PLVFRf8K) z9x@c|2T72+-KOm|kZ@j4EDDec>03FdgQlJ!&FbUQQH+nU^=U3Jyrgu97&#-W4C*;_ z(WacjhBDp@&Yon<9(BWPb;Q?Kc0gR5ZH~aRNkPAWbDY!FiYVSu!~Ss^9067|JCrZk z-{Rn2KEBR|Wti_iy) zXnh2wiU5Yz2L!W{{_#LwNWXeNPHkF=jjXmHC@n*oiz zIoM~Wvo^T@@t!QQW?Ujql-GBOlnB|HjN@x~K8z)c(X}%%5Zcux09vC8=@tvgY>czq z3D(U&FiETaN9aP}FDP3ZSIXIffq>M3{~eTB{uauL07oYiM=~K(XA{SN!rJLyXeC+Y zOdeebgHOc2aCIgC=8>-Q>zfuXV*=a&gp{l#E@K|{qft@YtO>xaF>O7sZz%8);e86? z+jJlFB{0fu6%8ew^_<+v>>%6eB8|t*_v7gb{x=vLLQYJKo;p7^o9!9A1)fZZ8i#ZU z<|E?bZakjkEV8xGi?n+{Xh3EgFKdM^;4D;5fHmc04PI>6oU>>WuLy6jgpPhf8$K4M zjJo*MbN0rZbZ!5DmoC^@hbqXiP^1l7I5;Wtp2i9Jkh+KtDJoXP0O8qmN;Sp(+%upX zAxXs*qlr(ck+-QG_mMx?hQNXVV~LT{$Q$ShX+&x?Q7v z@8t|UDylH6@RZ?WsMVd3B0z5zf50BP6U<&X_}+y3uJ0c5OD}+J&2T8}A%2Hu#Nt_4 zoOoTI$A!hQ<2pk5wfZDv+7Z{yo+Etqry=$!*pvYyS+kA4xnJ~3b~TBmA8Qd){w_bE zqDaLIjnU8m$wG#&T!}{e0qmHHipA{$j`%KN{&#_Kmjd&#X-hQN+ju$5Ms$iHj4r?) z&5m8tI}L$ih&95AjQ9EDfPKSmMj-@j?Q+h~C3<|Lg2zVtfKz=ft{YaQ1i6Om&EMll zzov%MsjSg=u^%EfnO+W}@)O6u0LwoX709h3Cxdc2Rwgjd%LLTChQvHZ+y<1q6kbJXj3_pq1&MBE{8 zd;aFotyW>4WHB{JSD8Z9M@jBitC1RF;!B8;Rf-B4nOiVbGlh9w51(8WjL&e{_iXN( zAvuMDIm_>L?rJPxc>S`bqC|W$njA0MKWa?V$u6mN@PLKYqak!bR!b%c^ze(M`ec(x zv500337YCT4gO3+9>oVIJLv$pkf`01S(DUM+4u!HQob|IFHJHm#>eb#eB1X5;bMc| z>QA4Zv}$S?fWg~31?Lr(C>MKhZg>gplRm`2WZ--iw%&&YlneQYY|PXl;_4*>vkp;I z$VYTZq|B*(3(y17#@ud@o)XUZPYN*rStQg5U1Sm2gM}7hf_G<>*T%6ebK*tF(kbJc zNPH4*xMnJNgw!ff{YXrhL&V$6`ylY={qT_xg9znQWw9>PlG~IbhnpsG_94Kk_(V-o&v7#F znra%uD-}KOX2dkak**hJnZZQyp#ERyyV^lNe!Qrg=VHiyr7*%j#PMvZMuYNE8o;JM zGrnDWmGGy)(UX{rLzJ*QEBd(VwMBXnJ@>*F8eOFy|FK*Vi0tYDw;#E zu#6eS;%Nm2KY+7dHGT3m{TM7sl=z8|V0e!DzEkY-RG8vTWDdSQFE|?+&FYA146@|y zV(JP>LWL;TSL6rao@W5fWqM1-xr$gRci#RQV2DX-x4@`w{uEUgoH4G|`J%H!N?*Qn zy~rjzuf(E7E!A9R2bSF|{{U(zO+;e29K_dGmC^p7MCP!=Bzq@}&AdF5=rtCwka zTT1A?5o}i*sXCsRXBt)`?nOL$zxuP3i*rm3Gmbmr6}9HCLvL*45d|(zP;q&(v%}S5yBmRVdYQQ24zh z6qL2<2>StU$_Ft29IyF!6=!@;tW=o8vNzVy*hh}XhZhUbxa&;9~woye<_YmkUZ)S?PW{7t; zmr%({tBlRLx=ffLd60`e{PQR3NUniWN2W^~7Sy~MPJ>A#!6PLnlw7O0(`=PgA}JLZ ztqhiNcKvobCcBel2 z-N82?4-()eGOisnWcQ9Wp23|ybG?*g!2j#>m3~0__IX1o%dG4b;VF@^B+mRgKx|ij zWr5G4jiRy}5n*(qu!W`y54Y*t8g`$YrjSunUmOsqykYB4-D(*(A~?QpuFWh;)A;5= zPl|=x+-w&H9B7EZGjUMqXT}MkcSfF}bHeRFLttu!vHD{Aq)3HVhvtZY^&-lxYb2%` zDXk7>V#WzPfJs6u{?ZhXpsMdm3kZscOc<^P&e&684Rc1-d=+=VOB)NR;{?0NjTl~D z1MXak$#X4{VNJyD$b;U~Q@;zlGoPc@ny!u7Pe;N2l4;i8Q=8>R3H{>HU(z z%hV2?rSinAg6&wuv1DmXok`5@a3@H0BrqsF~L$pRYHNEXXuRIWom0l zR9hrZpn1LoYc+G@q@VsFyMDNX;>_Vf%4>6$Y@j;KSK#g)TZRmjJxB!_NmUMTY(cAV zmewn7H{z`M3^Z& z2O$pWlDuZHAQJ{xjA}B;fuojAj8WxhO}_9>qd0|p0nBXS6IIRMX|8Qa!YDD{9NYYK z%JZrk2!Ss(Ra@NRW<7U#%8SZdWMFDU@;q<}%F{|6n#Y|?FaBgV$7!@|=NSVoxlJI4G-G(rn}bh|?mKkaBF$-Yr zA;t0r?^5Nz;u6gwxURapQ0$(-su(S+24Ffmx-aP(@8d>GhMtC5x*iEXIKthE*mk$` zOj!Uri|EAb4>03C1xaC#(q_I<;t}U7;1JqISVHz3tO{) zD(Yu@=>I9FDmDtUiWt81;BeaU{_=es^#QI7>uYl@e$$lGeZ~Q(f$?^3>$<<{n`Bn$ zn8bamZlL@6r^RZHV_c5WV7m2(G6X|OI!+04eAnNA5=0v1Z3lxml2#p~Zo57ri;4>;#16sSXXEK#QlH>=b$inEH0`G#<_ zvp;{+iY)BgX$R!`HmB{S&1TrS=V;*5SB$7*&%4rf_2wQS2ed2E%Wtz@y$4ecq4w<) z-?1vz_&u>s?BMrCQG6t9;t&gvYz;@K@$k!Zi=`tgpw*v-#U1Pxy%S9%52`uf$XMv~ zU}7FR5L4F<#9i%$P=t29nX9VBVv)-y7S$ZW;gmMVBvT$BT8d}B#XV^@;wXErJ-W2A zA=JftQRL>vNO(!n4mcd3O27bHYZD!a0kI)6b4hzzL9)l-OqWn)a~{VP;=Uo|D~?AY z#8grAAASNOkFMbRDdlqVUfB;GIS-B-_YXNlT_8~a|LvRMVXf!<^uy;)d$^OR(u)!) zHHH=FqJF-*BXif9uP~`SXlt0pYx|W&7jQnCbjy|8b-i>NWb@!6bx;1L&$v&+!%9BZ z0nN-l`&}xvv|wwxmC-ZmoFT_B#BzgQZxtm|4N+|;+(YW&Jtj^g!)iqPG++Z%x0LmqnF875%Ry&2QcCamx!T@FgE@H zN39P6e#I5y6Yl&K4eUP{^biV`u9{&CiCG#U6xgGRQr)zew;Z%x+ z-gC>y%gvx|dM=OrO`N@P+h2klPtbYvjS!mNnk4yE0+I&YrSRi?F^plh}hIp_+OKd#o7ID;b;%*c0ES z!J))9D&YufGIvNVwT|qsGWiZAwFODugFQ$VsNS%gMi8OJ#i${a4!E3<-4Jj<9SdSY z&xe|D0V1c`dZv+$8>(}RE|zL{E3 z-$5Anhp#7}oO(xm#}tF+W=KE*3(xxKxhBt-uuJP}`_K#0A< zE%rhMg?=b$ot^i@BhE3&)bNBpt1V*O`g?8hhcsV-n#=|9wGCOYt8`^#T&H7{U`yt2 z{l9Xl5CVsE=`)w4A^%PbIR6uG_5Ww9k`=q<@t9Bu662;o{8PTjDBzzbY#tL;$wrpjONqZ{^Ds4oanFm~uyPm#y1Ll3(H57YDWk9TlC zq;kebC!e=`FU&q2ojmz~GeLxaJHfs0#F%c(i+~gg$#$XOHIi@1mA72g2pFEdZSvp}m0zgQb5u2?tSRp#oo!bp`FP}< zaK4iuMpH+Jg{bb7n9N6eR*NZfgL7QiLxI zk6{uKr>xxJ42sR%bJ%m8QgrL|fzo9@?9eQiMW8O`j3teoO_R8cXPe_XiLnlYkE3U4 zN!^F)Z4ZWcA8gekEPLtFqX-Q~)te`LZnJK_pgdKs)Dp50 zdUq)JjlJeELskKg^6KY!sIou-HUnSFRsqG^lsHuRs`Z{f(Ti9eyd3cwu*Kxp?Ws7l z3cN>hGPXTnQK@qBgqz(n*qdJ2wbafELi?b90fK~+#XIkFGU4+HihnWq;{{)1J zv*Txl@GlnIMOjzjA1z%g?GsB2(6Zb-8fooT*8b0KF2CdsIw}~Hir$d3TdVHRx1m3c z4C3#h@1Xi@{t4zge-#B6jo*ChO%s-R%+9%-E|y<*4;L>$766RiygaLR?X%izyqMXA zb|N=Z-0PSFeH;W6aQ3(5VZWVC>5Ibgi&cj*c%_3=o#VyUJv* zM&bjyFOzlaFq;ZW(q?|yyi|_zS%oIuH^T*MZ6NNXBj;&yM3eQ7!CqXY?`7+*+GN47 zNR#%*ZH<^x{(0@hS8l{seisY~IE*)BD+R6^OJX}<2HRzo^fC$n>#yTOAZbk4%=Bei=JEe=o$jm`or0YDw*G?d> z=i$eEL7^}_?UI^9$;1Tn9b>$KOM@NAnvWrcru)r`?LodV%lz55O3y(%FqN;cKgj7t zlJ7BmLTQ*NDX#uelGbCY>k+&H*iSK?x-{w;f5G%%!^e4QT9z<_0vHbXW^MLR} zeC*jezrU|{*_F`I0mi)9=sUj^G03i@MjXx@ePv@(Udt2CCXVOJhRh4yp~fpn>ssHZ z?k(C>2uOMWKW5FVsBo#Nk!oqYbL`?#i~#!{3w^qmCto05uS|hKkT+iPrC-}hU_nbL zO622#mJupB21nChpime}&M1+whF2XM?prT-Vv)|EjWYK(yGYwJLRRMCkx;nMSpu?0 zNwa*{0n+Yg6=SR3-S&;vq=-lRqN`s9~#)OOaIcy3GZ&~l4g@2h| zThAN#=dh{3UN7Xil;nb8@%)wx5t!l z0RSe_yJQ+_y#qEYy$B)m2yDlul^|m9V2Ia$1CKi6Q19~GTbzqk*{y4;ew=_B4V8zw zScDH&QedBl&M*-S+bH}@IZUSkUfleyM45G>CnYY{hx8J9q}ME?Iv%XK`#DJRNmAYt zk2uY?A*uyBA=nlYjkcNPMGi*552=*Q>%l?gDK_XYh*Rya_c)ve{=ps`QYE0n!n!)_$TrGi_}J|>1v}(VE7I~aP-wns#?>Y zu+O7`5kq32zM4mAQpJ50vJsUDT_^s&^k-llQMy9!@wRnxw@~kXV6{;z_wLu3i=F3m z&eVsJmuauY)8(<=pNUM5!!fQ4uA6hBkJoElL1asWNkYE#qaP?a+biwWw~vB48PRS7 zY;DSHvgbIB$)!uJU)xA!yLE*kP0owzYo`v@wfdux#~f!dv#uNc_$SF@Qq9#3q5R zfuQnPPN_(z;#X#nRHTV>TWL_Q%}5N-a=PhkQ^GL+$=QYfoDr2JO-zo#j;mCsZVUQ) zJ96e^OqdLW6b-T@CW@eQg)EgIS9*k`xr$1yDa1NWqQ|gF^2pn#dP}3NjfRYx$pTrb zwGrf8=bQAjXx*8?du*?rlH2x~^pXjiEmj^XwQo{`NMonBN=Q@Y21!H)D( zA~%|VhiTjaRQ%|#Q9d*K4j~JDXOa4wmHb0L)hn*;Eq#*GI}@#ux4}bt+olS(M4$>c z=v8x74V_5~xH$sP+LZCTrMxi)VC%(Dg!2)KvW|Wwj@pwmH6%8zd*x0rUUe$e(Z%AW z@Q{4LL9#(A-9QaY2*+q8Yq2P`pbk3!V3mJkh3uH~uN)+p?67d(r|Vo0CebgR#u}i? zBxa^w%U|7QytN%L9bKaeYhwdg7(z=AoMeP0)M3XZA)NnyqL%D_x-(jXp&tp*`%Qsx z6}=lGr;^m1<{;e=QQZ!FNxvLcvJVGPkJ63at5%*`W?46!6|5FHYV0qhizSMT>Zoe8 zsJ48kb2@=*txGRe;?~KhZgr-ZZ&c0rNV7eK+h$I-UvQ=552@psVrvj#Ys@EU4p8`3 zsNqJu-o=#@9N!Pq`}<=|((u)>^r0k^*%r<{YTMm+mOPL>EoSREuQc-e2~C#ZQ&Xve zZ}OUzmE4{N-7cqhJiUoO_V#(nHX11fdfVZJT>|6CJGX5RQ+Ng$Nq9xs-C86-)~`>p zW--X53J`O~vS{WWjsAuGq{K#8f#2iz` zzSSNIf6;?5sXrHig%X(}0q^Y=eYwvh{TWK-fT>($8Ex>!vo_oGFw#ncr{vmERi^m7lRi%8Imph})ZopLoIWt*eFWSPuBK zu>;Pu2B#+e_W|IZ0_Q9E9(s@0>C*1ft`V{*UWz^K<0Ispxi@4umgGXW!j%7n+NC~* zBDhZ~k6sS44(G}*zg||X#9Weto;u*Ty;fP!+v*7be%cYG|yEOBomch#m8Np!Sw`L)q+T` zmrTMf2^}7j=RPwgpO9@eXfb{Q>GW#{X=+xt`AwTl!=TgYm)aS2x5*`FSUaaP_I{Xi zA#irF%G33Bw>t?^1YqX%czv|JF0+@Pzi%!KJ?z!u$A`Catug*tYPO`_Zho5iip0@! z;`rR0-|Ao!YUO3yaujlSQ+j-@*{m9dHLtve!sY1Xq_T2L3&=8N;n!!Eb8P0Z^p4PL zQDdZ?An2uzbIakOpC|d@=xEA}v-srucnX3Ym{~I#Ghl~JZU(a~Ppo9Gy1oZH&Wh%y zI=KH_s!Lm%lAY&`_KGm*Ht)j*C{-t}Nn71drvS!o|I|g>ZKjE3&Mq0TCs6}W;p>%M zQ(e!h*U~b;rsZ1OPigud>ej=&hRzs@b>>sq6@Yjhnw?M26YLnDH_Wt#*7S$-BtL08 zVyIKBm$}^vp?ILpIJetMkW1VtIc&7P3z0M|{y5gA!Yi5x4}UNz5C0Wdh02!h zNS>923}vrkzl07CX`hi)nj-B?#n?BJ2Vk0zOGsF<~{Fo7OMCN_85daxhk*pO}x_8;-h>}pcw26V6CqR-=x2vRL?GB#y%tYqi;J}kvxaz}*iFO6YO0ha6!fHU9#UI2Nv z_(`F#QU1B+P;E!t#Lb)^KaQYYSewj4L!_w$RH%@IL-M($?DV@lGj%3ZgVdHe^q>n(x zyd5PDpGbvR-&p*eU9$#e5#g3-W_Z@loCSz}f~{94>k6VRG`e5lI=SE0AJ7Z_+=nnE zTuHEW)W|a8{fJS>2TaX zuRoa=LCP~kP)kx4L+OqTjtJOtXiF=y;*eUFgCn^Y@`gtyp?n14PvWF=zhNGGsM{R- z^DsGxtoDtx+g^hZi@E2Y(msb-hm{dWiHdoQvdX88EdM>^DS#f}&kCGpPFDu*KjEpv$FZtLpeT>@)mf|z#ZWEsueeW~hF78Hu zfY9a+Gp?<)s{Poh_qdcSATV2oZJo$OH~K@QzE2kCADZ@xX(; z)0i=kcAi%nvlsYagvUp(z0>3`39iKG9WBDu3z)h38p|hLGdD+Khk394PF3qkX!02H z#rNE`T~P9vwNQ_pNe0toMCRCBHuJUmNUl)KFn6Gu2je+p>{<9^oZ4Gfb!)rLZ3CR3 z-o&b;Bh>51JOt=)$-9+Z!P}c@cKev_4F1ZZGs$I(A{*PoK!6j@ZJrAt zv2LxN#p1z2_0Ox|Q8PVblp9N${kXkpsNVa^tNWhof)8x8&VxywcJz#7&P&d8vvxn` zt75mu>yV=Dl#SuiV!^1BPh5R)`}k@Nr2+s8VGp?%Le>+fa{3&(XYi~{k{ z-u4#CgYIdhp~GxLC+_wT%I*)tm4=w;ErgmAt<5i6c~)7JD2olIaK8by{u-!tZWT#RQddptXRfEZxmfpt|@bs<*uh?Y_< zD>W09Iy4iM@@80&!e^~gj!N`3lZwosC!!ydvJtc0nH==K)v#ta_I}4Tar|;TLb|+) zSF(;=?$Z0?ZFdG6>Qz)6oPM}y1&zx_Mf`A&chb znSERvt9%wdPDBIU(07X+CY74u`J{@SSgesGy~)!Mqr#yV6$=w-dO;C`JDmv=YciTH zvcrN1kVvq|(3O)NNdth>X?ftc`W2X|FGnWV%s})+uV*bw>aoJ#0|$pIqK6K0Lw!@- z3pkPbzd`ljS=H2Bt0NYe)u+%kU%DWwWa>^vKo=lzDZHr>ruL5Ky&#q7davj-_$C6J z>V8D-XJ}0cL$8}Xud{T_{19#W5y}D9HT~$&YY-@=Th219U+#nT{tu=d|B)3K`pL53 zf7`I*|L@^dPEIDJkI3_oA9vsH7n7O}JaR{G~8 zfi$?kmKvu20(l`dV7=0S43VwVKvtF!7njv1Q{Ju#ysj=|dASq&iTE8ZTbd-iiu|2& zmll%Ee1|M?n9pf~?_tdQ<7%JA53!ulo1b^h#s|Su2S4r{TH7BRB3iIOiX5|vc^;5( zKfE1+ah18YA9o1EPT(AhBtve5(%GMbspXV)|1wf5VdvzeYt8GVGt0e*3|ELBhwRaO zE|yMhl;Bm?8Ju3-;DNnxM3Roelg`^!S%e({t)jvYtJCKPqN`LmMg^V&S z$9OIFLF$%Py~{l?#ReyMzpWixvm(n(Y^Am*#>atEZ8#YD&?>NUU=zLxOdSh0m6mL? z_twklB0SjM!3+7U^>-vV=KyQZI-6<(EZiwmNBzGy;Sjc#hQk%D;bay$v#zczt%mFCHL*817X4R;E$~N5(N$1Tv{VZh7d4mhu?HgkE>O+^-C*R@ zR0ima8PsEV*WFvz`NaB+lhX3&LUZcWWJJrG7ZjQrOWD%_jxv=)`cbCk zMgelcftZ%1-p9u!I-Zf_LLz{hcn5NRbxkWby@sj2XmYfAV?iw^0?hM<$&ZDctdC`; zsL|C-7d;w$z2Gt0@hsltNlytoPnK&$>ksr(=>!7}Vk#;)Hp)LuA7(2(Hh(y3LcxRY zim!`~j6`~B+sRBv4 z<#B{@38kH;sLB4eH2+8IPWklhd25r5j2VR}YK$lpZ%7eVF5CBr#~=kUp`i zlb+>Z%i%BJH}5dmfg1>h7U5Q(-F{1d=aHDbMv9TugohX5lq#szPAvPE|HaokMQIi_ zTcTNsO53(oX=hg2w!XA&+qP}nwr$(C)pgG8emS@Mf7m0&*kiA!wPLS`88c=aD$niJ zp?3j%NI^uy|5*MzF`k4hFbsyQZ@wu!*IY+U&&9PwumdmyfL(S0#!2RFfmtzD3m9V7 zsNOw9RQofl-XBfKBF^~~{oUVouka#r3EqRf=SnleD=r1Hm@~`y8U7R)w16fgHvK-6?-TFth)f3WlklbZh+}0 zx*}7oDF4U^1tX4^$qd%987I}g;+o0*$Gsd=J>~Uae~XY6UtbdF)J8TzJXoSrqHVC) zJ@pMgE#;zmuz?N2MIC+{&)tx=7A%$yq-{GAzyz zLzZLf=%2Jqy8wGHD;>^x57VG)sDZxU+EMfe0L{@1DtxrFOp)=zKY1i%HUf~Dro#8} zUw_Mj10K7iDsX}+fThqhb@&GI7PwONx!5z;`yLmB_92z0sBd#HiqTzDvAsTdx+%W{ z2YL#U=9r!@3pNXMp_nvximh+@HV3psUaVa-lOBekVuMf1RUd26~P*|MLouQrb}XM-bEw(UgQxMI6M&l3Nha z{MBcV=tl(b_4}oFdAo}WX$~$Mj-z70FowdoB{TN|h2BdYs?$imcj{IQpEf9q z)rzpttc0?iwopSmEoB&V!1aoZqEWEeO-MKMx(4iK7&Fhc(94c zdy}SOnSCOHX+A8q@i>gB@mQ~Anv|yiUsW!bO9hb&5JqTfDit9X6xDEz*mQEiNu$ay zwqkTV%WLat|Ar+xCOfYs0UQNM`sdsnn*zJr>5T=qOU4#Z(d90!IL76DaHIZeWKyE1 zqwN%9+~lPf2d7)vN2*Q?En?DEPcM+GQwvA<#;X3v=fqsxmjYtLJpc3)A8~*g(KqFx zZEnqqruFDnEagXUM>TC7ngwKMjc2Gx%#Ll#=N4qkOuK|;>4%=0Xl7k`E69@QJ-*Vq zk9p5!+Ek#bjuPa<@Xv7ku4uiWo|_wy)6tIr`aO!)h>m5zaMS-@{HGIXJ0UilA7*I} z?|NZ!Tp8@o-lnyde*H+@8IHME8VTQOGh96&XX3E+}OB zA>VLAGW+urF&J{H{9Gj3&u+Gyn?JAVW84_XBeGs1;mm?2SQm9^!3UE@(_FiMwgkJI zZ*caE={wMm`7>9R?z3Ewg!{PdFDrbzCmz=RF<@(yQJ_A6?PCd_MdUf5vv6G#9Mf)i#G z($OxDT~8RNZ>1R-vw|nN699a}MQN4gJE_9gA-0%>a?Q<9;f3ymgoi$OI!=aE6Elw z2I`l!qe-1J$T$X&x9Zz#;3!P$I);jdOgYY1nqny-k=4|Q4F!mkqACSN`blRji>z1` zc8M57`~1lgL+Ha%@V9_G($HFBXH%k;Swyr>EsQvg%6rNi){Tr&+NAMga2;@85531V z_h+h{jdB&-l+%aY{$oy2hQfx`d{&?#psJ78iXrhrO)McOFt-o80(W^LKM{Zw93O}m z;}G!51qE?hi=Gk2VRUL2kYOBRuAzktql%_KYF4>944&lJKfbr+uo@)hklCHkC=i)E zE*%WbWr@9zoNjumq|kT<9Hm*%&ahcQ)|TCjp@uymEU!&mqqgS;d|v)QlBsE0Jw|+^ zFi9xty2hOk?rlGYT3)Q7i4k65@$RJ-d<38o<`}3KsOR}t8sAShiVWevR8z^Si4>dS z)$&ILfZ9?H#H&lumngpj7`|rKQQ`|tmMmFR+y-9PP`;-425w+#PRKKnx7o-Rw8;}*Ctyw zKh~1oJ5+0hNZ79!1fb(t7IqD8*O1I_hM;o*V~vd_LKqu7c_thyLalEF8Y3oAV=ODv z$F_m(Z>ucO(@?+g_vZ`S9+=~Msu6W-V5I-V6h7->50nQ@+TELlpl{SIfYYNvS6T6D z`9cq=at#zEZUmTfTiM3*vUamr!OB~g$#?9$&QiwDMbSaEmciWf3O2E8?oE0ApScg38hb&iN%K+kvRt#d))-tr^ zD+%!d`i!OOE3in0Q_HzNXE!JcZ<0;cu6P_@;_TIyMZ@Wv!J z)HSXAYKE%-oBk`Ye@W3ShYu-bfCAZ}1|J16hFnLy z?Bmg2_kLhlZ*?`5R8(1%Y?{O?xT)IMv{-)VWa9#1pKH|oVRm4!lLmls=u}Lxs44@g^Zwa0Z_h>Rk<(_mHN47=Id4oba zQ-=qXGz^cNX(b*=NT0<^23+hpS&#OXzzVO@$Z2)D`@oS=#(s+eQ@+FSQcpXD@9npp zlxNC&q-PFU6|!;RiM`?o&Sj&)<4xG3#ozRyQxcW4=EE;E)wcZ&zUG*5elg;{9!j}I z9slay#_bb<)N!IKO16`n3^@w=Y%duKA-{8q``*!w9SW|SRbxcNl50{k&CsV@b`5Xg zWGZ1lX)zs_M65Yt&lO%mG0^IFxzE_CL_6$rDFc&#xX5EXEKbV8E2FOAt>Ka@e0aHQ zMBf>J$FLrCGL@$VgPKSbRkkqo>sOXmU!Yx+Dp7E3SRfT`v~!mjU3qj-*!!YjgI*^) z+*05x78FVnVwSGKr^A|FW*0B|HYgc{c;e3Ld}z4rMI7hVBKaiJRL_e$rxDW^8!nGLdJ<7ex9dFoyj|EkODflJ#Xl`j&bTO%=$v)c+gJsLK_%H3}A_} z6%rfG?a7+k7Bl(HW;wQ7BwY=YFMSR3J43?!;#~E&)-RV_L!|S%XEPYl&#`s!LcF>l zn&K8eemu&CJp2hOHJKaYU#hxEutr+O161ze&=j3w12)UKS%+LAwbjqR8sDoZHnD=m0(p62!zg zxt!Sj65S?6WPmm zL&U9c`6G}T`irf=NcOiZ!V)qhnvMNOPjVkyO2^CGJ+dKTnNAPa?!AxZEpO7yL_LkB zWpolpaDfSaO-&Uv=dj7`03^BT3_HJOAjn~X;wz-}03kNs@D^()_{*BD|0mII!J>5p z1h06PTyM#3BWzAz1FPewjtrQfvecWhkRR=^gKeFDe$rmaYAo!np6iuio3>$w?az$E zwGH|zy@OgvuXok}C)o1_&N6B3P7ZX&-yimXc1hAbXr!K&vclCL%hjVF$yHpK6i_Wa z*CMg1RAH1(EuuA01@lA$sMfe*s@9- z$jNWqM;a%d3?(>Hzp*MiOUM*?8eJ$=(0fYFis!YA;0m8s^Q=M0Hx4ai3eLn%CBm14 zOb8lfI!^UAu_RkuHmKA-8gx8Z;##oCpZV{{NlNSe<i;9!MfIN!&;JI-{|n{(A19|s z9oiGesENcLf@NN^9R0uIrgg(46r%kjR{0SbnjBqPq()wDJ@LC2{kUu_j$VR=l`#RdaRe zxx;b7bu+@IntWaV$si1_nrQpo*IWGLBhhMS13qH zTy4NpK<-3aVc;M)5v(8JeksSAGQJ%6(PXGnQ-g^GQPh|xCop?zVXlFz>42%rbP@jg z)n)% zM9anq5(R=uo4tq~W7wES$g|Ko z1iNIw@-{x@xKxSXAuTx@SEcw(%E49+JJCpT(y=d+n9PO0Gv1SmHkYbcxPgDHF}4iY zkXU4rkqkwVBz<{mcv~A0K|{zpX}aJcty9s(u-$je2&=1u(e#Q~UA{gA!f;0EAaDzdQ=}x7g(9gWrWYe~ zV98=VkHbI!5Rr;+SM;*#tOgYNlfr7;nLU~MD^jSdSpn@gYOa$TQPv+e8DyJ&>aInB zDk>JmjH=}<4H4N4z&QeFx>1VPY8GU&^1c&71T*@2#dINft%ibtY(bAm%<2YwPL?J0Mt{ z7l7BR718o5=v|jB!<7PDBafdL>?cCdVmKC;)MCOobo5edt%RTWiReAMaIU5X9h`@El0sR&Z z7Ed+FiyA+QAyWn zf7=%(8XpcS*C4^-L24TBUu%0;@s!Nzy{e95qjgkzElf0#ou`sYng<}wG1M|L? zKl6ITA1X9mt6o@S(#R3B{uwJI8O$&<3{+A?T~t>Kapx6#QJDol6%?i-{b1aRu?&9B z*W@$T*o&IQ&5Kc*4LK_)MK-f&Ys^OJ9FfE?0SDbAPd(RB)Oju#S(LK)?EVandS1qb#KR;OP|86J?;TqI%E8`vszd&-kS%&~;1Als=NaLzRNnj4q=+ zu5H#z)BDKHo1EJTC?Cd_oq0qEqNAF8PwU7fK!-WwVEp4~4g z3SEmE3-$ddli))xY9KN$lxEIfyLzup@utHn=Q{OCoz9?>u%L^JjClW$M8OB`txg4r6Q-6UlVx3tR%%Z!VMb6#|BKRL`I))#g zij8#9gk|p&Iwv+4s+=XRDW7VQrI(+9>DikEq!_6vIX8$>poDjSYIPcju%=qluSS&j zI-~+ztl1f71O-B+s7Hf>AZ#}DNSf`7C7*)%(Xzf|ps6Dr7IOGSR417xsU=Rxb z1pgk9vv${17h7mZ{)*R{mc%R=!i}8EFV9pl8V=nXCZruBff`$cqN3tpB&RK^$yH!A8RL zJ5KltH$&5%xC7pLZD}6wjD2-uq3&XL8CM$@V9jqalF{mvZ)c4Vn?xXbvkB(q%xbSdjoXJXanVN@I;8I`)XlBX@6BjuQKD28Jrg05} z^ImmK-Ux*QMn_A|1ionE#AurP8Vi?x)7jG?v#YyVe_9^up@6^t_Zy^T1yKW*t* z&Z0+0Eo(==98ig=^`he&G^K$I!F~1l~gq}%o5#pR6?T+ zLmZu&_ekx%^nys<^tC@)s$kD`^r8)1^tUazRkWEYPw0P)=%cqnyeFo3nW zyV$^0DXPKn5^QiOtOi4MIX^#3wBPJjenU#2OIAgCHPKXv$OY=e;yf7+_vI7KcjKq% z?RVzC24ekYp2lEhIE^J$l&wNX0<}1Poir8PjM`m#zwk-AL0w6WvltT}*JN8WFmtP_ z6#rK7$6S!nS!}PSFTG6AF7giGJw5%A%14ECde3x95(%>&W3zUF!8x5%*h-zk8b@Bz zh`7@ixoCVCZ&$$*YUJpur90Yg0X-P82>c~NMzDy7@Ed|6(#`;{)%t7#Yb>*DBiXC3 zUFq(UDFjrgOsc%0KJ_L;WQKF0q!MINpQzSsqwv?#Wg+-NO; z84#4nk$+3C{2f#}TrRhin=Erdfs77TqBSvmxm0P?01Tn@V(}gI_ltHRzQKPyvQ2=M zX#i1-a(>FPaESNx+wZ6J{^m_q3i})1n~JG80c<%-Ky!ZdTs8cn{qWY%x%X^27-Or_ z`KjiUE$OG9K4lWS16+?aak__C*)XA{ z6HmS*8#t_3dl}4;7ZZgn4|Tyy1lOEM1~6Qgl(|BgfQF{Mfjktch zB5kc~4NeehRYO%)3Z!FFHhUVVcV@uEX$eft5Qn&V3g;}hScW_d)K_h5i)vxjKCxcf zL>XlZ^*pQNuX*RJQn)b6;blT3<7@Ap)55)aK3n-H08GIx65W zO9B%gE%`!fyT`)hKjm-&=on)l&!i-QH+mXQ&lbXg0d|F{Ac#U;6b$pqQcpqWSgAPo zmr$gOoE*0r#7J=cu1$5YZE%uylM!i3L{;GW{ae9uy)+EaV>GqW6QJ)*B2)-W`|kLL z)EeeBtpgm;79U_1;Ni5!c^0RbG8yZ0W98JiG~TC8rjFRjGc6Zi8BtoC);q1@8h7UV zFa&LRzYsq%6d!o5-yrqyjXi>jg&c8bu}{Bz9F2D(B%nnuVAz74zmBGv)PAdFXS2(A z=Z?uupM2f-ar0!A)C6l2o8a|+uT*~huH)!h3i!&$ zr>76mt|lwexD(W_+5R{e@2SwR15lGxsnEy|gbS-s5?U}l*kcfQlfnQKo5=LZXizrL zM=0ty+$#f_qGGri-*t@LfGS?%7&LigUIU#JXvwEdJZvIgPCWFBTPT`@Re5z%%tRDO zkMlJCoqf2A=hkU7Ih=IxmPF~fEL90)u76nfFRQwe{m7b&Ww$pnk~$4Lx#s9|($Cvt ze|p{Xozhb^g1MNh-PqS_dLY|Fex4|rhM#lmzq&mhebD$5P>M$eqLoV|z=VQY{)7&sR#tW zl(S1i!!Rrg7kv+V@EL51PGpm511he%MbX2-Jl+DtyYA(0gZyZQjPZP@`SAH{n&25@ zd)emg(p2T3$A!Nmzo|%=z%AhLX)W4hsZNFhmd4<1l6?b3&Fg)G(Zh%J{Cf8Q;?_++ zgO7O<(-)H|Es@QqUgcXNJEfC-BCB~#dhi6ADVZtL!)Mx|u7>ukD052z!QZ5UC-+rd zYXWNRpCmdM{&?M9OMa;OiN{Y#0+F>lBQ=W@M;OXq;-7v3niC$pM8p!agNmq7F04;| z@s-_98JJB&s`Pr6o$KZ=8}qO*7m6SMp7kVmmh$jfnG{r@O(auI7Z^jj!x}NTLS9>k zdo}&Qc2m4Ws3)5qFw#<$h=g%+QUKiYog33bE)e4*H~6tfd42q+|FT5+vmr6Y$6HGC zV!!q>B`1Ho|6E|D<2tYE;4`8WRfm2#AVBBn%_W)mi(~x@g;uyQV3_)~!#A6kmFy0p zY~#!R1%h5E{5;rehP%-#kjMLt*{g((o@0-9*8lKVu+t~CtnOxuaMgo2ssI6@kX09{ zkn~q8Gx<6T)l}7tWYS#q0&~x|-3ho@l}qIr79qOJQcm&Kfr7H54=BQto0)vd1A_*V z)8b2{xa5O^u95~TS=HcJF5b9gMV%&M6uaj<>E zPNM~qGjJ~xbg%QTy#(hPtfc46^nN=Y_GmPYY_hTL{q`W3NedZyRL^kgU@Q$_KMAjEzz*eip`3u6AhPDcWXzR=Io5EtZRPme>#K9 z4lN&87i%YYjoCKN_z9YK+{fJu{yrriba#oGM|2l$ir017UH86Eoig3x+;bz32R*;n zt)Eyg#PhQbbGr^naCv0?H<=@+Poz)Xw*3Gn00qdSL|zGiyYKOA0CP%qk=rBAlt~hr zEvd3Z4nfW%g|c`_sfK$z8fWsXTQm@@eI-FpLGrW<^PIjYw)XC-xFk+M<6>MfG;WJr zuN}7b;p^`uc0j(73^=XJcw;|D4B(`)Flm|qEbB?>qBBv2V?`mWA?Q3yRdLkK7b}y& z+!3!JBI{+&`~;%Pj#n&&y+<;IQzw5SvqlbC+V=kLZLAHOQb zS{{8E&JXy1p|B&$K!T*GKtSV^{|Uk;`oE*F;?@q1dX|>|KWb@|Dy*lbGV0Gx;gpA$ z*N16`v*gQ?6Skw(f^|SL;;^ox6jf2AQ$Zl?gvEV&H|-ep*hIS@0TmGu1X1ZmEPY&f zKCrV{UgRAiNU*=+Uw%gjIQhTAC@67m)6(_D+N>)(^gK74F%M2NUpWpho}aq|Kxh$3 zz#DWOmQV4Lg&}`XTU41Z|P~5;wN2c?2L{a=)Xi~!m#*=22c~&AW zgG#yc!_p##fI&E{xQD9l#^x|9`wSyCMxXe<3^kDIkS0N>=oAz7b`@M>aT?e$IGZR; zS;I{gnr4cS^u$#>D(sjkh^T6_$s=*o%vNLC5+6J=HA$&0v6(Y1lm|RDn&v|^CTV{= zjVrg_S}WZ|k=zzp>DX08AtfT@LhW&}!rv^);ds7|mKc5^zge_Li>FTNFoA8dbk@K$ zuuzmDQRL1leikp%m}2_`A7*7=1p2!HBlj0KjPC|WT?5{_aa%}rQ+9MqcfXI0NtjvXz1U)|H>0{6^JpHspI4MfXjV%1Tc1O!tdvd{!IpO+@ z!nh()i-J3`AXow^MP!oVLVhVW&!CDaQxlD9b|Zsc%IzsZ@d~OfMvTFXoEQg9Nj|_L zI+^=(GK9!FGck+y8!KF!nzw8ZCX>?kQr=p@7EL_^;2Mlu1e7@ixfZQ#pqpyCJ```(m;la2NpJNoLQR};i4E;hd+|QBL@GdQy(Cc zTSgZ)4O~hXj86x<7&ho5ePzDrVD`XL7{7PjjNM1|6d5>*1hFPY!E(XDMA+AS;_%E~ z(dOs)vy29&I`5_yEw0x{8Adg%wvmoW&Q;x?5`HJFB@KtmS+o0ZFkE@f)v>YYh-z&m z#>ze?@JK4oE7kFRFD%MPC@x$^p{aW}*CH9Y_(oJ~St#(2)4e-b34D>VG6giMGFA83 zpZTHM2I*c8HE}5G;?Y7RXMA2k{Y?RxHb2 zZFQv?!*Kr_q;jt3`{?B5Wf}_a7`roT&m1BN9{;5Vqo6JPh*gnN(gj}#=A$-F(SRJj zUih_ce0f%K19VLXi5(VBGOFbc(YF zLvvOJl+W<}>_6_4O?LhD>MRGlrk;~J{S#Q;Q9F^;Cu@>EgZAH=-5fp02(VND(v#7n zK-`CfxEdonk!!65?3Ry(s$=|CvNV}u$5YpUf?9kZl8h@M!AMR7RG<9#=`_@qF@})d ztJDH>=F!5I+h!4#^DN6C$pd6^)_;0Bz7|#^edb9_qFg&eI}x{Roovml5^Yf5;=ehZ zGqz-x{I`J$ejkmGTFipKrUbv-+1S_Yga=)I2ZsO16_ye@!%&Op^6;#*Bm;=I^#F;? z27Sz-pXm4x-ykSW*3`)y4$89wy6dNOP$(@VYuPfb97XPDTY2FE{Z+{6=}LLA23mAc zskjZJ05>b)I7^SfVc)LnKW(&*(kP*jBnj>jtph`ZD@&30362cnQpZW8juUWcDnghc zy|tN1T6m?R7E8iyrL%)53`ymXX~_;#r${G`4Q(&7=m7b#jN%wdLlS0lb~r9RMdSuU zJ{~>>zGA5N`^QmrzaqDJ(=9y*?@HZyE!yLFONJO!8q5Up#2v>fR6CkquE$PEcvw5q zC8FZX!15JgSn{Gqft&>A9r0e#be^C<%)psE*nyW^e>tsc8s4Q}OIm})rOhuc{3o)g1r>Q^w5mas) zDlZQyjQefhl0PmH%cK05*&v{-M1QCiK=rAP%c#pdCq_StgDW}mmw$S&K6ASE=`u4+ z5wcmtrP27nAlQCc4qazffZoFV7*l2=Va}SVJD6CgRY^=5Ul=VYLGqR7H^LHA;H^1g}ekn=4K8SPRCT+pel*@jUXnLz+AIePjz@mUsslCN2 z({jl?BWf&DS+FlE5Xwp%5zXC7{!C=k9oQLP5B;sLQxd`pg+B@qPRqZ6FU(k~QkQu{ zF~5P=kLhs+D}8qqa|CQo2=cv$wkqAzBRmz_HL9(HRBj&73T@+B{(zZahlkkJ>EQmQ zenp59dy+L;sSWYde!z_W+I~-+2Xnm;c;wI_wH=RTgxpMlCW@;Us*0}L74J#E z8XbDWJGpBscw?W$&ZxZNxUq(*DKDwNzW7_}AIw$HF6Ix|;AJ3t6lN=v(c9=?n9;Y0 zK9A0uW4Ib9|Mp-itnzS#5in=Ny+XhGO8#(1_H4%Z6yEBciBiHfn*h;^r9gWb^$UB4 zJtN8^++GfT`1!WfQt#3sXGi-p<~gIVdMM<#ZZ0e_kdPG%Q5s20NNt3Jj^t$(?5cJ$ zGZ#FT(Lt>-0fP4b5V3az4_byF12k%}Spc$WsRydi&H|9H5u1RbfPC#lq=z#a9W(r1 z!*}KST!Yhsem0tO#r!z`znSL-=NnP~f(pw-sE+Z$e7i7t9nBP^5ts1~WFmW+j+<@7 zIh@^zKO{1%Lpx^$w8-S+T_59v;%N;EZtJzcfN%&@(Ux5 z@YzX^MwbbXESD*d(&qT7-eOHD6iaH-^N>p2sVdq&(`C$;?#mgBANIc5$r| z^A$r)@c{Z}N%sbfo?T`tTHz9-YpiMW?6>kr&W9t$Cuk{q^g1<$I~L zo++o2!!$;|U93cI#p4hyc!_Mv2QKXxv419}Ej#w#%N+YIBDdnn8;35!f2QZkUG?8O zpP47Wf9rnoI^^!9!dy~XsZ&!DU4bVTAi3Fc<9$_krGR&3TI=Az9uMgYU5dd~ksx+} zP+bs9y+NgEL>c@l>H1R%@>5SWg2k&@QZL(qNUI4XwDl6(=!Q^U%o984{|0e|mR$p+ z9BcwttR#7?As?@Q{+j?K6H7R71PuiA^Dl$=f47nUKL|koCwutc_P<-m{|Al3C~o7w z=4S=}s5LcJFT1zjS)+10X_r$74`K78pz!nGGH%JV%w75!YSIt#hT7}}K>+@{{a+Im z5p#6%^X*txY?}|T17xWW*sa^?G2QHt#@tlcw0GIcy;|NR2vaCBDvn=`h)1il7E5Rx z%)mA4$`$OZx)NF5vXZnaJ1)*cA6ryx6Ll~t!LzhxvcTedxT;>JS&e=?-&DXUPaQ2~ zH*69ezE`hgV{K-|0z|m~ld}=X^-Ob={wpex&}*+Rz{gx)G}gn!C_VN{UN=>^EV=Xc zr$-HO09cW&p4^M}V3yBjTP_xrVcc8iU_^Y-JD~(bgw*@GXGB1gYKz5DWO+O`>})|N zWrC)MR93yA)3{&27-M)TJB6Ml3~?zZg#mYsF=#OSTaw&K z@hBftpt+2l@)YK@|3DvTjl(8wZtpLp9Ik!6G$CSL_idZ$Ti?R)4toe8bb)l|)lNb}?K;O2K9vyn1QG zd=v#y-Ld49UVkmfRU>Egc+(Y$^-;6vW;3Lcu*6~etz}0|@+b|+!UCal)DEYGLbHWJ zll5Wi^$Y<6@S%^y%hdjRh6&{!z1Py|lZ|q&Wub3l41uN2zEF8E&5H5?PL*&V}?*a}Lp% zCYi{ghjpRNT^^B+_U59No50Ghih5qn(W5`RkrsDWr{~A1dgtv{sRkH4RU2^A{jb&0 zxVRnrm|u<;$iI;M6A>$POP)TWGU-gSjAERk*EGmVT(aw$!XUSe~7Ql-oRA54^4V(JWS6Q1mG?!vZ zx+pE!FEtvqr|Xrcb3oR`%LHFLmU_&{=p%mGy6MRe2Yz_5WJ8p@IgU2 zdVvvhhQtiQkChK%*&PsiPCBL9oDOoJX8!$S(V>R}+1M}wzK*U*A{KJ`r=lM;mPrKU zQDqqN(W*u-5-?$(SIk<6A0E}34y&@-IVC%S!a1F4kz<3bIKjlyD)ooO_7ftl%S_(6w`!vX&1PZ!K`@D@L6JR)6zO@Dl!YF{RY}d3HZ7?Q5E>w=$ ze)H_)48Ds*Ov4?zoGb2fe3}{!5Ooc|KCIni1o)(Gj+CO?`*7jsV`hIv@8J(22o4Q? zu?Bvi)zDG(me?7XKeL|iF9ZRgZdT*}Ffsl62Cu;{Gv9j6dO zPt*H2GqC)-C`V`ceuu=tM{7!2yTEj=*5+T~5DYiZ)Hy)*PARYI6R2lZXoOj;v8M4W z*O-NX(7_~Q&A3>Oaw&1lBH_H%SwmISX-i3)HfHvBOeVwTT{LUM3}ZuZmg<(>)KE;d zbs2!0v6>J;1nQ0UJkUxnkE@Ibi~Q}M=-=Rk;hcOnxO$luOKEVxZc|!XECgex(2`}T z3Y;Q_6rL)e+SrOZhQj5_e}Lv>w7n*Pep$yWZNQl>ubBgb_NIWWDn3kNpn+MPQXV;8 zV|_Ba5jsQ(w&Ey^IM|@|y!AqcJ#3m0#Q6_qvgCG~eoF#mnGmbO(;DP+bW%_aOs1R_ z@9p#7X2UA^--#Nwx_Hvk2l1`eO{P*#j@q2UELtH|Uh6hxR`h_847wIJo0=5CQQ`6it|%a-I$^&a@we1rc&*;QIu5Ck^?) zx*5eSd*mG#=6Hi(5!;5uUi&{HfnT1S8X-)?gE5CZ6KWoqM5|CyrULmuFBKOU8SOp* z{IB1$OCcq`S-k*xs;4fmhKsIGZ;GYAY*%(@875NxhMq|j*m4CNLI(Vho|N|F);!E0cS5y^$H^Izje?z}oTgyr`9x9G&rlJZw&uqIoBMtz zzhU0(9;w02?m#0!)cFi*r+8YvooQ;(s2lLVvyLqAE%Xqe!vtWbIs!l1Bpp(FIht-Z zPn#CN-2C|J*GhA2fuHqYQ2mJiXlGTzD}mkr2;ia8Wp}h^;OS7+N^Mw|en!1${vN6 z-x{8N*4UekA~`IV2&K-GzhAqau|}d*pEQ$1MH$cFi03OG^1NetZ_jW^STaEzr&Xho zB452St%v3ez2#TFm~`gZh$vi=in+y2d!z<{OZ~Kty-5bQ;0O=k_ESi8Nx9{*T`LJy6jqR>&|+>OZ;+=0hA04 zE25t^sE9HG)3^KKR_A5WDkqispweP9!I-@dCO&N!JrD@i{WBHnfQ z95o8;d$`AFnca3;N-0iX-CmbbAp5yQ!GoH;h7Cn?m{ammZJI8igP{U73lFnl2&gCs zqJ4(Vo~^j`{zOAzScL5B_Sm?Mjtek1d(A6X5ObcZi$;aOYy|g$}BY z$GEP3#i60Ju_&3SHzryH!gUFwC9-295u??cf+aYRQ1$+!rc#42YNattd6mZEFI@?C zqFM>6+zxEunIHDZ>{Z15u##>N(28Dw!>G(k*dB{NHvip@aP}f`@=Q;!o;zRMWo{Cx zo?kyzh8n7#f1g0&g>Cd>O-2g?uPwy8sy8hZbHSsXPmU;@l=HL=zm7mN(=@*|D$i+u zs~TllkCTvD$f&-#b9B?}#Lg*-ibK13R_a$RyoN3m5`10tdhAq{+VW)K#Bht-ra1*J z+n$N%V>u0rVtx`aKJDwXXrxaD7nS<>$=c82v7@KVx^S@vT;h=SZE37K>iahpx3;VDzEr9GY=2(%uaqM;^76eSP0QLzo4sI z>p_Eei*T$K;|qK`sq;?Hesp}(@VvX2Q4sAMYAJ}b&d$htDMC{FG-$o4k9ApECi1$a zXdamjiOGKHBh(4M<3(2x6n-CrmZMCknkQxdSS!qlis#I}btfX;J`JU3RlvtLdrymP zG0ZzrsGXVFiq+Wk1=BFay&9ZiCE#(`h~CL+c-Hs@iGTU@YxM%vlg;)`Tf~IknA^02 zXkN#Txo6aR{j$wP5T#|UH#5AP2{rSY8p?jKFv zG3kn3y`FaV!*Jq%m39_TQEhD>M@l*bhEPGe1{ft3q#K5AknT=F2_=T^l#ou5ln@D# z5Tzs(kRG@qNDa~HLNvfv7Z0g=bSlb?`QAx|Gfoni|iHJ%K0cy z;~Nsaa+{8HP_qrb{nj+xzkdYhSI@W4N_1`z(eSGIkbDP)!Ko|M%}Rqp(~KI2hl~eE zvJ!j4m6iwMgKy>fkCLC)`M$z9EV}B+sq1}}kVf$(ig0pWTY?rHz1Sm=4srTGNb^JG z=2$9wz-C@aZZZ2!HY#HNejqZRmE=pN(D$Kui$NpfhU`!y_s{@MIxiJdHb1|{6xb`> zE74_@QtgtG{4=3P1$^vn&m}7Aw8!1DnT$2thO#~44wl(N#ao8S0@t@m+Z!KD2CfK; z)n5DAPKV_etmH1aLDK$?`;sL91iVt$D z*SG}=-LIAg(*+JON!-5ivqOMQ1S!OQUgHglDsKik&Mwg;vva523`JwQH6SRz9eTY# zTIi23145~kc3r1mSWC_RzD%hs$S#!pkI9!BU80jJCJcwo*FZolQG$q`8C1d9pP@ND zG^&-ZraIvhg_FDVSfKGwkcI=avIan%2sK4coUs~Nr8jC*&!G0#?}_^s3r-c}-uAqi zM-Lw>Y}I``T;IS%Y|qH;s{F*ZefM!4{I5awr!K+T@uPd*Vu*iPWI}>(-D{zxsN>LG z=@747a_Rb2>q?y8xYf?dq2HM5tFO8Y5e4N;Y=xy8yAhI zsm>oy%R5;7)7T3V_b2%`aH^tNlsQpFxIFW#iV#8?{6{^cGr{A0@1bA)|K z>MMTuZD(pd2t|7vmHtywGXb%%=)S<`OG~}U+jm#xd%H8 z$v8-C%F?ah3$;hn?{G3(LT!SgvCVi$vwsZssAQvUwT`Q%qSw!LSd!(I!64w1=%Sc1Mck)q1@pZ@)=SY zoX}d+L3-RA|c?G3_BQNm&( z!i$AZ7cI(z7q|e9VM##6T3Xorj1JG(9os$;(I$y%mBy(#8{|3l4|x*oBAQL^XhZ0g zy1FR1teRrpKq{uLAibTLx#n({qwjlkOvR{OdSAeT5ah4-sNN)n4Clg1T9lzF)&yj; zyal1%+s4n1IG;^VPWJ;#olpk8Z42Gj-tjFeQ&PlxB)`oCNoUYKj4U$AeG8rYiD{pK zndDf&2;2;)D|KvOZP+e7fcPU9k4M2sfhr@vC~Ly0?S-4dz)ZGAYpCsAhChgbxLd4g zhTrbIPkO5SEp_kD>Ha0m12h5n3s;mE8kn515&nzSf+^D= zyE{JnJ;43l&BH55CL<=W%CF;6iUI)V5C*6!`**KqvzR2=Fj*3Y4`HYwx}TYD445(K z-QtXwtL?m*(F=LVH*H4oM>dXHBW=38q_dZ-_Vr&qpEPxd9Fs95P5W~@Z|Rt+WZP6l zPSQ}~Dh4V?Pp1g&Hk*Px?lm16C@X6M29Vrk%Rw@E||E-v~$ zb_E~{z<}#8i`Mx9mkqtd#Z1lZ-E_J8I+2oumc#x1)jdvh{W76NKm6x-RYpM~v!P8$ zw3e|YVf|}Hse9~oC@N7^j}Fi$hNpyaYnu1}bdXsD=^oI*%WKvbme|BI}$G3>smu#6y)ls|j? zF7Bhu9Z)j)C;3cZb+I>0stSK^WLOYV^U{pUYkgv>?+Nt^5j*CUB=eGw-CvU&40>y~ zGoHLXxY^7k5Xgv62{iQy|5jJQuq0|LU`}lE@flQ2Z*Zn*VWcQjm4FTb>LSVox^S4q zLn`LfS@mrjKCmg$nb^af?d?0&$aX6#2u(JyzIJvuJ*lwPrh|0~aEnSACCTezSdG%h zmSQg`17j@$Iq)r1&?+eR@1nlX|H`<}_!?BQSF&N+QQnvEAqZe+mIFui!0V49R?|9*$ zv!K1A01{8xq;L()Tv*Qk0-$Oj6+vCT*TUD{HvxO@3JjxBwM!4g3ydy&eaJw4CoQBF zJtULJ!YxgNR7_Ls%LmogyI7uIs=!B&?=MYY^yX+v;j@D_xGeZg>eZk0C;4e|HRNSi z6KlD9>q=3v-$4Zik&^ZDhNm1X)+7LCH1k!s+T3tn zUn@={1U&NJLq@K?~w|(=Y<4W{ucX}FdRr6pLw(l2$iK)At%t3gYBMlJz#(K0Nqm;=KAML!&MMSNz=%k=j*zh77r34Rs37iCY` z=_kva_41bdrj(b=4Wc5MO0~q^z#pIWJ>)vDSgIQF=3JVJe1iDy%h)8oNy{s_r&;m` zL{DYKSB_5xRb9xKNOS{qAY3qv5sSXVrrf%~*q5HO|CQ&lbKMePa$M5D{vlJcoGrCZ zD?fKbZN$6rWwz)w7`9h4DAmh1ij2}EO|bO#A9L0_RW6l*$sPPUJrUbhLC75L9%W5iO$Iw5~Yut-qBeu~hF|xD7-eQ%l z412vpq_;t%^F*pYDk%Q35c-erK|6Ve=FxQbAv~ikZ4c9$Y4;ee#ciOD9{yRqf55Qk zumv}#+JciT|Gj$uFOxBUze)=?l{B}qaC0_7m`t82<$K53!4Xvi9Tr)ADp3Off?O8o zVDG0Yx|tfn@r((m?Nxrh(b0DGjg)$;DfO&$6uY;4&F!4jnxkhP}Y3x zS?WFFt>=HWzqlQhffVfvM$Ta8Sg*r3j!Eo&rUOW7SCL2~lG7<+XZ;+{&8h5g8ElI+P>>yR2U%S93NN!Xhm|C682t6ysH-=o1=Bd*N*VlnG%l+KZFtjG`UkL;%65qn0UYQ`h zh0{9jDQx(`aBe7J0Aj3Z)4}`A|4OMM0a;?{j}qkYwi)~O8$9D}ITiMH2buiU>ixYp zhL${nwj6X($*OwmpVG`y5b6v45tX*J8?og}Qju6eJ9H}`X87iEd%BUo7<`2q(HJx+ zMR}d-J4oAf{V1W^a2~`M-YAdZ81dd4o6NPO{cmZaAS@RS4ir#Sr zfFZO-VIL|VN<%nEXr2` z$0FK2L#8O_f1w~c@G70JrB@N}r(gJ!Vmkk6{r68w!o$qO?HrFcjeU0_3F5;*!E2%( zTx>4?gP8w z1B?3UVZmz^%d_dIps>>0{cB~mp3{9UoPR6uQFecVq&} zY{ebB?AlPAD_}(ll{fK99;Wh1cgRbnw)maD^F>*J!R}eHM*W0VYN1TADWMy9H=$00 z5bHY${oDgwX7(W9LZw?}{!8(_{JB~Xkje6{0x4fgC4kUmpfJ+LT1DYD*TWu4#h{Y7 zFLronmc=hS=W=j1ar3r1JNjQoWo2hMWsqW*e?TF%#&{GpsaLp}iN~$)ar+7Ti}E&X z-nq~+Gkp(`qF0F_4A22>VZn-x>I$?PDZSeG8h_ifoWf^DxIb5%T7UytYo3}F|4#RC zUHpg$=)qVqD~=m(!~?XwocuxU1u}9qhhM7d^eqmJPi_e-!IO`*{u7A zbu*?L$Mbj-X9n3G2>+Kc#l`@d8}Xb9{l*IN{#M*d;s+3Pdr8FO$EBELR=8{ zd?LJbSv9fI`{OqTH)5{b?WulgMb)psp+W|@cSp=jtl-&5C}9lw@*0H+gEW(}mAWNz zf{~U;;N}|wdSaphgqnH{FWUy!{y3^=AC*c?RJ5Eb<^ zCgH_v7^axIUVmHSFL^zlj2R$zow$|y#7>%#U7d#Vp_ezcp3lefMyd5ES=q$>4pWyA zp_Zso^^NP~lu2=S6nD(3Z5u=Uy&B&F1i$J*3;3KhEkD_lgscHGR*;T;U!9vgQa(hI}oh9IzEf_PU_8F+i77t-~gDX z490Sb)LyVZmf18N6w{+37$aO<2!Av0 ztLaPOv^J<2@p{WnMiDudoghX_`luFZt_4eNU}*~cF5i%eEcNLs;D>QVIwr8mH;=dc z09`}JV;aaF;13@&iS(w>Jc=k~|d_1hcpM(l|O zu>!@}me%isTT$xT#hNUvh(ATd0wT4fbv=6htcHNEZIw9%E6wlYmwfu2{j0kh1y=$;Yf!|NldgB9ul zB{dbE&LfRnr8ITm@;-68wo#VV?8lG3ed&9k1}QBS3}WGV9%26?A1rBkkDR9Z3o+g+ z)eQg8BY3y(Dh5&z?VLLNdDV`C=muUvCPpGg!oYxIgOI3^%4>5d7jTh~ni!Fg2;fhx z(*c%H6Je84kmQh;5tC3*l~7khLxK-e|Cz?FLh!yYe7g|*LwqU?2wv^_ZyKT$fYVkGJo@AK0$+ml?}zJeB~deT2WL1vz}dxB z)y??t!}%M@)u$_IyW~)6u1SttJ!awd6N5lx|xBrmyrBh>tb&D*=C+Z3nPfq$1%WgY0bY*?PZ#Hk|=xn zGM#0*w4CaB^y0G(J4q=;5NeM@m-P}#mv7QZNF)M!dK^w{mk_!n0`+Y3PQutu-%NBt zzgPXug?JLEbUL{e_dk;Vd896&yPe(hliVK!lj%5+@BKdcrEZ2Nc_*i@ve*2lB>u~{ zFozd2FM|_0+nAGR4TLNHanQn_Oeb!JrUcvzJ?7p9TTNB}ocO3j$7ij!li8#k6 z@2tSd1>K03K9A#_-MIq)S;T#oE^;>U$)&}okIvDf3lm?kI{d80$>~xKUoS!%q1Pi?WpsUUt(tI ztjNjY*y&Rm9(S(DC2GuPHBJs@5M{RGm`c1z<6nwyN^)rMo-AS{M2$oM9|y%fM|}G~ DHx0+F literal 59821 zcma&NV|1p`(k7gaZQHhOJ9%QKV?D8LCmq{1JGRYE(y=?XJw0>InKkE~^UnAEs2gk5 zUVGPCwX3dOb!}xiFmPB95NK!+5D<~S0s;d1zn&lrfAn7 zC?Nb-LFlib|DTEqB8oDS5&$(u1<5;wsY!V`2F7^=IR@I9so5q~=3i_(hqqG<9SbL8Q(LqDrz+aNtGYWGJ2;p*{a-^;C>BfGzkz_@fPsK8{pTT~_VzB$E`P@> z7+V1WF2+tSW=`ZRj3&0m&d#x_lfXq`bb-Y-SC-O{dkN2EVM7@!n|{s+2=xSEMtW7( zz~A!cBpDMpQu{FP=y;sO4Le}Z)I$wuFwpugEY3vEGfVAHGqZ-<{vaMv-5_^uO%a{n zE_Zw46^M|0*dZ`;t%^3C19hr=8FvVdDp1>SY>KvG!UfD`O_@weQH~;~W=fXK_!Yc> z`EY^PDJ&C&7LC;CgQJeXH2 zjfM}2(1i5Syj)Jj4EaRyiIl#@&lC5xD{8hS4Wko7>J)6AYPC-(ROpVE-;|Z&u(o=X z2j!*>XJ|>Lo+8T?PQm;SH_St1wxQPz)b)Z^C(KDEN$|-6{A>P7r4J1R-=R7|FX*@! zmA{Ja?XE;AvisJy6;cr9Q5ovphdXR{gE_7EF`ji;n|RokAJ30Zo5;|v!xtJr+}qbW zY!NI6_Wk#6pWFX~t$rAUWi?bAOv-oL6N#1>C~S|7_e4 zF}b9(&a*gHk+4@J26&xpiWYf2HN>P;4p|TD4f586umA2t@cO1=Fx+qd@1Ae#Le>{-?m!PnbuF->g3u)7(n^llJfVI%Q2rMvetfV5 z6g|sGf}pV)3_`$QiKQnqQ<&ghOWz4_{`rA1+7*M0X{y(+?$|{n zs;FEW>YzUWg{sO*+D2l6&qd+$JJP_1Tm;To<@ZE%5iug8vCN3yH{!6u5Hm=#3HJ6J zmS(4nG@PI^7l6AW+cWAo9sFmE`VRcM`sP7X$^vQY(NBqBYU8B|n-PrZdNv8?K?kUTT3|IE`-A8V*eEM2=u*kDhhKsmVPWGns z8QvBk=BPjvu!QLtlF0qW(k+4i+?H&L*qf262G#fks9}D5-L{yiaD10~a;-j!p!>5K zl@Lh+(9D{ePo_S4F&QXv|q_yT`GIPEWNHDD8KEcF*2DdZD;=J6u z|8ICSoT~5Wd!>g%2ovFh`!lTZhAwpIbtchDc{$N%<~e$E<7GWsD42UdJh1fD($89f2on`W`9XZJmr*7lRjAA8K0!(t8-u>2H*xn5cy1EG{J;w;Q-H8Yyx+WW(qoZZM7p(KQx^2-yI6Sw?k<=lVOVwYn zY*eDm%~=|`c{tUupZ^oNwIr!o9T;H3Fr|>NE#By8SvHb&#;cyBmY1LwdXqZwi;qn8 zK+&z{{95(SOPXAl%EdJ3jC5yV^|^}nOT@M0)|$iOcq8G{#*OH7=DlfOb; z#tRO#tcrc*yQB5!{l5AF3(U4>e}nEvkoE_XCX=a3&A6Atwnr&`r&f2d%lDr8f?hBB zr1dKNypE$CFbT9I?n){q<1zHmY>C=5>9_phi79pLJG)f=#dKdQ7We8emMjwR*qIMF zE_P-T*$hX#FUa%bjv4Vm=;oxxv`B*`weqUn}K=^TXjJG=UxdFMSj-QV6fu~;- z|IsUq`#|73M%Yn;VHJUbt<0UHRzbaF{X@76=8*-IRx~bYgSf*H(t?KH=?D@wk*E{| z2@U%jKlmf~C^YxD=|&H?(g~R9-jzEb^y|N5d`p#2-@?BUcHys({pUz4Zto7XwKq2X zSB~|KQGgv_Mh@M!*{nl~2~VV_te&E7K39|WYH zCxfd|v_4!h$Ps2@atm+gj14Ru)DhivY&(e_`eA)!O1>nkGq|F-#-6oo5|XKEfF4hR z%{U%ar7Z8~B!foCd_VRHr;Z1c0Et~y8>ZyVVo9>LLi(qb^bxVkbq-Jq9IF7!FT`(- zTMrf6I*|SIznJLRtlP)_7tQ>J`Um>@pP=TSfaPB(bto$G1C zx#z0$=zNpP-~R);kM4O)9Mqn@5Myv5MmmXOJln312kq#_94)bpSd%fcEo7cD#&|<` zrcal$(1Xv(nDEquG#`{&9Ci~W)-zd_HbH-@2F6+|a4v}P!w!Q*h$#Zu+EcZeY>u&?hn#DCfC zVuye5@Ygr+T)0O2R1*Hvlt>%rez)P2wS}N-i{~IQItGZkp&aeY^;>^m7JT|O^{`78 z$KaK0quwcajja;LU%N|{`2o&QH@u%jtH+j!haGj;*ZCR*`UgOXWE>qpXqHc?g&vA& zt-?_g8k%ZS|D;()0Lf!>7KzTSo-8hUh%OA~i76HKRLudaNiwo*E9HxmzN4y>YpZNO zUE%Q|H_R_UmX=*f=2g=xyP)l-DP}kB@PX|(Ye$NOGN{h+fI6HVw`~Cd0cKqO;s6aiYLy7sl~%gs`~XaL z^KrZ9QeRA{O*#iNmB7_P!=*^pZiJ5O@iE&X2UmUCPz!)`2G3)5;H?d~3#P|)O(OQ_ zua+ZzwWGkWflk4j^Lb=x56M75_p9M*Q50#(+!aT01y80x#rs9##!;b-BH?2Fu&vx} za%4!~GAEDsB54X9wCF~juV@aU}fp_(a<`Ig0Pip8IjpRe#BR?-niYcz@jI+QY zBU9!8dAfq@%p;FX)X=E7?B=qJJNXlJ&7FBsz;4&|*z{^kEE!XbA)(G_O6I9GVzMAF z8)+Un(6od`W7O!!M=0Z)AJuNyN8q>jNaOdC-zAZ31$Iq%{c_SYZe+(~_R`a@ zOFiE*&*o5XG;~UjsuW*ja-0}}rJdd@^VnQD!z2O~+k-OSF%?hqcFPa4e{mV1UOY#J zTf!PM=KMNAzbf(+|AL%K~$ahX0Ol zbAxKu3;v#P{Qia{_WzHl`!@!8c#62XSegM{tW1nu?Ee{sQq(t{0TSq67YfG;KrZ$n z*$S-+R2G?aa*6kRiTvVxqgUhJ{ASSgtepG3hb<3hlM|r>Hr~v_DQ>|Nc%&)r0A9go z&F3Ao!PWKVq~aWOzLQIy&R*xo>}{UTr}?`)KS&2$3NR@a+>+hqK*6r6Uu-H};ZG^| zfq_Vl%YE1*uGwtJ>H*Y(Q9E6kOfLJRlrDNv`N;jnag&f<4#UErM0ECf$8DASxMFF& zK=mZgu)xBz6lXJ~WZR7OYw;4&?v3Kk-QTs;v1r%XhgzSWVf|`Sre2XGdJb}l1!a~z zP92YjnfI7OnF@4~g*LF>G9IZ5c+tifpcm6#m)+BmnZ1kz+pM8iUhwag`_gqr(bnpy zl-noA2L@2+?*7`ZO{P7&UL~ahldjl`r3=HIdo~Hq#d+&Q;)LHZ4&5zuDNug@9-uk; z<2&m#0Um`s=B}_}9s&70Tv_~Va@WJ$n~s`7tVxi^s&_nPI0`QX=JnItlOu*Tn;T@> zXsVNAHd&K?*u~a@u8MWX17VaWuE0=6B93P2IQ{S$-WmT+Yp!9eA>@n~=s>?uDQ4*X zC(SxlKap@0R^z1p9C(VKM>nX8-|84nvIQJ-;9ei0qs{}X>?f%&E#%-)Bpv_p;s4R+ z;PMpG5*rvN&l;i{^~&wKnEhT!S!LQ>udPzta#Hc9)S8EUHK=%x+z@iq!O{)*XM}aI zBJE)vokFFXTeG<2Pq}5Na+kKnu?Ch|YoxdPb&Z{07nq!yzj0=xjzZj@3XvwLF0}Pa zn;x^HW504NNfLY~w!}5>`z=e{nzGB>t4ntE>R}r7*hJF3OoEx}&6LvZz4``m{AZxC zz6V+^73YbuY>6i9ulu)2`ozP(XBY5n$!kiAE_Vf4}Ih)tlOjgF3HW|DF+q-jI_0p%6Voc^e;g28* z;Sr4X{n(X7eEnACWRGNsHqQ_OfWhAHwnSQ87@PvPcpa!xr9`9+{QRn;bh^jgO8q@v zLekO@-cdc&eOKsvXs-eMCH8Y{*~3Iy!+CANy+(WXYS&6XB$&1+tB?!qcL@@) zS7XQ|5=o1fr8yM7r1AyAD~c@Mo`^i~hjx{N17%pDX?j@2bdBEbxY}YZxz!h#)q^1x zpc_RnoC3`V?L|G2R1QbR6pI{Am?yW?4Gy`G-xBYfebXvZ=(nTD7u?OEw>;vQICdPJBmi~;xhVV zisVvnE!bxI5|@IIlDRolo_^tc1{m)XTbIX^<{TQfsUA1Wv(KjJED^nj`r!JjEA%MaEGqPB z9YVt~ol3%e`PaqjZt&-)Fl^NeGmZ)nbL;92cOeLM2H*r-zA@d->H5T_8_;Jut0Q_G zBM2((-VHy2&eNkztIpHk&1H3M3@&wvvU9+$RO%fSEa_d5-qZ!<`-5?L9lQ1@AEpo* z3}Zz~R6&^i9KfRM8WGc6fTFD%PGdruE}`X$tP_*A)_7(uI5{k|LYc-WY*%GJ6JMmw zNBT%^E#IhekpA(i zcB$!EB}#>{^=G%rQ~2;gbObT9PQ{~aVx_W6?(j@)S$&Ja1s}aLT%A*mP}NiG5G93- z_DaRGP77PzLv0s32{UFm##C2LsU!w{vHdKTM1X)}W%OyZ&{3d^2Zu-zw?fT=+zi*q z^fu6CXQ!i?=ljsqSUzw>g#PMk>(^#ejrYp(C)7+@Z1=Mw$Rw!l8c9}+$Uz;9NUO(kCd#A1DX4Lbis0k; z?~pO(;@I6Ajp}PL;&`3+;OVkr3A^dQ(j?`by@A!qQam@_5(w6fG>PvhO`#P(y~2ue zW1BH_GqUY&>PggMhhi@8kAY;XWmj>y1M@c`0v+l~l0&~Kd8ZSg5#46wTLPo*Aom-5 z>qRXyWl}Yda=e@hJ%`x=?I42(B0lRiR~w>n6p8SHN~B6Y>W(MOxLpv>aB)E<1oEcw z%X;#DJpeDaD;CJRLX%u!t23F|cv0ZaE183LXxMq*uWn)cD_ zp!@i5zsmcxb!5uhp^@>U;K>$B|8U@3$65CmhuLlZ2(lF#hHq-<<+7ZN9m3-hFAPgA zKi;jMBa*59ficc#TRbH_l`2r>z(Bm_XEY}rAwyp~c8L>{A<0@Q)j*uXns^q5z~>KI z)43=nMhcU1ZaF;CaBo>hl6;@(2#9yXZ7_BwS4u>gN%SBS<;j{{+p}tbD8y_DFu1#0 zx)h&?`_`=ti_6L>VDH3>PPAc@?wg=Omdoip5j-2{$T;E9m)o2noyFW$5dXb{9CZ?c z);zf3U526r3Fl+{82!z)aHkZV6GM@%OKJB5mS~JcDjieFaVn}}M5rtPnHQVw0Stn- zEHs_gqfT8(0b-5ZCk1%1{QQaY3%b>wU z7lyE?lYGuPmB6jnMI6s$1uxN{Tf_n7H~nKu+h7=%60WK-C&kEIq_d4`wU(*~rJsW< zo^D$-(b0~uNVgC+$J3MUK)(>6*k?92mLgpod{Pd?{os+yHr&t+9ZgM*9;dCQBzE!V zk6e6)9U6Bq$^_`E1xd}d;5O8^6?@bK>QB&7l{vAy^P6FOEO^l7wK4K=lLA45gQ3$X z=$N{GR1{cxO)j;ZxKI*1kZIT9p>%FhoFbRK;M(m&bL?SaN zzkZS9xMf={o@gpG%wE857u@9dq>UKvbaM1SNtMA9EFOp7$BjJQVkIm$wU?-yOOs{i z1^(E(WwZZG{_#aIzfpGc@g5-AtK^?Q&vY#CtVpfLbW?g0{BEX4Vlk(`AO1{-D@31J zce}#=$?Gq+FZG-SD^z)-;wQg9`qEO}Dvo+S9*PUB*JcU)@S;UVIpN7rOqXmEIerWo zP_lk!@RQvyds&zF$Rt>N#_=!?5{XI`Dbo0<@>fIVgcU*9Y+ z)}K(Y&fdgve3ruT{WCNs$XtParmvV;rjr&R(V&_#?ob1LzO0RW3?8_kSw)bjom#0; zeNllfz(HlOJw012B}rgCUF5o|Xp#HLC~of%lg+!pr(g^n;wCX@Yk~SQOss!j9f(KL zDiI1h#k{po=Irl)8N*KU*6*n)A8&i9Wf#7;HUR^5*6+Bzh;I*1cICa|`&`e{pgrdc zs}ita0AXb$c6{tu&hxmT0faMG0GFc)unG8tssRJd%&?^62!_h_kn^HU_kBgp$bSew zqu)M3jTn;)tipv9Wt4Ll#1bmO2n?^)t^ZPxjveoOuK89$oy4(8Ujw{nd*Rs*<+xFi z{k*9v%sl?wS{aBSMMWdazhs0#gX9Has=pi?DhG&_0|cIyRG7c`OBiVG6W#JjYf7-n zIQU*Jc+SYnI8oG^Q8So9SP_-w;Y00$p5+LZ{l+81>v7|qa#Cn->312n=YQd$PaVz8 zL*s?ZU*t-RxoR~4I7e^c!8TA4g>w@R5F4JnEWJpy>|m5la2b#F4d*uoz!m=i1;`L` zB(f>1fAd~;*wf%GEbE8`EA>IO9o6TdgbIC%+en!}(C5PGYqS0{pa?PD)5?ds=j9{w za9^@WBXMZ|D&(yfc~)tnrDd#*;u;0?8=lh4%b-lFPR3ItwVJp};HMdEw#SXg>f-zU zEiaj5H=jzRSy(sWVd%hnLZE{SUj~$xk&TfheSch#23)YTcjrB+IVe0jJqsdz__n{- zC~7L`DG}-Dgrinzf7Jr)e&^tdQ}8v7F+~eF*<`~Vph=MIB|YxNEtLo1jXt#9#UG5` zQ$OSk`u!US+Z!=>dGL>%i#uV<5*F?pivBH@@1idFrzVAzttp5~>Y?D0LV;8Yv`wAa{hewVjlhhBM z_mJhU9yWz9Jexg@G~dq6EW5^nDXe(sU^5{}qbd0*yW2Xq6G37f8{{X&Z>G~dUGDFu zgmsDDZZ5ZmtiBw58CERFPrEG>*)*`_B75!MDsOoK`T1aJ4GZ1avI?Z3OX|Hg?P(xy zSPgO$alKZuXd=pHP6UZy0G>#BFm(np+dekv0l6gd=36FijlT8^kI5; zw?Z*FPsibF2d9T$_L@uX9iw*>y_w9HSh8c=Rm}f>%W+8OS=Hj_wsH-^actull3c@!z@R4NQ4qpytnwMaY z)>!;FUeY?h2N9tD(othc7Q=(dF zZAX&Y1ac1~0n(z}!9{J2kPPnru1?qteJPvA2m!@3Zh%+f1VQt~@leK^$&ZudOpS!+ zw#L0usf!?Df1tB?9=zPZ@q2sG!A#9 zKZL`2cs%|Jf}wG=_rJkwh|5Idb;&}z)JQuMVCZSH9kkG%zvQO01wBN)c4Q`*xnto3 zi7TscilQ>t_SLij{@Fepen*a(`upw#RJAx|JYYXvP1v8f)dTHv9pc3ZUwx!0tOH?c z^Hn=gfjUyo!;+3vZhxNE?LJgP`qYJ`J)umMXT@b z{nU(a^xFfofcxfHN-!Jn*{Dp5NZ&i9#9r{)s^lUFCzs5LQL9~HgxvmU#W|iNs0<3O z%Y2FEgvts4t({%lfX1uJ$w{JwfpV|HsO{ZDl2|Q$-Q?UJd`@SLBsMKGjFFrJ(s?t^ z2Llf`deAe@YaGJf)k2e&ryg*m8R|pcjct@rOXa=64#V9!sp=6tC#~QvYh&M~zmJ;% zr*A}V)Ka^3JE!1pcF5G}b&jdrt;bM^+J;G^#R08x@{|ZWy|547&L|k6)HLG|sN<~o z?y`%kbfRN_vc}pwS!Zr}*q6DG7;be0qmxn)eOcD%s3Wk`=@GM>U3ojhAW&WRppi0e zudTj{ufwO~H7izZJmLJD3uPHtjAJvo6H=)&SJ_2%qRRECN#HEU_RGa(Pefk*HIvOH zW7{=Tt(Q(LZ6&WX_Z9vpen}jqge|wCCaLYpiw@f_%9+-!l{kYi&gT@Cj#D*&rz1%e z@*b1W13bN8^j7IpAi$>`_0c!aVzLe*01DY-AcvwE;kW}=Z{3RJLR|O~^iOS(dNEnL zJJ?Dv^ab++s2v!4Oa_WFDLc4fMspglkh;+vzg)4;LS{%CR*>VwyP4>1Tly+!fA-k? z6$bg!*>wKtg!qGO6GQ=cAmM_RC&hKg$~(m2LdP{{*M+*OVf07P$OHp*4SSj9H;)1p z^b1_4p4@C;8G7cBCB6XC{i@vTB3#55iRBZiml^jc4sYnepCKUD+~k}TiuA;HWC6V3 zV{L5uUAU9CdoU+qsFszEwp;@d^!6XnX~KI|!o|=r?qhs`(-Y{GfO4^d6?8BC0xonf zKtZc1C@dNu$~+p#m%JW*J7alfz^$x`U~)1{c7svkIgQ3~RK2LZ5;2TAx=H<4AjC8{ z;)}8OfkZy7pSzVsdX|wzLe=SLg$W1+`Isf=o&}npxWdVR(i8Rr{uzE516a@28VhVr zVgZ3L&X(Q}J0R2{V(}bbNwCDD5K)<5h9CLM*~!xmGTl{Mq$@;~+|U*O#nc^oHnFOy z9Kz%AS*=iTBY_bSZAAY6wXCI?EaE>8^}WF@|}O@I#i69ljjWQPBJVk zQ_rt#J56_wGXiyItvAShJpLEMtW_)V5JZAuK#BAp6bV3K;IkS zK0AL(3ia99!vUPL#j>?<>mA~Q!mC@F-9I$9Z!96ZCSJO8FDz1SP3gF~m`1c#y!efq8QN}eHd+BHwtm%M5586jlU8&e!CmOC z^N_{YV$1`II$~cTxt*dV{-yp61nUuX5z?N8GNBuZZR}Uy_Y3_~@Y3db#~-&0TX644OuG^D3w_`?Yci{gTaPWST8`LdE)HK5OYv>a=6B%R zw|}>ngvSTE1rh`#1Rey0?LXTq;bCIy>TKm^CTV4BCSqdpx1pzC3^ca*S3fUBbKMzF z6X%OSdtt50)yJw*V_HE`hnBA)1yVN3Ruq3l@lY;%Bu+Q&hYLf_Z@fCUVQY-h4M3)- zE_G|moU)Ne0TMjhg?tscN7#ME6!Rb+y#Kd&-`!9gZ06o3I-VX1d4b1O=bpRG-tDK0 zSEa9y46s7QI%LmhbU3P`RO?w#FDM(}k8T`&>OCU3xD=s5N7}w$GntXF;?jdVfg5w9OR8VPxp5{uw zD+_;Gb}@7Vo_d3UV7PS65%_pBUeEwX_Hwfe2e6Qmyq$%0i8Ewn%F7i%=CNEV)Qg`r|&+$ zP6^Vl(MmgvFq`Zb715wYD>a#si;o+b4j^VuhuN>+sNOq6Qc~Y;Y=T&!Q4>(&^>Z6* zwliz!_16EDLTT;v$@W(s7s0s zi*%p>q#t)`S4j=Ox_IcjcllyT38C4hr&mlr6qX-c;qVa~k$MG;UqdnzKX0wo0Xe-_)b zrHu1&21O$y5828UIHI@N;}J@-9cpxob}zqO#!U%Q*ybZ?BH#~^fOT_|8&xAs_rX24 z^nqn{UWqR?MlY~klh)#Rz-*%&e~9agOg*fIN`P&v!@gcO25Mec23}PhzImkdwVT|@ zFR9dYYmf&HiUF4xO9@t#u=uTBS@k*97Z!&hu@|xQnQDkLd!*N`!0JN7{EUoH%OD85 z@aQ2(w-N)1_M{;FV)C#(a4p!ofIA3XG(XZ2E#%j_(=`IWlJAHWkYM2&(+yY|^2TB0 z>wfC-+I}`)LFOJ%KeBb1?eNxGKeq?AI_eBE!M~$wYR~bB)J3=WvVlT8ZlF2EzIFZt zkaeyj#vmBTGkIL9mM3cEz@Yf>j=82+KgvJ-u_{bBOxE5zoRNQW3+Ahx+eMGem|8xo zL3ORKxY_R{k=f~M5oi-Z>5fgqjEtzC&xJEDQ@`<)*Gh3UsftBJno-y5Je^!D?Im{j za*I>RQ=IvU@5WKsIr?kC$DT+2bgR>8rOf3mtXeMVB~sm%X7W5`s=Tp>FR544tuQ>9qLt|aUSv^io&z93luW$_OYE^sf8DB?gx z4&k;dHMWph>Z{iuhhFJr+PCZ#SiZ9e5xM$A#0yPtVC>yk&_b9I676n|oAH?VeTe*1 z@tDK}QM-%J^3Ns6=_vh*I8hE?+=6n9nUU`}EX|;Mkr?6@NXy8&B0i6h?7%D=%M*Er zivG61Wk7e=v;<%t*G+HKBqz{;0Biv7F+WxGirONRxJij zon5~(a`UR%uUzfEma99QGbIxD(d}~oa|exU5Y27#4k@N|=hE%Y?Y3H%rcT zHmNO#ZJ7nPHRG#y-(-FSzaZ2S{`itkdYY^ZUvyw<7yMBkNG+>$Rfm{iN!gz7eASN9-B3g%LIEyRev|3)kSl;JL zX7MaUL_@~4ot3$woD0UA49)wUeu7#lj77M4ar8+myvO$B5LZS$!-ZXw3w;l#0anYz zDc_RQ0Ome}_i+o~H=CkzEa&r~M$1GC!-~WBiHiDq9Sdg{m|G?o7g`R%f(Zvby5q4; z=cvn`M>RFO%i_S@h3^#3wImmWI4}2x4skPNL9Am{c!WxR_spQX3+;fo!y(&~Palyjt~Xo0uy6d%sX&I`e>zv6CRSm)rc^w!;Y6iVBb3x@Y=`hl9jft zXm5vilB4IhImY5b->x{!MIdCermpyLbsalx8;hIUia%*+WEo4<2yZ6`OyG1Wp%1s$ zh<|KrHMv~XJ9dC8&EXJ`t3ETz>a|zLMx|MyJE54RU(@?K&p2d#x?eJC*WKO9^d17# zdTTKx-Os3k%^=58Sz|J28aCJ}X2-?YV3T7ee?*FoDLOC214J4|^*EX`?cy%+7Kb3(@0@!Q?p zk>>6dWjF~y(eyRPqjXqDOT`4^Qv-%G#Zb2G?&LS-EmO|ixxt79JZlMgd^~j)7XYQ; z62rGGXA=gLfgy{M-%1gR87hbhxq-fL)GSfEAm{yLQP!~m-{4i_jG*JsvUdqAkoc#q6Yd&>=;4udAh#?xa2L z7mFvCjz(hN7eV&cyFb%(U*30H@bQ8-b7mkm!=wh2|;+_4vo=tyHPQ0hL=NR`jbsSiBWtG ztMPPBgHj(JTK#0VcP36Z`?P|AN~ybm=jNbU=^3dK=|rLE+40>w+MWQW%4gJ`>K!^- zx4kM*XZLd(E4WsolMCRsdvTGC=37FofIyCZCj{v3{wqy4OXX-dZl@g`Dv>p2`l|H^ zS_@(8)7gA62{Qfft>vx71stILMuyV4uKb7BbCstG@|e*KWl{P1$=1xg(7E8MRRCWQ1g)>|QPAZot~|FYz_J0T+r zTWTB3AatKyUsTXR7{Uu) z$1J5SSqoJWt(@@L5a)#Q6bj$KvuC->J-q1!nYS6K5&e7vNdtj- zj9;qwbODLgIcObqNRGs1l{8>&7W?BbDd!87=@YD75B2ep?IY|gE~t)$`?XJ45MG@2 zz|H}f?qtEb_p^Xs$4{?nA=Qko3Lc~WrAS`M%9N60FKqL7XI+v_5H-UDiCbRm`fEmv z$pMVH*#@wQqml~MZe+)e4Ts3Gl^!Z0W3y$;|9hI?9(iw29b7en0>Kt2pjFXk@!@-g zTb4}Kw!@u|V!wzk0|qM*zj$*-*}e*ZXs#Y<6E_!BR}3^YtjI_byo{F+w9H9?f%mnBh(uE~!Um7)tgp2Ye;XYdVD95qt1I-fc@X zXHM)BfJ?^g(s3K|{N8B^hamrWAW|zis$`6|iA>M-`0f+vq(FLWgC&KnBDsM)_ez1# zPCTfN8{s^K`_bum2i5SWOn)B7JB0tzH5blC?|x;N{|@ch(8Uy-O{B2)OsfB$q0@FR z27m3YkcVi$KL;;4I*S;Z#6VfZcZFn!D2Npv5pio)sz-`_H*#}ROd7*y4i(y(YlH<4 zh4MmqBe^QV_$)VvzWgMXFy`M(vzyR2u!xx&%&{^*AcVLrGa8J9ycbynjKR~G6zC0e zlEU>zt7yQtMhz>XMnz>ewXS#{Bulz$6HETn?qD5v3td>`qGD;Y8&RmkvN=24=^6Q@DYY zxMt}uh2cSToMkkIWo1_Lp^FOn$+47JXJ*#q=JaeiIBUHEw#IiXz8cStEsw{UYCA5v_%cF@#m^Y!=+qttuH4u}r6gMvO4EAvjBURtLf& z6k!C|OU@hv_!*qear3KJ?VzVXDKqvKRtugefa7^^MSWl0fXXZR$Xb!b6`eY4A1#pk zAVoZvb_4dZ{f~M8fk3o?{xno^znH1t;;E6K#9?erW~7cs%EV|h^K>@&3Im}c7nm%Y zbLozFrwM&tSNp|46)OhP%MJ(5PydzR>8)X%i3!^L%3HCoCF#Y0#9vPI5l&MK*_ z6G8Y>$`~c)VvQle_4L_AewDGh@!bKkJeEs_NTz(yilnM!t}7jz>fmJb89jQo6~)%% z@GNIJ@AShd&K%UdQ5vR#yT<-goR+D@Tg;PuvcZ*2AzSWN&wW$Xc+~vW)pww~O|6hL zBxX?hOyA~S;3rAEfI&jmMT4f!-eVm%n^KF_QT=>!A<5tgXgi~VNBXqsFI(iI$Tu3x0L{<_-%|HMG4Cn?Xs zq~fvBhu;SDOCD7K5(l&i7Py-;Czx5byV*3y%#-Of9rtz?M_owXc2}$OIY~)EZ&2?r zLQ(onz~I7U!w?B%LtfDz)*X=CscqH!UE=mO?d&oYvtj|(u)^yomS;Cd>Men|#2yuD zg&tf(*iSHyo;^A03p&_j*QXay9d}qZ0CgU@rnFNDIT5xLhC5_tlugv()+w%`7;ICf z>;<#L4m@{1}Og76*e zHWFm~;n@B1GqO8s%=qu)+^MR|jp(ULUOi~v;wE8SB6^mK@adSb=o+A_>Itjn13AF& zDZe+wUF9G!JFv|dpj1#d+}BO~s*QTe3381TxA%Q>P*J#z%( z5*8N^QWxgF73^cTKkkvgvIzf*cLEyyKw)Wf{#$n{uS#(rAA~>TS#!asqQ2m_izXe3 z7$Oh=rR;sdmVx3G)s}eImsb<@r2~5?vcw*Q4LU~FFh!y4r*>~S7slAE6)W3Up2OHr z2R)+O<0kKo<3+5vB}v!lB*`%}gFldc+79iahqEx#&Im@NCQU$@PyCZbcTt?K{;o@4 z312O9GB)?X&wAB}*-NEU zn@6`)G`FhT8O^=Cz3y+XtbwO{5+{4-&?z!esFts-C zypwgI^4#tZ74KC+_IW|E@kMI=1pSJkvg$9G3Va(!reMnJ$kcMiZ=30dTJ%(Ws>eUf z;|l--TFDqL!PZbLc_O(XP0QornpP;!)hdT#Ts7tZ9fcQeH&rhP_1L|Z_ha#JOroe^qcsLi`+AoBWHPM7}gD z+mHuPXd14M?nkp|nu9G8hPk;3=JXE-a204Fg!BK|$MX`k-qPeD$2OOqvF;C(l8wm13?>i(pz7kRyYm zM$IEzf`$}B%ezr!$(UO#uWExn%nTCTIZzq&8@i8sP#6r8 z*QMUzZV(LEWZb)wbmf|Li;UpiP;PlTQ(X4zreD`|`RG!7_wc6J^MFD!A=#K*ze>Jg z?9v?p(M=fg_VB0+c?!M$L>5FIfD(KD5ku*djwCp+5GVIs9^=}kM2RFsxx0_5DE%BF zykxwjWvs=rbi4xKIt!z$&v(`msFrl4n>a%NO_4`iSyb!UiAE&mDa+apc zPe)#!ToRW~rqi2e1bdO1RLN5*uUM@{S`KLJhhY-@TvC&5D(c?a(2$mW-&N%h5IfEM zdFI6`6KJiJQIHvFiG-34^BtO3%*$(-Ht_JU*(KddiUYoM{coadlG&LVvke&*p>Cac z^BPy2Zteiq1@ulw0e)e*ot7@A$RJui0$l^{lsCt%R;$){>zuRv9#w@;m=#d%%TJmm zC#%eFOoy$V)|3*d<OC1iP+4R7D z8FE$E8l2Y?(o-i6wG=BKBh0-I?i3WF%hqdD7VCd;vpk|LFP!Et8$@voH>l>U8BY`Q zC*G;&y6|!p=7`G$*+hxCv!@^#+QD3m>^azyZoLS^;o_|plQaj-wx^ zRV&$HcY~p)2|Zqp0SYU?W3zV87s6JP-@D~$t0 zvd;-YL~JWc*8mtHz_s(cXus#XYJc5zdC=&!4MeZ;N3TQ>^I|Pd=HPjVP*j^45rs(n zzB{U4-44=oQ4rNN6@>qYVMH4|GmMIz#z@3UW-1_y#eNa+Q%(41oJ5i(DzvMO^%|?L z^r_+MZtw0DZ0=BT-@?hUtA)Ijk~Kh-N8?~X5%KnRH7cb!?Yrd8gtiEo!v{sGrQk{X zvV>h{8-DqTyuAxIE(hb}jMVtga$;FIrrKm>ye5t%M;p!jcH1(Bbux>4D#MVhgZGd> z=c=nVb%^9T?iDgM&9G(mV5xShc-lBLi*6RShenDqB%`-2;I*;IHg6>#ovKQ$M}dDb z<$USN%LMqa5_5DR7g7@(oAoQ%!~<1KSQr$rmS{UFQJs5&qBhgTEM_Y7|0Wv?fbP`z z)`8~=v;B)+>Jh`V*|$dTxKe`HTBkho^-!!K#@i{9FLn-XqX&fQcGsEAXp)BV7(`Lk zC{4&+Pe-0&<)C0kAa(MTnb|L;ZB5i|b#L1o;J)+?SV8T*U9$Vxhy}dm3%!A}SK9l_6(#5(e*>8|;4gNKk7o_%m_ zEaS=Z(ewk}hBJ>v`jtR=$pm_Wq3d&DU+6`BACU4%qdhH1o^m8hT2&j<4Z8!v=rMCk z-I*?48{2H*&+r<{2?wp$kh@L@=rj8c`EaS~J>W?)trc?zP&4bsNagS4yafuDoXpi5`!{BVqJ1$ZC3`pf$`LIZ(`0&Ik+!_Xa=NJW`R2 zd#Ntgwz`JVwC4A61$FZ&kP)-{T|rGO59`h#1enAa`cWxRR8bKVvvN6jBzAYePrc&5 z+*zr3en|LYB2>qJp479rEALk5d*X-dfKn6|kuNm;2-U2+P3_rma!nWjZQ-y*q3JS? zBE}zE-!1ZBR~G%v!$l#dZ*$UV4$7q}xct}=on+Ba8{b>Y9h*f-GW0D0o#vJ0%ALg( ztG2+AjWlG#d;myA(i&dh8Gp?y9HD@`CTaDAy?c&0unZ%*LbLIg4;m{Kc?)ws3^>M+ zt5>R)%KIJV*MRUg{0$#nW=Lj{#8?dD$yhjBOrAeR#4$H_Dc(eyA4dNjZEz1Xk+Bqt zB&pPl+?R{w8GPv%VI`x`IFOj320F1=cV4aq0(*()Tx!VVxCjua;)t}gTr=b?zY+U! zkb}xjXZ?hMJN{Hjw?w&?gz8Ow`htX z@}WG*_4<%ff8(!S6bf3)p+8h2!Rory>@aob$gY#fYJ=LiW0`+~l7GI%EX_=8 z{(;0&lJ%9)M9{;wty=XvHbIx|-$g4HFij`J$-z~`mW)*IK^MWVN+*>uTNqaDmi!M8 zurj6DGd)g1g(f`A-K^v)3KSOEoZXImXT06apJum-dO_%oR)z6Bam-QC&CNWh7kLOE zcxLdVjYLNO2V?IXWa-ys30Jbxw(Xm?U1{4kDs9`gZQHh8X{*w9=H&Zz&-6RL?uq#R zxN+k~JaL|gdsdvY_u6}}MHC?a@ElFeipA1Lud#M~)pp2SnG#K{a@tSpvXM;A8gz9> zRVDV5T1%%!LsNRDOw~LIuiAiKcj<%7WpgjP7G6mMU1#pFo6a-1>0I5ZdhxnkMX&#L z=Vm}?SDlb_LArobqpnU!WLQE*yVGWgs^4RRy4rrJwoUUWoA~ZJUx$mK>J6}7{CyC4 zv=8W)kKl7TmAnM%m;anEDPv5tzT{A{ON9#FPYF6c=QIc*OrPp96tiY&^Qs+#A1H>Y z<{XtWt2eDwuqM zQ_BI#UIP;2-olOL4LsZ`vTPv-eILtuB7oWosoSefWdM}BcP>iH^HmimR`G`|+9waCO z&M375o@;_My(qYvPNz;N8FBZaoaw3$b#x`yTBJLc8iIP z--la{bzK>YPP|@Mke!{Km{vT8Z4|#An*f=EmL34?!GJfHaDS#41j~8c5KGKmj!GTh&QIH+DjEI*BdbSS2~6VTt}t zhAwNQNT6%c{G`If3?|~Fp7iwee(LaUS)X9@I29cIb61} z$@YBq4hSplr&liE@ye!y&7+7n$fb+8nS~co#^n@oCjCwuKD61x$5|0ShDxhQES5MP z(gH|FO-s6#$++AxnkQR!3YMgKcF)!&aqr^a3^{gAVT`(tY9@tqgY7@ z>>ul3LYy`R({OY7*^Mf}UgJl(N7yyo$ag;RIpYHa_^HKx?DD`%Vf1D0s^ zjk#OCM5oSzuEz(7X`5u~C-Y~n4B}_3*`5B&8tEdND@&h;H{R`o%IFpIJ4~Kw!kUjehGT8W!CD7?d8sg_$KKp%@*dW)#fI1#R<}kvzBVpaog_2&W%c_jJfP` z6)wE+$3+Hdn^4G}(ymPyasc1<*a7s2yL%=3LgtZLXGuA^jdM^{`KDb%%}lr|ONDsl zy~~jEuK|XJ2y<`R{^F)Gx7DJVMvpT>gF<4O%$cbsJqK1;v@GKXm*9l3*~8^_xj*Gs z=Z#2VQ6`H@^~#5Pv##@CddHfm;lbxiQnqy7AYEH(35pTg^;u&J2xs-F#jGLuDw2%z z`a>=0sVMM+oKx4%OnC9zWdbpq*#5^yM;og*EQKpv`^n~-mO_vj=EgFxYnga(7jO?G z`^C87B4-jfB_RgN2FP|IrjOi;W9AM1qS}9W@&1a9Us>PKFQ9~YE!I~wTbl!m3$Th? z)~GjFxmhyyGxN}t*G#1^KGVXm#o(K0xJyverPe}mS=QgJ$#D}emQDw+dHyPu^&Uv> z4O=3gK*HLFZPBY|!VGq60Of6QrAdj`nj1h!$?&a;Hgaj{oo{l0P3TzpJK_q_eW8Ng zP6QF}1{V;xlolCs?pGegPoCSxx@bshb#3ng4Fkp4!7B0=&+1%187izf@}tvsjZ6{m z4;K>sR5rm97HJrJ`w}Y`-MZN$Wv2N%X4KW(N$v2@R1RkRJH2q1Ozs0H`@ zd5)X-{!{<+4Nyd=hQ8Wm3CCd}ujm*a?L79ztfT7@&(?B|!pU5&%9Rl!`i;suAg0+A zxb&UYpo-z}u6CLIndtH~C|yz&!OV_I*L;H#C7ie_5uB1fNRyH*<^d=ww=gxvE%P$p zRHKI{^{nQlB9nLhp9yj-so1is{4^`{Xd>Jl&;dX;J)#- z=fmE5GiV?-&3kcjM1+XG7&tSq;q9Oi4NUuRrIpoyp*Fn&nVNFdUuGQ_g)g>VzXGdneB7`;!aTUE$t* z5iH+8XPxrYl)vFo~+vmcU-2) zq!6R(T0SsoDnB>Mmvr^k*{34_BAK+I=DAGu){p)(ndZqOFT%%^_y;X(w3q-L``N<6 zw9=M zoQ8Lyp>L_j$T20UUUCzYn2-xdN}{e@$8-3vLDN?GbfJ>7*qky{n!wC#1NcYQr~d51 zy;H!am=EI#*S&TCuP{FA3CO)b0AAiN*tLnDbvKwxtMw-l;G2T@EGH)YU?-B`+Y=!$ zypvDn@5V1Tr~y~U0s$ee2+CL3xm_BmxD3w}d_Pd@S%ft#v~_j;6sC6cy%E|dJy@wj z`+(YSh2CrXMxI;yVy*=O@DE2~i5$>nuzZ$wYHs$y`TAtB-ck4fQ!B8a;M=CxY^Nf{ z+UQhn0jopOzvbl(uZZ1R-(IFaprC$9hYK~b=57@ zAJ8*pH%|Tjotzu5(oxZyCQ{5MAw+6L4)NI!9H&XM$Eui-DIoDa@GpNI=I4}m>Hr^r zZjT?xDOea}7cq+TP#wK1p3}sbMK{BV%(h`?R#zNGIP+7u@dV5#zyMau+w}VC1uQ@p zrFUjrJAx6+9%pMhv(IOT52}Dq{B9njh_R`>&j&5Sbub&r*hf4es)_^FTYdDX$8NRk zMi=%I`)hN@N9>X&Gu2RmjKVsUbU>TRUM`gwd?CrL*0zxu-g#uNNnnicYw=kZ{7Vz3 zULaFQ)H=7%Lm5|Z#k?<{ux{o4T{v-e zTLj?F(_qp{FXUzOfJxEyKO15Nr!LQYHF&^jMMBs z`P-}WCyUYIv>K`~)oP$Z85zZr4gw>%aug1V1A)1H(r!8l&5J?ia1x_}Wh)FXTxZUE zs=kI}Ix2cK%Bi_Hc4?mF^m`sr6m8M(n?E+k7Tm^Gn}Kf= zfnqoyVU^*yLypz?s+-XV5(*oOBwn-uhwco5b(@B(hD|vtT8y7#W{>RomA_KchB&Cd zcFNAD9mmqR<341sq+j+2Ra}N5-3wx5IZqg6Wmi6CNO#pLvYPGNER}Q8+PjvIJ42|n zc5r@T*p)R^U=d{cT2AszQcC6SkWiE|hdK)m{7ul^mU+ED1R8G#)#X}A9JSP_ubF5p z8Xxcl;jlGjPwow^p+-f_-a~S;$lztguPE6SceeUCfmRo=Qg zKHTY*O_ z;pXl@z&7hniVYVbGgp+Nj#XP^Aln2T!D*{(Td8h{8Dc?C)KFfjPybiC`Va?Rf)X>y z;5?B{bAhPtbmOMUsAy2Y0RNDQ3K`v`gq)#ns_C&ec-)6cq)d^{5938T`Sr@|7nLl; zcyewuiSUh7Z}q8iIJ@$)L3)m)(D|MbJm_h&tj^;iNk%7K-YR}+J|S?KR|29K?z-$c z<+C4uA43yfSWBv*%z=-0lI{ev`C6JxJ};A5N;lmoR(g{4cjCEn33 z-ef#x^uc%cM-f^_+*dzE?U;5EtEe;&8EOK^K}xITa?GH`tz2F9N$O5;)`Uof4~l+t z#n_M(KkcVP*yMYlk_~5h89o zlf#^qjYG8Wovx+f%x7M7_>@r7xaXa2uXb?_*=QOEe_>ErS(v5-i)mrT3&^`Oqr4c9 zDjP_6T&NQMD`{l#K&sHTm@;}ed_sQ88X3y`ON<=$<8Qq{dOPA&WAc2>EQ+U8%>yWR zK%(whl8tB;{C)yRw|@Gn4%RhT=bbpgMZ6erACc>l5^p)9tR`(2W-D*?Ph6;2=Fr|G- zdF^R&aCqyxqWy#P7#G8>+aUG`pP*ow93N=A?pA=aW0^^+?~#zRWcf_zlKL8q8-80n zqGUm=S8+%4_LA7qrV4Eq{FHm9#9X15%ld`@UKyR7uc1X*>Ebr0+2yCye6b?i=r{MPoqnTnYnq z^?HWgl+G&@OcVx4$(y;{m^TkB5Tnhx2O%yPI=r*4H2f_6Gfyasq&PN^W{#)_Gu7e= zVHBQ8R5W6j;N6P3O(jsRU;hkmLG(Xs_8=F&xh@`*|l{~0OjUVlgm z7opltSHg7Mb%mYamGs*v1-#iW^QMT**f+Nq*AzIvFT~Ur3KTD26OhIw1WQsL(6nGg znHUo-4e15cXBIiyqN};5ydNYJ6zznECVVR44%(P0oW!yQ!YH)FPY?^k{IrtrLo7Zo`?sg%%oMP9E^+H@JLXicr zi?eoI?LODRPcMLl90MH32rf8btf69)ZE~&4d%(&D{C45egC6bF-XQ;6QKkbmqW>_H z{86XDZvjiN2wr&ZPfi;^SM6W+IP0);50m>qBhzx+docpBkkiY@2bSvtPVj~E`CfEu zhQG5G>~J@dni5M5Jmv7GD&@%UR`k3ru-W$$onI259jM&nZ)*d3QFF?Mu?{`+nVzkx z=R*_VH=;yeU?9TzQ3dP)q;P)4sAo&k;{*Eky1+Z!10J<(cJC3zY9>bP=znA=<-0RR zMnt#<9^X7BQ0wKVBV{}oaV=?JA=>R0$az^XE%4WZcA^Em>`m_obQyKbmf-GA;!S-z zK5+y5{xbkdA?2NgZ0MQYF-cfOwV0?3Tzh8tcBE{u%Uy?Ky4^tn^>X}p>4&S(L7amF zpWEio8VBNeZ=l!%RY>oVGOtZh7<>v3?`NcHlYDPUBRzgg z0OXEivCkw<>F(>1x@Zk=IbSOn+frQ^+jI*&qdtf4bbydk-jgVmLAd?5ImK+Sigh?X zgaGUlbf^b-MH2@QbqCawa$H1Vb+uhu{zUG9268pa{5>O&Vq8__Xk5LXDaR1z$g;s~;+Ae82wq#l;wo08tX(9uUX6NJWq1vZLh3QbP$# zL`udY|Qp*4ER`_;$%)2 zmcJLj|FD`(;ts0bD{}Ghq6UAVpEm#>j`S$wHi0-D_|)bEZ}#6) zIiqH7Co;TB`<6KrZi1SF9=lO+>-_3=Hm%Rr7|Zu-EzWLSF{9d(H1v*|UZDWiiqX3} zmx~oQ6%9~$=KjPV_ejzz7aPSvTo+3@-a(OCCoF_u#2dHY&I?`nk zQ@t8#epxAv@t=RUM09u?qnPr6=Y5Pj;^4=7GJ`2)Oq~H)2V)M1sC^S;w?hOB|0zXT zQdf8$)jslO>Q}(4RQ$DPUF#QUJm-k9ysZFEGi9xN*_KqCs9Ng(&<;XONBDe1Joku? z*W!lx(i&gvfXZ4U(AE@)c0FI2UqrFLOO$&Yic|`L;Vyy-kcm49hJ^Mj^H9uY8Fdm2 z?=U1U_5GE_JT;Tx$2#I3rAAs(q@oebIK=19a$N?HNQ4jw0ljtyGJ#D}z3^^Y=hf^Bb--297h6LQxi0-`TB|QY2QPg92TAq$cEQdWE ze)ltSTVMYe0K4wte6;^tE+^>|a>Hit_3QDlFo!3Jd`GQYTwlR#{<^MzG zK!vW&))~RTKq4u29bc<+VOcg7fdorq-kwHaaCQe6tLB{|gW1_W_KtgOD0^$^|`V4C# z*D_S9Dt_DIxpjk3my5cBFdiYaq||#0&0&%_LEN}BOxkb3v*d$4L|S|z z!cZZmfe~_Y`46v=zul=aixZTQCOzb(jx>8&a%S%!(;x{M2!*$od2!Pwfs>RZ-a%GOZdO88rS)ZW~{$656GgW)$Q=@!x;&Nn~!K)lr4gF*%qVO=hlodHA@2)keS2 zC}7O=_64#g&=zY?(zhzFO3)f5=+`dpuyM!Q)zS&otpYB@hhn$lm*iK2DRt+#1n|L%zjM}nB*$uAY^2JIw zV_P)*HCVq%F))^)iaZD#R9n^{sAxBZ?Yvi1SVc*`;8|F2X%bz^+s=yS&AXjysDny)YaU5RMotF-tt~FndTK ziRve_5b!``^ZRLG_ks}y_ye0PKyKQSsQCJuK5()b2ThnKPFU?An4;dK>)T^4J+XjD zEUsW~H?Q&l%K4<1f5^?|?lyCQe(O3?!~OU{_Wxs#|Ff8?a_WPQUKvP7?>1()Cy6oLeA zjEF^d#$6Wb${opCc^%%DjOjll%N2=GeS6D-w=Ap$Ux2+0v#s#Z&s6K*)_h{KFfgKjzO17@p1nKcC4NIgt+3t}&}F z@cV; zZ1r#~?R@ZdSwbFNV(fFl2lWI(Zf#nxa<6f!nBZD>*K)nI&Fun@ngq@Ge!N$O< zySt*mY&0moUXNPe~Fg=%gIu)tJ;asscQ!-AujR@VJBRoNZNk;z4hs4T>Ud!y=1NwGs-k zlTNeBOe}=)Epw=}+dfX;kZ32h$t&7q%Xqdt-&tlYEWc>>c3(hVylsG{Ybh_M8>Cz0ZT_6B|3!_(RwEJus9{;u-mq zW|!`{BCtnao4;kCT8cr@yeV~#rf76=%QQs(J{>Mj?>aISwp3{^BjBO zLV>XSRK+o=oVDBnbv?Y@iK)MiFSl{5HLN@k%SQZ}yhPiu_2jrnI?Kk?HtCv>wN$OM zSe#}2@He9bDZ27hX_fZey=64#SNU#1~=icK`D>a;V-&Km>V6ZdVNj7d2 z-NmAoOQm_aIZ2lXpJhlUeJ95eZt~4_S zIfrDs)S$4UjyxKSaTi#9KGs2P zfSD>(y~r+bU4*#|r`q+be_dopJzKK5JNJ#rR978ikHyJKD>SD@^Bk$~D0*U38Y*IpYcH>aaMdZq|YzQ-Ixd(_KZK!+VL@MWGl zG!k=<%Y-KeqK%``uhx}0#X^@wS+mX@6Ul@90#nmYaKh}?uw>U;GS4fn3|X%AcV@iY z8v+ePk)HxSQ7ZYDtlYj#zJ?5uJ8CeCg3efmc#|a%2=u>+vrGGRg$S@^mk~0f;mIu! zWMA13H1<@hSOVE*o0S5D8y=}RiL#jQpUq42D}vW$z*)VB*FB%C?wl%(3>ANaY)bO@ zW$VFutemwy5Q*&*9HJ603;mJJkB$qp6yxNOY0o_4*y?2`qbN{m&*l{)YMG_QHXXa2 z+hTmlA;=mYwg{Bfusl zyF&}ib2J;#q5tN^e)D62fWW*Lv;Rnb3GO-JVtYG0CgR4jGujFo$Waw zSNLhc{>P~>{KVZE1Vl1!z)|HFuN@J7{`xIp_)6>*5Z27BHg6QIgqLqDJTmKDM+ON* zK0Fh=EG`q13l z+m--9UH0{ZGQ%j=OLO8G2WM*tgfY}bV~>3Grcrpehjj z6Xe<$gNJyD8td3EhkHjpKk}7?k55Tu7?#;5`Qcm~ki;BeOlNr+#PK{kjV>qfE?1No zMA07}b>}Dv!uaS8Hym0TgzxBxh$*RX+Fab6Gm02!mr6u}f$_G4C|^GSXJMniy^b`G z74OC=83m0G7L_dS99qv3a0BU({t$zHQsB-RI_jn1^uK9ka_%aQuE2+~J2o!7`735Z zb?+sTe}Gd??VEkz|KAPMfj(1b{om89p5GIJ^#Aics_6DD%WnNGWAW`I<7jT|Af|8g zZA0^)`p8i#oBvX2|I&`HC8Pn&0>jRuMF4i0s=}2NYLmgkZb=0w9tvpnGiU-gTUQhJ zR6o4W6ZWONuBZAiN77#7;TR1^RKE(>>OL>YU`Yy_;5oj<*}ac99DI(qGCtn6`949f ziMpY4k>$aVfffm{dNH=-=rMg|u?&GIToq-u;@1-W&B2(UOhC-O2N5_px&cF-C^tWp zXvChm9@GXEcxd;+Q6}u;TKy}$JF$B`Ty?|Y3tP$N@Rtoy(*05Wj-Ks32|2y2ZM>bM zi8v8E1os!yorR!FSeP)QxtjIKh=F1ElfR8U7StE#Ika;h{q?b?Q+>%78z^>gTU5+> zxQ$a^rECmETF@Jl8fg>MApu>btHGJ*Q99(tMqsZcG+dZ6Yikx7@V09jWCiQH&nnAv zY)4iR$Ro223F+c3Q%KPyP9^iyzZsP%R%-i^MKxmXQHnW6#6n7%VD{gG$E;7*g86G< zu$h=RN_L2(YHO3@`B<^L(q@^W_0#U%mLC9Q^XEo3LTp*~(I%?P_klu-c~WJxY1zTI z^PqntLIEmdtK~E-v8yc&%U+jVxW5VuA{VMA4Ru1sk#*Srj0Pk#tZuXxkS=5H9?8eb z)t38?JNdP@#xb*yn=<*_pK9^lx%;&yH6XkD6-JXgdddZty8@Mfr9UpGE!I<37ZHUe z_Rd+LKsNH^O)+NW8Ni-V%`@J_QGKA9ZCAMSnsN>Ych9VW zCE7R_1FVy}r@MlkbxZ*TRIGXu`ema##OkqCM9{wkWQJg^%3H${!vUT&vv2250jAWN zw=h)C!b2s`QbWhBMSIYmWqZ_~ReRW;)U#@C&ThctSd_V!=HA=kdGO-Hl57an|M1XC?~3f0{7pyjWY}0mChU z2Fj2(B*r(UpCKm-#(2(ZJD#Y|Or*Vc5VyLpJ8gO1;fCm@EM~{DqpJS5FaZ5%|ALw) zyumBl!i@T57I4ITCFmdbxhaOYud}i!0YkdiNRaQ%5$T5>*HRBhyB~<%-5nj*b8=i= z(8g(LA50%0Zi_eQe}Xypk|bt5e6X{aI^jU2*c?!p*$bGk=?t z+17R){lx~Z{!B34Zip~|A;8l@%*Gc}kT|kC0*Ny$&fI3@%M! zqk_zvN}7bM`x@jqFOtaxI?*^Im5ix@=`QEv;__i;Tek-&7kGm6yP17QANVL>*d0B=4>i^;HKb$k8?DYFMr38IX4azK zBbwjF%$>PqXhJh=*7{zH5=+gi$!nc%SqFZlwRm zmpctOjZh3bwt!Oc>qVJhWQf>`HTwMH2ibK^eE*j!&Z`-bs8=A`Yvnb^?p;5+U=Fb8 z@h>j_3hhazd$y^Z-bt%3%E3vica%nYnLxW+4+?w{%|M_=w^04U{a6^22>M_?{@mXP zS|Qjcn4&F%WN7Z?u&I3fU(UQVw4msFehxR*80dSb=a&UG4zDQp&?r2UGPy@G?0FbY zVUQ?uU9-c;f9z06$O5FO1TOn|P{pLcDGP?rfdt`&uw|(Pm@$n+A?)8 zP$nG(VG&aRU*(_5z#{+yVnntu`6tEq>%9~n^*ao}`F6ph_@6_8|AfAXtFfWee_14` zKKURYV}4}=UJmxv7{RSz5QlwZtzbYQs0;t3?kx*7S%nf-aY&lJ@h?-BAn%~0&&@j) zQd_6TUOLXErJ`A3vE?DJIbLE;s~s%eVt(%fMzUq^UfZV9c?YuhO&6pwKt>j(=2CkgTNEq7&c zfeGN+%5DS@b9HO>zsoRXv@}(EiA|t5LPi}*R3?(-=iASADny<{D0WiQG>*-BSROk4vI6%$R>q64J&v-T+(D<_(b!LD z9GL;DV;;N3!pZYg23mcg81tx>7)=e%f|i{6Mx0GczVpc}{}Mg(W_^=Wh0Rp+xXgX` z@hw|5=Je&nz^Xa>>vclstYt;8c2PY)87Ap;z&S&`yRN>yQVV#K{4&diVR7Rm;S{6m z6<+;jwbm`==`JuC6--u6W7A@o4&ZpJV%5+H)}toy0afF*!)AaG5=pz_i9}@OG%?$O z2cec6#@=%xE3K8;^ps<2{t4SnqH+#607gAHP-G4^+PBiC1s>MXf&bQ|Pa;WBIiErV z?3VFpR9JFl9(W$7p3#xe(Bd?Z93Uu~jHJFo7U3K_x4Ej-=N#=a@f;kPV$>;hiN9i9 z<6elJl?bLI$o=|d6jlihA4~bG;Fm2eEnlGxZL`#H%Cdes>uJfMJ4>@1SGGeQ81DwxGxy7L5 zm05Ik*WpSgZvHh@Wpv|2i|Y#FG?Y$hbRM5ZF0Z7FB3cY0+ei#km9mDSPI}^!<<`vr zuv$SPg2vU{wa)6&QMY)h1hbbxvR2cc_6WcWR`SH& z&KuUQcgu}!iW2Wqvp~|&&LSec9>t(UR_|f$;f-fC&tSO-^-eE0B~Frttnf+XN(#T) z^PsuFV#(pE#6ztaI8(;ywN%CtZh?w&;_)w_s@{JiA-SMjf&pQk+Bw<}f@Q8-xCQMwfaf zMgHsAPU=>>Kw~uDFS(IVRN{$ak(SV(hrO!UqhJ?l{lNnA1>U24!=>|q_p404Xd>M# z7?lh^C&-IfeIr`Dri9If+bc%oU0?|Rh8)%BND5;_9@9tuM)h5Kcw6}$Ca7H_n)nOf0pd`boCXItb`o11 zb`)@}l6I_h>n+;`g+b^RkYs7;voBz&Gv6FLmyvY|2pS)z#P;t8k;lS>49a$XeVDc4 z(tx2Pe3N%Gd(!wM`E7WRBZy)~vh_vRGt&esDa0NCua)rH#_39*H0!gIXpd>~{rGx+ zJKAeXAZ-z5n=mMVqlM5Km;b;B&KSJlScD8n?2t}kS4Wf9@MjIZSJ2R?&=zQn zs_`=+5J$47&mP4s{Y{TU=~O_LzSrXvEP6W?^pz<#Y*6Fxg@$yUGp31d(h+4x>xpb< zH+R639oDST6F*0iH<9NHC^Ep*8D4-%p2^n-kD6YEI<6GYta6-I;V^ZH3n5}syTD=P z3b6z=jBsdP=FlXcUe@I|%=tY4J_2j!EVNEzph_42iO3yfir|Dh>nFl&Lu9!;`!zJB zCis9?_(%DI?$CA(00pkzw^Up`O;>AnPc(uE$C^a9868t$m?5Q)CR%!crI$YZpiYK6m= z!jv}82He`QKF;10{9@roL2Q7CF)OeY{~dBp>J~X#c-Z~{YLAxNmn~kWQW|2u!Yq00 zl5LKbzl39sVCTpm9eDW_T>Z{x@s6#RH|P zA~_lYas7B@SqI`N=>x50Vj@S)QxouKC(f6Aj zz}7e5e*5n?j@GO;mCYEo^Jp_*BmLt3!N)(T>f#L$XHQWzZEVlJo(>qH@7;c%fy zS-jm^Adju9Sm8rOKTxfTU^!&bg2R!7C_-t+#mKb_K?0R72%26ASF;JWA_prJ8_SVW zOSC7C&CpSrgfXRp8r)QK34g<~!1|poTS7F;)NseFsbwO$YfzEeG3oo!qe#iSxQ2S# z1=Fxc9J;2)pCab-9o-m8%BLjf(*mk#JJX3k9}S7Oq)dV0jG)SOMbw7V^Z<5Q0Cy$< z^U0QUVd4(96W03OA1j|x%{sd&BRqIERDb6W{u1p1{J(a;fd6lnWzjeS`d?L3-0#o7 z{Qv&L7!Tm`9|}u=|IbwS_jgH(_V@o`S*R(-XC$O)DVwF~B&5c~m!zl14ydT6sK+Ly zn+}2hQ4RTC^8YvrQ~vk$f9u=pTN{5H_yTOcza9SVE&nt_{`ZC8zkmFji=UyD`G4~f zUfSTR=Kju>6u+y&|Bylb*W&^P|8fvEbQH3+w*DrKq|9xMzq2OiZyM=;(?>~4+O|jn zC_Et05oc>e%}w4ye2Fm%RIR??VvofwZS-}BL@X=_4jdHp}FlMhW_IW?Zh`4$z*Wr!IzQHa3^?1|);~VaWmsIcmc6 zJs{k0YW}OpkfdoTtr4?9F6IX6$!>hhA+^y_y@vvA_Gr7u8T+i-< zDX(~W5W{8mfbbM-en&U%{mINU#Q8GA`byo)iLF7rMVU#wXXY`a3ji3m{4;x53216i z`zA8ap?>_}`tQj7-%$K78uR}R$|@C2)qgop$}o=g(jOv0ishl!E(R73N=i0~%S)6+ z1xFP7|H0yt3Z_Re*_#C2m3_X{=zi1C&3CM7e?9-Y5lCtAlA%RFG9PDD=Quw1dfYnZ zdUL)#+m`hKx@PT`r;mIx_RQ6Txbti+&;xQorP;$H=R2r)gPMO9>l+!p*Mt04VH$$M zSLwJ81IFjQ5N!S#;MyBD^IS`2n04kuYbZ2~4%3%tp0jn^**BZQ05ELp zY%yntZ=52s6U5Y93Aao)v~M3y?6h7mZcVGp63pK*d&!TRjW99rUU;@s#3kYB76Bs$|LRwkH>L!0Xe zE=dz1o}phhnOVYZFsajQsRA^}IYZnk9Wehvo>gHPA=TPI?2A`plIm8=F1%QiHx*Zn zi)*Y@)$aXW0v1J|#+R2=$ysooHZ&NoA|Wa}htd`=Eud!(HD7JlT8ug|yeBZmpry(W z)pS>^1$N#nuo3PnK*>Thmaxz4pLcY?PP2r3AlhJ7jw(TI8V#c}>Ym;$iPaw+83L+* z!_QWpYs{UWYcl0u z(&(bT0Q*S_uUX9$jC;Vk%oUXw=A-1I+!c18ij1CiUlP@pfP9}CHAVm{!P6AEJ(7Dn z?}u#}g`Q?`*|*_0Rrnu8{l4PP?yCI28qC~&zlwgLH2AkfQt1?B#3AOQjW&10%@@)Q zDG?`6$8?Nz(-sChL8mRs#3z^uOA>~G=ZIG*mgUibWmgd{a|Tn4nkRK9O^37E(()Q% zPR0#M4e2Q-)>}RSt1^UOCGuv?dn|IT3#oW_$S(YR+jxAzxCD_L25p_dt|^>g+6Kgj zJhC8n)@wY;Y7JI6?wjU$MQU|_Gw*FIC)x~^Eq1k41BjLmr}U>6#_wxP0-2Ka?uK14u5M-lAFSX$K1K{WH!M1&q}((MWWUp#Uhl#n_yT5dFs4X`>vmM& z*1!p0lACUVqp&sZG1GWATvZEENs^0_7Ymwem~PlFN3hTHVBv(sDuP;+8iH07a)s(# z%a7+p1QM)YkS7>kbo${k2N1&*%jFP*7UABJ2d||c!eSXWM*<4(_uD7;1XFDod@cT$ zP>IC%^fbC${^QrUXy$f)yBwY^g@}}kngZKa1US!lAa+D=G4wklukaY8AEW%GL zh40pnuv*6D>9`_e14@wWD^o#JvxYVG-~P)+<)0fW zP()DuJN?O*3+Ab!CP-tGr8S4;JN-Ye^9D%(%8d{vb_pK#S1z)nZzE^ezD&%L6nYbZ z*62>?u)xQe(Akd=e?vZbyb5)MMNS?RheZDHU?HK<9;PBHdC~r{MvF__%T)-9ifM#cR#2~BjVJYbA>xbPyl9yNX zX)iFVvv-lfm`d?tbfh^j*A|nw)RszyD<#e>llO8X zou=q3$1|M@Ob;F|o4H0554`&y9T&QTa3{yn=w0BLN~l;XhoslF-$4KGNUdRe?-lcV zS4_WmftU*XpP}*wFM^oKT!D%_$HMT#V*j;9weoOq0mjbl1271$F)`Q(C z76*PAw3_TE{vntIkd=|(zw)j^!@j ^tV@s0U~V+mu)vv`xgL$Z9NQLnuRdZ;95D|1)!0Aybwv}XCE#xz1k?ZC zxAU)v@!$Sm*?)t2mWrkevNFbILU9&znoek=d7jn*k+~ptQ)6z`h6e4B&g?Q;IK+aH z)X(BH`n2DOS1#{AJD-a?uL)@Vl+`B=6X3gF(BCm>Q(9+?IMX%?CqgpsvK+b_de%Q> zj-GtHKf!t@p2;Gu*~#}kF@Q2HMevg~?0{^cPxCRh!gdg7MXsS}BLtG_a0IY0G1DVm z2F&O-$Dzzc#M~iN`!j38gAn`6*~h~AP=s_gy2-#LMFoNZ0<3q+=q)a|4}ur7F#><%j1lnr=F42Mbti zi-LYs85K{%NP8wE1*r4Mm+ZuZ8qjovmB;f##!E*M{*A(4^~vg!bblYi1M@7tq^L8- zH7tf_70iWXqcSQgENGdEjvLiSLicUi3l0H*sx=K!!HLxDg^K|s1G}6Tam|KBV>%YeU)Q>zxQe;ddnDTWJZ~^g-kNeycQ?u242mZs`i8cP)9qW`cwqk)Jf?Re0=SD=2z;Gafh(^X-=WJ$i7Z9$Pao56bTwb+?p>L3bi9 zP|qi@;H^1iT+qnNHBp~X>dd=Us6v#FPDTQLb9KTk%z{&OWmkx3uY(c6JYyK3w|z#Q zMY%FPv%ZNg#w^NaW6lZBU+}Znwc|KF(+X0RO~Q6*O{T-P*fi@5cPGLnzWMSyoOPe3 z(J;R#q}3?z5Ve%crTPZQFLTW81cNY-finw!LH9wr$(C)p_@v?(y#b-R^Pv!}_#7t+A?pHEUMY zoQZIwSETTKeS!W{H$lyB1^!jn4gTD{_mgG?#l1Hx2h^HrpCXo95f3utP-b&%w80F} zXFs@Jp$lbIL64@gc?k*gJ;OForPaapOH7zNMB60FdNP<*9<@hEXJk9Rt=XhHR-5_$Ck-R?+1py&J3Y9^sBBZuj?GwSzua;C@9)@JZpaI zE?x6{H8@j9P06%K_m%9#nnp0Li;QAt{jf-7X%Pd2jHoI4As-9!UR=h6Rjc z!3{UPWiSeLG&>1V5RlM@;5HhQW_&-wL2?%k@dvRS<+@B6Yaj*NG>qE5L*w~1ATP$D zmWu6(OE=*EHqy{($~U4zjxAwpPn42_%bdH9dMphiUU|) z*+V@lHaf%*GcXP079>vy5na3h^>X=n;xc;VFx)`AJEk zYZFlS#Nc-GIHc}j06;cOU@ zAD7Egkw<2a8TOcfO9jCp4U4oI*`|jpbqMWo(={gG3BjuM3QTGDG`%y|xithFck}0J zG}N#LyhCr$IYP`#;}tdm-7^9=72+CBfBsOZ0lI=LC_a%U@(t3J_I1t(UdiJ^@NubM zvvA0mGvTC%{fj53M^|Ywv$KbW;n8B-x{9}Z!K6v-tw&Xe_D2{7tX?eVk$sA*0826( zuGz!K7$O#;K;1w<38Tjegl)PmRso`fc&>fAT5s z7hzQe-_`lx`}2=c)jz6;yn(~F6#M@z_7@Z(@GWbIAo6A2&;aFf&>CVHpqoPh5#~=G zav`rZ3mSL2qwNL+Pg>aQv;%V&41e|YU$!fQ9Ksle!XZERpjAowHtX zi#0lnw{(zmk&}t`iFEMmx-y7FWaE*vA{Hh&>ieZg{5u0-3@a8BY)Z47E`j-H$dadu zIP|PXw1gjO@%aSz*O{GqZs_{ke|&S6hV{-dPkl*V|3U4LpqhG0eVdqfeNX28hrafI zE13WOsRE|o?24#`gQJs@v*EwL{@3>Ffa;knvI4@VEG2I>t-L(KRS0ShZ9N!bwXa}e zI0}@2#PwFA&Y9o}>6(ZaSaz>kw{U=@;d{|dYJ~lyjh~@bBL>n}#@KjvXUOhrZ`DbnAtf5bz3LD@0RpmAyC-4cgu<7rZo&C3~A_jA*0)v|Ctcdu} zt@c7nQ6hSDC@76c4hI&*v|5A0Mj4eQ4kVb0$5j^*$@psB zdouR@B?l6E%a-9%i(*YWUAhxTQ(b@z&Z#jmIb9`8bZ3Um3UW!@w4%t0#nxsc;*YrG z@x$D9Yj3EiA(-@|IIzi@!E$N)j?gedGJpW!7wr*7zKZwIFa>j|cy<(1`VV_GzWN=1 zc%OO)o*RRobvTZE<9n1s$#V+~5u8ZwmDaysD^&^cxynksn!_ypmx)Mg^8$jXu5lMo zK3K_8GJh#+7HA1rO2AM8cK(#sXd2e?%3h2D9GD7!hxOEKJZK&T`ZS0e*c9c36Y-6yz2D0>Kvqy(EuiQtUQH^~M*HY!$e z20PGLb2Xq{3Ceg^sn+99K6w)TkprP)YyNU(+^PGU8}4&Vdw*u;(`Bw!Um76gL_aMT z>*82nmA8Tp;~hwi0d3S{vCwD};P(%AVaBr=yJ zqB?DktZ#)_VFh_X69lAHQw(ZNE~ZRo2fZOIP;N6fD)J*3u^YGdgwO(HnI4pb$H#9) zizJ<>qI*a6{+z=j+SibowDLKYI*Je2Y>~=*fL@i*f&8**s~4l&B&}$~nwhtbOTr=G zFx>{y6)dpJPqv={_@*!q0=jgw3^j`qi@!wiWiT_$1`SPUgaG&9z9u9=m5C8`GpMaM zyMRSv2llS4F}L?233!)f?mvcYIZ~U z7mPng^=p)@Z*Fp9owSYA`Fe4OjLiJ`rdM`-U(&z1B1`S`ufK_#T@_BvenxDQU`deH$X5eMVO=;I4EJjh6?kkG2oc6AYF6|(t)L0$ukG}Zn=c+R`Oq;nC)W^ z{ek!A?!nCsfd_5>d&ozG%OJmhmnCOtARwOq&p!FzWl7M))YjqK8|;6sOAc$w2%k|E z`^~kpT!j+Y1lvE0B)mc$Ez_4Rq~df#vC-FmW;n#7E)>@kMA6K30!MdiC19qYFnxQ* z?BKegU_6T37%s`~Gi2^ewVbciy-m5%1P3$88r^`xN-+VdhhyUj4Kzg2 zlKZ|FLUHiJCZL8&<=e=F2A!j@3D@_VN%z?J;uw9MquL`V*f^kYTrpoWZ6iFq00uO+ zD~Zwrs!e4cqGedAtYxZ76Bq3Ur>-h(m1~@{x@^*YExmS*vw9!Suxjlaxyk9P#xaZK z)|opA2v#h=O*T42z>Mub2O3Okd3GL86KZM2zlfbS z{Vps`OO&3efvt->OOSpMx~i7J@GsRtoOfQ%vo&jZ6^?7VhBMbPUo-V^Znt%-4k{I# z8&X)=KY{3lXlQg4^FH^{jw0%t#2%skLNMJ}hvvyd>?_AO#MtdvH;M^Y?OUWU6BdMX zJ(h;PM9mlo@i)lWX&#E@d4h zj4Z0Czj{+ipPeW$Qtz_A52HA<4$F9Qe4CiNQSNE2Q-d1OPObk4?7-&`={{yod5Iy3kB=PK3%0oYSr`Gca120>CHbC#SqE*ivL2R(YmI1A|nAT?JmK*2qj_3p#?0h)$#ixdmP?UejCg9%AS2 z8I(=_QP(a(s)re5bu-kcNQc-&2{QZ%KE*`NBx|v%K2?bK@Ihz_e<5Y(o(gQ-h+s&+ zjpV>uj~?rfJ!UW5Mop~ro^|FP3Z`@B6A=@f{Wn78cm`)3&VJ!QE+P9&$;3SDNH>hI z_88;?|LHr%1kTX0t*xzG-6BU=LRpJFZucRBQ<^zy?O5iH$t>o}C}Fc+kM1EZu$hm% zTTFKrJkXmCylFgrA;QAA(fX5Sia5TNo z?=Ujz7$Q?P%kM$RKqRQisOexvV&L+bolR%`u`k;~!o(HqgzV9I6w9|g*5SVZN6+kT9H$-3@%h%k7BBnB zPn+wmPYNG)V2Jv`&$LoI*6d0EO^&Nh`E* z&1V^!!Szd`8_uf%OK?fuj~! z%p9QLJ?V*T^)72<6p1ONqpmD?Wm((40>W?rhjCDOz?#Ei^sXRt|GM3ULLnoa8cABQ zA)gCqJ%Q5J%D&nJqypG-OX1`JLT+d`R^|0KtfGQU+jw79la&$GHTjKF>*8BI z0}l6TC@XB6`>7<&{6WX2kX4k+0SaI`$I8{{mMHB}tVo*(&H2SmZLmW* z+P8N>(r}tR?f!O)?)df>HIu>$U~e~tflVmwk*+B1;TuqJ+q_^`jwGwCbCgSevBqj$ z<`Fj*izeO)_~fq%wZ0Jfvi6<3v{Afz;l5C^C7!i^(W>%5!R=Ic7nm(0gJ~9NOvHyA zqWH2-6w^YmOy(DY{VrN6ErvZREuUMko@lVbdLDq*{A+_%F>!@6Z)X9kR1VI1+Ler+ zLUPtth=u~23=CqZoAbQ`uGE_91kR(8Ie$mq1p`q|ilkJ`Y-ob_=Nl(RF=o7k{47*I)F%_XMBz9uwRH8q1o$TkV@8Pwl zzi`^7i;K6Ak7o58a_D-V0AWp;H8pSjbEs$4BxoJkkC6UF@QNL)0$NU;Wv0*5 z0Ld;6tm7eR%u=`hnUb)gjHbE2cP?qpo3f4w%5qM0J*W_Kl6&z4YKX?iD@=McR!gTyhpGGYj!ljQm@2GL^J70`q~4CzPv@sz`s80FgiuxjAZ zLq61rHv1O>>w1qOEbVBwGu4%LGS!!muKHJ#JjfT>g`aSn>83Af<9gM3XBdY)Yql|{ zUds}u*;5wuus)D>HmexkC?;R&*Z`yB4;k;4T*(823M&52{pOd1yXvPJ3PPK{Zs>6w zztXy*HSH0scZHn7qIsZ8y-zftJ*uIW;%&-Ka0ExdpijI&xInDg-Bv-Q#Islcbz+R! zq|xz?3}G5W@*7jSd`Hv9q^5N*yN=4?Lh=LXS^5KJC=j|AJ5Y(f_fC-c4YQNtvAvn|(uP9@5Co{dL z?7|=jqTzD8>(6Wr&(XYUEzT~-VVErf@|KeFpKjh=v51iDYN_`Kg&XLOIG;ZI8*U$@ zKig{dy?1H}UbW%3jp@7EVSD>6c%#abQ^YfcO(`)*HuvNc|j( zyUbYozBR15$nNU$0ZAE%ivo4viW?@EprUZr6oX=4Sc!-WvrpJdF`3SwopKPyX~F>L zJ>N>v=_plttTSUq6bYu({&rkq)d94m5n~Sk_MO*gY*tlkPFd2m=Pi>MK)ObVV@Sgs zmXMNMvvcAuz+<$GLR2!j4w&;{)HEkxl{$B^*)lUKIn&p5_huD6+%WDoH4`p}9mkw$ zXCPw6Y7tc%rn$o_vy>%UNBC`0@+Ih-#T05AT)ooKt?94^ROI5;6m2pIM@@tdT=&WP z{u09xEVdD}{(3v}8AYUyT82;LV%P%TaJa%f)c36?=90z>Dzk5mF2}Gs0jYCmufihid8(VFcZWs8#59;JCn{!tHu5kSBbm zL`F{COgE01gg-qcP2Lt~M9}mALg@i?TZp&i9ZM^G<3`WSDh}+Ceb3Q!QecJ|N;Xrs z{wH{D8wQ2+mEfBX#M8)-32+~q4MRVr1UaSPtw}`iwx@x=1Xv-?UT{t}w}W(J&WKAC zrZ%hssvf*T!rs}}#atryn?LB=>0U%PLwA9IQZt$$UYrSw`7++}WR7tfE~*Qg)vRrM zT;(1>Zzka?wIIz8vfrG86oc^rjM@P7^i8D~b(S23AoKYj9HBC(6kq9g`1gN@|9^xO z{~h zbxGMHqGZ@eJ17bgES?HQnwp|G#7I>@p~o2zxWkgZUYSUeB*KT{1Q z*J3xZdWt`eBsA}7(bAHNcMPZf_BZC(WUR5B8wUQa=UV^e21>|yp+uop;$+#JwXD!> zunhJVCIKgaol0AM_AwJNl}_k&q|uD?aTE@{Q*&hxZ=k_>jcwp}KwG6mb5J*pV@K+- zj*`r0WuEU_8O=m&1!|rj9FG7ad<2px63;Gl z9lJrXx$~mPnuiqIH&n$jSt*ReG}1_?r4x&iV#3e_z+B4QbhHwdjiGu^J3vcazPi`| zaty}NFSWe=TDry*a*4XB)F;KDI$5i9!!(5p@5ra4*iW;FlGFV0P;OZXF!HCQ!oLm1 zsK+rY-FnJ?+yTBd0}{*Y6su|hul)wJ>RNQ{eau*;wWM{vWM`d0dTC-}Vwx6@cd#P? zx$Qyk^2*+_ZnMC}q0)+hE-q)PKoox#;pc%DNJ&D5+if6X4j~p$A7-s&AjDkSEV)aM z(<3UOw*&f)+^5F0Mpzw3zB1ZHl*B?C~Cx) zuNg*>5RM9F5{EpU@a2E7hAE`m<89wbQ2Lz&?Egu-^sglNXG5Q;{9n(%&*kEb0vApd zRHrY@22=pkFN81%x)~acZeu`yvK zovAVJNykgxqkEr^hZksHkpxm>2I8FTu2%+XLs@?ym0n;;A~X>i32{g6NOB@o4lk8{ zB}7Z2MNAJi>9u=y%s4QUXaNdt@SlAZr54!S6^ETWoik6gw=k-itu_}Yl_M9!l+Rbv z(S&WD`{_|SE@@(|Wp7bq1Zq}mc4JAG?mr2WN~6}~u`7M_F@J9`sr0frzxfuqSF~mA z$m$(TWAuCIE99yLSwi%R)8geQhs;6VBlRhJb(4Cx zu)QIF%_W9+21xI45U>JknBRaZ9nYkgAcK6~E|Zxo!B&z9zQhjsi^fgwZI%K@rYbMq znWBXg1uCZ+ljGJrsW7@x3h2 z;kn!J!bwCeOrBx;oPkZ}FeP%wExyf4=XMp)N8*lct~SyfK~4^-75EZFpHYO5AnuRM z!>u?>Vj3+j=uiHc<=cD~JWRphDSwxFaINB42-{@ZJTWe85>-RcQ&U%?wK)vjz z5u5fJYkck##j(bP7W0*RdW#BmAIK`D3=(U~?b`cJ&U2jHj}?w6 z_4BM)#EoJ6)2?pcR4AqBd)qAUn@RtNQq})FIQoBK4ie+GB(Vih2D|Ds>RJo2zE~C- z7mI)7p)5(-O6JRh6a@VZ5~piVC+Xv=O-)=0eTMSJsRE^c1@bPQWlr}E31VqO-%739 zdcmE{`1m;5LH8w|7euK>>>U#Iod8l1yivC>;YWsg=z#07E%cU9x1yw#3l6AcIm%79 zGi^zH6rM#CZMow(S(8dcOq#5$kbHnQV6s?MRsU3et!!YK5H?OV9vf2qy-UHCn>}2d zTwI(A_fzmmCtE@10yAGgU7R&|Fl$unZJ_^0BgCEDE6(B*SzfkapE9#0N6adc>}dtH zJ#nt^F~@JMJg4=Pv}OdUHyPt-<<9Z&c0@H@^4U?KwZM&6q0XjXc$>K3c&3iXLD9_%(?)?2kmZ=Ykb;)M`Tw=%_d=e@9eheGG zk0<`4so}r={C{zr|6+_1mA_=a56(XyJq||g6Es1E6%fPg#l{r+vk9;)r6VB7D84nu zE0Z1EIxH{Y@}hT+|#$0xn+CdMy6Uhh80eK~nfMEIpM z`|G1v!USmx81nY8XkhEOSWto}pc#{Ut#`Pqb}9j$FpzkQ7`0<-@5D_!mrLah98Mpr zz(R7;ZcaR-$aKqUaO!j z=7QT;Bu0cvYBi+LDfE_WZ`e@YaE_8CCxoRc?Y_!Xjnz~Gl|aYjN2&NtT5v4#q3od2 zkCQZHe#bn(5P#J**Fj4Py%SaaAKJsmV6}F_6Z7V&n6QAu8UQ#9{gkq+tB=VF_Q6~^ zf(hXvhJ#tC(eYm6g|I>;55Lq-;yY*COpTp4?J}hGQ42MIVI9CgEC{3hYw#CZfFKVG zgD(steIg8veyqX%pYMoulq zMUmbj8I`t>mC`!kZ@A>@PYXy*@NprM@e}W2Q+s?XIRM-U1FHVLM~c60(yz1<46-*j zW*FjTnBh$EzI|B|MRU11^McTPIGVJrzozlv$1nah_|t4~u}Ht^S1@V8r@IXAkN;lH z_s|WHlN90k4X}*#neR5bX%}?;G`X!1#U~@X6bbhgDYKJK17~oFF0&-UB#()c$&V<0 z7o~Pfye$P@$)Lj%T;axz+G1L_YQ*#(qO zQND$QTz(~8EF1c3<%;>dAiD$>8j@7WS$G_+ktE|Z?Cx<}HJb=!aChR&4z ziD&FwsiZ)wxS4k6KTLn>d~!DJ^78yb>?Trmx;GLHrbCBy|Bip<@sWdAfP0I~;(Ybr zoc-@j?wA!$ zIP0m3;LZy+>dl#&Ymws@7|{i1+OFLYf@+8+)w}n?mHUBCqg2=-Hb_sBb?=q))N7Ej zDIL9%@xQFOA!(EQmchHiDN%Omrr;WvlPIN5gW;u#ByV)x2aiOd2smy&;vA2+V!u|D zc~K(OVI8} z0t|e0OQ7h23e01O;%SJ}Q#yeDh`|jZR7j-mL(T4E;{w^}2hzmf_6PF|`gWVj{I?^2T3MBK>{?nMXed4kgNox2DP!jvP9v`;pa6AV)OD zDt*Vd-x7s{-;E?E5}3p-V;Y#dB-@c5vTWfS7<=>E+tN$ME`Z7K$px@!%{5{uV`cH80|IzU! zDs9=$%75P^QKCRQ`mW7$q9U?mU@vrFMvx)NNDrI(uk>xwO;^($EUvqVev#{W&GdtR z0ew;Iwa}(-5D28zABlC{WnN{heSY5Eq5Fc=TN^9X#R}0z53!xP85#@;2E=&oNYHyo z46~#Sf!1M1X!rh}ioe`>G2SkPH{5nCoP`GT@}rH;-LP1Q7U_ypw4+lwsqiBql80aA zJE<(88yw$`xzNiSnU(hsyJqHGac<}{Av)x9lQ=&py9djsh0uc}6QkmKN3{P!TEy;P zzLDVQj4>+0r<9B0owxBt5Uz`!M_VSS|{(?`_e+qD9b=vZHoo6>?u;!IP zM7sqoyP>kWY|=v06gkhaGRUrO8n@zE?Yh8$om@8%=1}*!2wdIWsbrCg@;6HfF?TEN z+B_xtSvT6H3in#8e~jvD7eE|LTQhO_>3b823&O_l$R$CFvP@3~)L7;_A}JpgN@ax{ z2d9Ra)~Yh%75wsmHK8e87yAn-ZMiLo6#=<&PgdFsJw1bby-j&3%&4=9dQFltFR(VB z@=6XmyNN4yr^^o$ON8d{PQ=!OX17^CrdM~7D-;ZrC!||<+FEOxI_WI3 zCA<35va%4v>gcEX-@h8esj=a4szW7x z{0g$hwoWRQG$yK{@3mqd-jYiVofJE!Wok1*nV7Gm&Ssq#hFuvj1sRyHg(6PFA5U*Q z8Rx>-blOs=lb`qa{zFy&n4xY;sd$fE+<3EI##W$P9M{B3c3Si9gw^jlPU-JqD~Cye z;wr=XkV7BSv#6}DrsXWFJ3eUNrc%7{=^sP>rp)BWKA9<}^R9g!0q7yWlh;gr_TEOD|#BmGq<@IV;ue zg+D2}cjpp+dPf&Q(36sFU&K8}hA85U61faW&{lB`9HUl-WWCG|<1XANN3JVAkRYvr5U z4q6;!G*MTdSUt*Mi=z_y3B1A9j-@aK{lNvxK%p23>M&=KTCgR!Ee8c?DAO2_R?Bkaqr6^BSP!8dHXxj%N1l+V$_%vzHjq zvu7p@%Nl6;>y*S}M!B=pz=aqUV#`;h%M0rUHfcog>kv3UZAEB*g7Er@t6CF8kHDmK zTjO@rejA^ULqn!`LwrEwOVmHx^;g|5PHm#B6~YD=gjJ!043F+&#_;D*mz%Q60=L9O zve|$gU&~As5^uz@2-BfQ!bW)Khn}G+Wyjw-19qI#oB(RSNydn0t~;tAmK!P-d{b-@ z@E5|cdgOS#!>%#Rj6ynkMvaW@37E>@hJP^82zk8VXx|3mR^JCcWdA|t{0nPmYFOxN z55#^-rlqobcr==<)bi?E?SPymF*a5oDDeSdO0gx?#KMoOd&G(2O@*W)HgX6y_aa6i zMCl^~`{@UR`nMQE`>n_{_aY5nA}vqU8mt8H`oa=g0SyiLd~BxAj2~l$zRSDHxvDs; zI4>+M$W`HbJ|g&P+$!U7-PHX4RAcR0szJ*(e-417=bO2q{492SWrqDK+L3#ChUHtz z*@MP)e^%@>_&#Yk^1|tv@j4%3T)diEXATx4K*hcO`sY$jk#jN5WD<=C3nvuVs zRh||qDHnc~;Kf59zr0;c7VkVSUPD%NnnJC_l3F^#f_rDu8l}l8qcAz0FFa)EAt32I zUy_JLIhU_J^l~FRH&6-iv zSpG2PRqzDdMWft>Zc(c)#tb%wgmWN%>IOPmZi-noqS!^Ft zb81pRcQi`X#UhWK70hy4tGW1mz|+vI8c*h@fFGJtW3r>qV>1Z0r|L>7I3un^gcep$ zAAWfZHRvB|E*kktY$qQP_$YG60C z@X~tTQjB3%@`uz!qxtxF+LE!+=nrS^07hn`EgAp!h|r03h7B!$#OZW#ACD+M;-5J!W+{h z|6I;5cNnE(Y863%1(oH}_FTW})8zYb$7czPg~Szk1+_NTm6SJ0MS_|oSz%e(S~P-& zSFp;!k?uFayytV$8HPwuyELSXOs^27XvK-DOx-Dl!P|28DK6iX>p#Yb%3`A&CG0X2 zS43FjN%IB}q(!hC$fG}yl1y9W&W&I@KTg6@K^kpH8=yFuP+vI^+59|3%Zqnb5lTDAykf9S#X`3N(X^SpdMyWQGOQRjhiwlj!0W-yD<3aEj^ z&X%=?`6lCy~?`&WSWt?U~EKFcCG_RJ(Qp7j=$I%H8t)Z@6Vj zA#>1f@EYiS8MRHZphpMA_5`znM=pzUpBPO)pXGYpQ6gkine{ z6u_o!P@Q+NKJ}k!_X7u|qfpAyIJb$_#3@wJ<1SE2Edkfk9C!0t%}8Yio09^F`YGzp zaJHGk*-ffsn85@)%4@`;Fv^8q(-Wk7r=Q8pT&hD`5(f?M{gfzGbbwh8(}G#|#fDuk z7v1W)5H9wkorE0ZZjL0Q1=NRGY>zwgfm81DdoaVwNH;or{{e zSyybt)m<=zXoA^RALYG-2touH|L*BLvmm9cdMmn+KGopyR@4*=&0 z&4g|FLoreZOhRmh=)R0bg~T2(8V_q7~42-zvb)+y959OAv!V$u(O z3)%Es0M@CRFmG{5sovIq4%8Ahjk#*5w{+)+MWQoJI_r$HxL5km1#6(e@{lK3Udc~n z0@g`g$s?VrnQJ$!oPnb?IHh-1qA`Rz$)Ai<6w$-MJW-gKNvOhL+XMbE7&mFt`x1KY z>k4(!KbbpZ`>`K@1J<(#vVbjx@Z@(6Q}MF#Mnbr-f55)vXj=^j+#)=s+ThMaV~E`B z8V=|W_fZWDwiso8tNMTNse)RNBGi=gVwgg%bOg8>mbRN%7^Um-7oj4=6`$|(K7!+t^90a{$1 z8Z>}<#!bm%ZEFQ{X(yBZMc>lCz0f1I2w9SquGh<9<=AO&g6BZte6hn>Qmvv;Rt)*c zJfTr2=~EnGD8P$v3R|&1RCl&7)b+`=QGapiPbLg_pxm`+HZurtFZ;wZ=`Vk*do~$wBxoW&=j0OTbQ=Q%S8XJ%~qoa3Ea|au5 zo}_(P;=!y z-AjFrERh%8la!z6Fn@lR?^E~H12D? z8#ht=1F;7@o4$Q8GDj;sSC%Jfn01xgL&%F2wG1|5ikb^qHv&9hT8w83+yv&BQXOQy zMVJSBL(Ky~p)gU3#%|blG?I zR9rP^zUbs7rOA0X52Ao=GRt@C&zlyjNLv-}9?*x{y(`509qhCV*B47f2hLrGl^<@S zuRGR!KwHei?!CM10pBKpDIoBNyRuO*>3FU?HjipIE#B~y3FSfOsMfj~F9PNr*H?0o zHyYB^G(YyNh{SxcE(Y-`x5jFMKb~HO*m+R%rq|ic4fzJ#USpTm;X7K+E%xsT_3VHK ze?*uc4-FsILUH;kL>_okY(w`VU*8+l>o>JmiU#?2^`>arnsl#)*R&nf_%>A+qwl%o z{l(u)M?DK1^mf260_oteV3#E_>6Y4!_hhVDM8AI6MM2V*^_M^sQ0dmHu11fy^kOqX zqzps-c5efIKWG`=Es(9&S@K@)ZjA{lj3ea7_MBPk(|hBFRjHVMN!sNUkrB;(cTP)T97M$ z0Dtc&UXSec<+q?y>5=)}S~{Z@ua;1xt@=T5I7{`Z=z_X*no8s>mY;>BvEXK%b`a6(DTS6t&b!vf_z#HM{Uoy z_5fiB(zpkF{})ruka$iX*~pq1ZxD?q68dIoIZSVls9kFGsTwvr4{T_LidcWtt$u{k zJlW7moRaH6+A5hW&;;2O#$oKyEN8kx z`LmG)Wfq4ykh+q{I3|RfVpkR&QH_x;t41UwxzRFXt^E2B$domKT@|nNW`EHwyj>&< zJatrLQ=_3X%vd%nHh^z@vIk(<5%IRAa&Hjzw`TSyVMLV^L$N5Kk_i3ey6byDt)F^U zuM+Ub4*8+XZpnnPUSBgu^ijLtQD>}K;eDpe1bNOh=fvIfk`&B61+S8ND<(KC%>y&? z>opCnY*r5M+!UrWKxv0_QvTlJc>X#AaI^xoaRXL}t5Ej_Z$y*|w*$6D+A?Lw-CO-$ zitm^{2Ct82-<0IW)0KMNvJHgBrdsIR0v~=H?n6^}l{D``Me90`^o|q!olsF?UX3YS zq^6Vu>Ijm>>PaZI8G@<^NGw{Cx&%|PwYrfwR!gX_%AR=L3BFsf8LxI|K^J}deh0Zd zV?$3r--FEX`#INxsOG6_=!v)DI>0q|BxT)z-G6kzA01M?rba+G_mwNMQD1mbVbNTW zmBi*{s_v_Ft9m2Avg!^78(QFu&n6mbRJ2bAv!b;%yo{g*9l2)>tsZJOOp}U~8VUH`}$8p_}t*XIOehezolNa-a2x0BS})Y9}& z*TPgua{Ewn-=wVrmJUeU39EKx+%w%=ixQWKDLpwaNJs65#6o7Ln7~~X+p_o2BR1g~ zVCfxLzxA{HlWAI6^H;`juI=&r1jQrUv_q0Z1Ja-tjdktrrP>GOC*#p?*xfQU5MqjM zsBe!9lh(u8)w$e@Z|>aUHI5o;MGw*|Myiz3-f0;pHg~Q#%*Kx8MxH%AluVXjG2C$) zWL-K63@Q`#y9_k_+}eR(x4~dp7oV-ek0H>Igy8p#i4GN{>#v=pFYUQT(g&b$OeTy- zX_#FDgNF8XyfGY6R!>inYn8IR2RDa&O!(6NIHrC0H+Qpam1bNa=(`SRKjixBTtm&e z`j9porEci!zdlg1RI0Jw#b(_Tb@RQK1Zxr_%7SUeH6=TrXt3J@js`4iDD0=I zoHhK~I7^W8^Rcp~Yaf>2wVe|Hh1bXa_A{oZ9eG$he;_xYvTbTD#moBy zY57-f2Ef1TP^lBi&p5_s7WGG9|0T}dlfxOxXvScJO1Cnq`c`~{Dp;{;l<-KkCDE+p zmexJkd}zCgE{eF=)K``-qC~IT6GcRog_)!X?fK^F8UDz$(zFUrwuR$qro5>qqn>+Z z%<5>;_*3pZ8QM|yv9CAtrAx;($>4l^_$_-L*&?(77!-=zvnCVW&kUcZMb6;2!83si z518Y%R*A3JZ8Is|kUCMu`!vxDgaWjs7^0j(iTaS4HhQ)ldR=r)_7vYFUr%THE}cPF z{0H45FJ5MQW^+W>P+eEX2kLp3zzFe*-pFVAdDZRybv?H|>`9f$AKVjFWJ=wegO7hO zOIYCtd?Vj{EYLT*^gl35|HbMX|NAEUf2ra9dy1=O;figB>La=~eA^#>O6n4?EMugV zbbt{Dbfef5l^(;}5kZ@!XaWwF8z0vUr6r|+QN*|WpF z^*osUHzOnE$lHuWYO$G7>}Y)bY0^9UY4eDV`E{s+{}Z$O$2*lMEYl zTA`ki(<0(Yrm~}15V-E^e2W6`*`%ydED-3G@$UFm6$ZtLx z+av`BhsHcAWqdxPWfu2*%{}|Sptax4_=NpDMeWy$* zZM6__s`enB$~0aT1BU^2k`J9F%+n+lL_|8JklWOCVYt*0%o*j4w1CsB_H^tVpYT_LLyKuyk=CV6~1M<7~^FylL*+AIFf3h>J=x$ygY-BG}4LJ z8XxYPY!v7dO3PVwEoY=`)6krokmR^|Mg5ztX_^#QR}ibr^X-|_St#rtv3gukh0(#A=};NPlNz57ZDFJ9hf#NP50zS)+Fo=StX)i@ zWS?W}i6LjB>kAB~lupAPyIjFb)izFgRq*iS*(Jt509jNr3r72{Gj`5DGoj;J&k5G@Rm!dJ($ox>SbxR)fc zz|Phug;~A7!p@?|mMva@rWuf2fSDK_ZxN3vVmlYz>rrf?LpiNs)^z!y{As@`55JC~ zS*GD3#N-ptY!2<613UelAJ;M4EEI$dm)`8#n$|o{ce^dlyoUY3bsy2hgnj-;ovubb zg2h1rZA6Ot}K_cpYBpIuF&CyK~5R0Wv;kG|3A^8K3nk{rw$Be8u@aos#qvKQKJyVU$cX6biw&Ep#+q7upFX z%qo&`WZ){<%zh@BTl{MO@v9#;t+cb7so0Uz49Fmo1e4>y!vUyIHadguZS0T7-x#_drMXz*16*c zymR0u^`ZQpXN}2ofegbpSedL%F9aypdQcrzjzPlBW0j zMlPzC&ePZ@Cq!?d%9oQNEg0`rHALm8l#lUdXMVEqDvb(AID~H(?H9z!e9G98fG@IzhajKr)3{L_Clu1(Bwg`RM!-(MOuZi zbeDsj9I3(~EITsE=3Z)a|l_rn8W92U0DB70gF7YYfO0j!)h?QobY1lSR>0 z_TVw@$eP~3k8r9;%g%RlZzCJ2%f}DvY`rsZ$;ak&^~-`i%B%+O!pnADeVyV!dHj|} zzOj#q4eRx9Q8c2Z7vy9L&fGLj+3_?fp}+8o`Xpwyi(81H|7P8#65%FIS*lOi={o&v z4NV$xu7az4Nb50dRGZv<tdZCx4Ek<_o3!mAT} zL5l*|K3Qr-)W8paaG z&R6{ped_4e2cy}ejD0!dt{*PaC*^L@eB%(1Fmc%Y#4)~!jF#lCGfj#E??4LG-T;!M z>Uha}f;W>ib_ZL-I7-v9KZQls^G!-JmL^w;=^}?!RXK;m4$#MwI2AH-l7M2-0 zVMK8k^+4+>2S0k^N_40EDa#`7c;2!&3-o6MHsnBfRnq@>E@)=hDulVq-g5SQWDWbt zj6H5?QS2gRZ^Zvbs~cW|8jagJV|;^zqC0e=D1oUsQPJ3MCb+eRGw(XgIY9y8v_tXq z9$(xWntWpx_Uronmvho{JfyYdV{L1N$^s^|-Nj`Ll`lUsiWTjm&8fadUGMXreJGw$ zQ**m+Tj|(XG}DyUKY~2?&9&n6SJ@9VKa9Hcayv{ar^pNr0WHy zP$bQv&8O!vd;GoT!pLwod-42qB^`m!b7nP@YTX}^+1hzA$}LSLh}Ln|?`%8xGMazw z8WT!LoYJ-Aq3=2p6ZSP~uMgSSWv3f`&-I06tU}WhZsA^6nr&r17hjQIZE>^pk=yZ% z06}dfR$85MjWJPq)T?OO(RxoaF+E#4{Z7)i9}Xsb;Nf+dzig61HO;@JX1Lf9)R5j9)Oi6vPL{H z&UQ9ln=$Q8jnh6-t;`hKM6pHftdd?$=1Aq16jty4-TF~`Gx=C&R242uxP{Y@Q~%O3 z*(16@x+vJsbW@^3tzY=-5MHi#(kB};CU%Ep`mVY1j$MAPpYJBB3x$ue`%t}wZ-@CG z(lBv36{2HMjxT)2$n%(UtHo{iW9>4HX4>)%k8QNnzIQYXrm-^M%#Qk%9odbUrZDz1YPdY`2Z4w~p!5tb^m(mUfk}kZ9+EsmenQ)5iwiaulcy zCJ#2o4Dz?@%)aAKfVXYMF;3t@aqNh2tBBlBkCdj`F31b=h93y(46zQ-YK@+zX5qM9 z&=KkN&3@Ptp*>UD$^q-WpG|9O)HBXz{D>p!`a36aPKkgz7uxEo0J>-o+4HHVD9!Hn z${LD0d{tuGsW*wvZoHc8mJroAs(3!FK@~<}Pz1+vY|Gw}Lwfxp{4DhgiQ_SSlV)E| zZWZxYZLu2EB1=g_y@(ieCQC_1?WNA0J0*}eMZfxCCs>oL;?kHdfMcKB+A)Qull$v( z2x6(38utR^-(?DG>d1GyU()8>ih3ud0@r&I$`ZSS<*1n6(76=OmP>r_JuNCdS|-8U zxGKXL1)Lc2kWY@`_kVBt^%7t9FyLVYX(g%a6>j=yURS1!V<9ieT$$5R+yT!I>}jI5 z?fem|T=Jq;BfZmsvqz_Ud*m5;&xE66*o*S22vf-L+MosmUPPA}~wy`kntf8rIeP-m;;{`xe}9E~G7J!PYoVH_$q~NzQab?F8vWUja5BJ!T5%5IpyqI#Dkps0B;gQ*z?c#N>spFw|wRE$gY?y4wQbJ zku2sVLh({KQz6e0yo+X!rV#8n8<;bHWd{ZLL_(*9Oi)&*`LBdGWz>h zx+p`Wi00u#V$f=CcMmEmgFjw+KnbK3`mbaKfoCsB{;Q^oJgj*LWnd_(dk9Kcssbj` z?*g8l`%{*LuY!Ls*|Tm`1Gv-tRparW8q4AK(5pfJFY5>@qO( zcY>pt*na>LlB^&O@YBDnWLE$x7>pMdSmb-?qMh79eB+Wa{)$%}^kX@Z3g>fytppz! zl%>pMD(Yw+5=!UgYHLD69JiJ;YhiGeEyZM$Au{ff;i zCBbNQfO{d!b7z^F732XX&qhEsJA1UZtJjJEIPyDq+F`LeAUU_4`%2aTX#3NG3%W8u zC!7OvlB?QJ4s2#Ok^_8SKcu&pBd}L?vLRT8Kow#xARt`5&Cg=ygYuz>>c z4)+Vv$;<$l=is&E{k&4Lf-Lzq#BHuWc;wDfm4Fbd5Sr!40s{UpKT$kzmUi{V0t1yp zPOf%H8ynE$x@dQ_!+ISaI}#%72UcYm7~|D*(Fp8xiFAj$CmQ4oH3C+Q8W=Y_9Sp|B z+k<%5=y{eW=YvTivV(*KvC?qxo)xqcEU9(Te=?ITts~;xA0Jph-vpd4@Zw#?r2!`? zB3#XtIY^wxrpjJv&(7Xjvm>$TIg2ZC&+^j(gT0R|&4cb)=92-2Hti1`& z=+M;*O%_j3>9zW|3h{0Tfh5i)Fa;clGNJpPRcUmgErzC{B+zACiPHbff3SmsCZ&X; zp=tgI=zW-t(5sXFL8;ITHw0?5FL3+*z5F-KcLN130l=jAU6%F=DClRPrzO|zY+HD`zlZ-)JT}X?2g!o zxg4Ld-mx6&*-N0-MQ(z+zJo8c`B39gf{-h2vqH<=^T&o1Dgd>4BnVht+JwLcrjJl1 zsP!8`>3-rSls07q2i1hScM&x0lQyBbk(U=#3hI7Bkh*kj6H*&^p+J?OMiT_3*vw5R zEl&p|QQHZq6f~TlAeDGy(^BC0vUK?V&#ezC0*#R-h}_8Cw8-*${mVfHssathC8%VA zUE^Qd!;Rvym%|f@?-!sEj|73Vg8!$$zj_QBZAOraF5HCFKl=(Ac|_p%-P;6z<2WSf zz(9jF2x7ZR{w+p)ETCW06PVt0YnZ>gW9^sr&~`%a_7j-Ful~*4=o|&TM@k@Px2z>^ t{*Ed16F~3V5p+(suF-++X8+nHtT~NSfJ>UC3v)>lEpV}<+rIR_{{yMcG_L>v diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 48c0a02c..37f853b1 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 1b6c7873..faf93008 100755 --- a/gradlew +++ b/gradlew @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,13 +82,11 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,22 +133,29 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -193,11 +200,15 @@ if "$cygwin" || "$msys" ; then done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ @@ -205,6 +216,12 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/gradlew.bat b/gradlew.bat index 107acd32..9d21a218 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal