From e0ad65f85ec6670df1ba7903202822666ae712f1 Mon Sep 17 00:00:00 2001 From: Tor Norbye Date: Thu, 25 Jan 2024 15:45:07 -0800 Subject: [PATCH] Update lint issue documentation --- docs/checks/ActivityIconColor.md.html | 152 ++++++++++ docs/checks/AlertDialogUsage.md.html | 47 +-- .../checks/AndroidGradlePluginVersion.md.html | 2 +- docs/checks/AppLinkUrlError.md.html | 14 +- docs/checks/ArcAnimationSpecTypeIssue.md.html | 193 ++++++++++++ .../ArgInFormattedQuantityStringRes.md.html | 8 +- docs/checks/AssertionSideEffect.md.html | 124 +------- docs/checks/AssertjImport.md.html | 19 +- docs/checks/AutoDispose.md.html | 12 +- docs/checks/AutoboxingStateCreation.md.html | 32 +- .../AutoboxingStateValueProperty.md.html | 40 ++- docs/checks/BadConfigurationProvider.md.html | 8 +- .../BadPeriodicWorkRequestEnqueue.md.html | 8 +- docs/checks/BatteryLife.md.html | 2 +- docs/checks/BindingReceiverParameter.md.html | 259 ++++++++++++++++ docs/checks/BindingReturnType.md.html | 195 ++++++++++++ docs/checks/BindsMustBeAbstract.md.html | 194 ++++++++++++ docs/checks/BindsTypeMismatch.md.html | 206 +++++++++++++ docs/checks/BindsWrongParameterCount.md.html | 184 +++++++++++ docs/checks/BomWithoutPlatform.md.html | 2 + docs/checks/BuildListAdds.md.html | 138 +++++++++ .../CastingViewContextToActivity.md.html | 8 +- docs/checks/ChromeOsAbiSupport.md.html | 4 +- docs/checks/ColorCasing.md.html | 47 +-- ...omposableDestinationInComposeScope.md.html | 8 +- .../ComposableLambdaParameterNaming.md.html | 22 +- .../ComposableLambdaParameterPosition.md.html | 22 +- docs/checks/ComposableNaming.md.html | 22 +- .../ComposableNavGraphInComposeScope.md.html | 8 +- docs/checks/ComposeComposableModifier.md.html | 29 +- .../ComposeCompositionLocalUsage.md.html | 16 +- ...mposeContentEmitterReturningValues.md.html | 30 +- docs/checks/ComposeM2Api.md.html | 24 +- docs/checks/ComposeModifierMissing.md.html | 26 +- docs/checks/ComposeModifierReused.md.html | 135 +++++---- .../ComposeModifierWithoutDefault.md.html | 19 +- .../ComposeMultipleContentEmitters.md.html | 14 +- docs/checks/ComposeMutableParameters.md.html | 57 ++-- docs/checks/ComposeNamingLowercase.md.html | 22 +- docs/checks/ComposeNamingUppercase.md.html | 33 +- docs/checks/ComposeParameterOrder.md.html | 46 +-- docs/checks/ComposePreviewNaming.md.html | 18 +- docs/checks/ComposePreviewPublic.md.html | 38 ++- docs/checks/ComposeRememberMissing.md.html | 12 +- .../checks/ComposeUnstableCollections.md.html | 18 +- .../checks/ComposeViewModelForwarding.md.html | 15 +- docs/checks/ComposeViewModelInjection.md.html | 13 +- docs/checks/CompositionLocalNaming.md.html | 22 +- docs/checks/ConflictingOnColor.md.html | 20 +- ...nstraintLayoutToolsEditorAttribute.md.html | 48 +-- ...CoroutineCreationDuringComposition.md.html | 22 +- docs/checks/CredentialDependency.md.html | 108 +++++++ docs/checks/CutPasteId.md.html | 285 +----------------- .../DeepLinkInActivityDestination.md.html | 8 +- docs/checks/DefaultEncoding.md.html | 6 +- docs/checks/DefaultLayoutAttribute.md.html | 50 +-- docs/checks/DefaultLocale.md.html | 2 +- docs/checks/DenyListedApi.md.html | 10 +- docs/checks/DenyListedBlockingApi.md.html | 193 ++++++++++++ docs/checks/DeprecatedCall.md.html | 8 +- docs/checks/DeprecatedSinceApi.md.html | 113 +++---- docs/checks/DeprecatedSqlUsage.md.html | 8 +- .../DetachAndAttachSameFragment.md.html | 8 +- .../DialogFragmentCallbacksDetector.md.html | 8 +- docs/checks/DiscouragedApi.md.html | 12 +- docs/checks/DoNotCallProviders.md.html | 8 +- ...DoNotExposeEitherNetInRepositories.md.html | 8 +- docs/checks/DoNotMock.md.html | 63 +++- docs/checks/DoNotMockAutoValue.md.html | 63 +++- docs/checks/DoNotMockDataClass.md.html | 63 +++- docs/checks/DoNotMockObjectClass.md.html | 63 +++- docs/checks/DoNotMockPlatformTypes.md.html | 201 ++++++++++++ docs/checks/DoNotMockRecordClass.md.html | 63 +++- docs/checks/DoNotMockSealedClass.md.html | 67 +++- docs/checks/DuplicateDivider.md.html | 2 +- docs/checks/EmptyNavDeepLink.md.html | 8 +- docs/checks/EnsureInitializerMetadata.md.html | 4 - docs/checks/ErroneousLayoutAttribute.md.html | 51 +--- docs/checks/ErrorProneDoNotMockUsage.md.html | 8 +- docs/checks/ExceptionMessage.md.html | 180 +++++++++++ .../ExperimentalAnnotationRetention.md.html | 10 +- docs/checks/ExpiredTargetSdkVersion.md.html | 19 +- docs/checks/ExpiringTargetSdkVersion.md.html | 29 +- ...eldSiteTargetOnQualifierAnnotation.md.html | 8 +- .../FlowOperatorInvokedInComposition.md.html | 22 +- docs/checks/FormalGerman.md.html | 77 +---- docs/checks/FragmentAddMenuProvider.md.html | 8 +- .../FragmentBackPressedCallback.md.html | 8 +- .../FragmentConstructorInjection.md.html | 8 +- docs/checks/FragmentFieldInjection.md.html | 8 +- .../FragmentGradleConfiguration-2.md.html | 8 +- .../FragmentGradleConfiguration.md.html | 8 +- docs/checks/FragmentLiveDataObserve.md.html | 8 +- docs/checks/FragmentTagUsage.md.html | 8 +- ...entlyChangedStateReadInComposition.md.html | 20 +- docs/checks/FullyQualifiedResource.md.html | 8 +- docs/checks/GestureBackNavigation.md.html | 2 +- docs/checks/GradleCompatible.md.html | 37 +-- docs/checks/GradleDependency.md.html | 4 +- docs/checks/GradleDeprecated.md.html | 2 +- docs/checks/GradleDynamicVersion.md.html | 2 +- docs/checks/GuavaChecksUsed.md.html | 8 +- .../GuavaPreconditionsUsedInKotlin.md.html | 8 +- .../IdleBatteryChargingConstraints.md.html | 8 +- docs/checks/ImplicitStringPlaceholder.md.html | 48 +-- docs/checks/InclusiveNaming.md.html | 12 +- .../checks/IncorrectChainMarginsUsage.md.html | 8 +- docs/checks/IncorrectMatchParentUsage.md.html | 8 +- .../IncorrectReferencesDeclaration.md.html | 8 +- docs/checks/InjectInJava.md.html | 8 +- ...hScopeRequiredLoggedInUserProvider.md.html | 8 +- ...thTypeMustImplementAnvilInjectable.md.html | 8 +- .../checks/IntentWithNullActionLaunch.md.html | 152 ++++++++++ docs/checks/InvalidAccessibility.md.html | 50 +-- docs/checks/InvalidColorHexValue.md.html | 20 +- ...idFragmentVersionForActivityResult.md.html | 8 +- docs/checks/InvalidImport.md.html | 47 +-- ...InvalidPeriodicWorkRequestInterval.md.html | 8 +- docs/checks/InvalidSetHasFixedSize.md.html | 10 +- docs/checks/InvalidSingleLineComment.md.html | 52 +--- docs/checks/InvalidString.md.html | 49 +-- docs/checks/JCenter.md.html | 49 +-- docs/checks/JavaOnlyDetector.md.html | 8 +- .../JvmStaticProvidesInObjectDetector.md.html | 8 +- docs/checks/KotlinPairNotCreated.md.html | 8 +- .../KotlinRequireNotNullUseMessage.md.html | 45 +-- docs/checks/LaunchDuringComposition.md.html | 8 +- .../checks/LayoutFileNameMatchesClass.md.html | 52 +--- docs/checks/LintImplUseUast.md.html | 8 + docs/checks/MainScopeUsage.md.html | 8 +- docs/checks/MatchingMenuId.md.html | 48 +-- docs/checks/MatchingViewId.md.html | 46 +-- docs/checks/MissingColorAlphaChannel.md.html | 20 +- ...issingFirebaseInstanceTokenRefresh.md.html | 2 +- .../checks/MissingResourceImportAlias.md.html | 8 +- docs/checks/MissingScrollbars.md.html | 50 +-- docs/checks/MissingXmlHeader.md.html | 46 +-- .../ModifierFactoryExtensionFunction.md.html | 20 +- docs/checks/ModifierFactoryReturnType.md.html | 20 +- ...odifierFactoryUnreferencedReceiver.md.html | 20 +- .../ModifierNodeInspectableProperties.md.html | 20 +- docs/checks/ModifierParameter.md.html | 20 +- docs/checks/ModuleCompanionObjects.md.html | 8 +- ...eCompanionObjectsNotInModuleParent.md.html | 8 +- ...MoshiUsageAdaptedByRequiresAdapter.md.html | 8 +- .../MoshiUsageAdaptedByRequiresKeep.md.html | 8 +- docs/checks/MoshiUsageArray.md.html | 8 +- docs/checks/MoshiUsageBlankGenerator.md.html | 8 +- docs/checks/MoshiUsageBlankJsonName.md.html | 8 +- docs/checks/MoshiUsageBlankTypeLabel.md.html | 8 +- docs/checks/MoshiUsageClassVisibility.md.html | 8 +- .../MoshiUsageDoubleClassAnnotation.md.html | 8 +- docs/checks/MoshiUsageDoubleTypeLabel.md.html | 8 +- .../MoshiUsageDuplicateJsonName.md.html | 8 +- .../MoshiUsageEnumAnnotatedUnknown.md.html | 8 +- docs/checks/MoshiUsageEnumCasing.md.html | 8 +- .../MoshiUsageEnumJsonClassGenerated.md.html | 8 +- .../MoshiUsageEnumMissingJsonClass.md.html | 8 +- .../MoshiUsageEnumMissingUnknown.md.html | 8 +- ...MoshiUsageEnumPropertyCouldBeMoshi.md.html | 8 +- ...shiUsageEnumPropertyDefaultUnknown.md.html | 8 +- ...hiUsageGenerateAdapterShouldBeTrue.md.html | 8 +- .../MoshiUsageGenericSealedSubtype.md.html | 8 +- .../MoshiUsageInappropriateTypeLabel.md.html | 8 +- docs/checks/MoshiUsageMissingPrimary.md.html | 8 +- .../checks/MoshiUsageMissingTypeLabel.md.html | 8 +- .../MoshiUsageMutableCollections.md.html | 8 +- .../MoshiUsageNonMoshiClassCollection.md.html | 8 +- .../MoshiUsageNonMoshiClassExternal.md.html | 8 +- .../MoshiUsageNonMoshiClassInternal.md.html | 8 +- .../checks/MoshiUsageNonMoshiClassMap.md.html | 8 +- .../MoshiUsageNonMoshiClassPlatform.md.html | 8 +- docs/checks/MoshiUsageObject.md.html | 8 +- docs/checks/MoshiUsageParamNeedsInit.md.html | 8 +- .../MoshiUsagePrivateConstructor.md.html | 8 +- ...shiUsagePrivateConstructorProperty.md.html | 8 +- .../MoshiUsageQualifierRetention.md.html | 8 +- docs/checks/MoshiUsageQualifierTarget.md.html | 8 +- .../MoshiUsageRedundantJsonName.md.html | 8 +- .../MoshiUsageRedundantSiteTarget.md.html | 8 +- .../MoshiUsageSealedMustBeSealed.md.html | 8 +- docs/checks/MoshiUsageSerializedName.md.html | 8 +- docs/checks/MoshiUsageSnakeCase.md.html | 8 +- .../MoshiUsageTransientNeedsInit.md.html | 8 +- docs/checks/MoshiUsageUnsupportedType.md.html | 8 +- docs/checks/MoshiUsageUseData.md.html | 8 +- docs/checks/MoshiUsageVarProperty.md.html | 8 +- .../MultipleAwaitPointerEventScopes.md.html | 20 +- docs/checks/MustBeInModule.md.html | 226 ++++++++++++++ .../MutableCollectionMutableState.md.html | 22 +- .../MutableImplicitPendingIntent.md.html | 108 +++++++ docs/checks/NamingPattern.md.html | 49 +-- docs/checks/NoCollectCallFound.md.html | 250 +++++++++++++++ docs/checks/NullSafeMutableLiveData.md.html | 8 +- docs/checks/OldTargetApi.md.html | 30 +- docs/checks/OpaqueUnitKey.md.html | 22 +- docs/checks/OutdatedLibrary.md.html | 16 +- docs/checks/OverrideAbstract.md.html | 8 +- docs/checks/ParcelizeFunctionProperty.md.html | 8 +- docs/checks/PlaySdkIndexGenericIssues.md.html | 81 +++++ docs/checks/PlaySdkIndexNonCompliant.md.html | 148 ++++++++- .../ProduceStateDoesNotAssignValue.md.html | 22 +- docs/checks/ProguardSplit.md.html | 2 +- docs/checks/ProtoLayoutMinSchema-2.md.html | 163 ++++++++++ docs/checks/ProtoLayoutMinSchema.md.html | 163 ++++++++++ docs/checks/ProvidesMustNotBeAbstract.md.html | 257 ++++++++++++++++ docs/checks/PublicKeyCredential.md.html | 146 +++++++++ docs/checks/Range.md.html | 2 +- docs/checks/RawColor.md.html | 44 +-- docs/checks/RawDimen.md.html | 43 +-- docs/checks/RawDispatchersUse.md.html | 8 +- docs/checks/RedactedInJavaUsage.md.html | 8 +- docs/checks/RedundantBinds.md.html | 190 ++++++++++++ docs/checks/RememberReturnType.md.html | 22 +- .../RememberSaveableSaverParameter.md.html | 20 +- docs/checks/RemoteViewLayout.md.html | 42 ++- .../RemoveWorkManagerInitializer.md.html | 8 +- .../RepeatOnLifecycleWrongUsage.md.html | 8 +- docs/checks/ReportShortcutUsage.md.html | 2 +- docs/checks/ResourcesGetColorCall.md.html | 50 +-- .../ResourcesGetColorStateListCall.md.html | 50 +-- docs/checks/ResourcesGetDrawableCall.md.html | 50 +-- docs/checks/RestrictCallsTo.md.html | 8 +- docs/checks/RestrictedApi.md.html | 5 - docs/checks/RetrofitUsage.md.html | 8 +- .../ReturnFromAwaitPointerEventScope.md.html | 20 +- docs/checks/RiskyLibrary.md.html | 14 +- docs/checks/RxJava2DefaultScheduler.md.html | 52 +--- .../RxJava2DisposableAddAllCall.md.html | 50 +-- .../RxJava2DisposableDisposeCall.md.html | 55 +--- ...Java2MethodMissingCheckReturnValue.md.html | 173 +---------- ...va2MissingCompositeDisposableClear.md.html | 49 +-- .../RxJava2SchedulersFactoryCall.md.html | 53 +--- .../RxJava2SubscribeMissingOnError.md.html | 52 +--- docs/checks/ScrollViewSize.md.html | 7 +- docs/checks/SecretInSource.md.html | 143 +++++++++ docs/checks/SelectedPhotoAccess.md.html | 137 +++++++++ docs/checks/SerializableUsage.md.html | 8 +- docs/checks/ShouldUseStaticImport.md.html | 49 +-- docs/checks/SpanMarkPointMissingMask.md.html | 8 +- .../SpecifyForegroundServiceType.md.html | 8 +- .../checks/SpecifyJobSchedulerIdRange.md.html | 8 +- .../checks/SquareAndRoundTilePreviews.md.html | 5 +- ...StartActivityAndCollapseDeprecated.md.html | 135 +++++++++ .../StateFlowValueCalledInComposition.md.html | 22 +- docs/checks/StringNotCapitalized.md.html | 48 +-- docs/checks/SubscribeOnMain.md.html | 8 +- .../SuperfluousMarginDeclaration.md.html | 51 +--- docs/checks/SuperfluousNameSpace.md.html | 50 +-- .../SuperfluousPaddingDeclaration.md.html | 51 +--- ...iciousCompositionLocalModifierRead.md.html | 20 +- .../TestLifecycleOwnerInCoroutine.md.html | 141 +++++++++ .../TestManifestGradleConfiguration.md.html | 8 +- docs/checks/TilePreviewImageFormat.md.html | 131 ++++++++ docs/checks/TileProviderPermissions.md.html | 3 +- docs/checks/Todo.md.html | 46 +-- docs/checks/TrulyRandom.md.html | 4 +- docs/checks/TypographyQuotes.md.html | 32 +- .../UnnecessaryComposedModifier.md.html | 20 +- docs/checks/UnrememberedAnimatable.md.html | 20 +- .../UnrememberedGetBackStackEntry.md.html | 8 +- ...rememberedMutableInteractionSource.md.html | 272 +++++++++++++++++ docs/checks/UnrememberedMutableState.md.html | 22 +- docs/checks/UnsafeLifecycleWhenUsage.md.html | 8 +- docs/checks/UnsafeOptInUsageError.md.html | 10 +- docs/checks/UnsafeOptInUsageWarning.md.html | 10 +- .../UnsafeRepeatOnLifecycleDetector.md.html | 8 +- docs/checks/UnspecifiedImmutableFlag.md.html | 2 +- .../checks/UnsupportedLayoutAttribute.md.html | 48 +-- .../UnusedBoxWithConstraintsScope.md.html | 201 ++++++++++++ ...dContentLambdaTargetStateParameter.md.html | 20 +- ...nusedCrossfadeTargetStateParameter.md.html | 20 +- ...dMaterial3ScaffoldPaddingParameter.md.html | 20 +- ...edMaterialScaffoldPaddingParameter.md.html | 20 +- docs/checks/UnusedMergeAttributes.md.html | 51 +--- ...usedTransitionTargetStateParameter.md.html | 20 +- docs/checks/UseAndroidAlpha.md.html | 10 +- docs/checks/UseAppTint.md.html | 10 +- ...UseCompatLoadingForColorStateLists.md.html | 10 +- .../UseCompatLoadingForDrawables.md.html | 10 +- .../UseCompatTextViewDrawableApis.md.html | 10 +- .../UseCompatTextViewDrawableXml.md.html | 10 +- docs/checks/UseGetLayoutInflater.md.html | 8 +- .../UseOfNonLambdaOffsetOverload.md.html | 20 +- docs/checks/UseRequireInsteadOfGet.md.html | 8 +- docs/checks/UseRxSetProgress2.md.html | 8 +- docs/checks/UseSdkSuppress.md.html | 143 +++++++++ docs/checks/UseSupportActionBar.md.html | 10 +- .../UseSwitchCompatOrMaterialCode.md.html | 10 +- .../UseSwitchCompatOrMaterialXml.md.html | 10 +- ...UsingMaterialAndMaterial3Libraries.md.html | 178 +++++++++++ docs/checks/UsingOnClickInXml.md.html | 10 +- docs/checks/VectorDrawableCompat.md.html | 3 + docs/checks/VisibleForTests.md.html | 23 +- docs/checks/Wakelock.md.html | 73 +++-- docs/checks/WakelockTimeout.md.html | 6 +- docs/checks/WearBackNavigation.md.html | 16 +- docs/checks/WearMaterialTheme.md.html | 135 +++++++++ docs/checks/WearRecents.md.html | 151 ++++++++++ docs/checks/WearSplashScreen.md.html | 97 ++++++ docs/checks/WorkerHasAPublicModifier.md.html | 8 +- docs/checks/WrongAnnotationOrder.md.html | 52 +--- docs/checks/WrongCommentType.md.html | 159 ++++++++++ .../checks/WrongConstraintLayoutUsage.md.html | 52 +--- docs/checks/WrongDrawableName.md.html | 44 +-- docs/checks/WrongGlobalIconColor.md.html | 55 +--- docs/checks/WrongLayoutName.md.html | 43 +-- docs/checks/WrongMenuIdFormat.md.html | 48 +-- docs/checks/WrongRequiresOptIn.md.html | 10 +- docs/checks/WrongResourceImportAlias.md.html | 8 +- docs/checks/WrongTestMethodName.md.html | 52 +--- docs/checks/WrongViewIdFormat.md.html | 47 +-- docs/checks/XmlSpacing.md.html | 76 +---- ...androidx_activity_activity-compose.md.html | 22 +- .../checks/androidx_activity_activity.md.html | 20 +- ...annotation_annotation-experimental.md.html | 17 +- .../androidx_appcompat_appcompat.md.html | 21 +- ...ompose_animation_animation-android.md.html | 77 +++++ ...e_animation_animation-core-android.md.html | 80 +++++ ...pose_foundation_foundation-android.md.html | 83 +++++ ...ompose_material3_material3-android.md.html | 85 ++++++ ..._compose_material_material-android.md.html | 77 +++++ ...dx_compose_runtime_runtime-android.md.html | 95 ++++++ ...e_runtime_runtime-saveable-android.md.html | 75 +++++ .../androidx_compose_ui_ui-android.md.html | 91 ++++++ ...idx_compose_ui_ui-graphics-android.md.html | 77 +++++ ...droidx_compose_ui_ui-test-manifest.md.html | 23 +- ...intlayout_constraintlayout-compose.md.html | 13 +- ...fragment_fragment-testing-manifest.md.html | 20 +- ...androidx_fragment_fragment-testing.md.html | 20 +- .../checks/androidx_fragment_fragment.md.html | 20 +- ...ecycle_lifecycle-livedata-core-ktx.md.html | 13 +- ...dx_lifecycle_lifecycle-runtime-ktx.md.html | 15 +- ...ifecycle_lifecycle-runtime-testing.md.html | 70 +++++ ...roidx_navigation_navigation-common.md.html | 20 +- ...oidx_navigation_navigation-compose.md.html | 20 +- ...oidx_navigation_navigation-runtime.md.html | 20 +- ...androidx_recyclerview_recyclerview.md.html | 18 +- ...protolayout_protolayout-expression.md.html | 71 +++++ ...roidx_wear_protolayout_protolayout.md.html | 71 +++++ .../checks/androidx_work_work-runtime.md.html | 13 +- docs/checks/categories.md.html | 49 ++- .../com_google_dagger_dagger-lint.md.html | 26 +- .../com_slack_lint_slack-lint-checks.md.html | 36 ++- ...uber_autodispose2_autodispose-lint.md.html | 18 +- .../com_vanniktech_lint-rules-android.md.html | 15 +- .../com_vanniktech_lint-rules-kotlin.md.html | 15 +- .../com_vanniktech_lint-rules-rxjava2.md.html | 15 +- docs/checks/index.md.html | 49 ++- docs/checks/libraries.md.html | 25 +- docs/checks/severity.md.html | 51 +++- docs/checks/vendors.md.html | 60 +++- docs/checks/year.md.html | 62 +++- docs/print-command.sh | 2 + 354 files changed, 9773 insertions(+), 4292 deletions(-) create mode 100644 docs/checks/ActivityIconColor.md.html create mode 100644 docs/checks/ArcAnimationSpecTypeIssue.md.html create mode 100644 docs/checks/BindingReceiverParameter.md.html create mode 100644 docs/checks/BindingReturnType.md.html create mode 100644 docs/checks/BindsMustBeAbstract.md.html create mode 100644 docs/checks/BindsTypeMismatch.md.html create mode 100644 docs/checks/BindsWrongParameterCount.md.html create mode 100644 docs/checks/BuildListAdds.md.html create mode 100644 docs/checks/CredentialDependency.md.html create mode 100644 docs/checks/DenyListedBlockingApi.md.html create mode 100644 docs/checks/DoNotMockPlatformTypes.md.html create mode 100644 docs/checks/ExceptionMessage.md.html create mode 100644 docs/checks/IntentWithNullActionLaunch.md.html create mode 100644 docs/checks/MustBeInModule.md.html create mode 100644 docs/checks/MutableImplicitPendingIntent.md.html create mode 100644 docs/checks/NoCollectCallFound.md.html create mode 100644 docs/checks/PlaySdkIndexGenericIssues.md.html create mode 100644 docs/checks/ProtoLayoutMinSchema-2.md.html create mode 100644 docs/checks/ProtoLayoutMinSchema.md.html create mode 100644 docs/checks/ProvidesMustNotBeAbstract.md.html create mode 100644 docs/checks/PublicKeyCredential.md.html create mode 100644 docs/checks/RedundantBinds.md.html create mode 100644 docs/checks/SecretInSource.md.html create mode 100644 docs/checks/SelectedPhotoAccess.md.html create mode 100644 docs/checks/StartActivityAndCollapseDeprecated.md.html create mode 100644 docs/checks/TestLifecycleOwnerInCoroutine.md.html create mode 100644 docs/checks/TilePreviewImageFormat.md.html create mode 100644 docs/checks/UnrememberedMutableInteractionSource.md.html create mode 100644 docs/checks/UnusedBoxWithConstraintsScope.md.html create mode 100644 docs/checks/UseSdkSuppress.md.html create mode 100644 docs/checks/UsingMaterialAndMaterial3Libraries.md.html create mode 100644 docs/checks/WearMaterialTheme.md.html create mode 100644 docs/checks/WearRecents.md.html create mode 100644 docs/checks/WearSplashScreen.md.html create mode 100644 docs/checks/WrongCommentType.md.html create mode 100644 docs/checks/androidx_compose_animation_animation-android.md.html create mode 100644 docs/checks/androidx_compose_animation_animation-core-android.md.html create mode 100644 docs/checks/androidx_compose_foundation_foundation-android.md.html create mode 100644 docs/checks/androidx_compose_material3_material3-android.md.html create mode 100644 docs/checks/androidx_compose_material_material-android.md.html create mode 100644 docs/checks/androidx_compose_runtime_runtime-android.md.html create mode 100644 docs/checks/androidx_compose_runtime_runtime-saveable-android.md.html create mode 100644 docs/checks/androidx_compose_ui_ui-android.md.html create mode 100644 docs/checks/androidx_compose_ui_ui-graphics-android.md.html create mode 100644 docs/checks/androidx_lifecycle_lifecycle-runtime-testing.md.html create mode 100644 docs/checks/androidx_wear_protolayout_protolayout-expression.md.html create mode 100644 docs/checks/androidx_wear_protolayout_protolayout.md.html diff --git a/docs/checks/ActivityIconColor.md.html b/docs/checks/ActivityIconColor.md.html new file mode 100644 index 00000000..f2d0b025 --- /dev/null +++ b/docs/checks/ActivityIconColor.md.html @@ -0,0 +1,152 @@ + +(#) Ongoing activity icon is not white + +!!! WARNING: Ongoing activity icon is not white + This is a warning. + +Id +: `ActivityIconColor` +Summary +: Ongoing activity icon is not white +Severity +: Warning +Category +: Usability: Icons +Platform +: Android +Vendor +: Android Open Source Project +Feedback +: https://issuetracker.google.com/issues/new?component=192708 +Affects +: Kotlin and Java files, binary resource files and resource files +Editing +: This check can *not* run live in the IDE editor +See +: https://developer.android.com/training/wearables/ongoing-activity#best-practices +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/ActivityIconColorDetector.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/ActivityIconColorDetectorTest.kt) +Copyright Year +: 2022 + +The resources passed to `setAnimatedIcon` and `setStaticIcon` should be +white with a transparent background, preferably a VectorDrawable or +AnimatedVectorDrawable. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/test/pkg/ForegroundOnlyWalkingWorkoutService.kt:9:Warning: The +animated icon for an ongoing activity should be white with a transparent +background [ActivityIconColor] + + .setAnimatedIcon(R.drawable.animated_walk) + ------------------------ + + +src/test/pkg/ForegroundOnlyWalkingWorkoutService.kt:10:Warning: The +static icon for an ongoing activity should be white with a transparent +background [ActivityIconColor] + + .setStaticIcon(R.drawable.ic_walk) + ------------------ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/test/pkg/ForegroundOnlyWalkingWorkoutService.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package test.pkg; + +import androidx.wear.ongoing.OngoingActivity + +class ForegroundOnlyWalkingWorkoutService { + private fun generateNotification(mainText: String) { + val ongoingActivity = + OngoingActivity.Builder() + .setAnimatedIcon(R.drawable.animated_walk) + .setStaticIcon(R.drawable.ic_walk) + .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) +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("ActivityIconColor") + fun method() { + setAnimatedIcon(...) + } + ``` + + or + + ```java + // Java + @SuppressWarnings("ActivityIconColor") + void method() { + setAnimatedIcon(...); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection ActivityIconColor + problematicStatement() + ``` + +* Adding the suppression attribute `tools:ignore="ActivityIconColor"` + 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="ActivityIconColor" 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 'ActivityIconColor' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore ActivityIconColor ...` + ``` + +* 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 e0ef65d2..b957bc20 100644 --- a/docs/checks/AlertDialogUsage.md.html +++ b/docs/checks/AlertDialogUsage.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,46 +29,11 @@ : Kotlin and Java files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/AlertDialogUsageDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/AlertDialogUsageDetectorTest.kt) Support library AlertDialog is much more powerful and plays better together with the new theming / styling than the AlertDialog built into the framework. -(##) Example - -Here is an example of lint warnings produced by this check: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/Test.java:4:Warning: Should not be using android.app.AlertDialog -[AlertDialogUsage] - - public Test(AlertDialog dialog) { } - ------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`src/Test.java`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers -import android.app.AlertDialog; - -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/java/com/vanniktech/lintrules/android/AlertDialogUsageDetectorTest.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, `AlertDialogUsageDetector.constructorParameterInJava`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -78,17 +43,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -96,7 +61,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/AndroidGradlePluginVersion.md.html b/docs/checks/AndroidGradlePluginVersion.md.html index f27e22ae..1c80057b 100644 --- a/docs/checks/AndroidGradlePluginVersion.md.html +++ b/docs/checks/AndroidGradlePluginVersion.md.html @@ -48,7 +48,7 @@ [AndroidGradlePluginVersion] classpath 'com.android.tools.build:gradle:3.4.0-alpha3' - ------------------------------------------------------- + --------------------------------------------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: diff --git a/docs/checks/AppLinkUrlError.md.html b/docs/checks/AppLinkUrlError.md.html index 6070e7ad..5fcd5988 100644 --- a/docs/checks/AppLinkUrlError.md.html +++ b/docs/checks/AppLinkUrlError.md.html @@ -1,17 +1,17 @@ -(#) URL not supported by app for Firebase App Indexing +(#) URI invalid -!!! ERROR: URL not supported by app for Firebase App Indexing +!!! ERROR: URI invalid This is an error. Id : `AppLinkUrlError` Summary -: URL not supported by app for Firebase App Indexing +: URI invalid Severity : Error Category -: Usability +: Correctness Platform : Android Vendor @@ -23,6 +23,8 @@ Editing : This check runs on the fly in the IDE editor See +: https://developer.android.com/training/app-links +See : https://g.co/AppIndexing/AndroidStudio 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/AppLinksValidDetector.kt) @@ -31,8 +33,8 @@ Copyright Year : 2017 -Ensure the URL is supported by your app, to get installs and traffic to -your app from Google Search. +Ensure your intent filter has the documented elements for deep links, +web links, or Android App Links. !!! Tip This lint check has an associated quickfix available in the IDE. diff --git a/docs/checks/ArcAnimationSpecTypeIssue.md.html b/docs/checks/ArcAnimationSpecTypeIssue.md.html new file mode 100644 index 00000000..73ba6770 --- /dev/null +++ b/docs/checks/ArcAnimationSpecTypeIssue.md.html @@ -0,0 +1,193 @@ + +(#) ArcAnimationSpec is designed for 2D values. Particularly, for positional values such as Offset. + +!!! Tip: ArcAnimationSpec is designed for 2D values. Particularly, for positional values such as Offset. + Advice from this check is just a tip. + +Id +: `ArcAnimationSpecTypeIssue` +Summary +: ArcAnimationSpec is designed for 2D values. Particularly, for positional values such as Offset. +Severity +: Information +Category +: Correctness +Platform +: Any +Vendor +: Jetpack Compose +Identifier +: androidx.compose.animation.core +Feedback +: https://issuetracker.google.com/issues/new?component=612128 +Min +: Lint 7.0 +Compiled +: Lint 8.0 and 8.1 +Artifact +: [androidx.compose.animation:animation-core-android](androidx_compose_animation_animation-core-android.md.html) + +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:/compose/animation/animation-core-lint/src/main/java/androidx/compose/animation/core/lint/ArcAnimationSpecTypeDetector.kt) +Tests +: [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) +Copyright Year +: 2023 + +ArcAnimationSpec is designed for 2D values. Particularly, for positional +values such as Offset. +Trying to use it for values of different dimensions (Float, Size, Color, +etc.) will result in unpredictable animation behavior. + +(##) Example + +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. +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. +Otherwise, the animation might not be what you expect. +[ArcAnimationSpecTypeIssue] + + ArcAnimationSpec<String>(ArcAbove) + ---------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/foo/test.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package foo + +import androidx.compose.animation.core.ArcAnimationSpec +import androidx.compose.animation.core.ArcAbove +import androidx.compose.ui.geometry.Offset +import androidx.compose.ui.unit.DpOffset +import androidx.compose.ui.unit.IntOffset + +fun test() { + ArcAnimationSpec(ArcAbove) + ArcAnimationSpec(ArcAbove) + ArcAnimationSpec(ArcAbove) + 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) +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, `ArcAnimationSpecTypeDetector.testPreferredTypeIssue`. +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-core-android:1.7.0-alpha01") + +// build.gradle +implementation 'androidx.compose.animation:animation-core-android:1.7.0-alpha01' + +// build.gradle.kts with version catalogs: +implementation(libs.animation-core-android) + +# libs.versions.toml +[versions] +animation-core-android = "1.7.0-alpha01" +[libraries] +animation-core-android = { + module = "androidx.compose.animation:animation-core-android", + version.ref = "animation-core-android" +} +``` + +1.7.0-alpha01 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about androidx.compose.animation:animation-core-android](androidx_compose_animation_animation-core-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("ArcAnimationSpecTypeIssue") + fun method() { + problematicStatement() + } + ``` + + or + + ```java + // Java + @SuppressWarnings("ArcAnimationSpecTypeIssue") + void method() { + problematicStatement(); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection ArcAnimationSpecTypeIssue + 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="ArcAnimationSpecTypeIssue" 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 'ArcAnimationSpecTypeIssue' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore ArcAnimationSpecTypeIssue ...` + ``` + +* 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/ArgInFormattedQuantityStringRes.md.html b/docs/checks/ArgInFormattedQuantityStringRes.md.html index 7a5caa77..a46b5d1f 100644 --- a/docs/checks/ArgInFormattedQuantityStringRes.md.html +++ b/docs/checks/ArgInFormattedQuantityStringRes.md.html @@ -92,17 +92,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -110,7 +110,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/AssertionSideEffect.md.html b/docs/checks/AssertionSideEffect.md.html index 4124f441..01955acc 100644 --- a/docs/checks/AssertionSideEffect.md.html +++ b/docs/checks/AssertionSideEffect.md.html @@ -42,128 +42,30 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/test.kt:4:Warning: Assertion condition has a side effect: i++ +src/test.kt:5:Warning: Assertion condition has a side effect: setOf(42) [AssertionSideEffect] - assert(i++ < 5) // WARN 1 - --- + assert(42 != f.setOf(42)) // WARN 1 + ----------- -src/test.kt:5:Warning: Assertion condition has a side effect: x++ -[AssertionSideEffect] - - assert(method1() > 5) // WARN 2 - --------- - - -src/test.kt:6:Warning: Assertion condition has a side effect: x++ -[AssertionSideEffect] - - assert(method2() > 5) // WARN 3 - --------- - - -src/test.kt:7:Warning: Assertion condition has a side effect: x = 0 -[AssertionSideEffect] - - assert(method3()) // WARN 4 - --------- - - -src/test.kt:9:Warning: Assertion condition has a side effect: delete() -[AssertionSideEffect] - - assert(file.delete()) // WARN 5 - ------------- - - -src/test.kt:10:Warning: Assertion condition has a side effect: mkdirs() -[AssertionSideEffect] - - assert(file.mkdirs()) // WARN 6 - ------------- - - -src/test.kt:11:Warning: Assertion condition has a side effect: -add("test") [AssertionSideEffect] +src/test.kt:6:Warning: Assertion condition has a side effect: f.of = +2024 [AssertionSideEffect] - assert(list.add("test")) // WARN 7 - ---------------- - - -src/test.kt:12:Warning: Assertion condition has a side effect: -setExecutable(true) [AssertionSideEffect] - - assert(file.setExecutable(true)) // WARN 8 - ------------------------ - - -src/test.kt:14:Warning: Assertion condition has a side effect: x++ -[AssertionSideEffect] - - assert(method5()) // WARN 9 - --------- - - -src/test.kt:15:Warning: Assertion condition has a side effect: x++ -[AssertionSideEffect] - - assert(method6()) // WARN 10 - --------- - - -src/test.kt:16:Warning: Assertion condition has a side effect: x++ -[AssertionSideEffect] - - assert(method7()) // WARN 11 - --------- + assert(2024 != (f.of = 2024)) // WARN 2 + ----------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: `src/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers -var x: Int = 0 -fun test(file: java.io.File, list: java.util.List) { - var i = 0 - assert(i++ < 5) // WARN 1 - assert(method1() > 5) // WARN 2 - assert(method2() > 5) // WARN 3 - assert(method3()) // WARN 4 - assert(method4()) // OK 1 - assert(file.delete()) // WARN 5 - assert(file.mkdirs()) // WARN 6 - assert(list.add("test")) // WARN 7 - assert(file.setExecutable(true)) // WARN 8 - assert(list.contains("test")) // OK 2 - assert(method5()) // WARN 9 - assert(method6()) // WARN 10 - assert(method7()) // WARN 11 -} +import test.pkg.Foo -fun method1(): Int = x++ // side effect -fun method2(): Int = method1() // indirect side effect -fun method3(): Boolean { - x = 0 // side effect - return true -} -fun method4(): Boolean { - val x: Int - x = 0 // not a side effect - x++ // not a side effect - return true -} -fun method5(v: Int): Boolean { - if (v > 5) { } else { x++ } - return true -} -fun method6(v: Int): Boolean { - for (i in 0 until v) x++ - return true -} -fun method7(v: Int): Boolean { - try { println(v) } finally { x++ } - return true +fun test() { + val f = Foo() + assert(42 != f.setOf(42)) // WARN 1 + assert(2024 != (f.of = 2024)) // WARN 2 } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -172,7 +74,7 @@ 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, `AssertDetector.testSideEffects`. +found for this lint check, `AssertDetector.testSetOf_JavaSyntheticPropertySetter`. To report a problem with this extracted sample, visit https://issuetracker.google.com/issues/new?component=192708. diff --git a/docs/checks/AssertjImport.md.html b/docs/checks/AssertjImport.md.html index 28ca2c0d..a7f408cd 100644 --- a/docs/checks/AssertjImport.md.html +++ b/docs/checks/AssertjImport.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,19 +29,12 @@ : Kotlin and Java files and test sources Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/AssertjDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/AssertjDetectorTest.kt) Importing org.assertj.core.api.Assertions is not ideal. Since it can require Java 8. It's simple as instead org.assertj.core.api.Java6Assertions can be imported and provides guarantee to run on Java 6 as well. -!!! Tip - This lint check has an associated quickfix available in the IDE. - (##) Including !!! @@ -51,17 +44,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -69,7 +62,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/AutoDispose.md.html b/docs/checks/AutoDispose.md.html index fd66a752..5c9ac225 100644 --- a/docs/checks/AutoDispose.md.html +++ b/docs/checks/AutoDispose.md.html @@ -21,9 +21,9 @@ Feedback : https://github.com/uber/AutoDispose/issues Min -: Lint 7.0 +: Lint 8.0 and 8.1 Compiled -: Lint 7.0 +: Lint 8.0 and 8.1 Artifact : [com.uber.autodispose2:autodispose-lint](com_uber_autodispose2_autodispose-lint.md.html) @@ -96,17 +96,17 @@ ``` // build.gradle.kts -lintChecks("com.uber.autodispose2:autodispose-lint:2.1.1") +lintChecks("com.uber.autodispose2:autodispose-lint:2.2.1") // build.gradle -lintChecks 'com.uber.autodispose2:autodispose-lint:2.1.1' +lintChecks 'com.uber.autodispose2:autodispose-lint:2.2.1' // build.gradle.kts with version catalogs: lintChecks(libs.autodispose-lint) # libs.versions.toml [versions] -autodispose-lint = "2.1.1" +autodispose-lint = "2.2.1" [libraries] autodispose-lint = { module = "com.uber.autodispose2:autodispose-lint", @@ -114,7 +114,7 @@ } ``` -2.1.1 is the version this documentation was generated from; +2.2.1 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.uber.autodispose2:autodispose-lint](com_uber_autodispose2_autodispose-lint.md.html). diff --git a/docs/checks/AutoboxingStateCreation.md.html b/docs/checks/AutoboxingStateCreation.md.html index b234dc94..7c3e2f30 100644 --- a/docs/checks/AutoboxingStateCreation.md.html +++ b/docs/checks/AutoboxingStateCreation.md.html @@ -1,15 +1,15 @@ (#) `State` will autobox values assigned to this state. Use a specialized state type instead. -!!! WARNING: `State` will autobox values assigned to this state. Use a specialized state type instead. - This is a warning. +!!! Tip: `State` will autobox values assigned to this state. Use a specialized state type instead. + Advice from this check is just a tip. Id : `AutoboxingStateCreation` Summary : `State` will autobox values assigned to this state. Use a specialized state type instead. Severity -: Warning +: Information Category : Performance Platform @@ -21,11 +21,11 @@ Feedback : https://issuetracker.google.com/issues/new?component=612128 Min -: Lint 7.0 +: Lint 8.0 and 8.1 Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.runtime:runtime](androidx_compose_runtime_runtime.md.html) +: [androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html) Affects : Kotlin and Java files @@ -45,7 +45,9 @@ work to auto-unbox values when reading the value of the state. Instead, prefer to use a specialized primitive state implementation for `Int`, `Long`, `Float`, and `Double` when the state does not need to track null -values and does not override the default `SnapshotMutationPolicy`. +values and does not override the default `SnapshotMutationPolicy`. See +`mutableIntStateOf()`, `mutableLongStateOf()`, `mutableFloatStateOf()`, +and `mutableDoubleStateOf()` for more information. !!! Tip This lint check has an associated quickfix available in the IDE. @@ -93,28 +95,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime:1.5.0-beta02") +implementation("androidx.compose.runtime:runtime-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.runtime:runtime:1.5.0-beta02' +implementation 'androidx.compose.runtime:runtime-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.runtime) +implementation(libs.runtime-android) # libs.versions.toml [versions] -runtime = "1.5.0-beta02" +runtime-android = "1.7.0-alpha01" [libraries] -runtime = { - module = "androidx.compose.runtime:runtime", - version.ref = "runtime" +runtime-android = { + module = "androidx.compose.runtime:runtime-android", + version.ref = "runtime-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.runtime:runtime](androidx_compose_runtime_runtime.md.html). +[Additional details about androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html). (##) Suppressing You can suppress false positives using one of the following mechanisms: diff --git a/docs/checks/AutoboxingStateValueProperty.md.html b/docs/checks/AutoboxingStateValueProperty.md.html index 7a5c381b..6502536f 100644 --- a/docs/checks/AutoboxingStateValueProperty.md.html +++ b/docs/checks/AutoboxingStateValueProperty.md.html @@ -21,11 +21,11 @@ Feedback : https://issuetracker.google.com/issues/new?component=612128 Min -: Lint 7.0 +: Lint 8.0 and 8.1 Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.runtime:runtime](androidx_compose_runtime_runtime.md.html) +: [androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html) Affects : Kotlin and Java files and test sources @@ -38,11 +38,11 @@ Copyright Year : 2023 -Avoid using the generic value accessor when using a State objects with a -specialized types. Usages of the generic value property result in an -unnecessary autoboxing operation whenever the state's value is read or -written to. Use the specialized value accessor or property delegation to -avoid unnecessary allocations. +Avoid using the generic `value` property when using a specialized State +type. Reading or writing to the state's generic `value` property will +result in an unnecessary autoboxing operation. Prefer the specialized +value property (e.g. `intValue` for `MutableIntState`), or use property +delegation to avoid unnecessary allocations. !!! Tip This lint check has an associated quickfix available in the IDE. @@ -51,7 +51,7 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/androidx/compose/runtime/lint/test/test.kt:9:Warning: Reading value +src/androidx/compose/runtime/lint/test/test.kt:7:Warning: Reading value will cause an autoboxing operation. Use intValue to avoid unnecessary allocations. [AutoboxingStateValueProperty] @@ -65,12 +65,10 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers package androidx.compose.runtime.lint.test -import androidx.compose.runtime.sandbox.MutableIntState -import androidx.compose.runtime.getValue -import androidx.compose.runtime.setValue +import androidx.compose.runtime.mutableIntStateOf fun valueAssignment() { - val state = MutableIntState() + val state = mutableIntStateOf(4) val value = state.value } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -92,28 +90,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime:1.5.0-beta02") +implementation("androidx.compose.runtime:runtime-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.runtime:runtime:1.5.0-beta02' +implementation 'androidx.compose.runtime:runtime-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.runtime) +implementation(libs.runtime-android) # libs.versions.toml [versions] -runtime = "1.5.0-beta02" +runtime-android = "1.7.0-alpha01" [libraries] -runtime = { - module = "androidx.compose.runtime:runtime", - version.ref = "runtime" +runtime-android = { + module = "androidx.compose.runtime:runtime-android", + version.ref = "runtime-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.runtime:runtime](androidx_compose_runtime_runtime.md.html). +[Additional details about androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html). (##) Suppressing You can suppress false positives using one of the following mechanisms: diff --git a/docs/checks/BadConfigurationProvider.md.html b/docs/checks/BadConfigurationProvider.md.html index 2d1a71f4..f557b1be 100644 --- a/docs/checks/BadConfigurationProvider.md.html +++ b/docs/checks/BadConfigurationProvider.md.html @@ -52,17 +52,17 @@ ``` // build.gradle.kts -implementation("androidx.work:work-runtime:2.9.0-alpha01") +implementation("androidx.work:work-runtime:2.10.0-alpha01") // build.gradle -implementation 'androidx.work:work-runtime:2.9.0-alpha01' +implementation 'androidx.work:work-runtime:2.10.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.work-runtime) # libs.versions.toml [versions] -work-runtime = "2.9.0-alpha01" +work-runtime = "2.10.0-alpha01" [libraries] work-runtime = { module = "androidx.work:work-runtime", @@ -70,7 +70,7 @@ } ``` -2.9.0-alpha01 is the version this documentation was generated from; +2.10.0-alpha01 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/BadPeriodicWorkRequestEnqueue.md.html b/docs/checks/BadPeriodicWorkRequestEnqueue.md.html index a60d530d..59912a5a 100644 --- a/docs/checks/BadPeriodicWorkRequestEnqueue.md.html +++ b/docs/checks/BadPeriodicWorkRequestEnqueue.md.html @@ -52,17 +52,17 @@ ``` // build.gradle.kts -implementation("androidx.work:work-runtime:2.9.0-alpha01") +implementation("androidx.work:work-runtime:2.10.0-alpha01") // build.gradle -implementation 'androidx.work:work-runtime:2.9.0-alpha01' +implementation 'androidx.work:work-runtime:2.10.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.work-runtime) # libs.versions.toml [versions] -work-runtime = "2.9.0-alpha01" +work-runtime = "2.10.0-alpha01" [libraries] work-runtime = { module = "androidx.work:work-runtime", @@ -70,7 +70,7 @@ } ``` -2.9.0-alpha01 is the version this documentation was generated from; +2.10.0-alpha01 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 ebce6991..8414f8ea 100644 --- a/docs/checks/BatteryLife.md.html +++ b/docs/checks/BatteryLife.md.html @@ -58,7 +58,7 @@ REQUEST_IGNORE_BATTERY_OPTIMIZATIONS violates the Play Store Content Policy regarding acceptable use cases, as described in https://developer.android.com/training/monitoring-device-state/doze-standby.html - [BatteryLife] +[BatteryLife] <action android:name="android.settings.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" /> ----------------------------------------------------- diff --git a/docs/checks/BindingReceiverParameter.md.html b/docs/checks/BindingReceiverParameter.md.html new file mode 100644 index 00000000..15985df0 --- /dev/null +++ b/docs/checks/BindingReceiverParameter.md.html @@ -0,0 +1,259 @@ + +(#) @Binds/@Provides functions cannot be extension functions. + +!!! ERROR: @Binds/@Provides functions cannot be extension functions. + This is an error. + +Id +: `BindingReceiverParameter` +Summary +: @Binds/@Provides functions cannot be extension functions. +Severity +: Error +Category +: Correctness +Platform +: Any +Vendor +: slack +Identifier +: slack-lint +Contact +: https://github.com/slackhq/slack-lints +Feedback +: https://github.com/slackhq/slack-lints +Min +: Lint 8.0 and 8.1 +Compiled +: Lint 8.0 and 8.1 +Artifact +: [com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html) + +Affects +: 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/slack-lints/blob/main/slack-lint-checks/src/main/java/slack/lint/DaggerIssuesDetector.kt) +Tests +: [Source Code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/DaggerIssuesDetectorTest.kt) +Copyright Year +: 2021 + +@Binds/@Provides functions cannot be extension functions. Move the +receiver type to a parameter via IDE inspection (option+enter and +convert to parameter). + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/foo/MyQualifier.kt:12:Error: @Binds/@Provides functions cannot be +extensions [BindingReceiverParameter] + + @Binds fun Int.bind(): Number + --- + + +src/foo/MyQualifier.kt:13:Error: @Binds/@Provides functions cannot be +extensions [BindingReceiverParameter] + + @Binds fun Long.bind(): Number + ---- + + +src/foo/MyQualifier.kt:14:Error: @Binds/@Provides functions cannot be +extensions [BindingReceiverParameter] + + @Binds fun Double.bind(): Number + ------ + + +src/foo/MyQualifier.kt:15:Error: @Binds/@Provides functions cannot be +extensions [BindingReceiverParameter] + + @Binds fun Float.bind(): Number + ----- + + +src/foo/MyQualifier.kt:16:Error: @Binds/@Provides functions cannot be +extensions [BindingReceiverParameter] + + @Binds fun Short.bind(): Number + ----- + + +src/foo/MyQualifier.kt:17:Error: @Binds/@Provides functions cannot be +extensions [BindingReceiverParameter] + + @Binds fun Byte.bind(): Number + ---- + + +src/foo/MyQualifier.kt:18:Error: @Binds/@Provides functions cannot be +extensions [BindingReceiverParameter] + + @Binds fun Char.bind(): Comparable<Char> + ---- + + +src/foo/MyQualifier.kt:19:Error: @Binds/@Provides functions cannot be +extensions [BindingReceiverParameter] + + @Binds fun String.bind(): Comparable<String> + ------ + + +src/foo/MyQualifier.kt:20:Error: @Binds/@Provides functions cannot be +extensions [BindingReceiverParameter] + + @Binds fun @receiver:MyQualifier Boolean.bind(): Comparable<Boolean> + ------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/foo/MyQualifier.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package foo +import javax.inject.Qualifier +import dagger.Binds +import dagger.Provides +import dagger.Module + +@Qualifier +annotation class MyQualifier + +@Module +interface MyModule { + @Binds fun Int.bind(): Number + @Binds fun Long.bind(): Number + @Binds fun Double.bind(): Number + @Binds fun Float.bind(): Number + @Binds fun Short.bind(): Number + @Binds fun Byte.bind(): Number + @Binds fun Char.bind(): Comparable + @Binds fun String.bind(): Comparable + @Binds fun @receiver:MyQualifier Boolean.bind(): Comparable +} + +@Module +interface MyModule2 { + @Provides fun Int.bind(): Number = this@bind + @Provides fun Long.bind(): Number = this@bind + @Provides fun Double.bind(): Number = this@bind + @Provides fun Float.bind(): Number = this@bind + @Provides fun Short.bind(): Number = this@bind + @Provides fun Byte.bind(): Number = this@bind + @Provides fun Char.bind(): Comparable = this@bind + @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) +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, `DaggerIssuesDetector.bindings cannot be extension functions`. +To report a problem with this extracted sample, visit +https://github.com/slackhq/slack-lints. + +(##) 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.slack.lint:slack-lint-checks:0.7.0") + +// build.gradle +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' + +// build.gradle.kts with version catalogs: +lintChecks(libs.slack-lint-checks) + +# libs.versions.toml +[versions] +slack-lint-checks = "0.7.0" +[libraries] +slack-lint-checks = { + module = "com.slack.lint:slack-lint-checks", + version.ref = "slack-lint-checks" +} +``` + +0.7.0 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.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("BindingReceiverParameter") + fun method() { + problematicStatement() + } + ``` + + or + + ```java + // Java + @SuppressWarnings("BindingReceiverParameter") + void method() { + problematicStatement(); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection BindingReceiverParameter + 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="BindingReceiverParameter" 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 'BindingReceiverParameter' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore BindingReceiverParameter ...` + ``` + +* 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/BindingReturnType.md.html b/docs/checks/BindingReturnType.md.html new file mode 100644 index 00000000..27b48aa6 --- /dev/null +++ b/docs/checks/BindingReturnType.md.html @@ -0,0 +1,195 @@ + +(#) @Binds/@Provides functions must have a return type. Cannot be void or Unit. + +!!! ERROR: @Binds/@Provides functions must have a return type. Cannot be void or Unit. + This is an error. + +Id +: `BindingReturnType` +Summary +: @Binds/@Provides functions must have a return type. Cannot be void or Unit. +Severity +: Error +Category +: Correctness +Platform +: Any +Vendor +: slack +Identifier +: slack-lint +Contact +: https://github.com/slackhq/slack-lints +Feedback +: https://github.com/slackhq/slack-lints +Min +: Lint 8.0 and 8.1 +Compiled +: Lint 8.0 and 8.1 +Artifact +: [com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html) + +Affects +: 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/slack-lints/blob/main/slack-lint-checks/src/main/java/slack/lint/DaggerIssuesDetector.kt) +Tests +: [Source Code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/DaggerIssuesDetectorTest.kt) +Copyright Year +: 2021 + +@Binds/@Provides functions must have a return type. Cannot be void or +Unit. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/foo/MyQualifier.kt:14:Error: @Binds/@Provides must have a return +type [BindingReturnType] + + @Provides fun invalidBind3() { + ^ + + +src/foo/MyQualifier.kt:17:Error: @Binds/@Provides must have a return +type [BindingReturnType] + + @Provides fun invalidBind4(): Unit { + ^ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/foo/MyQualifier.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package foo +import javax.inject.Qualifier +import dagger.Binds +import dagger.Provides +import dagger.Module + +@Qualifier +annotation class MyQualifier + +@Module +abstract class MyModule { + @Binds fun invalidBind1(@MyQualifier real: Unit) + @Binds fun invalidBind2(@MyQualifier real: Unit): Unit + @Provides fun invalidBind3() { + + } + @Provides fun invalidBind4(): Unit { + 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) +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, `DaggerIssuesDetector.invalid return types`. +To report a problem with this extracted sample, visit +https://github.com/slackhq/slack-lints. + +(##) 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.slack.lint:slack-lint-checks:0.7.0") + +// build.gradle +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' + +// build.gradle.kts with version catalogs: +lintChecks(libs.slack-lint-checks) + +# libs.versions.toml +[versions] +slack-lint-checks = "0.7.0" +[libraries] +slack-lint-checks = { + module = "com.slack.lint:slack-lint-checks", + version.ref = "slack-lint-checks" +} +``` + +0.7.0 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.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("BindingReturnType") + fun method() { + problematicStatement() + } + ``` + + or + + ```java + // Java + @SuppressWarnings("BindingReturnType") + void method() { + problematicStatement(); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection BindingReturnType + 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="BindingReturnType" 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 'BindingReturnType' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore BindingReturnType ...` + ``` + +* 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/BindsMustBeAbstract.md.html b/docs/checks/BindsMustBeAbstract.md.html new file mode 100644 index 00000000..387aabb7 --- /dev/null +++ b/docs/checks/BindsMustBeAbstract.md.html @@ -0,0 +1,194 @@ + +(#) @Binds functions must be abstract and cannot have function bodies. + +!!! ERROR: @Binds functions must be abstract and cannot have function bodies. + This is an error. + +Id +: `BindsMustBeAbstract` +Summary +: @Binds functions must be abstract and cannot have function bodies. +Severity +: Error +Category +: Correctness +Platform +: Any +Vendor +: slack +Identifier +: slack-lint +Contact +: https://github.com/slackhq/slack-lints +Feedback +: https://github.com/slackhq/slack-lints +Min +: Lint 8.0 and 8.1 +Compiled +: Lint 8.0 and 8.1 +Artifact +: [com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html) + +Affects +: 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/slack-lints/blob/main/slack-lint-checks/src/main/java/slack/lint/DaggerIssuesDetector.kt) +Tests +: [Source Code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/DaggerIssuesDetectorTest.kt) +Copyright Year +: 2021 + +@Binds functions must be abstract and cannot have function bodies. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/foo/MyQualifier.kt:12:Error: @Binds functions must be abstract +[BindsMustBeAbstract] + + @Binds fun invalidBind1(@MyQualifier real: Unit) + ------------------------------------------------ + + +src/foo/MyQualifier.kt:13:Error: @Binds functions must be abstract +[BindsMustBeAbstract] + + @Binds fun invalidBind2(@MyQualifier real: Unit): Unit + ------------------------------------------------------ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/foo/MyQualifier.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package foo +import javax.inject.Qualifier +import dagger.Binds +import dagger.Provides +import dagger.Module + +@Qualifier +annotation class MyQualifier + +@Module +abstract class MyModule { + @Binds fun invalidBind1(@MyQualifier real: Unit) + @Binds fun invalidBind2(@MyQualifier real: Unit): Unit + @Provides fun invalidBind3() { + + } + @Provides fun invalidBind4(): Unit { + 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) +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, `DaggerIssuesDetector.invalid return types`. +To report a problem with this extracted sample, visit +https://github.com/slackhq/slack-lints. + +(##) 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.slack.lint:slack-lint-checks:0.7.0") + +// build.gradle +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' + +// build.gradle.kts with version catalogs: +lintChecks(libs.slack-lint-checks) + +# libs.versions.toml +[versions] +slack-lint-checks = "0.7.0" +[libraries] +slack-lint-checks = { + module = "com.slack.lint:slack-lint-checks", + version.ref = "slack-lint-checks" +} +``` + +0.7.0 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.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("BindsMustBeAbstract") + fun method() { + problematicStatement() + } + ``` + + or + + ```java + // Java + @SuppressWarnings("BindsMustBeAbstract") + void method() { + problematicStatement(); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection BindsMustBeAbstract + 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="BindsMustBeAbstract" 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 'BindsMustBeAbstract' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore BindsMustBeAbstract ...` + ``` + +* 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/BindsTypeMismatch.md.html b/docs/checks/BindsTypeMismatch.md.html new file mode 100644 index 00000000..e2133e02 --- /dev/null +++ b/docs/checks/BindsTypeMismatch.md.html @@ -0,0 +1,206 @@ + +(#) @Binds function parameters must be type-assignable to their return types. + +!!! ERROR: @Binds function parameters must be type-assignable to their return types. + This is an error. + +Id +: `BindsTypeMismatch` +Summary +: @Binds function parameters must be type-assignable to their return types. +Severity +: Error +Category +: Correctness +Platform +: Any +Vendor +: slack +Identifier +: slack-lint +Contact +: https://github.com/slackhq/slack-lints +Feedback +: https://github.com/slackhq/slack-lints +Min +: Lint 8.0 and 8.1 +Compiled +: Lint 8.0 and 8.1 +Artifact +: [com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html) + +Affects +: 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/slack-lints/blob/main/slack-lint-checks/src/main/java/slack/lint/DaggerIssuesDetector.kt) +Tests +: [Source Code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/DaggerIssuesDetectorTest.kt) +Copyright Year +: 2021 + +@Binds function parameters must be type-assignable to their return +types. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/foo/TestModule.kt:18:Error: @Binds parameter/return must be +type-assignable [BindsTypeMismatch] + + @Binds fun invalidBind(real: Long): String + ------------------------------------------ + + +src/foo/TestModule.kt:19:Error: @Binds parameter/return must be +type-assignable [BindsTypeMismatch] + + @Binds fun invalidBind(real: Long): Comparable<Boolean> + ------------------------------------------------------- + + +src/foo/TestModule.kt:23:Error: @Binds parameter/return must be +type-assignable [BindsTypeMismatch] + + @Binds fun invalidComplexBinding(real: DetailTypeAItemMapper): ItemMapper<ItemDetail> + ------------------------------------------------------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/foo/TestModule.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package foo +import javax.inject.Qualifier +import dagger.Binds +import dagger.Module + +sealed interface ItemDetail { + object DetailTypeA : ItemDetail +} + +interface ItemMapper + +class DetailTypeAItemMapper : ItemMapper + +@Module +interface MyModule { + @Binds fun validBind(real: Int): Number + @Binds fun validBind(real: Boolean): Comparable + @Binds fun invalidBind(real: Long): String + @Binds fun invalidBind(real: Long): Comparable + + @Binds fun validComplexBinding(real: DetailTypeAItemMapper): ItemMapper + @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) +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, `DaggerIssuesDetector.binds type mismatches`. +To report a problem with this extracted sample, visit +https://github.com/slackhq/slack-lints. + +(##) 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.slack.lint:slack-lint-checks:0.7.0") + +// build.gradle +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' + +// build.gradle.kts with version catalogs: +lintChecks(libs.slack-lint-checks) + +# libs.versions.toml +[versions] +slack-lint-checks = "0.7.0" +[libraries] +slack-lint-checks = { + module = "com.slack.lint:slack-lint-checks", + version.ref = "slack-lint-checks" +} +``` + +0.7.0 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.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("BindsTypeMismatch") + fun method() { + problematicStatement() + } + ``` + + or + + ```java + // Java + @SuppressWarnings("BindsTypeMismatch") + void method() { + problematicStatement(); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection BindsTypeMismatch + 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="BindsTypeMismatch" 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 'BindsTypeMismatch' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore BindsTypeMismatch ...` + ``` + +* 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/BindsWrongParameterCount.md.html b/docs/checks/BindsWrongParameterCount.md.html new file mode 100644 index 00000000..b3015866 --- /dev/null +++ b/docs/checks/BindsWrongParameterCount.md.html @@ -0,0 +1,184 @@ + +(#) @Binds functions require a single parameter as an input to bind. + +!!! ERROR: @Binds functions require a single parameter as an input to bind. + This is an error. + +Id +: `BindsWrongParameterCount` +Summary +: @Binds functions require a single parameter as an input to bind. +Severity +: Error +Category +: Correctness +Platform +: Any +Vendor +: slack +Identifier +: slack-lint +Contact +: https://github.com/slackhq/slack-lints +Feedback +: https://github.com/slackhq/slack-lints +Min +: Lint 8.0 and 8.1 +Compiled +: Lint 8.0 and 8.1 +Artifact +: [com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html) + +Affects +: 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/slack-lints/blob/main/slack-lint-checks/src/main/java/slack/lint/DaggerIssuesDetector.kt) +Tests +: [Source Code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/DaggerIssuesDetectorTest.kt) +Copyright Year +: 2021 + +@Binds functions require a single parameter as an input to bind. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/foo/MyModule.kt:8:Error: @Binds must have one parameter +[BindsWrongParameterCount] + + @Binds fun invalidBind(real: Int, second: Int): Number + ------------------------ + + +src/foo/MyModule.kt:9:Error: @Binds must have one parameter +[BindsWrongParameterCount] + + @Binds fun invalidBind(): Number + -------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/foo/MyModule.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package foo +import dagger.Binds +import dagger.Module + +@Module +interface MyModule { + @Binds fun validBind(real: Int): Number + @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) +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, `DaggerIssuesDetector.binds param counts`. +To report a problem with this extracted sample, visit +https://github.com/slackhq/slack-lints. + +(##) 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.slack.lint:slack-lint-checks:0.7.0") + +// build.gradle +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' + +// build.gradle.kts with version catalogs: +lintChecks(libs.slack-lint-checks) + +# libs.versions.toml +[versions] +slack-lint-checks = "0.7.0" +[libraries] +slack-lint-checks = { + module = "com.slack.lint:slack-lint-checks", + version.ref = "slack-lint-checks" +} +``` + +0.7.0 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.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("BindsWrongParameterCount") + fun method() { + problematicStatement() + } + ``` + + or + + ```java + // Java + @SuppressWarnings("BindsWrongParameterCount") + void method() { + problematicStatement(); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection BindsWrongParameterCount + 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="BindsWrongParameterCount" 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 'BindsWrongParameterCount' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore BindsWrongParameterCount ...` + ``` + +* 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/BomWithoutPlatform.md.html b/docs/checks/BomWithoutPlatform.md.html index 427f479d..f2ff833f 100644 --- a/docs/checks/BomWithoutPlatform.md.html +++ b/docs/checks/BomWithoutPlatform.md.html @@ -79,6 +79,8 @@ testImplementation(libs.compose.bom) testImplementation "androidx.compose:compose-bom:2023.01.00" api("androidx.compose:compose-bom:2023.01.00") + // Make sure we don't complain about existing platforms + implementation platform("androidx.compose:compose-bom:2023.01.00") } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/checks/BuildListAdds.md.html b/docs/checks/BuildListAdds.md.html new file mode 100644 index 00000000..be7c68ce --- /dev/null +++ b/docs/checks/BuildListAdds.md.html @@ -0,0 +1,138 @@ + +(#) Missing `add` call in `buildList` + +!!! WARNING: Missing `add` call in `buildList` + This is a warning. + +Id +: `BuildListAdds` +Summary +: Missing `add` call in `buildList` +Severity +: Warning +Category +: Correctness +Platform +: Any +Vendor +: Android Open Source Project +Feedback +: https://issuetracker.google.com/issues/new?component=192708 +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/BuildListDetector.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/BuildListDetectorTest.kt) +Copyright Year +: 2024 + +The `buildList { }` standard library function is a convenient way to +build lists, but you need to actually call `add` on the items. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/Cubic.kt:4:Warning: No add calls within buildList lambda; this is +usually a mistake [BuildListAdds] + + return buildList { // ERROR + --------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/Cubic.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +class Cubic(id: Int) +val _morphMatch = listOf(1) +fun asCubics_broken(progress: Float): List { + return buildList { // ERROR + for (i in _morphMatch.indices) { + Cubic(i) + } + } +} + +fun asCubics_correct(progress: Float): List { + return buildList { // OK + for (i in _morphMatch.indices) { + add(Cubic(i)) + } + } +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can also visit the +[source code](https://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) +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("BuildListAdds") + fun method() { + buildList(...) + } + ``` + + or + + ```java + // Java + @SuppressWarnings("BuildListAdds") + void method() { + buildList(...); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection BuildListAdds + 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="BuildListAdds" 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 'BuildListAdds' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore BuildListAdds ...` + ``` + +* 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/CastingViewContextToActivity.md.html b/docs/checks/CastingViewContextToActivity.md.html index e846799a..7526a6ef 100644 --- a/docs/checks/CastingViewContextToActivity.md.html +++ b/docs/checks/CastingViewContextToActivity.md.html @@ -54,17 +54,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -72,7 +72,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/ChromeOsAbiSupport.md.html b/docs/checks/ChromeOsAbiSupport.md.html index 3f263883..8db74d90 100644 --- a/docs/checks/ChromeOsAbiSupport.md.html +++ b/docs/checks/ChromeOsAbiSupport.md.html @@ -45,7 +45,7 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -build.gradle:10:Warning: Missing x86 and x86_64 ABI support for ChromeOS +build.gradle:10:Warning: Missing x86_64 ABI support for ChromeOS [ChromeOsAbiSupport] abiFilters 'arm64-v8a' @@ -76,7 +76,7 @@ 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.testChromeOSAbiFiltersMissingX86`. +found for this lint check, `GradleDetector.testChromeOSAbiFiltersMissingX8664`. To report a problem with this extracted sample, visit https://issuetracker.google.com/issues/new?component=192708. diff --git a/docs/checks/ColorCasing.md.html b/docs/checks/ColorCasing.md.html index 8e02a72f..a7028c57 100644 --- a/docs/checks/ColorCasing.md.html +++ b/docs/checks/ColorCasing.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,45 +29,10 @@ : Resource files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/ColorCasingDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/ColorCasingDetectorTest.kt) Colors should have uppercase letters. #FF0099 is valid while #ff0099 isn't since the ff should be written in uppercase. -!!! 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/layout/layout.xml:2:Warning: Should be using uppercase letters -[ColorCasing] - - tools:textColor="#fff"/> - ---- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`res/layout/layout.xml`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~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/java/com/vanniktech/lintrules/android/ColorCasingDetectorTest.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, `ColorCasingDetector.lowercaseColor`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -77,17 +42,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -95,7 +60,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/ComposableDestinationInComposeScope.md.html b/docs/checks/ComposableDestinationInComposeScope.md.html index 4ace057e..f9396ed4 100644 --- a/docs/checks/ComposableDestinationInComposeScope.md.html +++ b/docs/checks/ComposableDestinationInComposeScope.md.html @@ -90,17 +90,17 @@ ``` // build.gradle.kts -implementation("androidx.navigation:navigation-compose:2.7.0-beta01") +implementation("androidx.navigation:navigation-compose:2.8.0-alpha01") // build.gradle -implementation 'androidx.navigation:navigation-compose:2.7.0-beta01' +implementation 'androidx.navigation:navigation-compose:2.8.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.navigation-compose) # libs.versions.toml [versions] -navigation-compose = "2.7.0-beta01" +navigation-compose = "2.8.0-alpha01" [libraries] navigation-compose = { module = "androidx.navigation:navigation-compose", @@ -108,7 +108,7 @@ } ``` -2.7.0-beta01 is the version this documentation was generated from; +2.8.0-alpha01 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 797a558c..9c3351bb 100644 --- a/docs/checks/ComposableLambdaParameterNaming.md.html +++ b/docs/checks/ComposableLambdaParameterNaming.md.html @@ -23,11 +23,11 @@ Feedback : https://issuetracker.google.com/issues/new?component=612128 Min -: Lint 7.0 +: Lint 8.0 and 8.1 Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.runtime:runtime](androidx_compose_runtime_runtime.md.html) +: [androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html) Affects : Kotlin and Java files and test sources @@ -85,28 +85,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime:1.5.0-beta02") +implementation("androidx.compose.runtime:runtime-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.runtime:runtime:1.5.0-beta02' +implementation 'androidx.compose.runtime:runtime-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.runtime) +implementation(libs.runtime-android) # libs.versions.toml [versions] -runtime = "1.5.0-beta02" +runtime-android = "1.7.0-alpha01" [libraries] -runtime = { - module = "androidx.compose.runtime:runtime", - version.ref = "runtime" +runtime-android = { + module = "androidx.compose.runtime:runtime-android", + version.ref = "runtime-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.runtime:runtime](androidx_compose_runtime_runtime.md.html). +[Additional details about androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html). (##) Suppressing You can suppress false positives using one of the following mechanisms: diff --git a/docs/checks/ComposableLambdaParameterPosition.md.html b/docs/checks/ComposableLambdaParameterPosition.md.html index 2b4e2b29..feb9c788 100644 --- a/docs/checks/ComposableLambdaParameterPosition.md.html +++ b/docs/checks/ComposableLambdaParameterPosition.md.html @@ -23,11 +23,11 @@ Feedback : https://issuetracker.google.com/issues/new?component=612128 Min -: Lint 7.0 +: Lint 8.0 and 8.1 Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.runtime:runtime](androidx_compose_runtime_runtime.md.html) +: [androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html) Affects : Kotlin and Java files and test sources @@ -87,28 +87,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime:1.5.0-beta02") +implementation("androidx.compose.runtime:runtime-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.runtime:runtime:1.5.0-beta02' +implementation 'androidx.compose.runtime:runtime-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.runtime) +implementation(libs.runtime-android) # libs.versions.toml [versions] -runtime = "1.5.0-beta02" +runtime-android = "1.7.0-alpha01" [libraries] -runtime = { - module = "androidx.compose.runtime:runtime", - version.ref = "runtime" +runtime-android = { + module = "androidx.compose.runtime:runtime-android", + version.ref = "runtime-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.runtime:runtime](androidx_compose_runtime_runtime.md.html). +[Additional details about androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html). (##) Suppressing You can suppress false positives using one of the following mechanisms: diff --git a/docs/checks/ComposableNaming.md.html b/docs/checks/ComposableNaming.md.html index cf2d975e..97342ee4 100644 --- a/docs/checks/ComposableNaming.md.html +++ b/docs/checks/ComposableNaming.md.html @@ -21,11 +21,11 @@ Feedback : https://issuetracker.google.com/issues/new?component=612128 Min -: Lint 7.0 +: Lint 8.0 and 8.1 Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.runtime:runtime](androidx_compose_runtime_runtime.md.html) +: [androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html) Affects : Kotlin and Java files and test sources @@ -87,28 +87,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime:1.5.0-beta02") +implementation("androidx.compose.runtime:runtime-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.runtime:runtime:1.5.0-beta02' +implementation 'androidx.compose.runtime:runtime-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.runtime) +implementation(libs.runtime-android) # libs.versions.toml [versions] -runtime = "1.5.0-beta02" +runtime-android = "1.7.0-alpha01" [libraries] -runtime = { - module = "androidx.compose.runtime:runtime", - version.ref = "runtime" +runtime-android = { + module = "androidx.compose.runtime:runtime-android", + version.ref = "runtime-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.runtime:runtime](androidx_compose_runtime_runtime.md.html). +[Additional details about androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html). (##) Suppressing You can suppress false positives using one of the following mechanisms: diff --git a/docs/checks/ComposableNavGraphInComposeScope.md.html b/docs/checks/ComposableNavGraphInComposeScope.md.html index 3e9601bc..52dcf6b5 100644 --- a/docs/checks/ComposableNavGraphInComposeScope.md.html +++ b/docs/checks/ComposableNavGraphInComposeScope.md.html @@ -89,17 +89,17 @@ ``` // build.gradle.kts -implementation("androidx.navigation:navigation-compose:2.7.0-beta01") +implementation("androidx.navigation:navigation-compose:2.8.0-alpha01") // build.gradle -implementation 'androidx.navigation:navigation-compose:2.7.0-beta01' +implementation 'androidx.navigation:navigation-compose:2.8.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.navigation-compose) # libs.versions.toml [versions] -navigation-compose = "2.7.0-beta01" +navigation-compose = "2.8.0-alpha01" [libraries] navigation-compose = { module = "androidx.navigation:navigation-compose", @@ -107,7 +107,7 @@ } ``` -2.7.0-beta01 is the version this documentation was generated from; +2.8.0-alpha01 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/ComposeComposableModifier.md.html b/docs/checks/ComposeComposableModifier.md.html index 312b4067..4eccedb6 100644 --- a/docs/checks/ComposeComposableModifier.md.html +++ b/docs/checks/ComposeComposableModifier.md.html @@ -45,33 +45,29 @@ function tree. See https://slackhq.github.io/compose-lints/rules/#avoid-modifier-extension-factory-functions - for more information. +for more information. (##) Example Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/test.kt:1:Error: Using @Composable builder functions for modifiers -is not recommended, as they cause unnecessary recompositions. -You should use Modifier.composed { ... } instead, as it limits -recomposition to just the modifier instance, rather than the whole -function tree. -See +src/test.kt:4:Error: Using @Composable builder functions for modifiers +is not recommended, as they cause unnecessary recompositions.You should +use the Modifier.Node API instead, as it limits recomposition to just +the modifier instance, rather than the whole function tree.See https://slackhq.github.io/compose-lints/rules/#avoid-modifier-extension-factory-functions - for more information. [ComposeComposableModifier] +for more information. [ComposeComposableModifier] @Composable ^ -src/test.kt:3:Error: Using @Composable builder functions for modifiers -is not recommended, as they cause unnecessary recompositions. -You should use Modifier.composed { ... } instead, as it limits -recomposition to just the modifier instance, rather than the whole -function tree. -See +src/test.kt:6:Error: Using @Composable builder functions for modifiers +is not recommended, as they cause unnecessary recompositions.You should +use the Modifier.Node API instead, as it limits recomposition to just +the modifier instance, rather than the whole function tree.See https://slackhq.github.io/compose-lints/rules/#avoid-modifier-extension-factory-functions - for more information. [ComposeComposableModifier] +for more information. [ComposeComposableModifier] @Composable ^ @@ -81,6 +77,9 @@ `src/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier + @Composable fun Modifier.something1(): Modifier { } @Composable diff --git a/docs/checks/ComposeCompositionLocalUsage.md.html b/docs/checks/ComposeCompositionLocalUsage.md.html index b280f529..83db6997 100644 --- a/docs/checks/ComposeCompositionLocalUsage.md.html +++ b/docs/checks/ComposeCompositionLocalUsage.md.html @@ -68,8 +68,8 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text src/test.kt:2:Warning: `CompositionLocal`s are implicit dependencies and -creating new ones should be avoided. -See https://slackhq.github.io/compose-lints/rules/#compositionlocals for +creating new ones should be avoided. See +https://slackhq.github.io/compose-lints/rules/#compositionlocals for more information. [ComposeCompositionLocalUsage] private val LocalApple = staticCompositionLocalOf<String> { "Apple" } @@ -77,8 +77,8 @@ src/test.kt:3:Warning: `CompositionLocal`s are implicit dependencies and -creating new ones should be avoided. -See https://slackhq.github.io/compose-lints/rules/#compositionlocals for +creating new ones should be avoided. See +https://slackhq.github.io/compose-lints/rules/#compositionlocals for more information. [ComposeCompositionLocalUsage] internal val LocalPlum: String = staticCompositionLocalOf { "Plum" } @@ -86,8 +86,8 @@ src/test.kt:4:Warning: `CompositionLocal`s are implicit dependencies and -creating new ones should be avoided. -See https://slackhq.github.io/compose-lints/rules/#compositionlocals for +creating new ones should be avoided. See +https://slackhq.github.io/compose-lints/rules/#compositionlocals for more information. [ComposeCompositionLocalUsage] val LocalPrune = compositionLocalOf { "Prune" } @@ -95,8 +95,8 @@ src/test.kt:5:Warning: `CompositionLocal`s are implicit dependencies and -creating new ones should be avoided. -See https://slackhq.github.io/compose-lints/rules/#compositionlocals for +creating new ones should be avoided. See +https://slackhq.github.io/compose-lints/rules/#compositionlocals for more information. [ComposeCompositionLocalUsage] private val LocalKiwi: String = compositionLocalOf { "Kiwi" } diff --git a/docs/checks/ComposeContentEmitterReturningValues.md.html b/docs/checks/ComposeContentEmitterReturningValues.md.html index 154b12c7..303c7bcd 100644 --- a/docs/checks/ComposeContentEmitterReturningValues.md.html +++ b/docs/checks/ComposeContentEmitterReturningValues.md.html @@ -45,7 +45,7 @@ the composable function by the caller. See https://slackhq.github.io/compose-lints/rules/#do-not-emit-content-and-return-a-result - for more information. +for more information. (##) Options @@ -71,27 +71,25 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/test.kt:1: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 +src/test.kt:3: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 https://slackhq.github.io/compose-lints/rules/#do-not-emit-content-and-return-a-result - for more information. [ComposeContentEmitterReturningValues] +for more information. [ComposeContentEmitterReturningValues] @Composable ^ -src/test.kt:6: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 +src/test.kt:8: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 https://slackhq.github.io/compose-lints/rules/#do-not-emit-content-and-return-a-result - for more information. [ComposeContentEmitterReturningValues] +for more information. [ComposeContentEmitterReturningValues] @Composable ^ @@ -101,6 +99,8 @@ `src/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +import androidx.compose.runtime.Composable + @Composable fun Something() { Text("Hi") diff --git a/docs/checks/ComposeM2Api.md.html b/docs/checks/ComposeM2Api.md.html index 79fd9822..a18b199c 100644 --- a/docs/checks/ComposeM2Api.md.html +++ b/docs/checks/ComposeM2Api.md.html @@ -70,36 +70,36 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text src/test.kt:9:Error: Compose Material 2 (M2) is succeeded by Material 3 -(M3). Please use M3 APIs. -See https://slackhq.github.io/compose-lints/rules/#use-material-3 for -more information. [ComposeM2Api] +(M3). Please use M3 APIs.See +https://slackhq.github.io/compose-lints/rules/#use-material-3 for more +information. [ComposeM2Api] Text("Hello, world!") --------------------- src/test.kt:23:Error: Compose Material 2 (M2) is succeeded by Material 3 -(M3). Please use M3 APIs. -See https://slackhq.github.io/compose-lints/rules/#use-material-3 for -more information. [ComposeM2Api] +(M3). Please use M3 APIs.See +https://slackhq.github.io/compose-lints/rules/#use-material-3 for more +information. [ComposeM2Api] Text("Hello, world!") --------------------- src/test.kt:24:Error: Compose Material 2 (M2) is succeeded by Material 3 -(M3). Please use M3 APIs. -See https://slackhq.github.io/compose-lints/rules/#use-material-3 for -more information. [ComposeM2Api] +(M3). Please use M3 APIs.See +https://slackhq.github.io/compose-lints/rules/#use-material-3 for more +information. [ComposeM2Api] val elevation = BottomNavigationDefaults.Elevation ---------------------------------- src/test.kt:25:Error: Compose Material 2 (M2) is succeeded by Material 3 -(M3). Please use M3 APIs. -See https://slackhq.github.io/compose-lints/rules/#use-material-3 for -more information. [ComposeM2Api] +(M3). Please use M3 APIs.See +https://slackhq.github.io/compose-lints/rules/#use-material-3 for more +information. [ComposeM2Api] val drawerValue = BottomDrawerValue.Closed ------------------------ diff --git a/docs/checks/ComposeModifierMissing.md.html b/docs/checks/ComposeModifierMissing.md.html index f748f187..f0a4241f 100644 --- a/docs/checks/ComposeModifierMissing.md.html +++ b/docs/checks/ComposeModifierMissing.md.html @@ -42,7 +42,7 @@ parameter. See https://slackhq.github.io/compose-lints/rules/#when-should-i-expose-modifier-parameters - for more information. +for more information. (##) Options @@ -85,31 +85,28 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/test.kt:2:Error: This @Composable function emits content but doesn't -have a modifier parameter. -See +src/test.kt:5:Error: This @Composable function emits content but doesn't +have a modifier parameter.See https://slackhq.github.io/compose-lints/rules/#when-should-i-expose-modifier-parameters - for more information. [ComposeModifierMissing] +for more information. [ComposeModifierMissing] fun Something1() { ---------- -src/test.kt:7:Error: This @Composable function emits content but doesn't -have a modifier parameter. -See +src/test.kt:10:Error: This @Composable function emits content but +doesn't have a modifier parameter.See https://slackhq.github.io/compose-lints/rules/#when-should-i-expose-modifier-parameters - for more information. [ComposeModifierMissing] +for more information. [ComposeModifierMissing] fun Something2() { ---------- -src/test.kt:12:Error: This @Composable function emits content but -doesn't have a modifier parameter. -See +src/test.kt:15:Error: This @Composable function emits content but +doesn't have a modifier parameter.See https://slackhq.github.io/compose-lints/rules/#when-should-i-expose-modifier-parameters - for more information. [ComposeModifierMissing] +for more information. [ComposeModifierMissing] fun Something3(): Unit { ---------- @@ -119,6 +116,9 @@ `src/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +import androidx.compose.ui.Modifier +import androidx.compose.runtime.Composable + @Composable fun Something1() { Row { diff --git a/docs/checks/ComposeModifierReused.md.html b/docs/checks/ComposeModifierReused.md.html index 40922aea..ce058ff2 100644 --- a/docs/checks/ComposeModifierReused.md.html +++ b/docs/checks/ComposeModifierReused.md.html @@ -70,133 +70,133 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/test.kt:3:Error: Modifiers should only be used once and by the root +src/test.kt:6:Error: Modifiers should only be used once and by the root level layout of a Composable. This is true even if appended to or with -other modifiers e.g. modifier.fillMaxWidth(). -Use Modifier (with a capital 'M') to construct a new Modifier that you -can pass to other composables. -See https://slackhq.github.io/compose-lints/rules/#dont-re-use-modifiers -for more information. [ComposeModifierReused] +other modifiers e.g. modifier.fillMaxWidth().Use Modifier (with a +capital 'M') to construct a new Modifier that you can pass to other +composables.See +https://slackhq.github.io/compose-lints/rules/#dont-re-use-modifiers for +more information. [ComposeModifierReused] Row(modifier) { ^ -src/test.kt:4:Error: Modifiers should only be used once and by the root +src/test.kt:7:Error: Modifiers should only be used once and by the root level layout of a Composable. This is true even if appended to or with -other modifiers e.g. modifier.fillMaxWidth(). -Use Modifier (with a capital 'M') to construct a new Modifier that you -can pass to other composables. -See https://slackhq.github.io/compose-lints/rules/#dont-re-use-modifiers -for more information. [ComposeModifierReused] +other modifiers e.g. modifier.fillMaxWidth().Use Modifier (with a +capital 'M') to construct a new Modifier that you can pass to other +composables.See +https://slackhq.github.io/compose-lints/rules/#dont-re-use-modifiers for +more information. [ComposeModifierReused] SomethingElse(modifier) ----------------------- -src/test.kt:9:Error: Modifiers should only be used once and by the root +src/test.kt:12:Error: Modifiers should only be used once and by the root level layout of a Composable. This is true even if appended to or with -other modifiers e.g. modifier.fillMaxWidth(). -Use Modifier (with a capital 'M') to construct a new Modifier that you -can pass to other composables. -See https://slackhq.github.io/compose-lints/rules/#dont-re-use-modifiers -for more information. [ComposeModifierReused] +other modifiers e.g. modifier.fillMaxWidth().Use Modifier (with a +capital 'M') to construct a new Modifier that you can pass to other +composables.See +https://slackhq.github.io/compose-lints/rules/#dont-re-use-modifiers for +more information. [ComposeModifierReused] Column(modifier = modifier) { ^ -src/test.kt:11:Error: Modifiers should only be used once and by the root +src/test.kt:14:Error: Modifiers should only be used once and by the root level layout of a Composable. This is true even if appended to or with -other modifiers e.g. modifier.fillMaxWidth(). -Use Modifier (with a capital 'M') to construct a new Modifier that you -can pass to other composables. -See https://slackhq.github.io/compose-lints/rules/#dont-re-use-modifiers -for more information. [ComposeModifierReused] +other modifiers e.g. modifier.fillMaxWidth().Use Modifier (with a +capital 'M') to construct a new Modifier that you can pass to other +composables.See +https://slackhq.github.io/compose-lints/rules/#dont-re-use-modifiers for +more information. [ComposeModifierReused] SomethingDifferent(modifier = modifier) --------------------------------------- -src/test.kt:16:Error: Modifiers should only be used once and by the root +src/test.kt:19:Error: Modifiers should only be used once and by the root level layout of a Composable. This is true even if appended to or with -other modifiers e.g. modifier.fillMaxWidth(). -Use Modifier (with a capital 'M') to construct a new Modifier that you -can pass to other composables. -See https://slackhq.github.io/compose-lints/rules/#dont-re-use-modifiers -for more information. [ComposeModifierReused] +other modifiers e.g. modifier.fillMaxWidth().Use Modifier (with a +capital 'M') to construct a new Modifier that you can pass to other +composables.See +https://slackhq.github.io/compose-lints/rules/#dont-re-use-modifiers for +more information. [ComposeModifierReused] Column(modifier = modifier) { ^ -src/test.kt:19:Error: Modifiers should only be used once and by the root +src/test.kt:22:Error: Modifiers should only be used once and by the root level layout of a Composable. This is true even if appended to or with -other modifiers e.g. modifier.fillMaxWidth(). -Use Modifier (with a capital 'M') to construct a new Modifier that you -can pass to other composables. -See https://slackhq.github.io/compose-lints/rules/#dont-re-use-modifiers -for more information. [ComposeModifierReused] +other modifiers e.g. modifier.fillMaxWidth().Use Modifier (with a +capital 'M') to construct a new Modifier that you can pass to other +composables.See +https://slackhq.github.io/compose-lints/rules/#dont-re-use-modifiers for +more information. [ComposeModifierReused] SomethingElse(modifier = modifier) ---------------------------------- -src/test.kt:20:Error: Modifiers should only be used once and by the root +src/test.kt:23:Error: Modifiers should only be used once and by the root level layout of a Composable. This is true even if appended to or with -other modifiers e.g. modifier.fillMaxWidth(). -Use Modifier (with a capital 'M') to construct a new Modifier that you -can pass to other composables. -See https://slackhq.github.io/compose-lints/rules/#dont-re-use-modifiers -for more information. [ComposeModifierReused] +other modifiers e.g. modifier.fillMaxWidth().Use Modifier (with a +capital 'M') to construct a new Modifier that you can pass to other +composables.See +https://slackhq.github.io/compose-lints/rules/#dont-re-use-modifiers for +more information. [ComposeModifierReused] SomethingElse(modifier = modifier.padding12()) ---------------------------------------------- -src/test.kt:25:Error: Modifiers should only be used once and by the root +src/test.kt:28:Error: Modifiers should only be used once and by the root level layout of a Composable. This is true even if appended to or with -other modifiers e.g. modifier.fillMaxWidth(). -Use Modifier (with a capital 'M') to construct a new Modifier that you -can pass to other composables. -See https://slackhq.github.io/compose-lints/rules/#dont-re-use-modifiers -for more information. [ComposeModifierReused] +other modifiers e.g. modifier.fillMaxWidth().Use Modifier (with a +capital 'M') to construct a new Modifier that you can pass to other +composables.See +https://slackhq.github.io/compose-lints/rules/#dont-re-use-modifiers for +more information. [ComposeModifierReused] SomethingElse(myMod) -------------------- -src/test.kt:26:Error: Modifiers should only be used once and by the root +src/test.kt:29:Error: Modifiers should only be used once and by the root level layout of a Composable. This is true even if appended to or with -other modifiers e.g. modifier.fillMaxWidth(). -Use Modifier (with a capital 'M') to construct a new Modifier that you -can pass to other composables. -See https://slackhq.github.io/compose-lints/rules/#dont-re-use-modifiers -for more information. [ComposeModifierReused] +other modifiers e.g. modifier.fillMaxWidth().Use Modifier (with a +capital 'M') to construct a new Modifier that you can pass to other +composables.See +https://slackhq.github.io/compose-lints/rules/#dont-re-use-modifiers for +more information. [ComposeModifierReused] SomethingElse(myMod) -------------------- -src/test.kt:31:Error: Modifiers should only be used once and by the root +src/test.kt:34:Error: Modifiers should only be used once and by the root level layout of a Composable. This is true even if appended to or with -other modifiers e.g. modifier.fillMaxWidth(). -Use Modifier (with a capital 'M') to construct a new Modifier that you -can pass to other composables. -See https://slackhq.github.io/compose-lints/rules/#dont-re-use-modifiers -for more information. [ComposeModifierReused] +other modifiers e.g. modifier.fillMaxWidth().Use Modifier (with a +capital 'M') to construct a new Modifier that you can pass to other +composables.See +https://slackhq.github.io/compose-lints/rules/#dont-re-use-modifiers for +more information. [ComposeModifierReused] Box( ^ -src/test.kt:37:Error: Modifiers should only be used once and by the root +src/test.kt:40:Error: Modifiers should only be used once and by the root level layout of a Composable. This is true even if appended to or with -other modifiers e.g. modifier.fillMaxWidth(). -Use Modifier (with a capital 'M') to construct a new Modifier that you -can pass to other composables. -See https://slackhq.github.io/compose-lints/rules/#dont-re-use-modifiers -for more information. [ComposeModifierReused] +other modifiers e.g. modifier.fillMaxWidth().Use Modifier (with a +capital 'M') to construct a new Modifier that you can pass to other +composables.See +https://slackhq.github.io/compose-lints/rules/#dont-re-use-modifiers for +more information. [ComposeModifierReused] Box( ^ @@ -206,6 +206,9 @@ `src/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier + @Composable fun Something(modifier: Modifier) { Row(modifier) { diff --git a/docs/checks/ComposeModifierWithoutDefault.md.html b/docs/checks/ComposeModifierWithoutDefault.md.html index 1a272605..9845a4ca 100644 --- a/docs/checks/ComposeModifierWithoutDefault.md.html +++ b/docs/checks/ComposeModifierWithoutDefault.md.html @@ -42,7 +42,7 @@ default value. See https://slackhq.github.io/compose-lints/rules/#modifiers-should-have-default-parameters - for more information. +for more information. !!! Tip This lint check has an associated quickfix available in the IDE. @@ -51,21 +51,19 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/test.kt:2:Error: This @Composable function has a modifier parameter -but it doesn't have a default value. -See +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] +for more information. [ComposeModifierWithoutDefault] fun Something(modifier: Modifier) { } ------------------ -src/test.kt:4:Error: This @Composable function has a modifier parameter -but it doesn't have a default value. -See +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] +for more information. [ComposeModifierWithoutDefault] fun Something(modifier: Modifier = Modifier, modifier2: Modifier) { } ------------------- @@ -75,6 +73,9 @@ `src/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier + @Composable fun Something(modifier: Modifier) { } @Composable diff --git a/docs/checks/ComposeMultipleContentEmitters.md.html b/docs/checks/ComposeMultipleContentEmitters.md.html index bd9face4..d009c847 100644 --- a/docs/checks/ComposeMultipleContentEmitters.md.html +++ b/docs/checks/ComposeMultipleContentEmitters.md.html @@ -42,7 +42,7 @@ composition from one source at their top level. See https://slackhq.github.io/compose-lints/rules/#do-not-emit-multiple-pieces-of-content - for more information. +for more information. (##) Options @@ -68,21 +68,23 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/test.kt:1:Error: Composable functions should only be emitting +src/test.kt:3:Error: Composable functions should only be emitting content into the composition from one source at their top level. + See https://slackhq.github.io/compose-lints/rules/#do-not-emit-multiple-pieces-of-content - for more information. [ComposeMultipleContentEmitters] +for more information. [ComposeMultipleContentEmitters] @Composable ^ -src/test.kt:6:Error: Composable functions should only be emitting +src/test.kt:8:Error: Composable functions should only be emitting content into the composition from one source at their top level. + See https://slackhq.github.io/compose-lints/rules/#do-not-emit-multiple-pieces-of-content - for more information. [ComposeMultipleContentEmitters] +for more information. [ComposeMultipleContentEmitters] @Composable ^ @@ -92,6 +94,8 @@ `src/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +import androidx.compose.runtime.Composable + @Composable fun Something() { Text("Hi") diff --git a/docs/checks/ComposeMutableParameters.md.html b/docs/checks/ComposeMutableParameters.md.html index 3145014c..591e8bb1 100644 --- a/docs/checks/ComposeMutableParameters.md.html +++ b/docs/checks/ComposeMutableParameters.md.html @@ -45,59 +45,55 @@ recomposition when they change. See https://slackhq.github.io/compose-lints/rules/#do-not-use-inherently-mutable-types-as-parameters - for more information. +for more information. (##) Example Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/test.kt:2:Error: Using mutable objects as state in Compose will -cause your users to see incorrect or stale data in your app. -Mutable objects that are not observable, such as ArrayList or a -mutable data class, cannot be observed by Compose to trigger -recomposition when they change. -See +src/test.kt:5:Error: Using mutable objects as state in Compose will +cause your users to see incorrect or stale data in your app.Mutable +objects that are not observable, such as ArrayList or a mutable data +class, cannot be observed by Compose to trigger recomposition when they +change.See https://slackhq.github.io/compose-lints/rules/#do-not-use-inherently-mutable-types-as-parameters - for more information. [ComposeMutableParameters] +for more information. [ComposeMutableParameters] fun Something(a: MutableState<String>) {} -------------------- -src/test.kt:4:Error: Using mutable objects as state in Compose will -cause your users to see incorrect or stale data in your app. -Mutable objects that are not observable, such as ArrayList or a -mutable data class, cannot be observed by Compose to trigger -recomposition when they change. -See +src/test.kt:7:Error: Using mutable objects as state in Compose will +cause your users to see incorrect or stale data in your app.Mutable +objects that are not observable, such as ArrayList or a mutable data +class, cannot be observed by Compose to trigger recomposition when they +change.See https://slackhq.github.io/compose-lints/rules/#do-not-use-inherently-mutable-types-as-parameters - for more information. [ComposeMutableParameters] +for more information. [ComposeMutableParameters] fun Something(a: ArrayList<String>) {} ----------------- -src/test.kt:6:Error: Using mutable objects as state in Compose will -cause your users to see incorrect or stale data in your app. -Mutable objects that are not observable, such as ArrayList or a -mutable data class, cannot be observed by Compose to trigger -recomposition when they change. -See +src/test.kt:9:Error: Using mutable objects as state in Compose will +cause your users to see incorrect or stale data in your app.Mutable +objects that are not observable, such as ArrayList or a mutable data +class, cannot be observed by Compose to trigger recomposition when they +change.See https://slackhq.github.io/compose-lints/rules/#do-not-use-inherently-mutable-types-as-parameters - for more information. [ComposeMutableParameters] +for more information. [ComposeMutableParameters] fun Something(a: HashSet<String>) {} --------------- -src/test.kt:8:Error: Using mutable objects as state in Compose will -cause your users to see incorrect or stale data in your app. -Mutable objects that are not observable, such as ArrayList or a -mutable data class, cannot be observed by Compose to trigger -recomposition when they change. -See +src/test.kt:11:Error: Using mutable objects as state in Compose will +cause your users to see incorrect or stale data in your app.Mutable +objects that are not observable, such as ArrayList or a mutable data +class, cannot be observed by Compose to trigger recomposition when they +change.See https://slackhq.github.io/compose-lints/rules/#do-not-use-inherently-mutable-types-as-parameters - for more information. [ComposeMutableParameters] +for more information. [ComposeMutableParameters] fun Something(a: MutableMap<String, String>) {} -------------------------- @@ -107,6 +103,9 @@ `src/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +import androidx.compose.runtime.MutableState +import androidx.compose.runtime.Composable + @Composable fun Something(a: MutableState) {} @Composable diff --git a/docs/checks/ComposeNamingLowercase.md.html b/docs/checks/ComposeNamingLowercase.md.html index 018551b4..cd28ed4d 100644 --- a/docs/checks/ComposeNamingLowercase.md.html +++ b/docs/checks/ComposeNamingLowercase.md.html @@ -45,7 +45,7 @@ for callers when used with @Composable functions. See https://slackhq.github.io/compose-lints/rules/#naming-composable-functions-properly - for more information. +for more information. (##) Options @@ -71,14 +71,13 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/test.kt:2:Error: Composable functions that return a value should -start with a lowercase letter. -While useful and accepted outside of @Composable functions, this factory -function convention has drawbacks that set inappropriate expectations -for callers when used with @Composable functions. -See +src/test.kt:4:Error: Composable functions that return a value should +start with a lowercase letter.While useful and accepted outside of +@Composable functions, this factory function convention has drawbacks +that set inappropriate expectations for callers when used with +@Composable functions.See https://slackhq.github.io/compose-lints/rules/#naming-composable-functions-properly - for more information. [ComposeNamingLowercase] +for more information. [ComposeNamingLowercase] fun MyComposable(): Something { } ------------ @@ -88,6 +87,8 @@ `src/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +import androidx.compose.runtime.Composable + @Composable fun MyComposable(): Something { } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -96,11 +97,6 @@ [source code](https://github.com/slackhq/compose-lints/tree/main/compose-lint-checks/src/test/java/slack/lint/compose/ComposableFunctionNamingDetectorTest.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, `ComposableFunctionNamingDetector.errors when a composable returns a value and is capitalized`. -To report a problem with this extracted sample, visit -https://github.com/slackhq/compose-lints/issues. - (##) Including !!! diff --git a/docs/checks/ComposeNamingUppercase.md.html b/docs/checks/ComposeNamingUppercase.md.html index 8ceaa50e..6d7d1530 100644 --- a/docs/checks/ComposeNamingUppercase.md.html +++ b/docs/checks/ComposeNamingUppercase.md.html @@ -45,7 +45,7 @@ classes. See https://slackhq.github.io/compose-lints/rules/#naming-composable-functions-properly - for more information. +for more information. (##) Options @@ -71,27 +71,23 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/test.kt:2:Error: Composable functions that return Unit should start -with an uppercase letter. -They are considered declarative entities that can be either present or -absent in a composition and therefore follow the naming rules for -classes. -See +src/test.kt:4:Error: Composable functions that return Unit should start +with an uppercase letter.They are considered declarative entities that +can be either present or absent in a composition and therefore follow +the naming rules for classes.See https://slackhq.github.io/compose-lints/rules/#naming-composable-functions-properly - for more information. [ComposeNamingUppercase] +for more information. [ComposeNamingUppercase] fun myComposable() { } ------------ -src/test.kt:5:Error: Composable functions that return Unit should start -with an uppercase letter. -They are considered declarative entities that can be either present or -absent in a composition and therefore follow the naming rules for -classes. -See +src/test.kt:7:Error: Composable functions that return Unit should start +with an uppercase letter.They are considered declarative entities that +can be either present or absent in a composition and therefore follow +the naming rules for classes.See https://slackhq.github.io/compose-lints/rules/#naming-composable-functions-properly - for more information. [ComposeNamingUppercase] +for more information. [ComposeNamingUppercase] fun myComposable(): Unit { } ------------ @@ -101,6 +97,8 @@ `src/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +import androidx.compose.runtime.Composable + @Composable fun myComposable() { } @@ -112,11 +110,6 @@ [source code](https://github.com/slackhq/compose-lints/tree/main/compose-lint-checks/src/test/java/slack/lint/compose/ComposableFunctionNamingDetectorTest.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, `ComposableFunctionNamingDetector.errors when a composable returns nothing or Unit and is lowercase`. -To report a problem with this extracted sample, visit -https://github.com/slackhq/compose-lints/issues. - (##) Including !!! diff --git a/docs/checks/ComposeParameterOrder.md.html b/docs/checks/ComposeParameterOrder.md.html index 8a658568..22fb09a0 100644 --- a/docs/checks/ComposeParameterOrder.md.html +++ b/docs/checks/ComposeParameterOrder.md.html @@ -40,11 +40,14 @@ This is replaced when reported. +!!! 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:1:Error: Parameters in a composable function should be +src/test.kt:5: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. @@ -53,13 +56,13 @@ Modifier = Modifier]. See https://slackhq.github.io/compose-lints/rules/#ordering-composable-parameters-properly - for more information. [ComposeParameterOrder] +for more information. [ComposeParameterOrder] -@Composable -^ +fun MyComposable(modifier: Modifier = Modifier, other: String, other2: String) { } + -------------------------------------------------------------- -src/test.kt:4:Error: Parameters in a composable function should be +src/test.kt:8: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. @@ -68,13 +71,13 @@ "deffo"]. See https://slackhq.github.io/compose-lints/rules/#ordering-composable-parameters-properly - for more information. [ComposeParameterOrder] +for more information. [ComposeParameterOrder] -@Composable -^ +fun MyComposable(text: String = "deffo", modifier: Modifier = Modifier) { } + ------------------------------------------------------- -src/test.kt:7:Error: Parameters in a composable function should be +src/test.kt:11: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. @@ -83,13 +86,13 @@ = Modifier, modifier2: Modifier = Modifier, text: String = "123"]. See https://slackhq.github.io/compose-lints/rules/#ordering-composable-parameters-properly - for more information. [ComposeParameterOrder] +for more information. [ComposeParameterOrder] -@Composable -^ +fun MyComposable(modifier: Modifier = Modifier, text: String = "123", modifier2: Modifier = Modifier) { } + ------------------------------------------------------------------------------------- -src/test.kt:10:Error: Parameters in a composable function should be +src/test.kt:14: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. @@ -98,13 +101,13 @@ Modifier, text: String = "123", lambda: () -> Unit]. See https://slackhq.github.io/compose-lints/rules/#ordering-composable-parameters-properly - for more information. [ComposeParameterOrder] +for more information. [ComposeParameterOrder] -@Composable -^ +fun MyComposable(text: String = "123", modifier: Modifier = Modifier, lambda: () -> Unit) { } + ------------------------------------------------------------------------- -src/test.kt:13:Error: Parameters in a composable function should be +src/test.kt:17: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. @@ -114,16 +117,19 @@ Unit]. See https://slackhq.github.io/compose-lints/rules/#ordering-composable-parameters-properly - for more information. [ComposeParameterOrder] +for more information. [ComposeParameterOrder] -@Composable -^ +fun MyComposable(text1: String, m2: Modifier = Modifier, modifier: Modifier = Modifier, trailing: () -> Unit) { } + --------------------------------------------------------------------------------------------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: `src/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier + @Composable fun MyComposable(modifier: Modifier = Modifier, other: String, other2: String) { } diff --git a/docs/checks/ComposePreviewNaming.md.html b/docs/checks/ComposePreviewNaming.md.html index 621fcdeb..4cf920ef 100644 --- a/docs/checks/ComposePreviewNaming.md.html +++ b/docs/checks/ComposePreviewNaming.md.html @@ -44,33 +44,33 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/Banana.kt:1:Error: Preview annotations with 1 preview annotations +src/Banana.kt:3:Error: Preview annotations with 1 preview annotations should end with the Preview suffix. See https://slackhq.github.io/compose-lints/rules/#naming-multipreview-annotations-properly - for more information. [ComposePreviewNaming] +for more information. [ComposePreviewNaming] @Preview ^ -src/Banana.kt:3:Error: Preview annotations with 1 preview annotations +src/Banana.kt:5:Error: Preview annotations with 1 preview annotations should end with the Preview suffix. See https://slackhq.github.io/compose-lints/rules/#naming-multipreview-annotations-properly - for more information. [ComposePreviewNaming] +for more information. [ComposePreviewNaming] @Preview ^ -src/Banana.kt:5:Error: Preview annotations with 1 preview annotations +src/Banana.kt:7:Error: Preview annotations with 1 preview annotations should end with the Preview suffix. See https://slackhq.github.io/compose-lints/rules/#naming-multipreview-annotations-properly - for more information. [ComposePreviewNaming] +for more information. [ComposePreviewNaming] -@BananaPreview +@BananaPreviews ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -78,11 +78,13 @@ `src/Banana.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +import androidx.compose.ui.tooling.preview.Preview + @Preview annotation class Banana @Preview annotation class BananaPreviews -@BananaPreview +@BananaPreviews annotation class WithBananaPreviews ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/checks/ComposePreviewPublic.md.html b/docs/checks/ComposePreviewPublic.md.html index 37c497eb..c4ae8736 100644 --- a/docs/checks/ComposePreviewPublic.md.html +++ b/docs/checks/ComposePreviewPublic.md.html @@ -42,7 +42,7 @@ the UI should not be public. See https://slackhq.github.io/compose-lints/rules/#preview-composables-should-not-be-public - for more information. +for more information. !!! Tip This lint check has an associated quickfix available in the IDE. @@ -72,30 +72,43 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/test.kt:1:Error: Composables annotated with @Preview that are used -only for previewing the UI should not be public. -See +src/test.kt:4:Error: Composables annotated with @Preview that are used +only for previewing the UI should not be public.See https://slackhq.github.io/compose-lints/rules/#preview-composables-should-not-be-public - for more information. [ComposePreviewPublic] +for more information. [ComposePreviewPublic] @Preview ^ -src/test.kt:4:Error: Composables annotated with @Preview that are used -only for previewing the UI should not be public. -See +src/test.kt:7:Error: Composables annotated with @Preview that are used +only for previewing the UI should not be public.See https://slackhq.github.io/compose-lints/rules/#preview-composables-should-not-be-public - for more information. [ComposePreviewPublic] +for more information. [ComposePreviewPublic] @CombinedPreviews ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Here is the source file referenced above: +Here are the relevant source files: + +`src/CombinedPreviews.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.PreviewParameterProvider + +@Preview +annotation class CombinedPreviews + +class User +class UserProvider : PreviewParameterProvider +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `src/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +import androidx.compose.runtime.Composable +import androidx.compose.ui.tooling.preview.Preview + @Preview @Composable fun MyComposable() { } @@ -108,11 +121,6 @@ [source code](https://github.com/slackhq/compose-lints/tree/main/compose-lint-checks/src/test/java/slack/lint/compose/PreviewPublicDetectorTest.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, `PreviewPublicDetector.errors when a public preview composable is used when previewPublicOnlyIfParams is false`. -To report a problem with this extracted sample, visit -https://github.com/slackhq/compose-lints/issues. - (##) Including !!! diff --git a/docs/checks/ComposeRememberMissing.md.html b/docs/checks/ComposeRememberMissing.md.html index c0f43fb6..0e731ce3 100644 --- a/docs/checks/ComposeRememberMissing.md.html +++ b/docs/checks/ComposeRememberMissing.md.html @@ -44,25 +44,25 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/test.kt:3:Error: Using mutableStateOf in a @Composable function +src/test.kt:7:Error: Using mutableStateOf in a @Composable function without it being inside of a remember function. If you don't remember the state instance, a new state instance will be created when the function is recomposed. See https://slackhq.github.io/compose-lints/rules/#state-should-be-remembered-in-composables - for more information. [ComposeRememberMissing] +for more information. [ComposeRememberMissing] val something = mutableStateOf("X") ------------------- -src/test.kt:6:Error: Using mutableStateOf in a @Composable function +src/test.kt:10:Error: Using mutableStateOf in a @Composable function without it being inside of a remember function. If you don't remember the state instance, a new state instance will be created when the function is recomposed. See https://slackhq.github.io/compose-lints/rules/#state-should-be-remembered-in-composables - for more information. [ComposeRememberMissing] +for more information. [ComposeRememberMissing] fun MyComposable(something: State<String> = mutableStateOf("X")) { ------------------- @@ -72,6 +72,10 @@ `src/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +import androidx.compose.runtime.Composable +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.State + @Composable fun MyComposable() { val something = mutableStateOf("X") diff --git a/docs/checks/ComposeUnstableCollections.md.html b/docs/checks/ComposeUnstableCollections.md.html index 8a33d1ca..02022a38 100644 --- a/docs/checks/ComposeUnstableCollections.md.html +++ b/docs/checks/ComposeUnstableCollections.md.html @@ -44,7 +44,7 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/test.kt:2:Warning: The Compose Compiler cannot infer the stability +src/test.kt:4:Warning: The Compose Compiler cannot infer the stability of a parameter if a Collection is used in it, even if the item type is stable. You should use Kotlinx Immutable Collections instead: a: @@ -52,13 +52,13 @@ class: @Immutable data class ACollection(val items: Collection) See https://slackhq.github.io/compose-lints/rules/#avoid-using-unstable-collections - for more information. [ComposeUnstableCollections] +for more information. [ComposeUnstableCollections] fun Something(a: Collection<String>) {} ------------------ -src/test.kt:4:Warning: The Compose Compiler cannot infer the stability +src/test.kt:6:Warning: The Compose Compiler cannot infer the stability of a parameter if a List is used in it, even if the item type is stable. You should use Kotlinx Immutable Collections instead: a: @@ -66,13 +66,13 @@ @Immutable data class AList(val items: List) See https://slackhq.github.io/compose-lints/rules/#avoid-using-unstable-collections - for more information. [ComposeUnstableCollections] +for more information. [ComposeUnstableCollections] fun Something(a: List<String>) {} ------------ -src/test.kt:6:Warning: The Compose Compiler cannot infer the stability +src/test.kt:8:Warning: The Compose Compiler cannot infer the stability of a parameter if a Set is used in it, even if the item type is stable. You should use Kotlinx Immutable Collections instead: a: @@ -80,13 +80,13 @@ @Immutable data class ASet(val items: Set) See https://slackhq.github.io/compose-lints/rules/#avoid-using-unstable-collections - for more information. [ComposeUnstableCollections] +for more information. [ComposeUnstableCollections] fun Something(a: Set<String>) {} ----------- -src/test.kt:8:Warning: The Compose Compiler cannot infer the stability +src/test.kt:10:Warning: The Compose Compiler cannot infer the stability of a parameter if a Map is used in it, even if the item type is stable. You should use Kotlinx Immutable Collections instead: a: @@ -94,7 +94,7 @@ class: @Immutable data class AMap(val items: Map) See https://slackhq.github.io/compose-lints/rules/#avoid-using-unstable-collections - for more information. [ComposeUnstableCollections] +for more information. [ComposeUnstableCollections] fun Something(a: Map<String, Int>) {} ---------------- @@ -104,6 +104,8 @@ `src/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +import androidx.compose.runtime.Composable + @Composable fun Something(a: Collection) {} @Composable diff --git a/docs/checks/ComposeViewModelForwarding.md.html b/docs/checks/ComposeViewModelForwarding.md.html index 24bdd51e..82778fdb 100644 --- a/docs/checks/ComposeViewModelForwarding.md.html +++ b/docs/checks/ComposeViewModelForwarding.md.html @@ -47,10 +47,11 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/test.kt:3:Error: Forwarding a ViewModel through multiple @Composable -functions should be avoided. Consider using state hoisting. -See https://slackhq.github.io/compose-lints/rules/#hoist-all-the-things -for more information. [ComposeViewModelForwarding] +src/MyViewModel.kt:7:Error: Forwarding a ViewModel through multiple +@Composable functions should be avoided. Consider using state +hoisting.See +https://slackhq.github.io/compose-lints/rules/#hoist-all-the-things for +more information. [ComposeViewModelForwarding] AnotherComposable(viewModel) ---------------------------- @@ -58,8 +59,12 @@ Here is the source file referenced above: -`src/test.kt`: +`src/MyViewModel.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +import androidx.compose.runtime.Composable + +class MyViewModel + @Composable fun MyComposable(viewModel: MyViewModel) { AnotherComposable(viewModel) diff --git a/docs/checks/ComposeViewModelInjection.md.html b/docs/checks/ComposeViewModelInjection.md.html index e6719378..fc8b5fca 100644 --- a/docs/checks/ComposeViewModelInjection.md.html +++ b/docs/checks/ComposeViewModelInjection.md.html @@ -64,7 +64,7 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/test.kt:3:Error: Implicit dependencies of composables should be made +src/test.kt:6:Error: Implicit dependencies of composables should be made explicit. Usages of to acquire a ViewModel should be done in composable default parameters, so that it is more testable and flexible. @@ -75,8 +75,8 @@ ------------------------ -src/test.kt:8:Error: Implicit dependencies of composables should be made -explicit. +src/test.kt:11:Error: Implicit dependencies of composables should be +made explicit. Usages of to acquire a ViewModel should be done in composable default parameters, so that it is more testable and flexible. See https://slackhq.github.io/compose-lints/rules/#viewmodels for more @@ -86,7 +86,7 @@ ------------------------ -src/test.kt:13:Error: Implicit dependencies of composables should be +src/test.kt:16:Error: Implicit dependencies of composables should be made explicit. Usages of to acquire a ViewModel should be done in composable default parameters, so that it is more testable and flexible. @@ -101,7 +101,10 @@ `src/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers -@Composable +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier + + @Composable fun MyComposable(modifier: Modifier) { val viewModel = () } diff --git a/docs/checks/CompositionLocalNaming.md.html b/docs/checks/CompositionLocalNaming.md.html index 74767e6e..54f98007 100644 --- a/docs/checks/CompositionLocalNaming.md.html +++ b/docs/checks/CompositionLocalNaming.md.html @@ -21,11 +21,11 @@ Feedback : https://issuetracker.google.com/issues/new?component=612128 Min -: Lint 7.0 +: Lint 8.0 and 8.1 Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.runtime:runtime](androidx_compose_runtime_runtime.md.html) +: [androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html) Affects : Kotlin and Java files and test sources @@ -110,28 +110,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime:1.5.0-beta02") +implementation("androidx.compose.runtime:runtime-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.runtime:runtime:1.5.0-beta02' +implementation 'androidx.compose.runtime:runtime-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.runtime) +implementation(libs.runtime-android) # libs.versions.toml [versions] -runtime = "1.5.0-beta02" +runtime-android = "1.7.0-alpha01" [libraries] -runtime = { - module = "androidx.compose.runtime:runtime", - version.ref = "runtime" +runtime-android = { + module = "androidx.compose.runtime:runtime-android", + version.ref = "runtime-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.runtime:runtime](androidx_compose_runtime_runtime.md.html). +[Additional details about androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html). (##) Suppressing You can suppress false positives using one of the following mechanisms: diff --git a/docs/checks/ConflictingOnColor.md.html b/docs/checks/ConflictingOnColor.md.html index 31c719ee..98fd2ee5 100644 --- a/docs/checks/ConflictingOnColor.md.html +++ b/docs/checks/ConflictingOnColor.md.html @@ -25,7 +25,7 @@ Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.material:material](androidx_compose_material_material.md.html) +: [androidx.compose.material:material-android](androidx_compose_material_material-android.md.html) Affects : Kotlin and Java files and test sources @@ -214,28 +214,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.material:material:1.5.0-beta02") +implementation("androidx.compose.material:material-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.material:material:1.5.0-beta02' +implementation 'androidx.compose.material:material-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.material) +implementation(libs.material-android) # libs.versions.toml [versions] -material = "1.5.0-beta02" +material-android = "1.7.0-alpha01" [libraries] -material = { - module = "androidx.compose.material:material", - version.ref = "material" +material-android = { + module = "androidx.compose.material:material-android", + version.ref = "material-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.material:material](androidx_compose_material_material.md.html). +[Additional details about androidx.compose.material:material-android](androidx_compose_material_material-android.md.html). (##) Suppressing You can suppress false positives using one of the following mechanisms: diff --git a/docs/checks/ConstraintLayoutToolsEditorAttribute.md.html b/docs/checks/ConstraintLayoutToolsEditorAttribute.md.html index d42901b0..502323d3 100644 --- a/docs/checks/ConstraintLayoutToolsEditorAttribute.md.html +++ b/docs/checks/ConstraintLayoutToolsEditorAttribute.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,47 +29,11 @@ : Resource files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/ConstraintLayoutToolsEditorAttributeDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/ConstraintLayoutToolsEditorAttributeDetectorTest.kt) The tools:layout_editor xml properties are only used for previewing and won't be used in your APK hence they're unnecessary and just add overhead. -!!! 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/layout/layout.xml:3:Warning: Don't use tools:layout_editor_absoluteX -[ConstraintLayoutToolsEditorAttribute] - - tools:layout_editor_absoluteX="4dp"/> - ----------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`res/layout/layout.xml`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers -<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/java/com/vanniktech/lintrules/android/ConstraintLayoutToolsEditorAttributeDetectorTest.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, `ConstraintLayoutToolsEditorAttributeDetector.toolsLayoutEditor`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -79,17 +43,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -97,7 +61,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/CoroutineCreationDuringComposition.md.html b/docs/checks/CoroutineCreationDuringComposition.md.html index 3897df63..570379fa 100644 --- a/docs/checks/CoroutineCreationDuringComposition.md.html +++ b/docs/checks/CoroutineCreationDuringComposition.md.html @@ -21,11 +21,11 @@ Feedback : https://issuetracker.google.com/issues/new?component=612128 Min -: Lint 7.0 +: Lint 8.0 and 8.1 Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.runtime:runtime](androidx_compose_runtime_runtime.md.html) +: [androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html) Affects : Kotlin and Java files and test sources @@ -297,28 +297,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime:1.5.0-beta02") +implementation("androidx.compose.runtime:runtime-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.runtime:runtime:1.5.0-beta02' +implementation 'androidx.compose.runtime:runtime-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.runtime) +implementation(libs.runtime-android) # libs.versions.toml [versions] -runtime = "1.5.0-beta02" +runtime-android = "1.7.0-alpha01" [libraries] -runtime = { - module = "androidx.compose.runtime:runtime", - version.ref = "runtime" +runtime-android = { + module = "androidx.compose.runtime:runtime-android", + version.ref = "runtime-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.runtime:runtime](androidx_compose_runtime_runtime.md.html). +[Additional details about androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html). (##) Suppressing You can suppress false positives using one of the following mechanisms: diff --git a/docs/checks/CredentialDependency.md.html b/docs/checks/CredentialDependency.md.html new file mode 100644 index 00000000..e9d7e6b7 --- /dev/null +++ b/docs/checks/CredentialDependency.md.html @@ -0,0 +1,108 @@ + +(#) `credentials-play-services-auth` is Required + +!!! WARNING: `credentials-play-services-auth` is Required + This is a warning. + +Id +: `CredentialDependency` +Summary +: `credentials-play-services-auth` is Required +Severity +: Warning +Category +: Correctness +Platform +: Android +Vendor +: Android Open Source Project +Feedback +: https://issuetracker.google.com/issues/new?component=192708 +Affects +: Gradle build files and TOML files +Editing +: This check runs on the fly in the IDE editor +See +: https://developer.android.com/jetpack/androidx/releases/credentials +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) +Copyright Year +: 2014 + +The dependency `androidx.credentials:credentials-play-services-auth` is +required to get support from Play services for the Credential Manager +API to work. For Android 14 or higher, this is optional. Please check +release notes for the latest version. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +build.gradle:2:Warning: In Android 13 or lower, +credentials-play-services-auth is required when using +androidx.credentials:credentials [CredentialDependency] + + implementation 'androidx.credentials:credentials:+' + ------------------------------------ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`build.gradle`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~groovy linenumbers +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/GradleDetectorTest.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 CredentialDependency + 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="CredentialDependency" 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 'CredentialDependency' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore CredentialDependency ...` + ``` + +* 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/CutPasteId.md.html b/docs/checks/CutPasteId.md.html index ae9c5858..bceb77e5 100644 --- a/docs/checks/CutPasteId.md.html +++ b/docs/checks/CutPasteId.md.html @@ -41,298 +41,41 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/test/pkg/PasteError.java:22:Warning: The id R.id.duplicated has +src/test/pkg/PasteError.java:10:Warning: The id R.id.previous has already been looked up in this method; possible cut & paste error? [CutPasteId] - View view2 = findViewById(R.id.duplicated); - ----------------------------- - - -src/test/pkg/PasteError.java:78:Warning: The id R.id.duplicated has -already been looked up in this method; possible cut & paste error? -[CutPasteId] - - view2 = findViewById(R.id.duplicated); - ----------------------------- - - -src/test/pkg/PasteError.java:85:Warning: The id R.id.duplicated has -already been looked up in this method; possible cut & paste error? -[CutPasteId] - - view2 = findViewById(R.id.duplicated); - ----------------------------- - - -src/test/pkg/PasteError.java:93:Warning: The id R.id.duplicated has -already been looked up in this method; possible cut & paste error? -[CutPasteId] - - view2 = findViewById(R.id.duplicated); - ----------------------------- - - -src/test/pkg/PasteError.java:102:Warning: The id R.id.duplicated has -already been looked up in this method; possible cut & paste error? -[CutPasteId] - - view2 = findViewById(R.id.duplicated); - ----------------------------- - - -src/test/pkg/PasteError.java:148:Warning: The id R.id.duplicated has -already been looked up in this method; possible cut & paste error? -[CutPasteId] - - TextView sectionTitleView = (TextView) root.findViewById(R.id.duplicated); - ---------------------------------- - - -src/test/pkg/PasteError.java:162:Warning: The id R.id.duplicated has -already been looked up in this method; possible cut & paste error? -[CutPasteId] - - TextView sectionTitleView = (TextView) root.findViewById(R.id.duplicated); - ---------------------------------- - - -src/test/pkg/PasteError.java:171:Warning: The id R.id.duplicated has -already been looked up in this method; possible cut & paste error? -[CutPasteId] - - view2 = findViewById(R.id.duplicated); - ----------------------------- - - -src/test/pkg/PasteError.java:182:Warning: The id R.id.duplicated has -already been looked up in this method; possible cut & paste error? -[CutPasteId] - - view2 = requireViewById(R.id.duplicated); - -------------------------------- + next = (Button) findViewById(R.id.previous); // TYPO, meant R.id.next + --------------------------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Here is the source file referenced above: +Here are the relevant source files: `src/test/pkg/PasteError.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers package test.pkg; - -import android.annotation.SuppressLint; import android.app.Activity; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; import android.widget.Button; -import android.widget.TextView; -@SuppressWarnings({"ConstantConditions", "UnnecessaryLocalVariable", "ConstantIfStatement", - "StatementWithEmptyBody", "FieldCanBeLocal", "unused", "UnusedAssignment"}) public class PasteError extends Activity { - protected void ok() { - Button button1 = (Button) findViewById(R.id.textView1); - mView2 = findViewById(R.id.textView2); - View view3 = findViewById(R.id.activity_main); - } - - protected void error() { - View view1 = findViewById(R.id.duplicated); - View view2 = findViewById(R.id.duplicated); - View view3 = findViewById(R.id.ok); - } - - protected void ok2() { - View view1; - if (true) { - view1 = findViewById(R.id.ok); - } else { - view1 = findViewById(R.id.ok); - } - } - - @SuppressLint("CutPasteId") - protected void suppressed() { - View view1 = findViewById(R.id.duplicated); - View view2 = findViewById(R.id.duplicated); - } - - private void ok3() { - if (view == null || view.findViewById(R.id.city_name) == null) { - view = mInflater.inflate(R.layout.city_list_item, parent, false); - } - TextView name = (TextView) view.findViewById(R.id.city_name); - } - - private void ok4() { - mPrevAlbumWrapper = mPrevTrackLayout.findViewById(R.id.album_wrapper); - mNextAlbumWrapper = mNextTrackLayout.findViewById(R.id.album_wrapper); - } - - public View getView(int position, View convertView, ViewGroup parent) { - View listItem = convertView; - if (getItemViewType(position) == VIEW_TYPE_HEADER) { - TextView header = (TextView) listItem.findViewById(R.id.name); - } else if (getItemViewType(position) == VIEW_TYPE_BOOLEAN) { - TextView filterName = (TextView) listItem.findViewById(R.id.name); - } else { - TextView filterName = (TextView) listItem.findViewById(R.id.name); - } - return null; - } - - protected void ok_branch_1() { - if (true) { - view1 = findViewById(R.id.ok); - } else { - view2 = findViewById(R.id.ok); - } - } - - protected void error_branch_1() { - if (true) { - view1 = findViewById(R.id.duplicated); - } - if (true) { - view2 = findViewById(R.id.duplicated); - } - } - - protected void error_branch_2() { - view1 = findViewById(R.id.duplicated); - if (true) { - view2 = findViewById(R.id.duplicated); - } - } - - protected void error_branch_3() { - view1 = findViewById(R.id.duplicated); - if (true) { - } else { - view2 = findViewById(R.id.duplicated); - } - } - - protected void error_branch_4() { - view1 = findViewById(R.id.duplicated); - if (true) { - } else { - if (true) { - view2 = findViewById(R.id.duplicated); - } - } - } - - protected void ok_branch_2() { - if (true) { - view1 = findViewById(R.id.ok); - } else { - if (true) { - view2 = findViewById(R.id.ok); - } - } - } - - protected void ok_branch3() { - if (true) { - view1 = findViewById(R.id.ok); - return; - } - if (true) { - view2 = findViewById(R.id.ok); - } - } - - public static void ok_switch(View root, int position) { - // mutually exclusive branches - switch (position) { - case 0: { - TextView titleView = (TextView) root.findViewById(R.id.ok); - } - break; - default: { - TextView sectionTitleView = (TextView) root.findViewById(R.id.ok); - } - break; - } - } - - public static void error_switch_fallthrough(View root, int position) { - switch (position) { - case 0: { - TextView titleView = (TextView) root.findViewById(R.id.duplicated); - // fallthrough! - } - default: { - TextView sectionTitleView = (TextView) root.findViewById(R.id.duplicated); - } - break; - } - } - - public static void warning_switch_to_outer(View root, int position) { - switch (position) { - case 0: - { - TextView titleView = (TextView) root.findViewById(R.id.duplicated); - } - break; - } - TextView sectionTitleView = (TextView) root.findViewById(R.id.duplicated); - } - - public void while_loop_error(View root, int position) { - while (position-- > 0) { // here we can flow back - if (true) { - view1 = findViewById(R.id.duplicated); - } else { - if (true) { - view2 = findViewById(R.id.duplicated); - } - } - } - } - - protected void require_by_id_error_branch_1() { - if (true) { - view1 = requireViewById(R.id.duplicated); - } - if (true) { - view2 = requireViewById(R.id.duplicated); - } - } - - public final T requireViewById(int id) { - throw new RuntimeException("Stub!"); - } - - private View view1; - private View mView2; - private View view; - private View view2; - private LayoutInflater mInflater; - private Object mPrevAlbumWrapper; - private Object mNextAlbumWrapper; - private Activity mPrevTrackLayout; - private Activity mNextTrackLayout; - private android.view.ViewGroup parent; - private static final int VIEW_TYPE_HEADER = 1; - private static final int VIEW_TYPE_BOOLEAN = 2; - private int getItemViewType(int position) { - return VIEW_TYPE_BOOLEAN; + private Button next; + private Button previous; + protected void onCreate() { + previous = (Button) findViewById(R.id.previous); + next = (Button) findViewById(R.id.previous); // TYPO, meant R.id.next } } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +`test.pkg`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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) 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, `CutPasteDetector.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/DeepLinkInActivityDestination.md.html b/docs/checks/DeepLinkInActivityDestination.md.html index 93d2244a..c9906177 100644 --- a/docs/checks/DeepLinkInActivityDestination.md.html +++ b/docs/checks/DeepLinkInActivityDestination.md.html @@ -102,17 +102,17 @@ ``` // build.gradle.kts -implementation("androidx.navigation:navigation-runtime:2.7.0-beta01") +implementation("androidx.navigation:navigation-runtime:2.8.0-alpha01") // build.gradle -implementation 'androidx.navigation:navigation-runtime:2.7.0-beta01' +implementation 'androidx.navigation:navigation-runtime:2.8.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.navigation-runtime) # libs.versions.toml [versions] -navigation-runtime = "2.7.0-beta01" +navigation-runtime = "2.8.0-alpha01" [libraries] navigation-runtime = { module = "androidx.navigation:navigation-runtime", @@ -120,7 +120,7 @@ } ``` -2.7.0-beta01 is the version this documentation was generated from; +2.8.0-alpha01 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/DefaultEncoding.md.html b/docs/checks/DefaultEncoding.md.html index 723c2b16..0dc8e6cf 100644 --- a/docs/checks/DefaultEncoding.md.html +++ b/docs/checks/DefaultEncoding.md.html @@ -45,9 +45,9 @@ Note that on Android, the default file encoding is always UTF-8 (see https://developer.android.com/reference/java/nio/charset/Charset#defaultCharset() - for more), so this lint check deliberately does not flag any problems -in Android code, since it is always safe to rely on the default -character encoding there. +for more), so this lint check deliberately does not flag any problems in +Android code, since it is always safe to rely on the default character +encoding there. (##) Example diff --git a/docs/checks/DefaultLayoutAttribute.md.html b/docs/checks/DefaultLayoutAttribute.md.html index 0747042b..b7363397 100644 --- a/docs/checks/DefaultLayoutAttribute.md.html +++ b/docs/checks/DefaultLayoutAttribute.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,48 +29,10 @@ : Resource files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/DefaultLayoutAttributeDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/DefaultLayoutAttributeDetectorTest.kt) Flags default layout values that are not needed. One for instance is the textStyle="normal" that can be just removed. -!!! 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/layout/ids.xml:5:Warning: This is the default and hence you don't -need to specify it [DefaultLayoutAttribute] - - android:textStyle="normal"/> - ------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`res/layout/ids.xml`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers -<TextView - xmlns:android="http://schemas.android.com/apk/res/android" - 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/java/com/vanniktech/lintrules/android/DefaultLayoutAttributeDetectorTest.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, `DefaultLayoutAttributeDetector.textStyleNormal`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -80,17 +42,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -98,7 +60,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/DefaultLocale.md.html b/docs/checks/DefaultLocale.md.html index 8c601092..6387b12e 100644 --- a/docs/checks/DefaultLocale.md.html +++ b/docs/checks/DefaultLocale.md.html @@ -39,7 +39,7 @@ locale, the uppercase replacement for `i` is **not** `I`. If you want the methods to just perform ASCII replacement, for example -to convert an enum name, call `String#toUpperCase(Locale.US)` instead. +to convert an enum name, call `String#toUpperCase(Locale.ROOT)` instead. If you really want to use the current locale, call `String#toUpperCase(Locale.getDefault())` instead. diff --git a/docs/checks/DenyListedApi.md.html b/docs/checks/DenyListedApi.md.html index 20435bf5..31f52fcd 100644 --- a/docs/checks/DenyListedApi.md.html +++ b/docs/checks/DenyListedApi.md.html @@ -51,7 +51,7 @@ [DenyListedApi] ContextCompat.getDrawable(context, 42) - -------------------------------------- + ----------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -89,17 +89,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -107,7 +107,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/DenyListedBlockingApi.md.html b/docs/checks/DenyListedBlockingApi.md.html new file mode 100644 index 00000000..4f6fb65b --- /dev/null +++ b/docs/checks/DenyListedBlockingApi.md.html @@ -0,0 +1,193 @@ + +(#) Deny-listed API + +!!! ERROR: Deny-listed API + This is an error. + +Id +: `DenyListedBlockingApi` +Summary +: Deny-listed API +Severity +: Error +Category +: Correctness +Platform +: Android +Vendor +: slack +Identifier +: slack-lint +Contact +: https://github.com/slackhq/slack-lints +Feedback +: https://github.com/slackhq/slack-lints +Min +: Lint 8.0 and 8.1 +Compiled +: Lint 8.0 and 8.1 +Artifact +: [com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html) + +Affects +: Kotlin and Java files, resource files and test sources +Editing +: This check runs on the fly in the IDE editor +Implementation +: [Source Code](https://github.com/slackhq/slack-lints/blob/main/slack-lint-checks/src/main/java/slack/lint/denylistedapis/DenyListedApiDetector.kt) +Tests +: [Source Code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/denylistedapis/DenyListedApiDetectorTest.kt) +Copyright Year +: 2022 + +This lint check flags usages of APIs in external libraries that we +prefer not to use. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/foo/SomeClass.kt:6:Error: Blocking calls in coroutines can cause +deadlocks and application jank. Prefer making the enclosing function a +suspend function or refactoring this in a way to use non-blocking calls. +If running in a test, use runTest {} or Turbine to test synchronous +values. [DenyListedBlockingApi] + + val result = runBlocking {} + ----------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/foo/SomeClass.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package foo + +import kotlinx.coroutines.runBlocking + +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) +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, `DenyListedApiDetector.coroutineRunBlocking`. +To report a problem with this extracted sample, visit +https://github.com/slackhq/slack-lints. + +(##) 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.slack.lint:slack-lint-checks:0.7.0") + +// build.gradle +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' + +// build.gradle.kts with version catalogs: +lintChecks(libs.slack-lint-checks) + +# libs.versions.toml +[versions] +slack-lint-checks = "0.7.0" +[libraries] +slack-lint-checks = { + module = "com.slack.lint:slack-lint-checks", + version.ref = "slack-lint-checks" +} +``` + +0.7.0 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.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("DenyListedBlockingApi") + fun method() { + problematicStatement() + } + ``` + + or + + ```java + // Java + @SuppressWarnings("DenyListedBlockingApi") + void method() { + problematicStatement(); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection DenyListedBlockingApi + problematicStatement() + ``` + +* Adding the suppression attribute + `tools:ignore="DenyListedBlockingApi"` 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"?> + <java.util.LinkedList xmlns:tools="http://schemas.android.com/tools" + tools:ignore="DenyListedBlockingApi" ...> + ... + </java.util.LinkedList> + ``` + +* 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="DenyListedBlockingApi" 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 'DenyListedBlockingApi' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore DenyListedBlockingApi ...` + ``` + +* 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/DeprecatedCall.md.html b/docs/checks/DeprecatedCall.md.html index 2e7091f8..2024c6f8 100644 --- a/docs/checks/DeprecatedCall.md.html +++ b/docs/checks/DeprecatedCall.md.html @@ -88,17 +88,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -106,7 +106,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/DeprecatedSinceApi.md.html b/docs/checks/DeprecatedSinceApi.md.html index 5dea317a..5c86b95c 100644 --- a/docs/checks/DeprecatedSinceApi.md.html +++ b/docs/checks/DeprecatedSinceApi.md.html @@ -39,93 +39,100 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/test/pkg/Api.kt:26:Warning: This method is deprecated as of API -level 25 [DeprecatedSinceApi] +src/test/pkg/Test.kt:9:Warning: This method is deprecated as of API +level 21 [DeprecatedSinceApi] - api.someMethod2(0) // WARN 1 - ------------------ + api.noLongerNecessary1(0) // WARN 1 + ------------------------- -src/test/pkg/Api.kt:27:Warning: This method is deprecated as of API -level 30; Use AlarmManager.notify instead [DeprecatedSinceApi] +src/test/pkg/Test.kt:10:Warning: This method is deprecated as of API +level 23; Use AlarmManager.notify instead [DeprecatedSinceApi] - api.someMethod3(0) // WARN 2 - ------------------ + api.noLongerNecessary2(0) // WARN 2 + ------------------------- -src/test/pkg/Api.kt:28:Warning: This field is deprecated as of API level -30 [DeprecatedSinceApi] +src/test/pkg/Test.kt:11:Warning: This method is deprecated as of API +level 24 [DeprecatedSinceApi] - val c = MY_CONSTANT // WARN 3 - ----------- + api.noLongerNecessary3(0) // WARN 3 + ------------------------- -src/test/pkg/Api.kt:29:Warning: This class is deprecated as of API level -28 [DeprecatedSinceApi] +src/test/pkg/Test.kt:18:Warning: This class is deprecated as of API +level 19 [DeprecatedSinceApi] - api2.someMethod1(0) // WARN 4 - ------------------- - - -src/test/pkg/Api.kt:30:Warning: This method is deprecated as of API -level 30 [DeprecatedSinceApi] + val clz = Api2::class.java // WARN 4 + ----------- - api2.someMethod2(0) // WARN 5 - ------------------- +src/test/pkg/Test.kt:19:Warning: This method is deprecated as of API +level 23 [DeprecatedSinceApi] -src/test/pkg/Api.kt:31:Warning: This class is deprecated as of API level -28 [DeprecatedSinceApi] + val method1 = api2::someMethod1 // WARN 5 + ----------------- - val clz = Api2::class.java // WARN 6 - ----------- +src/test/pkg/Test.kt:20:Warning: This method is deprecated as of API +level 21 [DeprecatedSinceApi] -src/test/pkg/Api.kt:32:Warning: This method is deprecated as of API -level 25 [DeprecatedSinceApi] - - println(api::someMethod2) // WARN 7 - ---------------- + val method2 = api2::someMethod2 // WARN 6 + ----------------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: -`src/test/pkg/Api.kt`: +`src/test/pkg/Test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +@file:Suppress("UNUSED_PARAMETER", "UNUSED_VARIABLE", "unused") package test.pkg import androidx.annotation.DeprecatedSinceApi +class Test { + fun test(api: Api, api2: Api2) { + // minSdkVersion = 24: + + api.noLongerNecessary1(0) // WARN 1 + api.noLongerNecessary2(0) // WARN 2 + api.noLongerNecessary3(0) // WARN 3 + + api.unnecessaryInTheFuture1(0) // OK 1 + api.unnecessaryInTheFuture2(0) // OK 2 + + // The above enforced calls (the most common scenario); check + // some other reference types. + val clz = Api2::class.java // WARN 4 + val method1 = api2::someMethod1 // WARN 5 + val method2 = api2::someMethod2 // WARN 6 + } +} + class Api { @DeprecatedSinceApi(api = 21) - fun someMethod1(arg: Int) { } + fun noLongerNecessary1(arg: Int) { } + + @DeprecatedSinceApi(api = 23, message = "Use AlarmManager.notify instead") + fun noLongerNecessary2(arg: Int) { } + + @DeprecatedSinceApi(api = 24) + fun noLongerNecessary3(arg: Int) { } + @DeprecatedSinceApi(api = 25) - fun someMethod2(arg: Int) { } - @DeprecatedSinceApi(api = 30, message = "Use AlarmManager.notify instead") - fun someMethod3(arg: Int) { } + fun unnecessaryInTheFuture1(arg: Int) { } + + @DeprecatedSinceApi(api = 33) + fun unnecessaryInTheFuture2(arg: Int) { } } -@DeprecatedSinceApi(api = 28) +@DeprecatedSinceApi(api = 19) class Api2 { + @DeprecatedSinceApi(api = 23) fun someMethod1(arg: Int) { } - @DeprecatedSinceApi(api = 30) + @DeprecatedSinceApi(api = 21) fun someMethod2(arg: Int) { } } -@DeprecatedSinceApi(30) -const val MY_CONSTANT = "test" - -class Test { - fun test(api: Api, api2: Api2) { - api.someMethod1(0) // OK - api.someMethod2(0) // WARN 1 - api.someMethod3(0) // WARN 2 - val c = MY_CONSTANT // WARN 3 - api2.someMethod1(0) // WARN 4 - api2.someMethod2(0) // WARN 5 - val clz = Api2::class.java // WARN 6 - println(api::someMethod2) // WARN 7 - } -} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can also visit the diff --git a/docs/checks/DeprecatedSqlUsage.md.html b/docs/checks/DeprecatedSqlUsage.md.html index 15c5d175..302f0cff 100644 --- a/docs/checks/DeprecatedSqlUsage.md.html +++ b/docs/checks/DeprecatedSqlUsage.md.html @@ -86,17 +86,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -104,7 +104,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/DetachAndAttachSameFragment.md.html b/docs/checks/DetachAndAttachSameFragment.md.html index 5996253b..cc5d6e4f 100644 --- a/docs/checks/DetachAndAttachSameFragment.md.html +++ b/docs/checks/DetachAndAttachSameFragment.md.html @@ -55,17 +55,17 @@ ``` // build.gradle.kts -implementation("androidx.fragment:fragment:1.7.0-alpha01") +implementation("androidx.fragment:fragment:1.7.0-alpha09") // build.gradle -implementation 'androidx.fragment:fragment:1.7.0-alpha01' +implementation 'androidx.fragment:fragment:1.7.0-alpha09' // build.gradle.kts with version catalogs: implementation(libs.fragment) # libs.versions.toml [versions] -fragment = "1.7.0-alpha01" +fragment = "1.7.0-alpha09" [libraries] fragment = { module = "androidx.fragment:fragment", @@ -73,7 +73,7 @@ } ``` -1.7.0-alpha01 is the version this documentation was generated from; +1.7.0-alpha09 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/DialogFragmentCallbacksDetector.md.html b/docs/checks/DialogFragmentCallbacksDetector.md.html index fbef426e..32676e18 100644 --- a/docs/checks/DialogFragmentCallbacksDetector.md.html +++ b/docs/checks/DialogFragmentCallbacksDetector.md.html @@ -94,17 +94,17 @@ ``` // build.gradle.kts -implementation("androidx.fragment:fragment:1.7.0-alpha01") +implementation("androidx.fragment:fragment:1.7.0-alpha09") // build.gradle -implementation 'androidx.fragment:fragment:1.7.0-alpha01' +implementation 'androidx.fragment:fragment:1.7.0-alpha09' // build.gradle.kts with version catalogs: implementation(libs.fragment) # libs.versions.toml [versions] -fragment = "1.7.0-alpha01" +fragment = "1.7.0-alpha09" [libraries] fragment = { module = "androidx.fragment:fragment", @@ -112,7 +112,7 @@ } ``` -1.7.0-alpha01 is the version this documentation was generated from; +1.7.0-alpha09 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/DiscouragedApi.md.html b/docs/checks/DiscouragedApi.md.html index 68710b75..cc2eb47c 100644 --- a/docs/checks/DiscouragedApi.md.html +++ b/docs/checks/DiscouragedApi.md.html @@ -19,7 +19,7 @@ Feedback : https://issuetracker.google.com/issues/new?component=192708 Affects -: Kotlin and Java files +: Kotlin and Java files, manifest files and resource files Editing : This check runs on the fly in the IDE editor Implementation @@ -114,7 +114,7 @@ // Kotlin @Suppress("DiscouragedApi") fun method() { - problematicStatement() + scheduleAtFixedRate(...) } ``` @@ -124,7 +124,7 @@ // Java @SuppressWarnings("DiscouragedApi") void method() { - problematicStatement(); + scheduleAtFixedRate(...); } ``` @@ -135,6 +135,12 @@ problematicStatement() ``` +* Adding the suppression attribute `tools:ignore="DiscouragedApi"` 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: diff --git a/docs/checks/DoNotCallProviders.md.html b/docs/checks/DoNotCallProviders.md.html index 948d62aa..f869ddb0 100644 --- a/docs/checks/DoNotCallProviders.md.html +++ b/docs/checks/DoNotCallProviders.md.html @@ -142,17 +142,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -160,7 +160,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/DoNotExposeEitherNetInRepositories.md.html b/docs/checks/DoNotExposeEitherNetInRepositories.md.html index 6eccdbff..9dff8888 100644 --- a/docs/checks/DoNotExposeEitherNetInRepositories.md.html +++ b/docs/checks/DoNotExposeEitherNetInRepositories.md.html @@ -91,17 +91,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -109,7 +109,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/DoNotMock.md.html b/docs/checks/DoNotMock.md.html index 6a6b8fed..4a351f95 100644 --- a/docs/checks/DoNotMock.md.html +++ b/docs/checks/DoNotMock.md.html @@ -45,6 +45,61 @@ These types should define explanations/alternatives in their annotation. +(##) Options + +You can configure this lint checks using the following options: + +(###) mock-annotations + +A comma-separated list of mock annotations.. +This property should define comma-separated list of mock annotation class names (FQCN). + +Default is "org.mockito.Mock,org.mockito.Spy". + +Example `lint.xml`: + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<lint> + <issue id="DoNotMock"> + <option name="mock-annotations" value=""org.mockito.Mock,org.mockito.Spy"" /> + </issue> +</lint> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(###) mock-factories + +A comma-separated list of mock factories (org.mockito.Mockito#methodName).. +A comma-separated list of mock factories (org.mockito.Mockito#methodName). + +Default is "org.mockito.Mockito#mock,org.mockito.Mockito#spy,slack.test.mockito.MockitoHelpers#mock,slack.test.mockito.MockitoHelpersKt#mock". + +Example `lint.xml`: + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<lint> + <issue id="DoNotMock"> + <option name="mock-factories" value=""org.mockito.Mockito#mock,org.mockito.Mockito#spy,slack.test.mockito.MockitoHelpers#mock,slack.test.mockito.MockitoHelpersKt#mock"" /> + </issue> +</lint> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(###) mock-report + +If enabled, writes a mock report to /build/reports/mockdetector/mock-report.csv.. +If enabled, writes a mock report to /build/reports/mockdetector/mock-report.csv. The format of the file is a csv of (type,isError) of mocked classes. + +Default is "none". + +Example `lint.xml`: + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<lint> + <issue id="DoNotMock"> + <option name="mock-report" value=""none"" /> + </issue> +</lint> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + (##) Example Here is an example of lint warnings produced by this check: @@ -122,17 +177,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -140,7 +195,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/DoNotMockAutoValue.md.html b/docs/checks/DoNotMockAutoValue.md.html index e954d8c5..5cd088df 100644 --- a/docs/checks/DoNotMockAutoValue.md.html +++ b/docs/checks/DoNotMockAutoValue.md.html @@ -43,6 +43,61 @@ `AutoValue` classes represent pure data classes, so mocking them should not be necessary. Construct a real instance of the class instead. +(##) Options + +You can configure this lint checks using the following options: + +(###) mock-annotations + +A comma-separated list of mock annotations.. +This property should define comma-separated list of mock annotation class names (FQCN). + +Default is "org.mockito.Mock,org.mockito.Spy". + +Example `lint.xml`: + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<lint> + <issue id="DoNotMockAutoValue"> + <option name="mock-annotations" value=""org.mockito.Mock,org.mockito.Spy"" /> + </issue> +</lint> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(###) mock-factories + +A comma-separated list of mock factories (org.mockito.Mockito#methodName).. +A comma-separated list of mock factories (org.mockito.Mockito#methodName). + +Default is "org.mockito.Mockito#mock,org.mockito.Mockito#spy,slack.test.mockito.MockitoHelpers#mock,slack.test.mockito.MockitoHelpersKt#mock". + +Example `lint.xml`: + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<lint> + <issue id="DoNotMockAutoValue"> + <option name="mock-factories" value=""org.mockito.Mockito#mock,org.mockito.Mockito#spy,slack.test.mockito.MockitoHelpers#mock,slack.test.mockito.MockitoHelpersKt#mock"" /> + </issue> +</lint> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(###) mock-report + +If enabled, writes a mock report to /build/reports/mockdetector/mock-report.csv.. +If enabled, writes a mock report to /build/reports/mockdetector/mock-report.csv. The format of the file is a csv of (type,isError) of mocked classes. + +Default is "none". + +Example `lint.xml`: + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<lint> + <issue id="DoNotMockAutoValue"> + <option name="mock-report" value=""none"" /> + </issue> +</lint> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + (##) Including !!! @@ -52,17 +107,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -70,7 +125,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/DoNotMockDataClass.md.html b/docs/checks/DoNotMockDataClass.md.html index e0be7bde..84aae0fe 100644 --- a/docs/checks/DoNotMockDataClass.md.html +++ b/docs/checks/DoNotMockDataClass.md.html @@ -43,6 +43,61 @@ data classes represent pure data classes, so mocking them should not be necessary. Construct a real instance of the class instead. +(##) Options + +You can configure this lint checks using the following options: + +(###) mock-annotations + +A comma-separated list of mock annotations.. +This property should define comma-separated list of mock annotation class names (FQCN). + +Default is "org.mockito.Mock,org.mockito.Spy". + +Example `lint.xml`: + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<lint> + <issue id="DoNotMockDataClass"> + <option name="mock-annotations" value=""org.mockito.Mock,org.mockito.Spy"" /> + </issue> +</lint> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(###) mock-factories + +A comma-separated list of mock factories (org.mockito.Mockito#methodName).. +A comma-separated list of mock factories (org.mockito.Mockito#methodName). + +Default is "org.mockito.Mockito#mock,org.mockito.Mockito#spy,slack.test.mockito.MockitoHelpers#mock,slack.test.mockito.MockitoHelpersKt#mock". + +Example `lint.xml`: + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<lint> + <issue id="DoNotMockDataClass"> + <option name="mock-factories" value=""org.mockito.Mockito#mock,org.mockito.Mockito#spy,slack.test.mockito.MockitoHelpers#mock,slack.test.mockito.MockitoHelpersKt#mock"" /> + </issue> +</lint> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(###) mock-report + +If enabled, writes a mock report to /build/reports/mockdetector/mock-report.csv.. +If enabled, writes a mock report to /build/reports/mockdetector/mock-report.csv. The format of the file is a csv of (type,isError) of mocked classes. + +Default is "none". + +Example `lint.xml`: + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<lint> + <issue id="DoNotMockDataClass"> + <option name="mock-report" value=""none"" /> + </issue> +</lint> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + (##) Including !!! @@ -52,17 +107,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -70,7 +125,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/DoNotMockObjectClass.md.html b/docs/checks/DoNotMockObjectClass.md.html index 8d4e9aa8..368800fb 100644 --- a/docs/checks/DoNotMockObjectClass.md.html +++ b/docs/checks/DoNotMockObjectClass.md.html @@ -43,6 +43,61 @@ object classes are global singletons, so mocking them should not be necessary. Use the object instance instead. +(##) Options + +You can configure this lint checks using the following options: + +(###) mock-annotations + +A comma-separated list of mock annotations.. +This property should define comma-separated list of mock annotation class names (FQCN). + +Default is "org.mockito.Mock,org.mockito.Spy". + +Example `lint.xml`: + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<lint> + <issue id="DoNotMockObjectClass"> + <option name="mock-annotations" value=""org.mockito.Mock,org.mockito.Spy"" /> + </issue> +</lint> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(###) mock-factories + +A comma-separated list of mock factories (org.mockito.Mockito#methodName).. +A comma-separated list of mock factories (org.mockito.Mockito#methodName). + +Default is "org.mockito.Mockito#mock,org.mockito.Mockito#spy,slack.test.mockito.MockitoHelpers#mock,slack.test.mockito.MockitoHelpersKt#mock". + +Example `lint.xml`: + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<lint> + <issue id="DoNotMockObjectClass"> + <option name="mock-factories" value=""org.mockito.Mockito#mock,org.mockito.Mockito#spy,slack.test.mockito.MockitoHelpers#mock,slack.test.mockito.MockitoHelpersKt#mock"" /> + </issue> +</lint> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(###) mock-report + +If enabled, writes a mock report to /build/reports/mockdetector/mock-report.csv.. +If enabled, writes a mock report to /build/reports/mockdetector/mock-report.csv. The format of the file is a csv of (type,isError) of mocked classes. + +Default is "none". + +Example `lint.xml`: + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<lint> + <issue id="DoNotMockObjectClass"> + <option name="mock-report" value=""none"" /> + </issue> +</lint> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + (##) Including !!! @@ -52,17 +107,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -70,7 +125,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/DoNotMockPlatformTypes.md.html b/docs/checks/DoNotMockPlatformTypes.md.html new file mode 100644 index 00000000..525d060c --- /dev/null +++ b/docs/checks/DoNotMockPlatformTypes.md.html @@ -0,0 +1,201 @@ + +(#) platform types should not be mocked + +!!! ERROR: platform types should not be mocked + This is an error. + +Id +: `DoNotMockPlatformTypes` +Summary +: platform types should not be mocked +Severity +: Error +Category +: Correctness +Platform +: Any +Vendor +: slack +Identifier +: slack-lint +Contact +: https://github.com/slackhq/slack-lints +Feedback +: https://github.com/slackhq/slack-lints +Min +: Lint 8.0 and 8.1 +Compiled +: Lint 8.0 and 8.1 +Artifact +: [com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html) + +Affects +: 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/slack-lints/blob/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) +Copyright Year +: 2021 + +Platform types (i.e. classes in java.*, android.*, etc) should not be +mocked. Use a real instance or fake instead. Mocking platform types like +these can lead to surprising test failures due to mocks that actually +behave differently than real instances, especially when passed into real +implementations that use them and expect them to behave in a certain +way. If using Robolectric, consider using its shadow APIs. + +(##) Options + +You can configure this lint checks using the following options: + +(###) mock-annotations + +A comma-separated list of mock annotations.. +This property should define comma-separated list of mock annotation class names (FQCN). + +Default is "org.mockito.Mock,org.mockito.Spy". + +Example `lint.xml`: + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<lint> + <issue id="DoNotMockPlatformTypes"> + <option name="mock-annotations" value=""org.mockito.Mock,org.mockito.Spy"" /> + </issue> +</lint> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(###) mock-factories + +A comma-separated list of mock factories (org.mockito.Mockito#methodName).. +A comma-separated list of mock factories (org.mockito.Mockito#methodName). + +Default is "org.mockito.Mockito#mock,org.mockito.Mockito#spy,slack.test.mockito.MockitoHelpers#mock,slack.test.mockito.MockitoHelpersKt#mock". + +Example `lint.xml`: + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<lint> + <issue id="DoNotMockPlatformTypes"> + <option name="mock-factories" value=""org.mockito.Mockito#mock,org.mockito.Mockito#spy,slack.test.mockito.MockitoHelpers#mock,slack.test.mockito.MockitoHelpersKt#mock"" /> + </issue> +</lint> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(###) mock-report + +If enabled, writes a mock report to /build/reports/mockdetector/mock-report.csv.. +If enabled, writes a mock report to /build/reports/mockdetector/mock-report.csv. The format of the file is a csv of (type,isError) of mocked classes. + +Default is "none". + +Example `lint.xml`: + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<lint> + <issue id="DoNotMockPlatformTypes"> + <option name="mock-report" value=""none"" /> + </issue> +</lint> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(##) 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.slack.lint:slack-lint-checks:0.7.0") + +// build.gradle +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' + +// build.gradle.kts with version catalogs: +lintChecks(libs.slack-lint-checks) + +# libs.versions.toml +[versions] +slack-lint-checks = "0.7.0" +[libraries] +slack-lint-checks = { + module = "com.slack.lint:slack-lint-checks", + version.ref = "slack-lint-checks" +} +``` + +0.7.0 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.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("DoNotMockPlatformTypes") + fun method() { + problematicStatement() + } + ``` + + or + + ```java + // Java + @SuppressWarnings("DoNotMockPlatformTypes") + void method() { + problematicStatement(); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection DoNotMockPlatformTypes + 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="DoNotMockPlatformTypes" 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 'DoNotMockPlatformTypes' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore DoNotMockPlatformTypes ...` + ``` + +* 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/DoNotMockRecordClass.md.html b/docs/checks/DoNotMockRecordClass.md.html index 3a5a6fbb..a90694b3 100644 --- a/docs/checks/DoNotMockRecordClass.md.html +++ b/docs/checks/DoNotMockRecordClass.md.html @@ -43,6 +43,61 @@ record classes represent pure data classes, so mocking them should not be necessary. Construct a real instance of the class instead. +(##) Options + +You can configure this lint checks using the following options: + +(###) mock-annotations + +A comma-separated list of mock annotations.. +This property should define comma-separated list of mock annotation class names (FQCN). + +Default is "org.mockito.Mock,org.mockito.Spy". + +Example `lint.xml`: + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<lint> + <issue id="DoNotMockRecordClass"> + <option name="mock-annotations" value=""org.mockito.Mock,org.mockito.Spy"" /> + </issue> +</lint> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(###) mock-factories + +A comma-separated list of mock factories (org.mockito.Mockito#methodName).. +A comma-separated list of mock factories (org.mockito.Mockito#methodName). + +Default is "org.mockito.Mockito#mock,org.mockito.Mockito#spy,slack.test.mockito.MockitoHelpers#mock,slack.test.mockito.MockitoHelpersKt#mock". + +Example `lint.xml`: + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<lint> + <issue id="DoNotMockRecordClass"> + <option name="mock-factories" value=""org.mockito.Mockito#mock,org.mockito.Mockito#spy,slack.test.mockito.MockitoHelpers#mock,slack.test.mockito.MockitoHelpersKt#mock"" /> + </issue> +</lint> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(###) mock-report + +If enabled, writes a mock report to /build/reports/mockdetector/mock-report.csv.. +If enabled, writes a mock report to /build/reports/mockdetector/mock-report.csv. The format of the file is a csv of (type,isError) of mocked classes. + +Default is "none". + +Example `lint.xml`: + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<lint> + <issue id="DoNotMockRecordClass"> + <option name="mock-report" value=""none"" /> + </issue> +</lint> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + (##) Including !!! @@ -52,17 +107,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -70,7 +125,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/DoNotMockSealedClass.md.html b/docs/checks/DoNotMockSealedClass.md.html index 4c74e8f0..cabd8418 100644 --- a/docs/checks/DoNotMockSealedClass.md.html +++ b/docs/checks/DoNotMockSealedClass.md.html @@ -41,8 +41,63 @@ : 2021 sealed classes have a restricted type hierarchy, so creating new -unrestricted mocks will break runtime expectations. Use a subtype -instead. +unrestricted mocks will break runtime expectations. Mockito also cannot +mock sealed classes in Java 17+. Use a subtype instead. + +(##) Options + +You can configure this lint checks using the following options: + +(###) mock-annotations + +A comma-separated list of mock annotations.. +This property should define comma-separated list of mock annotation class names (FQCN). + +Default is "org.mockito.Mock,org.mockito.Spy". + +Example `lint.xml`: + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<lint> + <issue id="DoNotMockSealedClass"> + <option name="mock-annotations" value=""org.mockito.Mock,org.mockito.Spy"" /> + </issue> +</lint> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(###) mock-factories + +A comma-separated list of mock factories (org.mockito.Mockito#methodName).. +A comma-separated list of mock factories (org.mockito.Mockito#methodName). + +Default is "org.mockito.Mockito#mock,org.mockito.Mockito#spy,slack.test.mockito.MockitoHelpers#mock,slack.test.mockito.MockitoHelpersKt#mock". + +Example `lint.xml`: + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<lint> + <issue id="DoNotMockSealedClass"> + <option name="mock-factories" value=""org.mockito.Mockito#mock,org.mockito.Mockito#spy,slack.test.mockito.MockitoHelpers#mock,slack.test.mockito.MockitoHelpersKt#mock"" /> + </issue> +</lint> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(###) mock-report + +If enabled, writes a mock report to /build/reports/mockdetector/mock-report.csv.. +If enabled, writes a mock report to /build/reports/mockdetector/mock-report.csv. The format of the file is a csv of (type,isError) of mocked classes. + +Default is "none". + +Example `lint.xml`: + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<lint> + <issue id="DoNotMockSealedClass"> + <option name="mock-report" value=""none"" /> + </issue> +</lint> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (##) Including @@ -53,17 +108,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -71,7 +126,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/DuplicateDivider.md.html b/docs/checks/DuplicateDivider.md.html index 35a238d4..ed681b4f 100644 --- a/docs/checks/DuplicateDivider.md.html +++ b/docs/checks/DuplicateDivider.md.html @@ -42,7 +42,7 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text src/com/example/android/supportv7/widget/decorator/DividerItemDecoration.java:11:Warning: - Replace with android.support.v7.widget.DividerItemDecoration? +Replace with android.support.v7.widget.DividerItemDecoration? [DuplicateDivider] public abstract class DividerItemDecoration extends RecyclerView.ItemDecoration { diff --git a/docs/checks/EmptyNavDeepLink.md.html b/docs/checks/EmptyNavDeepLink.md.html index 9f8620e2..25f89628 100644 --- a/docs/checks/EmptyNavDeepLink.md.html +++ b/docs/checks/EmptyNavDeepLink.md.html @@ -83,17 +83,17 @@ ``` // build.gradle.kts -implementation("androidx.navigation:navigation-common:2.7.0-beta01") +implementation("androidx.navigation:navigation-common:2.8.0-alpha01") // build.gradle -implementation 'androidx.navigation:navigation-common:2.7.0-beta01' +implementation 'androidx.navigation:navigation-common:2.8.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.navigation-common) # libs.versions.toml [versions] -navigation-common = "2.7.0-beta01" +navigation-common = "2.8.0-alpha01" [libraries] navigation-common = { module = "androidx.navigation:navigation-common", @@ -101,7 +101,7 @@ } ``` -2.7.0-beta01 is the version this documentation was generated from; +2.8.0-alpha01 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/EnsureInitializerMetadata.md.html b/docs/checks/EnsureInitializerMetadata.md.html index 47efdd52..32a44fbf 100644 --- a/docs/checks/EnsureInitializerMetadata.md.html +++ b/docs/checks/EnsureInitializerMetadata.md.html @@ -33,12 +33,8 @@ : Kotlin and Java files and manifest files Editing : This check can *not* run live in the IDE editor -Implementation -: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/startup/startup-runtime-lint/src/main/java/androidx/startup/lint/EnsureInitializerMetadataDetector.kt) Tests : [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/startup/startup-runtime-lint/src/test/java/androidx/startup/lint/EnsureInitializerMetadataTest.kt) -Copyright Year -: 2020 When a library defines a Initializer, it needs to be accompanied by a corresponding entry in the AndroidManifest.xml file. diff --git a/docs/checks/ErroneousLayoutAttribute.md.html b/docs/checks/ErroneousLayoutAttribute.md.html index 325db458..7c7e16e7 100644 --- a/docs/checks/ErroneousLayoutAttribute.md.html +++ b/docs/checks/ErroneousLayoutAttribute.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,48 +29,9 @@ : Resource files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/ErroneousLayoutAttributeDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/ErroneousLayoutAttributeDetectorTest.kt) Flags if a layout attribute is not applicable to a particular view. -!!! 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/layout/ids.xml:5:Warning: Attribute is erroneous on FrameLayout -[ErroneousLayoutAttribute] - - android:orientation="horizontal" - -------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`res/layout/ids.xml`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers -<FrameLayout - xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="wrap_content" - 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/java/com/vanniktech/lintrules/android/ErroneousLayoutAttributeDetectorTest.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, `ErroneousLayoutAttributeDetector.erroneousFrameLayoutOrientation`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -80,17 +41,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -98,7 +59,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/ErrorProneDoNotMockUsage.md.html b/docs/checks/ErrorProneDoNotMockUsage.md.html index a9fae114..04146ab7 100644 --- a/docs/checks/ErrorProneDoNotMockUsage.md.html +++ b/docs/checks/ErrorProneDoNotMockUsage.md.html @@ -112,17 +112,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -130,7 +130,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/ExceptionMessage.md.html b/docs/checks/ExceptionMessage.md.html new file mode 100644 index 00000000..cead9fbc --- /dev/null +++ b/docs/checks/ExceptionMessage.md.html @@ -0,0 +1,180 @@ + +(#) Please provide a string for the lazyMessage parameter + +!!! ERROR: Please provide a string for the lazyMessage parameter + This is an error. + +Id +: `ExceptionMessage` +Summary +: Please provide a string for the lazyMessage parameter +Severity +: Error +Category +: Correctness +Platform +: Any +Vendor +: slack +Identifier +: slack-lint +Contact +: https://github.com/slackhq/slack-lints +Feedback +: https://github.com/slackhq/slack-lints +Min +: Lint 8.0 and 8.1 +Compiled +: Lint 8.0 and 8.1 +Artifact +: [com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html) + +Affects +: 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/slack-lints/blob/main/slack-lint-checks/src/main/java/slack/lint/ExceptionMessageDetector.kt) +Tests +: [Source Code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/ExceptionMessageDetectorTest.kt) +Copyright Year +: 2023 + +Calls to check(), checkNotNull(), require() and requireNotNull() should +include a message string that can be used to debug issues experienced +by users. + +When we read user-supplied logs, the line numbers are sometimes not +sufficient to determine the cause of a bug. Inline functions can +sometimes make it hard to determine which file threw an exception. +Consider supplying a lazyMessage parameter to identify the check() +or require() call. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/test/test.kt:5:Error: Please specify a lazyMessage param for check +[ExceptionMessage] + + check(true) + ----- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/test/test.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package test + +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) +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, `ExceptionMessageDetector.checkWithoutMessage`. +To report a problem with this extracted sample, visit +https://github.com/slackhq/slack-lints. + +(##) 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.slack.lint:slack-lint-checks:0.7.0") + +// build.gradle +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' + +// build.gradle.kts with version catalogs: +lintChecks(libs.slack-lint-checks) + +# libs.versions.toml +[versions] +slack-lint-checks = "0.7.0" +[libraries] +slack-lint-checks = { + module = "com.slack.lint:slack-lint-checks", + version.ref = "slack-lint-checks" +} +``` + +0.7.0 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.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("ExceptionMessage") + fun method() { + check(...) + } + ``` + + or + + ```java + // Java + @SuppressWarnings("ExceptionMessage") + void method() { + check(...); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection ExceptionMessage + 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="ExceptionMessage" 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 'ExceptionMessage' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore ExceptionMessage ...` + ``` + +* 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/ExperimentalAnnotationRetention.md.html b/docs/checks/ExperimentalAnnotationRetention.md.html index 1f07a618..07d44374 100644 --- a/docs/checks/ExperimentalAnnotationRetention.md.html +++ b/docs/checks/ExperimentalAnnotationRetention.md.html @@ -23,7 +23,7 @@ Min : Lint 7.0 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [androidx.annotation:annotation-experimental](androidx_annotation_annotation-experimental.md.html) @@ -50,17 +50,17 @@ ``` // build.gradle.kts -implementation("androidx.annotation:annotation-experimental:1.4.0-dev01") +implementation("androidx.annotation:annotation-experimental:1.4.0") // build.gradle -implementation 'androidx.annotation:annotation-experimental:1.4.0-dev01' +implementation 'androidx.annotation:annotation-experimental:1.4.0' // build.gradle.kts with version catalogs: implementation(libs.annotation-experimental) # libs.versions.toml [versions] -annotation-experimental = "1.4.0-dev01" +annotation-experimental = "1.4.0" [libraries] annotation-experimental = { module = "androidx.annotation:annotation-experimental", @@ -68,7 +68,7 @@ } ``` -1.4.0-dev01 is the version this documentation was generated from; +1.4.0 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 9454f2bc..7c354ec8 100644 --- a/docs/checks/ExpiredTargetSdkVersion.md.html +++ b/docs/checks/ExpiredTargetSdkVersion.md.html @@ -21,7 +21,7 @@ Feedback : https://issuetracker.google.com/issues/new?component=192708 Affects -: Gradle build files +: Gradle build files and manifest files Editing : This check runs on the fly in the IDE editor See @@ -51,17 +51,15 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -build.gradle:5:Error: Google Play requires that apps target API level -or higher. - [ExpiredTargetSdkVersion] +build.gradle:5:Error: Google Play requires that apps target API level 31 +or higher. [ExpiredTargetSdkVersion] targetSdkVersion 17 ------------------- -build.gradle:6:Error: Google Play requires that apps target API level -or higher. - [ExpiredTargetSdkVersion] +build.gradle:6:Error: Google Play requires that apps target API level 31 +or higher. [ExpiredTargetSdkVersion] targetSdk 17 ------------ @@ -101,6 +99,13 @@ problematicStatement() ``` +* Adding the suppression attribute + `tools:ignore="ExpiredTargetSdkVersion"` 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: diff --git a/docs/checks/ExpiringTargetSdkVersion.md.html b/docs/checks/ExpiringTargetSdkVersion.md.html index ed7c0e04..dea32382 100644 --- a/docs/checks/ExpiringTargetSdkVersion.md.html +++ b/docs/checks/ExpiringTargetSdkVersion.md.html @@ -1,15 +1,15 @@ (#) TargetSdkVersion Soon Expiring -!!! ERROR: TargetSdkVersion Soon Expiring - This is an error. +!!! WARNING: TargetSdkVersion Soon Expiring + This is a warning. Id : `ExpiringTargetSdkVersion` Summary : TargetSdkVersion Soon Expiring Severity -: Error +: Warning Category : Compliance Platform @@ -19,7 +19,7 @@ Feedback : https://issuetracker.google.com/issues/new?component=192708 Affects -: Gradle build files +: Gradle build files and manifest files Editing : This check runs on the fly in the IDE editor See @@ -49,11 +49,11 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -build.gradle:6:Error: Google Play will soon require that apps target API -level or higher. This will be required for new apps and updates -starting on August 31, . [ExpiringTargetSdkVersion] +build.gradle:6:Warning: Google Play will soon require that apps target +API level 33 or higher. This will be required for new apps and updates +starting on August 31, 2023. [ExpiringTargetSdkVersion] - targetSdkVersion + targetSdkVersion 31 ------------------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -66,9 +66,9 @@ android { defaultConfig { // Already meeting last year's requirement but not this year's requirement - targetSdkVersion - targetSdkVersion // OK - targetSdkVersion // OK + targetSdkVersion 31 + targetSdkVersion 2023 // OK + targetSdkVersion 2024 // OK } } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -93,6 +93,13 @@ problematicStatement() ``` +* Adding the suppression attribute + `tools:ignore="ExpiringTargetSdkVersion"` 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: diff --git a/docs/checks/FieldSiteTargetOnQualifierAnnotation.md.html b/docs/checks/FieldSiteTargetOnQualifierAnnotation.md.html index da6493ad..1476fd47 100644 --- a/docs/checks/FieldSiteTargetOnQualifierAnnotation.md.html +++ b/docs/checks/FieldSiteTargetOnQualifierAnnotation.md.html @@ -185,17 +185,17 @@ ``` // build.gradle.kts -implementation("com.google.dagger:dagger-lint:2.46.1") +implementation("com.google.dagger:dagger-lint:2.50") // build.gradle -implementation 'com.google.dagger:dagger-lint:2.46.1' +implementation 'com.google.dagger:dagger-lint:2.50' // build.gradle.kts with version catalogs: implementation(libs.dagger-lint) # libs.versions.toml [versions] -dagger-lint = "2.46.1" +dagger-lint = "2.50" [libraries] dagger-lint = { module = "com.google.dagger:dagger-lint", @@ -203,7 +203,7 @@ } ``` -2.46.1 is the version this documentation was generated from; +2.50 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.google.dagger:dagger-lint](com_google_dagger_dagger-lint.md.html). diff --git a/docs/checks/FlowOperatorInvokedInComposition.md.html b/docs/checks/FlowOperatorInvokedInComposition.md.html index 591b38d1..96b64027 100644 --- a/docs/checks/FlowOperatorInvokedInComposition.md.html +++ b/docs/checks/FlowOperatorInvokedInComposition.md.html @@ -21,11 +21,11 @@ Feedback : https://issuetracker.google.com/issues/new?component=612128 Min -: Lint 7.0 +: Lint 8.0 and 8.1 Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.runtime:runtime](androidx_compose_runtime_runtime.md.html) +: [androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html) Affects : Kotlin and Java files and test sources @@ -296,28 +296,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime:1.5.0-beta02") +implementation("androidx.compose.runtime:runtime-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.runtime:runtime:1.5.0-beta02' +implementation 'androidx.compose.runtime:runtime-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.runtime) +implementation(libs.runtime-android) # libs.versions.toml [versions] -runtime = "1.5.0-beta02" +runtime-android = "1.7.0-alpha01" [libraries] -runtime = { - module = "androidx.compose.runtime:runtime", - version.ref = "runtime" +runtime-android = { + module = "androidx.compose.runtime:runtime-android", + version.ref = "runtime-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.runtime:runtime](androidx_compose_runtime_runtime.md.html). +[Additional details about androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html). (##) Suppressing You can suppress false positives using one of the following mechanisms: diff --git a/docs/checks/FormalGerman.md.html b/docs/checks/FormalGerman.md.html index cb08baf0..cd971bbd 100644 --- a/docs/checks/FormalGerman.md.html +++ b/docs/checks/FormalGerman.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,74 +29,9 @@ : Resource files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/FormalGermanDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/FormalGermanDetectorTest.kt) Informal language should be used at all times. -(##) Example - -Here is an example of lint warnings produced by this check: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -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: - -`res/values/config.xml`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers -<resources> - <string name="my_string_1">Wie lautet Ihr Name?</string> - <string name="my_string_2">Wie heissen Sie?</string> - <string name="my_string_3">Frag nach Ihrem Namen.</string> - <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/java/com/vanniktech/lintrules/android/FormalGermanDetectorTest.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, `FormalGermanDetector.formal`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -106,17 +41,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -124,7 +59,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/FragmentAddMenuProvider.md.html b/docs/checks/FragmentAddMenuProvider.md.html index db31f2ba..0bebdced 100644 --- a/docs/checks/FragmentAddMenuProvider.md.html +++ b/docs/checks/FragmentAddMenuProvider.md.html @@ -55,17 +55,17 @@ ``` // build.gradle.kts -implementation("androidx.fragment:fragment:1.7.0-alpha01") +implementation("androidx.fragment:fragment:1.7.0-alpha09") // build.gradle -implementation 'androidx.fragment:fragment:1.7.0-alpha01' +implementation 'androidx.fragment:fragment:1.7.0-alpha09' // build.gradle.kts with version catalogs: implementation(libs.fragment) # libs.versions.toml [versions] -fragment = "1.7.0-alpha01" +fragment = "1.7.0-alpha09" [libraries] fragment = { module = "androidx.fragment:fragment", @@ -73,7 +73,7 @@ } ``` -1.7.0-alpha01 is the version this documentation was generated from; +1.7.0-alpha09 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 fe96ae93..95b48e39 100644 --- a/docs/checks/FragmentBackPressedCallback.md.html +++ b/docs/checks/FragmentBackPressedCallback.md.html @@ -55,17 +55,17 @@ ``` // build.gradle.kts -implementation("androidx.fragment:fragment:1.7.0-alpha01") +implementation("androidx.fragment:fragment:1.7.0-alpha09") // build.gradle -implementation 'androidx.fragment:fragment:1.7.0-alpha01' +implementation 'androidx.fragment:fragment:1.7.0-alpha09' // build.gradle.kts with version catalogs: implementation(libs.fragment) # libs.versions.toml [versions] -fragment = "1.7.0-alpha01" +fragment = "1.7.0-alpha09" [libraries] fragment = { module = "androidx.fragment:fragment", @@ -73,7 +73,7 @@ } ``` -1.7.0-alpha01 is the version this documentation was generated from; +1.7.0-alpha09 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 5e162f4b..51e6417d 100644 --- a/docs/checks/FragmentConstructorInjection.md.html +++ b/docs/checks/FragmentConstructorInjection.md.html @@ -139,17 +139,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -157,7 +157,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/FragmentFieldInjection.md.html b/docs/checks/FragmentFieldInjection.md.html index d1c24a1c..2ed330e3 100644 --- a/docs/checks/FragmentFieldInjection.md.html +++ b/docs/checks/FragmentFieldInjection.md.html @@ -110,17 +110,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -128,7 +128,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/FragmentGradleConfiguration-2.md.html b/docs/checks/FragmentGradleConfiguration-2.md.html index 5f0a5b2e..5322961b 100644 --- a/docs/checks/FragmentGradleConfiguration-2.md.html +++ b/docs/checks/FragmentGradleConfiguration-2.md.html @@ -82,17 +82,17 @@ ``` // build.gradle.kts -implementation("androidx.fragment:fragment-testing-manifest:1.7.0-alpha01") +implementation("androidx.fragment:fragment-testing-manifest:1.7.0-alpha09") // build.gradle -implementation 'androidx.fragment:fragment-testing-manifest:1.7.0-alpha01' +implementation 'androidx.fragment:fragment-testing-manifest:1.7.0-alpha09' // build.gradle.kts with version catalogs: implementation(libs.fragment-testing-manifest) # libs.versions.toml [versions] -fragment-testing-manifest = "1.7.0-alpha01" +fragment-testing-manifest = "1.7.0-alpha09" [libraries] fragment-testing-manifest = { module = "androidx.fragment:fragment-testing-manifest", @@ -100,7 +100,7 @@ } ``` -1.7.0-alpha01 is the version this documentation was generated from; +1.7.0-alpha09 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 5398213f..3fe97919 100644 --- a/docs/checks/FragmentGradleConfiguration.md.html +++ b/docs/checks/FragmentGradleConfiguration.md.html @@ -83,17 +83,17 @@ ``` // build.gradle.kts -implementation("androidx.fragment:fragment-testing:1.7.0-alpha01") +implementation("androidx.fragment:fragment-testing:1.7.0-alpha09") // build.gradle -implementation 'androidx.fragment:fragment-testing:1.7.0-alpha01' +implementation 'androidx.fragment:fragment-testing:1.7.0-alpha09' // build.gradle.kts with version catalogs: implementation(libs.fragment-testing) # libs.versions.toml [versions] -fragment-testing = "1.7.0-alpha01" +fragment-testing = "1.7.0-alpha09" [libraries] fragment-testing = { module = "androidx.fragment:fragment-testing", @@ -101,7 +101,7 @@ } ``` -1.7.0-alpha01 is the version this documentation was generated from; +1.7.0-alpha09 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 0a660947..c9a03a35 100644 --- a/docs/checks/FragmentLiveDataObserve.md.html +++ b/docs/checks/FragmentLiveDataObserve.md.html @@ -55,17 +55,17 @@ ``` // build.gradle.kts -implementation("androidx.fragment:fragment:1.7.0-alpha01") +implementation("androidx.fragment:fragment:1.7.0-alpha09") // build.gradle -implementation 'androidx.fragment:fragment:1.7.0-alpha01' +implementation 'androidx.fragment:fragment:1.7.0-alpha09' // build.gradle.kts with version catalogs: implementation(libs.fragment) # libs.versions.toml [versions] -fragment = "1.7.0-alpha01" +fragment = "1.7.0-alpha09" [libraries] fragment = { module = "androidx.fragment:fragment", @@ -73,7 +73,7 @@ } ``` -1.7.0-alpha01 is the version this documentation was generated from; +1.7.0-alpha09 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 d8e1ba0e..d786508c 100644 --- a/docs/checks/FragmentTagUsage.md.html +++ b/docs/checks/FragmentTagUsage.md.html @@ -90,17 +90,17 @@ ``` // build.gradle.kts -implementation("androidx.fragment:fragment:1.7.0-alpha01") +implementation("androidx.fragment:fragment:1.7.0-alpha09") // build.gradle -implementation 'androidx.fragment:fragment:1.7.0-alpha01' +implementation 'androidx.fragment:fragment:1.7.0-alpha09' // build.gradle.kts with version catalogs: implementation(libs.fragment) # libs.versions.toml [versions] -fragment = "1.7.0-alpha01" +fragment = "1.7.0-alpha09" [libraries] fragment = { module = "androidx.fragment:fragment", @@ -108,7 +108,7 @@ } ``` -1.7.0-alpha01 is the version this documentation was generated from; +1.7.0-alpha09 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/FrequentlyChangedStateReadInComposition.md.html b/docs/checks/FrequentlyChangedStateReadInComposition.md.html index c826337b..d14ed8d4 100644 --- a/docs/checks/FrequentlyChangedStateReadInComposition.md.html +++ b/docs/checks/FrequentlyChangedStateReadInComposition.md.html @@ -25,7 +25,7 @@ Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.foundation:foundation](androidx_compose_foundation_foundation.md.html) +: [androidx.compose.foundation:foundation-android](androidx_compose_foundation_foundation-android.md.html) Affects : Kotlin and Java files and test sources @@ -142,28 +142,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.foundation:foundation:1.5.0-beta02") +implementation("androidx.compose.foundation:foundation-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.foundation:foundation:1.5.0-beta02' +implementation 'androidx.compose.foundation:foundation-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.foundation) +implementation(libs.foundation-android) # libs.versions.toml [versions] -foundation = "1.5.0-beta02" +foundation-android = "1.7.0-alpha01" [libraries] -foundation = { - module = "androidx.compose.foundation:foundation", - version.ref = "foundation" +foundation-android = { + module = "androidx.compose.foundation:foundation-android", + version.ref = "foundation-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.foundation:foundation](androidx_compose_foundation_foundation.md.html). +[Additional details about androidx.compose.foundation:foundation-android](androidx_compose_foundation_foundation-android.md.html). (##) Suppressing You can suppress false positives using one of the following mechanisms: diff --git a/docs/checks/FullyQualifiedResource.md.html b/docs/checks/FullyQualifiedResource.md.html index 6ea37eac..2745824f 100644 --- a/docs/checks/FullyQualifiedResource.md.html +++ b/docs/checks/FullyQualifiedResource.md.html @@ -113,17 +113,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -131,7 +131,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/GestureBackNavigation.md.html b/docs/checks/GestureBackNavigation.md.html index c104bf96..29ebc5c5 100644 --- a/docs/checks/GestureBackNavigation.md.html +++ b/docs/checks/GestureBackNavigation.md.html @@ -46,7 +46,7 @@ back events, this should be handled through the registration of callbacks on the window level; Please see https://developer.android.com/about/versions/13/features/predictive-back-gesture - [GestureBackNavigation] +[GestureBackNavigation] if (KeyEvent.KEYCODE_BACK == keyCode) { --------------------- diff --git a/docs/checks/GradleCompatible.md.html b/docs/checks/GradleCompatible.md.html index 3df7a09b..7059fdba 100644 --- a/docs/checks/GradleCompatible.md.html +++ b/docs/checks/GradleCompatible.md.html @@ -44,11 +44,12 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -build.gradle:25:Error: This support library should not use a different -version (13) than the compileSdkVersion (19) [GradleCompatible] +build.gradle:5:Error: Version 5.2.08 should not be used; the app can not +be published with this version. Use version 11.1.71 instead. +[GradleCompatible] - compile 'com.android.support:appcompat-v7:13.0.0' - ----------------------------------------- + compile 'com.google.android.gms:play-services:5.2.08' + --------------------------------------------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: @@ -57,33 +58,9 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~groovy linenumbers apply plugin: 'android' -android { - compileSdkVersion 19 - buildToolsVersion "19.0.0" - - defaultConfig { - minSdkVersion 7 - targetSdkVersion 17 - versionCode 1 - versionName "1.0" - } - - productFlavors { - free { - } - pro { - } - } -} - dependencies { - compile 'com.android.support:appcompat-v7:+' - freeCompile 'com.google.guava:guava:11.0.2' - compile 'com.android.support:appcompat-v7:13.0.0' - compile 'com.google.android.support:wearable:1.2.0' - compile 'com.android.support:multidex:1.0.0' - androidTestCompile 'com.android.support.test:runner:0.3' + compile 'com.google.android.gms:play-services:5.2.08' } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -92,7 +69,7 @@ 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.testBasic`. +found for this lint check, `GradleDetector.testBadPlayServicesVersion`. To report a problem with this extracted sample, visit https://issuetracker.google.com/issues/new?component=192708. diff --git a/docs/checks/GradleDependency.md.html b/docs/checks/GradleDependency.md.html index 9e72f1a9..2e031585 100644 --- a/docs/checks/GradleDependency.md.html +++ b/docs/checks/GradleDependency.md.html @@ -50,7 +50,7 @@ build.gradle:25:Warning: A newer version of -com.android.support:appcompat-v7 than 13.0.0 is available: 19.1.0 +com.android.support:appcompat-v7 than 13.0.0 is available: 25.3.1 [GradleDependency] compile 'com.android.support:appcompat-v7:13.0.0' @@ -87,7 +87,7 @@ apply plugin: 'android' android { - compileSdkVersion 19 + compileSdkVersion 34 buildToolsVersion "19.0.0" defaultConfig { diff --git a/docs/checks/GradleDeprecated.md.html b/docs/checks/GradleDeprecated.md.html index 0f841da2..3dcd678d 100644 --- a/docs/checks/GradleDeprecated.md.html +++ b/docs/checks/GradleDeprecated.md.html @@ -53,7 +53,7 @@ apply plugin: 'android' android { - compileSdkVersion 19 + compileSdkVersion 34 buildToolsVersion "19.0.0" defaultConfig { diff --git a/docs/checks/GradleDynamicVersion.md.html b/docs/checks/GradleDynamicVersion.md.html index 57384fee..045c1f46 100644 --- a/docs/checks/GradleDynamicVersion.md.html +++ b/docs/checks/GradleDynamicVersion.md.html @@ -58,7 +58,7 @@ apply plugin: 'android' android { - compileSdkVersion 19 + compileSdkVersion 34 buildToolsVersion "19.0.0" defaultConfig { diff --git a/docs/checks/GuavaChecksUsed.md.html b/docs/checks/GuavaChecksUsed.md.html index 0523cfd1..8a04844c 100644 --- a/docs/checks/GuavaChecksUsed.md.html +++ b/docs/checks/GuavaChecksUsed.md.html @@ -121,17 +121,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -139,7 +139,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/GuavaPreconditionsUsedInKotlin.md.html b/docs/checks/GuavaPreconditionsUsedInKotlin.md.html index 0ef0ec9c..a5559bed 100644 --- a/docs/checks/GuavaPreconditionsUsedInKotlin.md.html +++ b/docs/checks/GuavaPreconditionsUsedInKotlin.md.html @@ -122,17 +122,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -140,7 +140,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/IdleBatteryChargingConstraints.md.html b/docs/checks/IdleBatteryChargingConstraints.md.html index dbd608e3..16d82809 100644 --- a/docs/checks/IdleBatteryChargingConstraints.md.html +++ b/docs/checks/IdleBatteryChargingConstraints.md.html @@ -49,17 +49,17 @@ ``` // build.gradle.kts -implementation("androidx.work:work-runtime:2.9.0-alpha01") +implementation("androidx.work:work-runtime:2.10.0-alpha01") // build.gradle -implementation 'androidx.work:work-runtime:2.9.0-alpha01' +implementation 'androidx.work:work-runtime:2.10.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.work-runtime) # libs.versions.toml [versions] -work-runtime = "2.9.0-alpha01" +work-runtime = "2.10.0-alpha01" [libraries] work-runtime = { module = "androidx.work:work-runtime", @@ -67,7 +67,7 @@ } ``` -2.9.0-alpha01 is the version this documentation was generated from; +2.10.0-alpha01 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/ImplicitStringPlaceholder.md.html b/docs/checks/ImplicitStringPlaceholder.md.html index 67439d1a..9ee977cd 100644 --- a/docs/checks/ImplicitStringPlaceholder.md.html +++ b/docs/checks/ImplicitStringPlaceholder.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,45 +29,9 @@ : Resource files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/ImplicitStringPlaceholderDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/ImplicitStringPlaceholderDetectorTest.kt) It's better and more explicit to use numbered placeholders. -!!! 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/values/strings.xml:2:Warning: Implicit placeholder -[ImplicitStringPlaceholder] - - <string name="my_string">Hello %s</string> - ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`res/values/strings.xml`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers -<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/java/com/vanniktech/lintrules/android/ImplicitStringPlaceholderDetectorTest.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, `ImplicitStringPlaceholderDetector.invalid`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -77,17 +41,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -95,7 +59,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/InclusiveNaming.md.html b/docs/checks/InclusiveNaming.md.html index 1f4457cb..4bede9e7 100644 --- a/docs/checks/InclusiveNaming.md.html +++ b/docs/checks/InclusiveNaming.md.html @@ -68,8 +68,8 @@ id's must be unique, so you cannot combine these libraries. Also defined in: * InclusiveNaming: Use inclusive naming. (this issue) -* [InclusiveNaming from com.slack.lint:slack-lint-checks:0.3.0](InclusiveNaming.md.html) -* [InclusiveNaming from com.slack.lint:slack-lint-checks:0.3.0](InclusiveNaming.md.html) +* [InclusiveNaming from com.slack.lint:slack-lint-checks:0.7.0](InclusiveNaming.md.html) +* [InclusiveNaming from com.slack.lint:slack-lint-checks:0.7.0](InclusiveNaming.md.html) (##) Including @@ -81,17 +81,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -99,7 +99,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/IncorrectChainMarginsUsage.md.html b/docs/checks/IncorrectChainMarginsUsage.md.html index 96fe2382..3db4b871 100644 --- a/docs/checks/IncorrectChainMarginsUsage.md.html +++ b/docs/checks/IncorrectChainMarginsUsage.md.html @@ -52,17 +52,17 @@ ``` // build.gradle.kts -implementation("androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha10") +implementation("androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha13") // build.gradle -implementation 'androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha10' +implementation 'androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha13' // build.gradle.kts with version catalogs: implementation(libs.constraintlayout-compose) # libs.versions.toml [versions] -constraintlayout-compose = "1.1.0-alpha10" +constraintlayout-compose = "1.1.0-alpha13" [libraries] constraintlayout-compose = { module = "androidx.constraintlayout:constraintlayout-compose", @@ -70,7 +70,7 @@ } ``` -1.1.0-alpha10 is the version this documentation was generated from; +1.1.0-alpha13 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.constraintlayout:constraintlayout-compose](androidx_constraintlayout_constraintlayout-compose.md.html). diff --git a/docs/checks/IncorrectMatchParentUsage.md.html b/docs/checks/IncorrectMatchParentUsage.md.html index f7201a01..6828f72b 100644 --- a/docs/checks/IncorrectMatchParentUsage.md.html +++ b/docs/checks/IncorrectMatchParentUsage.md.html @@ -51,17 +51,17 @@ ``` // build.gradle.kts -implementation("androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha10") +implementation("androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha13") // build.gradle -implementation 'androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha10' +implementation 'androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha13' // build.gradle.kts with version catalogs: implementation(libs.constraintlayout-compose) # libs.versions.toml [versions] -constraintlayout-compose = "1.1.0-alpha10" +constraintlayout-compose = "1.1.0-alpha13" [libraries] constraintlayout-compose = { module = "androidx.constraintlayout:constraintlayout-compose", @@ -69,7 +69,7 @@ } ``` -1.1.0-alpha10 is the version this documentation was generated from; +1.1.0-alpha13 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.constraintlayout:constraintlayout-compose](androidx_constraintlayout_constraintlayout-compose.md.html). diff --git a/docs/checks/IncorrectReferencesDeclaration.md.html b/docs/checks/IncorrectReferencesDeclaration.md.html index b8b9c575..8bd9f829 100644 --- a/docs/checks/IncorrectReferencesDeclaration.md.html +++ b/docs/checks/IncorrectReferencesDeclaration.md.html @@ -124,17 +124,17 @@ ``` // build.gradle.kts -implementation("androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha10") +implementation("androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha13") // build.gradle -implementation 'androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha10' +implementation 'androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha13' // build.gradle.kts with version catalogs: implementation(libs.constraintlayout-compose) # libs.versions.toml [versions] -constraintlayout-compose = "1.1.0-alpha10" +constraintlayout-compose = "1.1.0-alpha13" [libraries] constraintlayout-compose = { module = "androidx.constraintlayout:constraintlayout-compose", @@ -142,7 +142,7 @@ } ``` -1.1.0-alpha10 is the version this documentation was generated from; +1.1.0-alpha13 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.constraintlayout:constraintlayout-compose](androidx_constraintlayout_constraintlayout-compose.md.html). diff --git a/docs/checks/InjectInJava.md.html b/docs/checks/InjectInJava.md.html index 31ea63cf..6feef522 100644 --- a/docs/checks/InjectInJava.md.html +++ b/docs/checks/InjectInJava.md.html @@ -149,17 +149,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -167,7 +167,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/InjectWithScopeRequiredLoggedInUserProvider.md.html b/docs/checks/InjectWithScopeRequiredLoggedInUserProvider.md.html index 2f680320..369a9513 100644 --- a/docs/checks/InjectWithScopeRequiredLoggedInUserProvider.md.html +++ b/docs/checks/InjectWithScopeRequiredLoggedInUserProvider.md.html @@ -119,17 +119,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -137,7 +137,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/InjectWithTypeMustImplementAnvilInjectable.md.html b/docs/checks/InjectWithTypeMustImplementAnvilInjectable.md.html index 4e2a4180..a92aa3b0 100644 --- a/docs/checks/InjectWithTypeMustImplementAnvilInjectable.md.html +++ b/docs/checks/InjectWithTypeMustImplementAnvilInjectable.md.html @@ -109,17 +109,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -127,7 +127,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/IntentWithNullActionLaunch.md.html b/docs/checks/IntentWithNullActionLaunch.md.html new file mode 100644 index 00000000..bab6c804 --- /dev/null +++ b/docs/checks/IntentWithNullActionLaunch.md.html @@ -0,0 +1,152 @@ + +(#) Unsafe intent launched with no action set + +!!! WARNING: Unsafe intent launched with no action set + This is a warning. + +Id +: `IntentWithNullActionLaunch` +Summary +: Unsafe intent launched with no action set +Severity +: Warning +Category +: Security +Platform +: Android +Vendor +: Android Open Source Project +Feedback +: https://issuetracker.google.com/issues/new?component=192708 +Affects +: Kotlin and Java files and 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/IntentWillNullActionDetector.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/IntentWillNullActionDetectorTest.kt) +Copyright Year +: 2023 + +Intents that have no action and do not specify a component are a +potential security risk, and using them will result in a crash in an +upcoming version of Android. If a specific app is being targeted +(including the case where the current app is the target) then set the +targeted component using `setComponent()`, `setClass()`, +`setClassName()`, or the Intent constructors that take a Class +parameter. If the intent is not intended for a specific app then the +action name should be set. + +!!! 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/TestActivity.java:10:Warning: This intent has no action set +and is not explicit by component. You should either make this intent +explicit by component or set an action matching the targeted intent +filter. [IntentWithNullActionLaunch] + + Intent intent = new Intent(); + ------------ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/test/pkg/TestActivity.java`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers +package test.pkg; + +import android.content.Intent; +import android.app.Activity; + +public class TestActivity extends Activity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + Intent intent = new Intent(); + 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) +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("IntentWithNullActionLaunch") + fun method() { + Intent(...) + } + ``` + + or + + ```java + // Java + @SuppressWarnings("IntentWithNullActionLaunch") + void method() { + new Intent(...); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection IntentWithNullActionLaunch + problematicStatement() + ``` + +* Adding the suppression attribute + `tools:ignore="IntentWithNullActionLaunch"` 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="IntentWithNullActionLaunch" 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 'IntentWithNullActionLaunch' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore IntentWithNullActionLaunch ...` + ``` + +* 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 3bd19fc0..75f718f2 100644 --- a/docs/checks/InvalidAccessibility.md.html +++ b/docs/checks/InvalidAccessibility.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,47 +29,9 @@ : Resource files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/InvalidAccessibilityDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/InvalidAccessibilityDetectorTest.kt) Marks usages of invalid accessibility and suggests corrections. -!!! 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/layout/ids.xml:5:Warning: Either set a proper accessibility text or -use importantForAccessibility [InvalidAccessibility] - - android:contentDescription="@null"/> - ----- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`res/layout/ids.xml`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers -<ImageView - xmlns:android="http://schemas.android.com/apk/res/android" - 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/java/com/vanniktech/lintrules/android/InvalidAccessibilityDetectorTest.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, `InvalidAccessibilityDetector.contentDescriptionNull`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -79,17 +41,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -97,7 +59,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/InvalidColorHexValue.md.html b/docs/checks/InvalidColorHexValue.md.html index 49d684e0..cd802313 100644 --- a/docs/checks/InvalidColorHexValue.md.html +++ b/docs/checks/InvalidColorHexValue.md.html @@ -25,7 +25,7 @@ Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.ui:ui-graphics](androidx_compose_ui_ui-graphics.md.html) +: [androidx.compose.ui:ui-graphics-android](androidx_compose_ui_ui-graphics-android.md.html) Affects : Kotlin and Java files and test sources @@ -97,28 +97,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui-graphics:1.5.0-beta02") +implementation("androidx.compose.ui:ui-graphics-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.ui:ui-graphics:1.5.0-beta02' +implementation 'androidx.compose.ui:ui-graphics-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.ui-graphics) +implementation(libs.ui-graphics-android) # libs.versions.toml [versions] -ui-graphics = "1.5.0-beta02" +ui-graphics-android = "1.7.0-alpha01" [libraries] -ui-graphics = { - module = "androidx.compose.ui:ui-graphics", - version.ref = "ui-graphics" +ui-graphics-android = { + module = "androidx.compose.ui:ui-graphics-android", + version.ref = "ui-graphics-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.ui:ui-graphics](androidx_compose_ui_ui-graphics.md.html). +[Additional details about androidx.compose.ui:ui-graphics-android](androidx_compose_ui_ui-graphics-android.md.html). (##) Suppressing You can suppress false positives using one of the following mechanisms: diff --git a/docs/checks/InvalidFragmentVersionForActivityResult.md.html b/docs/checks/InvalidFragmentVersionForActivityResult.md.html index 47ee6c70..dc213d0f 100644 --- a/docs/checks/InvalidFragmentVersionForActivityResult.md.html +++ b/docs/checks/InvalidFragmentVersionForActivityResult.md.html @@ -87,17 +87,17 @@ ``` // build.gradle.kts -implementation("androidx.activity:activity:1.8.0-alpha05") +implementation("androidx.activity:activity:1.9.0-alpha02") // build.gradle -implementation 'androidx.activity:activity:1.8.0-alpha05' +implementation 'androidx.activity:activity:1.9.0-alpha02' // build.gradle.kts with version catalogs: implementation(libs.activity) # libs.versions.toml [versions] -activity = "1.8.0-alpha05" +activity = "1.9.0-alpha02" [libraries] activity = { module = "androidx.activity:activity", @@ -105,7 +105,7 @@ } ``` -1.8.0-alpha05 is the version this documentation was generated from; +1.9.0-alpha02 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/InvalidImport.md.html b/docs/checks/InvalidImport.md.html index 4cddb957..1ddc7200 100644 --- a/docs/checks/InvalidImport.md.html +++ b/docs/checks/InvalidImport.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,46 +29,11 @@ : Kotlin and Java files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/InvalidImportDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/InvalidImportDetectorTest.kt) Flags invalid imports. One example is com.foo.bar.R.drawable. Instead just the generated class R should be imported and not R.drawable. Also you should never import anything that's in an internal package. -(##) Example - -Here is an example of lint warnings produced by this check: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/foo/Example.java:3:Warning: Forbidden import [InvalidImport] - -import foo.R.drawable; - -------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`src/foo/Example.java`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers -package foo; - -import foo.R.drawable; - -class Example { -} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can also visit the -[source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/InvalidImportDetectorTest.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, `InvalidImportDetector.rDrawableImport`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -78,17 +43,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -96,7 +61,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/InvalidPeriodicWorkRequestInterval.md.html b/docs/checks/InvalidPeriodicWorkRequestInterval.md.html index c928e5fd..08127b7d 100644 --- a/docs/checks/InvalidPeriodicWorkRequestInterval.md.html +++ b/docs/checks/InvalidPeriodicWorkRequestInterval.md.html @@ -51,17 +51,17 @@ ``` // build.gradle.kts -implementation("androidx.work:work-runtime:2.9.0-alpha01") +implementation("androidx.work:work-runtime:2.10.0-alpha01") // build.gradle -implementation 'androidx.work:work-runtime:2.9.0-alpha01' +implementation 'androidx.work:work-runtime:2.10.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.work-runtime) # libs.versions.toml [versions] -work-runtime = "2.9.0-alpha01" +work-runtime = "2.10.0-alpha01" [libraries] work-runtime = { module = "androidx.work:work-runtime", @@ -69,7 +69,7 @@ } ``` -2.9.0-alpha01 is the version this documentation was generated from; +2.10.0-alpha01 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/InvalidSetHasFixedSize.md.html b/docs/checks/InvalidSetHasFixedSize.md.html index 0325c80f..665f2464 100644 --- a/docs/checks/InvalidSetHasFixedSize.md.html +++ b/docs/checks/InvalidSetHasFixedSize.md.html @@ -28,7 +28,7 @@ Min : Lint 7.0 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [androidx.recyclerview:recyclerview](androidx_recyclerview_recyclerview.md.html) @@ -54,17 +54,17 @@ ``` // build.gradle.kts -implementation("androidx.recyclerview:recyclerview:1.3.1-rc01") +implementation("androidx.recyclerview:recyclerview:1.4.0-alpha01") // build.gradle -implementation 'androidx.recyclerview:recyclerview:1.3.1-rc01' +implementation 'androidx.recyclerview:recyclerview:1.4.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.recyclerview) # libs.versions.toml [versions] -recyclerview = "1.3.1-rc01" +recyclerview = "1.4.0-alpha01" [libraries] recyclerview = { module = "androidx.recyclerview:recyclerview", @@ -72,7 +72,7 @@ } ``` -1.3.1-rc01 is the version this documentation was generated from; +1.4.0-alpha01 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.recyclerview:recyclerview](androidx_recyclerview_recyclerview.md.html). diff --git a/docs/checks/InvalidSingleLineComment.md.html b/docs/checks/InvalidSingleLineComment.md.html index c62f561f..f7e04fda 100644 --- a/docs/checks/InvalidSingleLineComment.md.html +++ b/docs/checks/InvalidSingleLineComment.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,50 +29,10 @@ : Gradle build files and Kotlin and Java files Editing : This check can *not* run live in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/InvalidSingleLineCommentDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/InvalidSingleLineCommentDetectorTest.kt) Single line comments should always be sentences. They're part of the code and hence they deserve as much detail and respect as code. -!!! 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/Example.java:5:Warning: Comment does not contain a space at the -beginning [InvalidSingleLineComment] - - //Something. - --- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`src/foo/Example.java`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers -package foo; - -class Example { - public void foo() { - //Something. - } -} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can also visit the -[source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/InvalidSingleLineCommentDetectorTest.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, `InvalidSingleLineCommentDetector.invalidSingleLineCommentNoSpace`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -82,17 +42,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -100,7 +60,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/InvalidString.md.html b/docs/checks/InvalidString.md.html index 94eba804..4727f64a 100644 --- a/docs/checks/InvalidString.md.html +++ b/docs/checks/InvalidString.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,47 +29,10 @@ : Resource files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/InvalidStringDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/InvalidStringDetectorTest.kt) A translation string is invalid if it contains new lines instead of the escaped \n or if it contains trailing whitespace. -!!! 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/values/strings.xml:2:Warning: Text contains new line. -[InvalidString] - - <string name="my_string">My string" - ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`res/values/strings.xml`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers -<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/java/com/vanniktech/lintrules/android/InvalidStringDetectorTest.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, `InvalidStringDetector.stringContainingNewLine`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -79,17 +42,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -97,7 +60,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/JCenter.md.html b/docs/checks/JCenter.md.html index 1678f535..80f86c7a 100644 --- a/docs/checks/JCenter.md.html +++ b/docs/checks/JCenter.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,48 +29,11 @@ : Gradle build files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/JcenterDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/JcenterDetectorTest.kt) JCenter has gotten less and less reliable and it's best to avoid if possible. This check will flag usages of jcenter() in your gradle files. -!!! 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:3:Warning: Don't use jcenter() [JCenter] - - jcenter() - --------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`build.gradle`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~groovy linenumbers -buildscript { - repositories { - jcenter() - } -} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can also visit the -[source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/JcenterDetectorTest.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, `JcenterDetector.jcenter`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -80,17 +43,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -98,7 +61,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/JavaOnlyDetector.md.html b/docs/checks/JavaOnlyDetector.md.html index 45dfdf3f..581ea63a 100644 --- a/docs/checks/JavaOnlyDetector.md.html +++ b/docs/checks/JavaOnlyDetector.md.html @@ -102,17 +102,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -120,7 +120,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/JvmStaticProvidesInObjectDetector.md.html b/docs/checks/JvmStaticProvidesInObjectDetector.md.html index c84d4de8..8ee5f29e 100644 --- a/docs/checks/JvmStaticProvidesInObjectDetector.md.html +++ b/docs/checks/JvmStaticProvidesInObjectDetector.md.html @@ -200,17 +200,17 @@ ``` // build.gradle.kts -implementation("com.google.dagger:dagger-lint:2.46.1") +implementation("com.google.dagger:dagger-lint:2.50") // build.gradle -implementation 'com.google.dagger:dagger-lint:2.46.1' +implementation 'com.google.dagger:dagger-lint:2.50' // build.gradle.kts with version catalogs: implementation(libs.dagger-lint) # libs.versions.toml [versions] -dagger-lint = "2.46.1" +dagger-lint = "2.50" [libraries] dagger-lint = { module = "com.google.dagger:dagger-lint", @@ -218,7 +218,7 @@ } ``` -2.46.1 is the version this documentation was generated from; +2.50 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.google.dagger:dagger-lint](com_google_dagger_dagger-lint.md.html). diff --git a/docs/checks/KotlinPairNotCreated.md.html b/docs/checks/KotlinPairNotCreated.md.html index d169d057..9573241c 100644 --- a/docs/checks/KotlinPairNotCreated.md.html +++ b/docs/checks/KotlinPairNotCreated.md.html @@ -94,17 +94,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -112,7 +112,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/KotlinRequireNotNullUseMessage.md.html b/docs/checks/KotlinRequireNotNullUseMessage.md.html index ef53f7e6..f8bc4b9b 100644 --- a/docs/checks/KotlinRequireNotNullUseMessage.md.html +++ b/docs/checks/KotlinRequireNotNullUseMessage.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-kotlin](com_vanniktech_lint-rules-kotlin.md.html) @@ -29,43 +29,10 @@ : Kotlin and Java files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-kotlin-lint/src/main/java/com/vanniktech/lintrules/kotlin/KotlinRequireNotNullUseMessageDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-kotlin-lint/src/test/java/com/vanniktech/lintrules/rxjava2/KotlinRequireNotNullUseMessageDetectorTest.kt) The default generated message from requireNotNull often lacks context, hence it's best to provide a custom message. -(##) Example - -Here is an example of lint warnings produced by this check: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/test.kt:2:Warning: Provide a message -[KotlinRequireNotNullUseMessage] - - requireNotNull(value) - -------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`src/test.kt`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers -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/java/com/vanniktech/lintrules/rxjava2/KotlinRequireNotNullUseMessageDetectorTest.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, `KotlinRequireNotNullUseMessageDetector.requireNotNull`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -75,17 +42,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-kotlin:0.24.0") +lintChecks("com.vanniktech:lint-rules-kotlin:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-kotlin:0.24.0' +lintChecks 'com.vanniktech:lint-rules-kotlin:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-kotlin) # libs.versions.toml [versions] -lint-rules-kotlin = "0.24.0" +lint-rules-kotlin = "0.25.0" [libraries] lint-rules-kotlin = { module = "com.vanniktech:lint-rules-kotlin", @@ -93,7 +60,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-kotlin](com_vanniktech_lint-rules-kotlin.md.html). diff --git a/docs/checks/LaunchDuringComposition.md.html b/docs/checks/LaunchDuringComposition.md.html index 3909ed56..6fda0576 100644 --- a/docs/checks/LaunchDuringComposition.md.html +++ b/docs/checks/LaunchDuringComposition.md.html @@ -166,17 +166,17 @@ ``` // build.gradle.kts -implementation("androidx.activity:activity-compose:1.8.0-alpha05") +implementation("androidx.activity:activity-compose:1.9.0-alpha02") // build.gradle -implementation 'androidx.activity:activity-compose:1.8.0-alpha05' +implementation 'androidx.activity:activity-compose:1.9.0-alpha02' // build.gradle.kts with version catalogs: implementation(libs.activity-compose) # libs.versions.toml [versions] -activity-compose = "1.8.0-alpha05" +activity-compose = "1.9.0-alpha02" [libraries] activity-compose = { module = "androidx.activity:activity-compose", @@ -184,7 +184,7 @@ } ``` -1.8.0-alpha05 is the version this documentation was generated from; +1.9.0-alpha02 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 38d71918..4a4ea4ee 100644 --- a/docs/checks/LayoutFileNameMatchesClass.md.html +++ b/docs/checks/LayoutFileNameMatchesClass.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,50 +29,10 @@ : Kotlin and Java files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/LayoutFileNameMatchesClassDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/LayoutFileNameMatchesClassDetectorTest.kt) Layout file names should always match the name of the class. FooActivity should have a layout file named activity_foo hence. -!!! 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/main/java/foo/FooActivity.java:5:Warning: Parameter should be named -R.layout.unit_test_activity_foo [LayoutFileNameMatchesClass] - - setContentView(R.layout.activity_bar); - --------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`src/main/java/foo/FooActivity.java`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers -package foo; - -class FooActivity extends Activity { - void foo() { - setContentView(R.layout.activity_bar); - } -} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can also visit the -[source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/LayoutFileNameMatchesClassDetectorTest.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, `LayoutFileNameMatchesClassDetector.fooActivityUsesActivityBarWithResourcePrefix`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -82,17 +42,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -100,7 +60,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/LintImplUseUast.md.html b/docs/checks/LintImplUseUast.md.html index 2122014e..33a7a35d 100644 --- a/docs/checks/LintImplUseUast.md.html +++ b/docs/checks/LintImplUseUast.md.html @@ -55,6 +55,14 @@ ---------------- +src/test/pkg/MyJavaLintDetector.java:42:Error: Don't call +PsiMethod#getBody(); you must use UAST instead. If you don't have a +UMethod call UastFacade.getMethodBody(method) [LintImplUseUast] + + method.getBody(); // ERROR - must use UAST + ---------------- + + src/test/pkg/MyJavaLintDetector.java:45:Error: Don't call PsiMember#getContainingClass(); you should use UAST instead and call getContainingUClass() [LintImplUseUast] diff --git a/docs/checks/MainScopeUsage.md.html b/docs/checks/MainScopeUsage.md.html index 6609329b..1d3e5db0 100644 --- a/docs/checks/MainScopeUsage.md.html +++ b/docs/checks/MainScopeUsage.md.html @@ -88,17 +88,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -106,7 +106,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MatchingMenuId.md.html b/docs/checks/MatchingMenuId.md.html index ee31768e..4c12d1cc 100644 --- a/docs/checks/MatchingMenuId.md.html +++ b/docs/checks/MatchingMenuId.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,47 +29,11 @@ : Resource files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/MatchingMenuIdDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/MatchingMenuIdDetectorTest.kt) When the layout file is named menu_home all of the containing ids should be prefixed with menuHome to avoid ambiguity between different menu files across different menu items. -!!! 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/menu/menu_main.xml:2:Warning: Id should start with: menuMain -[MatchingMenuId] - - <item android:id="@+id/something"/> - -------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`res/menu/menu_main.xml`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers -<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/java/com/vanniktech/lintrules/android/MatchingMenuIdDetectorTest.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, `MatchingMenuIdDetector.idWithoutPrefix`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -79,17 +43,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -97,7 +61,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/MatchingViewId.md.html b/docs/checks/MatchingViewId.md.html index 464a80f6..a82ad185 100644 --- a/docs/checks/MatchingViewId.md.html +++ b/docs/checks/MatchingViewId.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,45 +29,11 @@ : Resource files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/MatchingViewIdDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/MatchingViewIdDetectorTest.kt) When the layout file is named activity_home all of the containing ids should be prefixed with activityHome to avoid ambiguity between different layout files across different views. -!!! 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/layout/activity_main.xml:1:Warning: Id should start with: -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/java/com/vanniktech/lintrules/android/MatchingViewIdDetectorTest.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, `MatchingViewIdDetector.idWithoutPrefix`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -77,17 +43,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -95,7 +61,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/MissingColorAlphaChannel.md.html b/docs/checks/MissingColorAlphaChannel.md.html index 4af0523b..bf0ff29e 100644 --- a/docs/checks/MissingColorAlphaChannel.md.html +++ b/docs/checks/MissingColorAlphaChannel.md.html @@ -25,7 +25,7 @@ Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.ui:ui-graphics](androidx_compose_ui_ui-graphics.md.html) +: [androidx.compose.ui:ui-graphics-android](androidx_compose_ui_ui-graphics-android.md.html) Affects : Kotlin and Java files and test sources @@ -119,28 +119,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui-graphics:1.5.0-beta02") +implementation("androidx.compose.ui:ui-graphics-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.ui:ui-graphics:1.5.0-beta02' +implementation 'androidx.compose.ui:ui-graphics-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.ui-graphics) +implementation(libs.ui-graphics-android) # libs.versions.toml [versions] -ui-graphics = "1.5.0-beta02" +ui-graphics-android = "1.7.0-alpha01" [libraries] -ui-graphics = { - module = "androidx.compose.ui:ui-graphics", - version.ref = "ui-graphics" +ui-graphics-android = { + module = "androidx.compose.ui:ui-graphics-android", + version.ref = "ui-graphics-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.ui:ui-graphics](androidx_compose_ui_ui-graphics.md.html). +[Additional details about androidx.compose.ui:ui-graphics-android](androidx_compose_ui_ui-graphics-android.md.html). (##) Suppressing You can suppress false positives using one of the following mechanisms: diff --git a/docs/checks/MissingFirebaseInstanceTokenRefresh.md.html b/docs/checks/MissingFirebaseInstanceTokenRefresh.md.html index a6fcae7c..d12836cb 100644 --- a/docs/checks/MissingFirebaseInstanceTokenRefresh.md.html +++ b/docs/checks/MissingFirebaseInstanceTokenRefresh.md.html @@ -40,7 +40,7 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text src/com/google/firebase/samples/messaging/advanced/services/MessagingService.java:5:Warning: - Apps that use Firebase Cloud Messaging should implement onNewToken() in +Apps that use Firebase Cloud Messaging should implement onNewToken() in order to observe token changes [MissingFirebaseInstanceTokenRefresh] public class MessagingService extends FirebaseMessagingService { diff --git a/docs/checks/MissingResourceImportAlias.md.html b/docs/checks/MissingResourceImportAlias.md.html index 203f86a5..49418370 100644 --- a/docs/checks/MissingResourceImportAlias.md.html +++ b/docs/checks/MissingResourceImportAlias.md.html @@ -107,17 +107,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -125,7 +125,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MissingScrollbars.md.html b/docs/checks/MissingScrollbars.md.html index 3d3b63a7..a67a8d5a 100644 --- a/docs/checks/MissingScrollbars.md.html +++ b/docs/checks/MissingScrollbars.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,48 +29,10 @@ : Resource files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/MissingScrollbarsDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/MissingScrollbarsDetectorTest.kt) Every scroll view should explicitly define whether it has scrollbars (none | vertical | horizontal). -!!! 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/layout/ids.xml:1:Warning: Missing scrollbars on ScrollView -[MissingScrollbars] - -<ScrollView -^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`res/layout/ids.xml`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers -<ScrollView - xmlns:android="http://schemas.android.com/apk/res/android" - 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/java/com/vanniktech/lintrules/android/MissingScrollbarsDetectorTest.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, `MissingScrollbarsDetector.scrollView`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -80,17 +42,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -98,7 +60,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/MissingXmlHeader.md.html b/docs/checks/MissingXmlHeader.md.html index 1a11ddb9..e4751d33 100644 --- a/docs/checks/MissingXmlHeader.md.html +++ b/docs/checks/MissingXmlHeader.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,44 +29,10 @@ : Resource files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/MissingXmlHeaderDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/MissingXmlHeaderDetectorTest.kt) An xml file should always have the xml header to declare that it is an xml file despite the file ending. -!!! 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/values/strings.xml:1:Warning: Missing an xml header -[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/java/com/vanniktech/lintrules/android/MissingXmlHeaderDetectorTest.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, `MissingXmlHeaderDetector.missingHeader`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -76,17 +42,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -94,7 +60,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/ModifierFactoryExtensionFunction.md.html b/docs/checks/ModifierFactoryExtensionFunction.md.html index a8e04416..89711880 100644 --- a/docs/checks/ModifierFactoryExtensionFunction.md.html +++ b/docs/checks/ModifierFactoryExtensionFunction.md.html @@ -25,7 +25,7 @@ Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.ui:ui](androidx_compose_ui_ui.md.html) +: [androidx.compose.ui:ui-android](androidx_compose_ui_ui-android.md.html) Affects : Kotlin and Java files and test sources @@ -119,28 +119,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui:1.5.0-beta02") +implementation("androidx.compose.ui:ui-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.ui:ui:1.5.0-beta02' +implementation 'androidx.compose.ui:ui-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.ui) +implementation(libs.ui-android) # libs.versions.toml [versions] -ui = "1.5.0-beta02" +ui-android = "1.7.0-alpha01" [libraries] -ui = { - module = "androidx.compose.ui:ui", - version.ref = "ui" +ui-android = { + module = "androidx.compose.ui:ui-android", + version.ref = "ui-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.ui:ui](androidx_compose_ui_ui.md.html). +[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: diff --git a/docs/checks/ModifierFactoryReturnType.md.html b/docs/checks/ModifierFactoryReturnType.md.html index 0340fd9b..ddf13b9d 100644 --- a/docs/checks/ModifierFactoryReturnType.md.html +++ b/docs/checks/ModifierFactoryReturnType.md.html @@ -25,7 +25,7 @@ Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.ui:ui](androidx_compose_ui_ui.md.html) +: [androidx.compose.ui:ui-android](androidx_compose_ui_ui-android.md.html) Affects : Kotlin and Java files and test sources @@ -85,28 +85,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui:1.5.0-beta02") +implementation("androidx.compose.ui:ui-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.ui:ui:1.5.0-beta02' +implementation 'androidx.compose.ui:ui-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.ui) +implementation(libs.ui-android) # libs.versions.toml [versions] -ui = "1.5.0-beta02" +ui-android = "1.7.0-alpha01" [libraries] -ui = { - module = "androidx.compose.ui:ui", - version.ref = "ui" +ui-android = { + module = "androidx.compose.ui:ui-android", + version.ref = "ui-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.ui:ui](androidx_compose_ui_ui.md.html). +[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: diff --git a/docs/checks/ModifierFactoryUnreferencedReceiver.md.html b/docs/checks/ModifierFactoryUnreferencedReceiver.md.html index 4388f23b..8f816047 100644 --- a/docs/checks/ModifierFactoryUnreferencedReceiver.md.html +++ b/docs/checks/ModifierFactoryUnreferencedReceiver.md.html @@ -25,7 +25,7 @@ Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.ui:ui](androidx_compose_ui_ui.md.html) +: [androidx.compose.ui:ui-android](androidx_compose_ui_ui-android.md.html) Affects : Kotlin and Java files and test sources @@ -90,28 +90,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui:1.5.0-beta02") +implementation("androidx.compose.ui:ui-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.ui:ui:1.5.0-beta02' +implementation 'androidx.compose.ui:ui-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.ui) +implementation(libs.ui-android) # libs.versions.toml [versions] -ui = "1.5.0-beta02" +ui-android = "1.7.0-alpha01" [libraries] -ui = { - module = "androidx.compose.ui:ui", - version.ref = "ui" +ui-android = { + module = "androidx.compose.ui:ui-android", + version.ref = "ui-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.ui:ui](androidx_compose_ui_ui.md.html). +[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: diff --git a/docs/checks/ModifierNodeInspectableProperties.md.html b/docs/checks/ModifierNodeInspectableProperties.md.html index 57977f65..92f152e3 100644 --- a/docs/checks/ModifierNodeInspectableProperties.md.html +++ b/docs/checks/ModifierNodeInspectableProperties.md.html @@ -25,7 +25,7 @@ Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.ui:ui](androidx_compose_ui_ui.md.html) +: [androidx.compose.ui:ui-android](androidx_compose_ui_ui-android.md.html) Affects : Kotlin and Java files @@ -92,28 +92,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui:1.5.0-beta02") +implementation("androidx.compose.ui:ui-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.ui:ui:1.5.0-beta02' +implementation 'androidx.compose.ui:ui-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.ui) +implementation(libs.ui-android) # libs.versions.toml [versions] -ui = "1.5.0-beta02" +ui-android = "1.7.0-alpha01" [libraries] -ui = { - module = "androidx.compose.ui:ui", - version.ref = "ui" +ui-android = { + module = "androidx.compose.ui:ui-android", + version.ref = "ui-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.ui:ui](androidx_compose_ui_ui.md.html). +[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: diff --git a/docs/checks/ModifierParameter.md.html b/docs/checks/ModifierParameter.md.html index 6467557c..44f765a9 100644 --- a/docs/checks/ModifierParameter.md.html +++ b/docs/checks/ModifierParameter.md.html @@ -25,7 +25,7 @@ Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.ui:ui](androidx_compose_ui_ui.md.html) +: [androidx.compose.ui:ui-android](androidx_compose_ui_ui-android.md.html) Affects : Kotlin and Java files and test sources @@ -94,28 +94,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui:1.5.0-beta02") +implementation("androidx.compose.ui:ui-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.ui:ui:1.5.0-beta02' +implementation 'androidx.compose.ui:ui-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.ui) +implementation(libs.ui-android) # libs.versions.toml [versions] -ui = "1.5.0-beta02" +ui-android = "1.7.0-alpha01" [libraries] -ui = { - module = "androidx.compose.ui:ui", - version.ref = "ui" +ui-android = { + module = "androidx.compose.ui:ui-android", + version.ref = "ui-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.ui:ui](androidx_compose_ui_ui.md.html). +[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: diff --git a/docs/checks/ModuleCompanionObjects.md.html b/docs/checks/ModuleCompanionObjects.md.html index ce67cff5..5373ab6d 100644 --- a/docs/checks/ModuleCompanionObjects.md.html +++ b/docs/checks/ModuleCompanionObjects.md.html @@ -200,17 +200,17 @@ ``` // build.gradle.kts -implementation("com.google.dagger:dagger-lint:2.46.1") +implementation("com.google.dagger:dagger-lint:2.50") // build.gradle -implementation 'com.google.dagger:dagger-lint:2.46.1' +implementation 'com.google.dagger:dagger-lint:2.50' // build.gradle.kts with version catalogs: implementation(libs.dagger-lint) # libs.versions.toml [versions] -dagger-lint = "2.46.1" +dagger-lint = "2.50" [libraries] dagger-lint = { module = "com.google.dagger:dagger-lint", @@ -218,7 +218,7 @@ } ``` -2.46.1 is the version this documentation was generated from; +2.50 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.google.dagger:dagger-lint](com_google_dagger_dagger-lint.md.html). diff --git a/docs/checks/ModuleCompanionObjectsNotInModuleParent.md.html b/docs/checks/ModuleCompanionObjectsNotInModuleParent.md.html index 7823c54e..74eeb2a0 100644 --- a/docs/checks/ModuleCompanionObjectsNotInModuleParent.md.html +++ b/docs/checks/ModuleCompanionObjectsNotInModuleParent.md.html @@ -56,17 +56,17 @@ ``` // build.gradle.kts -implementation("com.google.dagger:dagger-lint:2.46.1") +implementation("com.google.dagger:dagger-lint:2.50") // build.gradle -implementation 'com.google.dagger:dagger-lint:2.46.1' +implementation 'com.google.dagger:dagger-lint:2.50' // build.gradle.kts with version catalogs: implementation(libs.dagger-lint) # libs.versions.toml [versions] -dagger-lint = "2.46.1" +dagger-lint = "2.50" [libraries] dagger-lint = { module = "com.google.dagger:dagger-lint", @@ -74,7 +74,7 @@ } ``` -2.46.1 is the version this documentation was generated from; +2.50 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.google.dagger:dagger-lint](com_google_dagger_dagger-lint.md.html). diff --git a/docs/checks/MoshiUsageAdaptedByRequiresAdapter.md.html b/docs/checks/MoshiUsageAdaptedByRequiresAdapter.md.html index 10bcb45e..24d23ae2 100644 --- a/docs/checks/MoshiUsageAdaptedByRequiresAdapter.md.html +++ b/docs/checks/MoshiUsageAdaptedByRequiresAdapter.md.html @@ -118,17 +118,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -136,7 +136,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageAdaptedByRequiresKeep.md.html b/docs/checks/MoshiUsageAdaptedByRequiresKeep.md.html index 1e304ff3..43c4ea42 100644 --- a/docs/checks/MoshiUsageAdaptedByRequiresKeep.md.html +++ b/docs/checks/MoshiUsageAdaptedByRequiresKeep.md.html @@ -109,17 +109,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -127,7 +127,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageArray.md.html b/docs/checks/MoshiUsageArray.md.html index a8a01c4d..a7d406aa 100644 --- a/docs/checks/MoshiUsageArray.md.html +++ b/docs/checks/MoshiUsageArray.md.html @@ -166,17 +166,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -184,7 +184,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageBlankGenerator.md.html b/docs/checks/MoshiUsageBlankGenerator.md.html index 6f25c188..78c75db9 100644 --- a/docs/checks/MoshiUsageBlankGenerator.md.html +++ b/docs/checks/MoshiUsageBlankGenerator.md.html @@ -84,17 +84,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -102,7 +102,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageBlankJsonName.md.html b/docs/checks/MoshiUsageBlankJsonName.md.html index ec49f445..a2c68eba 100644 --- a/docs/checks/MoshiUsageBlankJsonName.md.html +++ b/docs/checks/MoshiUsageBlankJsonName.md.html @@ -86,17 +86,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -104,7 +104,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageBlankTypeLabel.md.html b/docs/checks/MoshiUsageBlankTypeLabel.md.html index 121b97d2..1858f020 100644 --- a/docs/checks/MoshiUsageBlankTypeLabel.md.html +++ b/docs/checks/MoshiUsageBlankTypeLabel.md.html @@ -84,17 +84,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -102,7 +102,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageClassVisibility.md.html b/docs/checks/MoshiUsageClassVisibility.md.html index d4c17ff1..434d9d2f 100644 --- a/docs/checks/MoshiUsageClassVisibility.md.html +++ b/docs/checks/MoshiUsageClassVisibility.md.html @@ -98,17 +98,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -116,7 +116,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageDoubleClassAnnotation.md.html b/docs/checks/MoshiUsageDoubleClassAnnotation.md.html index bf315eb5..5726302e 100644 --- a/docs/checks/MoshiUsageDoubleClassAnnotation.md.html +++ b/docs/checks/MoshiUsageDoubleClassAnnotation.md.html @@ -98,17 +98,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -116,7 +116,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageDoubleTypeLabel.md.html b/docs/checks/MoshiUsageDoubleTypeLabel.md.html index 00539aca..84226b9a 100644 --- a/docs/checks/MoshiUsageDoubleTypeLabel.md.html +++ b/docs/checks/MoshiUsageDoubleTypeLabel.md.html @@ -97,17 +97,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -115,7 +115,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageDuplicateJsonName.md.html b/docs/checks/MoshiUsageDuplicateJsonName.md.html index 66f8bbc4..8612f1ef 100644 --- a/docs/checks/MoshiUsageDuplicateJsonName.md.html +++ b/docs/checks/MoshiUsageDuplicateJsonName.md.html @@ -111,17 +111,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -129,7 +129,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageEnumAnnotatedUnknown.md.html b/docs/checks/MoshiUsageEnumAnnotatedUnknown.md.html index e8b0e7bc..3bc494d0 100644 --- a/docs/checks/MoshiUsageEnumAnnotatedUnknown.md.html +++ b/docs/checks/MoshiUsageEnumAnnotatedUnknown.md.html @@ -53,17 +53,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -71,7 +71,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageEnumCasing.md.html b/docs/checks/MoshiUsageEnumCasing.md.html index cf1970c6..8bf22881 100644 --- a/docs/checks/MoshiUsageEnumCasing.md.html +++ b/docs/checks/MoshiUsageEnumCasing.md.html @@ -53,17 +53,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -71,7 +71,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageEnumJsonClassGenerated.md.html b/docs/checks/MoshiUsageEnumJsonClassGenerated.md.html index db693fd3..5e67ef5e 100644 --- a/docs/checks/MoshiUsageEnumJsonClassGenerated.md.html +++ b/docs/checks/MoshiUsageEnumJsonClassGenerated.md.html @@ -52,17 +52,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -70,7 +70,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageEnumMissingJsonClass.md.html b/docs/checks/MoshiUsageEnumMissingJsonClass.md.html index 8a1a95f1..95d10b55 100644 --- a/docs/checks/MoshiUsageEnumMissingJsonClass.md.html +++ b/docs/checks/MoshiUsageEnumMissingJsonClass.md.html @@ -53,17 +53,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -71,7 +71,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageEnumMissingUnknown.md.html b/docs/checks/MoshiUsageEnumMissingUnknown.md.html index 04cc2e77..58447e23 100644 --- a/docs/checks/MoshiUsageEnumMissingUnknown.md.html +++ b/docs/checks/MoshiUsageEnumMissingUnknown.md.html @@ -53,17 +53,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -71,7 +71,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageEnumPropertyCouldBeMoshi.md.html b/docs/checks/MoshiUsageEnumPropertyCouldBeMoshi.md.html index e26d933d..c7ea6776 100644 --- a/docs/checks/MoshiUsageEnumPropertyCouldBeMoshi.md.html +++ b/docs/checks/MoshiUsageEnumPropertyCouldBeMoshi.md.html @@ -90,17 +90,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -108,7 +108,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageEnumPropertyDefaultUnknown.md.html b/docs/checks/MoshiUsageEnumPropertyDefaultUnknown.md.html index 5626c5d4..a50884f0 100644 --- a/docs/checks/MoshiUsageEnumPropertyDefaultUnknown.md.html +++ b/docs/checks/MoshiUsageEnumPropertyDefaultUnknown.md.html @@ -112,17 +112,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -130,7 +130,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageGenerateAdapterShouldBeTrue.md.html b/docs/checks/MoshiUsageGenerateAdapterShouldBeTrue.md.html index 17fc98bd..e1d0c383 100644 --- a/docs/checks/MoshiUsageGenerateAdapterShouldBeTrue.md.html +++ b/docs/checks/MoshiUsageGenerateAdapterShouldBeTrue.md.html @@ -85,17 +85,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -103,7 +103,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageGenericSealedSubtype.md.html b/docs/checks/MoshiUsageGenericSealedSubtype.md.html index 1f706aef..e813c13c 100644 --- a/docs/checks/MoshiUsageGenericSealedSubtype.md.html +++ b/docs/checks/MoshiUsageGenericSealedSubtype.md.html @@ -95,17 +95,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -113,7 +113,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageInappropriateTypeLabel.md.html b/docs/checks/MoshiUsageInappropriateTypeLabel.md.html index 373ad5e7..44191dfd 100644 --- a/docs/checks/MoshiUsageInappropriateTypeLabel.md.html +++ b/docs/checks/MoshiUsageInappropriateTypeLabel.md.html @@ -108,17 +108,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -126,7 +126,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageMissingPrimary.md.html b/docs/checks/MoshiUsageMissingPrimary.md.html index 2d4734b5..167f47b9 100644 --- a/docs/checks/MoshiUsageMissingPrimary.md.html +++ b/docs/checks/MoshiUsageMissingPrimary.md.html @@ -86,17 +86,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -104,7 +104,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageMissingTypeLabel.md.html b/docs/checks/MoshiUsageMissingTypeLabel.md.html index a179a33d..2e65f4db 100644 --- a/docs/checks/MoshiUsageMissingTypeLabel.md.html +++ b/docs/checks/MoshiUsageMissingTypeLabel.md.html @@ -98,17 +98,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -116,7 +116,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageMutableCollections.md.html b/docs/checks/MoshiUsageMutableCollections.md.html index ce98cffd..c96ecd2c 100644 --- a/docs/checks/MoshiUsageMutableCollections.md.html +++ b/docs/checks/MoshiUsageMutableCollections.md.html @@ -163,17 +163,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -181,7 +181,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageNonMoshiClassCollection.md.html b/docs/checks/MoshiUsageNonMoshiClassCollection.md.html index f51d09bc..b1a273d2 100644 --- a/docs/checks/MoshiUsageNonMoshiClassCollection.md.html +++ b/docs/checks/MoshiUsageNonMoshiClassCollection.md.html @@ -153,17 +153,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -171,7 +171,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageNonMoshiClassExternal.md.html b/docs/checks/MoshiUsageNonMoshiClassExternal.md.html index 4259964a..654b868d 100644 --- a/docs/checks/MoshiUsageNonMoshiClassExternal.md.html +++ b/docs/checks/MoshiUsageNonMoshiClassExternal.md.html @@ -167,17 +167,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -185,7 +185,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageNonMoshiClassInternal.md.html b/docs/checks/MoshiUsageNonMoshiClassInternal.md.html index c35eaa3a..9b5cac2f 100644 --- a/docs/checks/MoshiUsageNonMoshiClassInternal.md.html +++ b/docs/checks/MoshiUsageNonMoshiClassInternal.md.html @@ -144,17 +144,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -162,7 +162,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageNonMoshiClassMap.md.html b/docs/checks/MoshiUsageNonMoshiClassMap.md.html index 5801d664..2653abba 100644 --- a/docs/checks/MoshiUsageNonMoshiClassMap.md.html +++ b/docs/checks/MoshiUsageNonMoshiClassMap.md.html @@ -143,17 +143,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -161,7 +161,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageNonMoshiClassPlatform.md.html b/docs/checks/MoshiUsageNonMoshiClassPlatform.md.html index d971d874..2c8b958a 100644 --- a/docs/checks/MoshiUsageNonMoshiClassPlatform.md.html +++ b/docs/checks/MoshiUsageNonMoshiClassPlatform.md.html @@ -145,17 +145,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -163,7 +163,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageObject.md.html b/docs/checks/MoshiUsageObject.md.html index 4f4e773d..ed54aaac 100644 --- a/docs/checks/MoshiUsageObject.md.html +++ b/docs/checks/MoshiUsageObject.md.html @@ -86,17 +86,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -104,7 +104,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageParamNeedsInit.md.html b/docs/checks/MoshiUsageParamNeedsInit.md.html index ada1d7cf..71dce9fb 100644 --- a/docs/checks/MoshiUsageParamNeedsInit.md.html +++ b/docs/checks/MoshiUsageParamNeedsInit.md.html @@ -86,17 +86,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -104,7 +104,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsagePrivateConstructor.md.html b/docs/checks/MoshiUsagePrivateConstructor.md.html index 3fd86caf..c3e2392c 100644 --- a/docs/checks/MoshiUsagePrivateConstructor.md.html +++ b/docs/checks/MoshiUsagePrivateConstructor.md.html @@ -94,17 +94,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -112,7 +112,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsagePrivateConstructorProperty.md.html b/docs/checks/MoshiUsagePrivateConstructorProperty.md.html index f26ee34c..45788498 100644 --- a/docs/checks/MoshiUsagePrivateConstructorProperty.md.html +++ b/docs/checks/MoshiUsagePrivateConstructorProperty.md.html @@ -84,17 +84,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -102,7 +102,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageQualifierRetention.md.html b/docs/checks/MoshiUsageQualifierRetention.md.html index d306d0ed..50c74356 100644 --- a/docs/checks/MoshiUsageQualifierRetention.md.html +++ b/docs/checks/MoshiUsageQualifierRetention.md.html @@ -119,17 +119,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -137,7 +137,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageQualifierTarget.md.html b/docs/checks/MoshiUsageQualifierTarget.md.html index f28e2b94..75ce558f 100644 --- a/docs/checks/MoshiUsageQualifierTarget.md.html +++ b/docs/checks/MoshiUsageQualifierTarget.md.html @@ -118,17 +118,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -136,7 +136,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageRedundantJsonName.md.html b/docs/checks/MoshiUsageRedundantJsonName.md.html index 3566929b..4f96d1b0 100644 --- a/docs/checks/MoshiUsageRedundantJsonName.md.html +++ b/docs/checks/MoshiUsageRedundantJsonName.md.html @@ -87,17 +87,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -105,7 +105,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageRedundantSiteTarget.md.html b/docs/checks/MoshiUsageRedundantSiteTarget.md.html index 1cc343a5..0a642bb5 100644 --- a/docs/checks/MoshiUsageRedundantSiteTarget.md.html +++ b/docs/checks/MoshiUsageRedundantSiteTarget.md.html @@ -87,17 +87,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -105,7 +105,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageSealedMustBeSealed.md.html b/docs/checks/MoshiUsageSealedMustBeSealed.md.html index 928d158a..9a7516e0 100644 --- a/docs/checks/MoshiUsageSealedMustBeSealed.md.html +++ b/docs/checks/MoshiUsageSealedMustBeSealed.md.html @@ -83,17 +83,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -101,7 +101,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageSerializedName.md.html b/docs/checks/MoshiUsageSerializedName.md.html index 8182c298..fe478ca2 100644 --- a/docs/checks/MoshiUsageSerializedName.md.html +++ b/docs/checks/MoshiUsageSerializedName.md.html @@ -123,17 +123,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -141,7 +141,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageSnakeCase.md.html b/docs/checks/MoshiUsageSnakeCase.md.html index d2eb610b..0a7119c3 100644 --- a/docs/checks/MoshiUsageSnakeCase.md.html +++ b/docs/checks/MoshiUsageSnakeCase.md.html @@ -89,17 +89,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -107,7 +107,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageTransientNeedsInit.md.html b/docs/checks/MoshiUsageTransientNeedsInit.md.html index 4bdb5ee6..64060a5c 100644 --- a/docs/checks/MoshiUsageTransientNeedsInit.md.html +++ b/docs/checks/MoshiUsageTransientNeedsInit.md.html @@ -86,17 +86,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -104,7 +104,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageUnsupportedType.md.html b/docs/checks/MoshiUsageUnsupportedType.md.html index fe0d0003..db4d9e78 100644 --- a/docs/checks/MoshiUsageUnsupportedType.md.html +++ b/docs/checks/MoshiUsageUnsupportedType.md.html @@ -117,17 +117,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -135,7 +135,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageUseData.md.html b/docs/checks/MoshiUsageUseData.md.html index de13a282..b9528e53 100644 --- a/docs/checks/MoshiUsageUseData.md.html +++ b/docs/checks/MoshiUsageUseData.md.html @@ -88,17 +88,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -106,7 +106,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MoshiUsageVarProperty.md.html b/docs/checks/MoshiUsageVarProperty.md.html index a2890119..0550ac92 100644 --- a/docs/checks/MoshiUsageVarProperty.md.html +++ b/docs/checks/MoshiUsageVarProperty.md.html @@ -85,17 +85,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -103,7 +103,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/MultipleAwaitPointerEventScopes.md.html b/docs/checks/MultipleAwaitPointerEventScopes.md.html index f4de5ceb..e05819c0 100644 --- a/docs/checks/MultipleAwaitPointerEventScopes.md.html +++ b/docs/checks/MultipleAwaitPointerEventScopes.md.html @@ -25,7 +25,7 @@ Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.ui:ui](androidx_compose_ui_ui.md.html) +: [androidx.compose.ui:ui-android](androidx_compose_ui_ui-android.md.html) Affects : Kotlin and Java files and test sources @@ -52,28 +52,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui:1.5.0-beta02") +implementation("androidx.compose.ui:ui-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.ui:ui:1.5.0-beta02' +implementation 'androidx.compose.ui:ui-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.ui) +implementation(libs.ui-android) # libs.versions.toml [versions] -ui = "1.5.0-beta02" +ui-android = "1.7.0-alpha01" [libraries] -ui = { - module = "androidx.compose.ui:ui", - version.ref = "ui" +ui-android = { + module = "androidx.compose.ui:ui-android", + version.ref = "ui-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.ui:ui](androidx_compose_ui_ui.md.html). +[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: diff --git a/docs/checks/MustBeInModule.md.html b/docs/checks/MustBeInModule.md.html new file mode 100644 index 00000000..af46b378 --- /dev/null +++ b/docs/checks/MustBeInModule.md.html @@ -0,0 +1,226 @@ + +(#) @Binds/@Provides function must be in `@Module`-annotated classes. + +!!! ERROR: @Binds/@Provides function must be in `@Module`-annotated classes. + This is an error. + +Id +: `MustBeInModule` +Summary +: @Binds/@Provides function must be in `@Module`-annotated classes. +Severity +: Error +Category +: Correctness +Platform +: Any +Vendor +: slack +Identifier +: slack-lint +Contact +: https://github.com/slackhq/slack-lints +Feedback +: https://github.com/slackhq/slack-lints +Min +: Lint 8.0 and 8.1 +Compiled +: Lint 8.0 and 8.1 +Artifact +: [com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html) + +Affects +: 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/slack-lints/blob/main/slack-lint-checks/src/main/java/slack/lint/DaggerIssuesDetector.kt) +Tests +: [Source Code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/DaggerIssuesDetectorTest.kt) +Copyright Year +: 2021 + +@Binds/@Provides function must be in `@Module`-annotated classes. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/foo/MyModule.kt:7:Error: @Binds/@Provides functions must be in +modules [MustBeInModule] + + @Binds fun invalidBind(real: Int): Number + ----------------------------------------- + + +src/foo/MyModule.kt:10:Error: @Binds/@Provides functions must be in +modules [MustBeInModule] + + @Provides fun invalidBind(): Int = 3 + ------------------------------------ + + +src/foo/MyModule.kt:15:Error: @Binds/@Provides functions must be in +modules [MustBeInModule] + + @Binds abstract fun invalidBind(real: Int): Number + -------------------------------------------------- + + +src/foo/MyModule.kt:18:Error: @Binds/@Provides functions must be in +modules [MustBeInModule] + + @Provides fun invalidBind(): Int = 3 + ------------------------------------ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/foo/MyModule.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package foo +import dagger.Binds +import dagger.Provides +import dagger.Module + +interface MyModule { + @Binds fun invalidBind(real: Int): Number + + companion object { + @Provides fun invalidBind(): Int = 3 + } +} + +abstract class MyModule2 { + @Binds abstract fun invalidBind(real: Int): Number + + companion object { + @Provides fun invalidBind(): Int = 3 + } +} + +@Module +interface MyModule3 { + @Binds fun validBind(real: Int): Number + + companion object { + @Provides fun validBind(): Int = 3 + } +} + +@Module +abstract class MyModule4 { + @Binds abstract fun validBind(real: Int): Number + + companion object { + @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) +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, `DaggerIssuesDetector.must be in a module`. +To report a problem with this extracted sample, visit +https://github.com/slackhq/slack-lints. + +(##) 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.slack.lint:slack-lint-checks:0.7.0") + +// build.gradle +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' + +// build.gradle.kts with version catalogs: +lintChecks(libs.slack-lint-checks) + +# libs.versions.toml +[versions] +slack-lint-checks = "0.7.0" +[libraries] +slack-lint-checks = { + module = "com.slack.lint:slack-lint-checks", + version.ref = "slack-lint-checks" +} +``` + +0.7.0 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.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("MustBeInModule") + fun method() { + problematicStatement() + } + ``` + + or + + ```java + // Java + @SuppressWarnings("MustBeInModule") + void method() { + problematicStatement(); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection MustBeInModule + 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="MustBeInModule" 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 'MustBeInModule' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore MustBeInModule ...` + ``` + +* 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/MutableCollectionMutableState.md.html b/docs/checks/MutableCollectionMutableState.md.html index 86604d57..2eed87ac 100644 --- a/docs/checks/MutableCollectionMutableState.md.html +++ b/docs/checks/MutableCollectionMutableState.md.html @@ -21,11 +21,11 @@ Feedback : https://issuetracker.google.com/issues/new?component=612128 Min -: Lint 7.0 +: Lint 8.0 and 8.1 Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.runtime:runtime](androidx_compose_runtime_runtime.md.html) +: [androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html) Affects : Kotlin and Java files and test sources @@ -174,28 +174,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime:1.5.0-beta02") +implementation("androidx.compose.runtime:runtime-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.runtime:runtime:1.5.0-beta02' +implementation 'androidx.compose.runtime:runtime-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.runtime) +implementation(libs.runtime-android) # libs.versions.toml [versions] -runtime = "1.5.0-beta02" +runtime-android = "1.7.0-alpha01" [libraries] -runtime = { - module = "androidx.compose.runtime:runtime", - version.ref = "runtime" +runtime-android = { + module = "androidx.compose.runtime:runtime-android", + version.ref = "runtime-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.runtime:runtime](androidx_compose_runtime_runtime.md.html). +[Additional details about androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html). (##) Suppressing You can suppress false positives using one of the following mechanisms: diff --git a/docs/checks/MutableImplicitPendingIntent.md.html b/docs/checks/MutableImplicitPendingIntent.md.html new file mode 100644 index 00000000..244cc22b --- /dev/null +++ b/docs/checks/MutableImplicitPendingIntent.md.html @@ -0,0 +1,108 @@ + +(#) Mutable Implicit PendingIntent is disallowed + +!!! ERROR: Mutable Implicit PendingIntent is disallowed + This is an error. + +Id +: `MutableImplicitPendingIntent` +Summary +: Mutable Implicit PendingIntent is disallowed +Severity +: Error +Category +: Security +Platform +: Android +Vendor +: Android Open Source Project +Feedback +: https://issuetracker.google.com/issues/new?component=192708 +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/PendingIntentMutableImplicitDetector.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/PendingIntentMutableImplicitDetectorTest.kt) +Copyright Year +: 2023 + +Apps targeting Android 14 and above are not allowed to create +`PendingIntents` with `FLAG_MUTABLE` and an implicit intent within for +security reasons. + +To retrieve an existing PendingIntent, use `FLAG_NO_CREATE`. To create a +new `PendingIntent`, either make the intent explicit, or make it +immutable with `FLAG_IMMUTABLE`. + +!!! Tip + This lint check has an associated quickfix available in the IDE. + +(##) 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("MutableImplicitPendingIntent") + fun method() { + getActivity(...) + } + ``` + + or + + ```java + // Java + @SuppressWarnings("MutableImplicitPendingIntent") + void method() { + getActivity(...); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection MutableImplicitPendingIntent + 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="MutableImplicitPendingIntent" 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 'MutableImplicitPendingIntent' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore MutableImplicitPendingIntent ...` + ``` + +* 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/NamingPattern.md.html b/docs/checks/NamingPattern.md.html index 30fd5f9d..bfe231c3 100644 --- a/docs/checks/NamingPattern.md.html +++ b/docs/checks/NamingPattern.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,49 +29,12 @@ : Kotlin and Java files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/NamingPatternDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/NamingPatternDetectorTest.kt) Sometimes there is more than one reasonable way to convert an English phrase into camel case, such as when acronyms or unusual constructs like "IPv6" or "iOS" are present. XML HTTP request becomes XmlHttpRequest. XMLHTTPRequest would be incorrect. -(##) Example - -Here is an example of lint warnings produced by this check: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/foo/Foo.java:5:Warning: iOSVersion is not named in defined camel -case [NamingPattern] - - String iOSVersion; - ---------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`src/foo/Foo.java`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers -package foo; - -class Foo { - private void fun() { - String iOSVersion; - } -} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can also visit the -[source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/NamingPatternDetectorTest.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, `NamingPatternDetector.incorrectVariableName`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -81,17 +44,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -99,7 +62,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/NoCollectCallFound.md.html b/docs/checks/NoCollectCallFound.md.html new file mode 100644 index 00000000..d1dd131d --- /dev/null +++ b/docs/checks/NoCollectCallFound.md.html @@ -0,0 +1,250 @@ + +(#) You must call collect on the given progress flow when using PredictiveBackHandler + +!!! ERROR: You must call collect on the given progress flow when using PredictiveBackHandler + This is an error. + +Id +: `NoCollectCallFound` +Summary +: You must call collect on the given progress flow when using PredictiveBackHandler +Severity +: Error +Category +: Correctness +Platform +: Any +Vendor +: Jetpack Activity Compose +Identifier +: androidx.activity.compose +Feedback +: https://issuetracker.google.com/issues/new?component=612128 +Min +: Lint 7.0 +Compiled +: Lint 8.0 and 8.1 +Artifact +: [androidx.activity:activity-compose](androidx_activity_activity-compose.md.html) + +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:/activity/activity-compose-lint/src/main/java/androidx/activity/compose/lint/CollectProgressDetector.kt) +Tests +: [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) +Copyright Year +: 2023 + +You must call collect on the progress in the onBack function. The +collect call is what properly splits the callback so it knows what to do +when the back gestures is started vs when it is completed. Failing to +call collect will cause all code in the block to run when the gesture is +started. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/com/example/test.kt:9:Error: You must call collect() on Flow +progress [NoCollectCallFound] + + PredictiveBackHandler { progress -> } + -------- + + +src/com/example/test.kt:13:Error: You must call collect() on Flow +progress [NoCollectCallFound] + + PredictiveBackHandler { progress -> } + -------- + + +src/com/example/test.kt:17:Error: You must call collect() on Flow +progress [NoCollectCallFound] + + PredictiveBackHandler { progress -> } + -------- + + +src/com/example/test.kt:26:Error: You must call collect() on Flow +progress [NoCollectCallFound] + + PredictiveBackHandler { progress -> } + -------- + + +src/com/example/test.kt:29:Error: You must call collect() on Flow +progress [NoCollectCallFound] + + PredictiveBackHandler { progress -> } + -------- + + +src/com/example/test.kt:35:Error: You must call collect() on Flow +progress [NoCollectCallFound] + + PredictiveBackHandler { progress -> } + -------- + + +src/com/example/test.kt:39:Error: You must call collect() on Flow +progress [NoCollectCallFound] + + PredictiveBackHandler { progress -> } + -------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/com/example/test.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package com.example + +import androidx.compose.runtime.Composable +import androidx.activity.compose.PredictiveBackHandler + +@Composable +fun Test() { + PredictiveBackHandler { progress -> } +} + +val lambda = @Composable { + PredictiveBackHandler { progress -> } +} + +val lambda2: @Composable () -> Unit = { + PredictiveBackHandler { progress -> } +} + +@Composable +fun LambdaParameter(content: @Composable () -> Unit) {} + +@Composable +fun Test2() { + LambdaParameter(content = { + PredictiveBackHandler { progress -> } + }) + LambdaParameter { + PredictiveBackHandler { progress -> } + } +} + +fun test3() { + val localLambda1 = @Composable { + PredictiveBackHandler { progress -> } + } + + val localLambda2: @Composable () -> Unit = { + 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) +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, `CollectProgressDetector.errors`. +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.activity:activity-compose:1.9.0-alpha02") + +// build.gradle +implementation 'androidx.activity:activity-compose:1.9.0-alpha02' + +// build.gradle.kts with version catalogs: +implementation(libs.activity-compose) + +# libs.versions.toml +[versions] +activity-compose = "1.9.0-alpha02" +[libraries] +activity-compose = { + module = "androidx.activity:activity-compose", + version.ref = "activity-compose" +} +``` + +1.9.0-alpha02 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). +(##) 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("NoCollectCallFound") + fun method() { + PredictiveBackHandler(...) + } + ``` + + or + + ```java + // Java + @SuppressWarnings("NoCollectCallFound") + void method() { + PredictiveBackHandler(...); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection NoCollectCallFound + 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="NoCollectCallFound" 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 'NoCollectCallFound' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore NoCollectCallFound ...` + ``` + +* 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/NullSafeMutableLiveData.md.html b/docs/checks/NullSafeMutableLiveData.md.html index f880f3fd..841c6da9 100644 --- a/docs/checks/NullSafeMutableLiveData.md.html +++ b/docs/checks/NullSafeMutableLiveData.md.html @@ -62,17 +62,17 @@ ``` // build.gradle.kts -implementation("androidx.lifecycle:lifecycle-livedata-core-ktx:2.6.1") +implementation("androidx.lifecycle:lifecycle-livedata-core-ktx:2.8.0-alpha01") // build.gradle -implementation 'androidx.lifecycle:lifecycle-livedata-core-ktx:2.6.1' +implementation 'androidx.lifecycle:lifecycle-livedata-core-ktx:2.8.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.lifecycle-livedata-core-ktx) # libs.versions.toml [versions] -lifecycle-livedata-core-ktx = "2.6.1" +lifecycle-livedata-core-ktx = "2.8.0-alpha01" [libraries] lifecycle-livedata-core-ktx = { module = "androidx.lifecycle:lifecycle-livedata-core-ktx", @@ -80,7 +80,7 @@ } ``` -2.6.1 is the version this documentation was generated from; +2.8.0-alpha01 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.lifecycle:lifecycle-livedata-core-ktx](androidx_lifecycle_lifecycle-livedata-core-ktx.md.html). diff --git a/docs/checks/OldTargetApi.md.html b/docs/checks/OldTargetApi.md.html index 7a85b12e..ddc5c62a 100644 --- a/docs/checks/OldTargetApi.md.html +++ b/docs/checks/OldTargetApi.md.html @@ -19,7 +19,7 @@ Feedback : https://issuetracker.google.com/issues/new?component=192708 Affects -: Manifest files +: Gradle build files and manifest files Editing : This check runs on the fly in the IDE editor See @@ -27,11 +27,11 @@ See : https://developer.android.com/reference/android/os/Build.VERSION_CODES.html 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/ManifestDetector.kt) +: [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/ManifestDetectorTest.kt) +: [Source Code](https://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) Copyright Year -: 2011 +: 2014 When your application runs on a version of Android that is more recent than your `targetSdkVersion` specifies that it has been tested with, @@ -45,7 +45,7 @@ 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: +as well as follow this guide: https://developer.android.com/distribute/best-practices/develop/target-sdk.html. !!! Tip @@ -60,7 +60,7 @@ version. Consult the android.os.Build.VERSION_CODES javadoc for details. [OldTargetApi] - <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="14" /> + <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="33" /> ----------------------------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -73,7 +73,7 @@ android:versionCode="1" android:versionName="1.0" > - <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="14" /> + <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="33" /> <application android:icon="@drawable/ic_launcher" @@ -93,11 +93,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/ManifestDetectorTest.kt) +[source code](https://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, `ManifestDetector.testOldTargetSdk`. +found for this lint check, `GradleDetector.testNotTheNewestTargetSdk`. To report a problem with this extracted sample, visit https://issuetracker.google.com/issues/new?component=192708. @@ -111,13 +111,11 @@ 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="OldTargetApi" .../> - ... - </manifest> +* Using a suppression comment like this on the line above: + + ```kt + //noinspection OldTargetApi + problematicStatement() ``` * Using a special `lint.xml` file in the source tree which turns off diff --git a/docs/checks/OpaqueUnitKey.md.html b/docs/checks/OpaqueUnitKey.md.html index 1b05b2fc..46fb0ce1 100644 --- a/docs/checks/OpaqueUnitKey.md.html +++ b/docs/checks/OpaqueUnitKey.md.html @@ -21,11 +21,11 @@ Feedback : https://issuetracker.google.com/issues/new?component=612128 Min -: Lint 7.0 +: Lint 8.0 and 8.1 Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.runtime:runtime](androidx_compose_runtime_runtime.md.html) +: [androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html) Affects : Kotlin and Java files and test sources @@ -99,28 +99,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime:1.5.0-beta02") +implementation("androidx.compose.runtime:runtime-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.runtime:runtime:1.5.0-beta02' +implementation 'androidx.compose.runtime:runtime-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.runtime) +implementation(libs.runtime-android) # libs.versions.toml [versions] -runtime = "1.5.0-beta02" +runtime-android = "1.7.0-alpha01" [libraries] -runtime = { - module = "androidx.compose.runtime:runtime", - version.ref = "runtime" +runtime-android = { + module = "androidx.compose.runtime:runtime-android", + version.ref = "runtime-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.runtime:runtime](androidx_compose_runtime_runtime.md.html). +[Additional details about androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html). (##) Suppressing You can suppress false positives using one of the following mechanisms: diff --git a/docs/checks/OutdatedLibrary.md.html b/docs/checks/OutdatedLibrary.md.html index 235ade98..717aeb25 100644 --- a/docs/checks/OutdatedLibrary.md.html +++ b/docs/checks/OutdatedLibrary.md.html @@ -23,7 +23,7 @@ Editing : This check runs on the fly in the IDE editor See -: https://play.google.com/sdks +: https://developer.android.com/distribute/sdk-index 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 @@ -64,7 +64,7 @@ build.gradle:13:Warning: com.example.ads.third.party:example version 7.2.0 has been marked as outdated by its author [OutdatedLibrary] - compile 'com.example.ads.third.party:example:7.2.0' // Outdated & Non compliant & Critical + compile 'com.example.ads.third.party:example:7.2.0' // Outdated + Critical + Policy (multiple issues), no severity ------------------------------------------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -84,7 +84,17 @@ compile 'com.example.ads.third.party:example:8.0.0' // OK compile 'com.example.ads.third.party:example:7.2.2' // OK compile 'com.example.ads.third.party:example:7.2.1' // OK - compile 'com.example.ads.third.party:example:7.2.0' // Outdated & Non compliant & Critical + compile 'com.example.ads.third.party:example:7.2.0' // Outdated + Critical + Policy (multiple issues), no severity + compile 'com.example.ads.third.party:example:7.1.0' // Policy (Ads), non-blocking + compile 'com.example.ads.third.party:example:7.1.1' // Policy (Device and Network Abuse), blocking + compile 'com.example.ads.third.party:example:7.1.2' // Policy (Deceptive Behavior), no severity + compile 'com.example.ads.third.party:example:7.1.3' // Policy (User Data), non-blocking + compile 'com.example.ads.third.party:example:7.1.4' // Policy (Permissions), blocking + compile 'com.example.ads.third.party:example:7.1.5' // Policy (Mobile Unwanted Software), no-severity + compile 'com.example.ads.third.party:example:7.1.6' // Policy (Malware), non-blocking + compile 'com.example.ads.third.party:example:7.1.7' // Policy (multiple types), non-blocking + compile 'com.example.ads.third.party:example:7.1.8' // Policy (multiple types), blocking + compile 'com.example.ads.third.party:example:7.1.9' // Policy (multiple types), no severity compile 'log4j:log4j:latest.release' // OK compile 'log4j:log4j' // OK diff --git a/docs/checks/OverrideAbstract.md.html b/docs/checks/OverrideAbstract.md.html index 5a60e2f6..7f15e7c9 100644 --- a/docs/checks/OverrideAbstract.md.html +++ b/docs/checks/OverrideAbstract.md.html @@ -45,7 +45,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text src/test/pkg/OverrideConcreteTest.java:23:Error: Must override android.service.notification.NotificationListenerService.onNotificationPosted(android.service.notification.StatusBarNotification): - Method was abstract until 21, and your minSdkVersion is 18 +Method was abstract until 21, and your minSdkVersion is 18 [OverrideAbstract] private static class MyNotificationListenerService2 extends NotificationListenerService { @@ -54,7 +54,7 @@ src/test/pkg/OverrideConcreteTest.java:30:Error: Must override android.service.notification.NotificationListenerService.onNotificationRemoved(android.service.notification.StatusBarNotification): - Method was abstract until 21, and your minSdkVersion is 18 +Method was abstract until 21, and your minSdkVersion is 18 [OverrideAbstract] private static class MyNotificationListenerService3 extends NotificationListenerService { @@ -63,7 +63,7 @@ src/test/pkg/OverrideConcreteTest.java:37:Error: Must override android.service.notification.NotificationListenerService.onNotificationPosted(android.service.notification.StatusBarNotification): - Method was abstract until 21, and your minSdkVersion is 18 +Method was abstract until 21, and your minSdkVersion is 18 [OverrideAbstract] private static class MyNotificationListenerService4 extends NotificationListenerService { @@ -72,7 +72,7 @@ src/test/pkg/OverrideConcreteTest.java:57:Error: Must override android.service.notification.NotificationListenerService.onNotificationRemoved(android.service.notification.StatusBarNotification): - Method was abstract until 21, and your minSdkVersion is 18 +Method was abstract until 21, and your minSdkVersion is 18 [OverrideAbstract] private static class MyNotificationListenerService7 extends MyNotificationListenerService3 { diff --git a/docs/checks/ParcelizeFunctionProperty.md.html b/docs/checks/ParcelizeFunctionProperty.md.html index 823ea78d..df905478 100644 --- a/docs/checks/ParcelizeFunctionProperty.md.html +++ b/docs/checks/ParcelizeFunctionProperty.md.html @@ -154,17 +154,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -172,7 +172,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/PlaySdkIndexGenericIssues.md.html b/docs/checks/PlaySdkIndexGenericIssues.md.html new file mode 100644 index 00000000..bc89c67a --- /dev/null +++ b/docs/checks/PlaySdkIndexGenericIssues.md.html @@ -0,0 +1,81 @@ + +(#) Library has issues in SDK Index + +!!! ERROR: Library has issues in SDK Index + This is an error. + +Id +: `PlaySdkIndexGenericIssues` +Summary +: Library has issues in SDK Index +Severity +: Error +Category +: Compliance +Platform +: Android +Vendor +: Android Open Source Project +Feedback +: https://issuetracker.google.com/issues/new?component=192708 +Affects +: Gradle build files and TOML files +Editing +: This check runs on the fly in the IDE editor +See +: https://developer.android.com/distribute/sdk-index +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) +Copyright Year +: 2014 + +This library version has issues that could block publishing in the +Google Play Store. + +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection PlaySdkIndexGenericIssues + 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="PlaySdkIndexGenericIssues" 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 'PlaySdkIndexGenericIssues' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore PlaySdkIndexGenericIssues ...` + ``` + +* 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/PlaySdkIndexNonCompliant.md.html b/docs/checks/PlaySdkIndexNonCompliant.md.html index c6d1673b..85330230 100644 --- a/docs/checks/PlaySdkIndexNonCompliant.md.html +++ b/docs/checks/PlaySdkIndexNonCompliant.md.html @@ -23,7 +23,7 @@ Editing : This check runs on the fly in the IDE editor See -: https://play.google.com/sdks +: https://developer.android.com/distribute/sdk-index 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 @@ -34,6 +34,152 @@ This library version has policy issues that will block publishing in the Google Play Store. +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +build.gradle:6:Warning: log4j:log4j version 1.2.14 has policy issues +that will block publishing of your app to Play Console in the future +[PlaySdkIndexNonCompliant] + + compile 'log4j:log4j:1.2.14' // Non compliant + -------------------- + + +build.gradle:13:Warning: com.example.ads.third.party:example version +7.2.0 has 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.2.0' // Outdated + Critical + Policy (multiple issues), no severity + ------------------------------------------- + + +build.gradle:14:Warning: com.example.ads.third.party:example version +7.1.0 has Ads 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.0' // Policy (Ads), non-blocking + ------------------------------------------- + + +build.gradle:15:Error: com.example.ads.third.party:example version 7.1.1 +has Device and Network Abuse policy issues that will block publishing of +your app to Play Console [PlaySdkIndexNonCompliant] + + compile 'com.example.ads.third.party:example:7.1.1' // Policy (Device and Network Abuse), blocking + ------------------------------------------- + + +build.gradle:16:Warning: com.example.ads.third.party:example version +7.1.2 has Deceptive Behavior 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.2' // Policy (Deceptive Behavior), no severity + ------------------------------------------- + + +build.gradle:17:Warning: com.example.ads.third.party:example version +7.1.3 has 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.3' // Policy (User Data), non-blocking + ------------------------------------------- + + +build.gradle:18:Error: com.example.ads.third.party:example version 7.1.4 +has Permissions policy issues that will block publishing of your app to +Play Console [PlaySdkIndexNonCompliant] + + compile 'com.example.ads.third.party:example:7.1.4' // Policy (Permissions), blocking + ------------------------------------------- + + +build.gradle:19:Warning: com.example.ads.third.party:example version +7.1.5 has Mobile Unwanted Software 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.5' // Policy (Mobile Unwanted Software), no-severity + ------------------------------------------- + + +build.gradle:20:Warning: com.example.ads.third.party:example version +7.1.6 has Malware 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.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] + + compile 'com.example.ads.third.party:example:7.1.7' // Policy (multiple types), non-blocking + ------------------------------------------- + + +build.gradle:22:Error: 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] + + 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] + + compile 'com.example.ads.third.party:example:7.1.9' // Policy (multiple types), no severity + ------------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`build.gradle`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~groovy linenumbers +dependencies { + compile 'log4j:log4j:1.2.18' // OK, latest + compile 'log4j:log4j:1.2.17' // OK + compile 'log4j:log4j:1.2.16' // Critical NON_BLOCKING + compile 'log4j:log4j:1.2.15' // Outdated NON_BLOCKING + compile 'log4j:log4j:1.2.14' // Non compliant + compile 'log4j:log4j:1.2.13' // Critical BLOCKING + compile 'log4j:log4j:1.2.12' // OUTDATED BLOCKING + compile 'log4j:log4j:1.2.11' // Ok (not in Index) + compile 'com.example.ads.third.party:example:8.0.0' // OK + compile 'com.example.ads.third.party:example:7.2.2' // OK + compile 'com.example.ads.third.party:example:7.2.1' // OK + compile 'com.example.ads.third.party:example:7.2.0' // Outdated + Critical + Policy (multiple issues), no severity + compile 'com.example.ads.third.party:example:7.1.0' // Policy (Ads), non-blocking + compile 'com.example.ads.third.party:example:7.1.1' // Policy (Device and Network Abuse), blocking + compile 'com.example.ads.third.party:example:7.1.2' // Policy (Deceptive Behavior), no severity + compile 'com.example.ads.third.party:example:7.1.3' // Policy (User Data), non-blocking + compile 'com.example.ads.third.party:example:7.1.4' // Policy (Permissions), blocking + compile 'com.example.ads.third.party:example:7.1.5' // Policy (Mobile Unwanted Software), no-severity + compile 'com.example.ads.third.party:example:7.1.6' // Policy (Malware), non-blocking + compile 'com.example.ads.third.party:example:7.1.7' // Policy (multiple types), non-blocking + compile 'com.example.ads.third.party:example:7.1.8' // Policy (multiple types), blocking + compile 'com.example.ads.third.party:example:7.1.9' // Policy (multiple types), no severity + + compile 'log4j:log4j:latest.release' // OK + compile 'log4j:log4j' // OK + compile 'log4j:log4j:_' // OK + + 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) +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.testSdkIndexLibrary`. +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/ProduceStateDoesNotAssignValue.md.html b/docs/checks/ProduceStateDoesNotAssignValue.md.html index c2a21d3e..16c86dc2 100644 --- a/docs/checks/ProduceStateDoesNotAssignValue.md.html +++ b/docs/checks/ProduceStateDoesNotAssignValue.md.html @@ -21,11 +21,11 @@ Feedback : https://issuetracker.google.com/issues/new?component=612128 Min -: Lint 7.0 +: Lint 8.0 and 8.1 Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.runtime:runtime](androidx_compose_runtime_runtime.md.html) +: [androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html) Affects : Kotlin and Java files and test sources @@ -131,28 +131,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime:1.5.0-beta02") +implementation("androidx.compose.runtime:runtime-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.runtime:runtime:1.5.0-beta02' +implementation 'androidx.compose.runtime:runtime-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.runtime) +implementation(libs.runtime-android) # libs.versions.toml [versions] -runtime = "1.5.0-beta02" +runtime-android = "1.7.0-alpha01" [libraries] -runtime = { - module = "androidx.compose.runtime:runtime", - version.ref = "runtime" +runtime-android = { + module = "androidx.compose.runtime:runtime-android", + version.ref = "runtime-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.runtime:runtime](androidx_compose_runtime_runtime.md.html). +[Additional details about androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html). (##) Suppressing You can suppress false positives using one of the following mechanisms: diff --git a/docs/checks/ProguardSplit.md.html b/docs/checks/ProguardSplit.md.html index 8fa2708d..6ff32b09 100644 --- a/docs/checks/ProguardSplit.md.html +++ b/docs/checks/ProguardSplit.md.html @@ -64,7 +64,7 @@ Android configuration: Inherit these settings instead? Modify project.properties to define proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:myfile.txt - and then keep only project-specific configuration here [ProguardSplit] +and then keep only project-specific configuration here [ProguardSplit] -keep public class * extends android.app.Activity ^ diff --git a/docs/checks/ProtoLayoutMinSchema-2.md.html b/docs/checks/ProtoLayoutMinSchema-2.md.html new file mode 100644 index 00000000..84f6b5be --- /dev/null +++ b/docs/checks/ProtoLayoutMinSchema-2.md.html @@ -0,0 +1,163 @@ + +(#) 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.0 and 8.1 +Compiled +: Lint 8.0 and 8.1 +Artifact +: [androidx.wear.protolayout:protolayout](androidx_wear_protolayout_protolayout.md.html) + +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) +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). + +(##) 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.1.0-rc01](ProtoLayoutMinSchema.md.html) +* [ProtoLayoutMinSchema from androidx.wear.protolayout:protolayout:1.1.0-rc01](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.1.0-rc01") + +// build.gradle +implementation 'androidx.wear.protolayout:protolayout:1.1.0-rc01' + +// build.gradle.kts with version catalogs: +implementation(libs.protolayout) + +# libs.versions.toml +[versions] +protolayout = "1.1.0-rc01" +[libraries] +protolayout = { + module = "androidx.wear.protolayout:protolayout", + version.ref = "protolayout" +} +``` + +1.1.0-rc01 is the version this documentation was generated from; +there may be newer versions available. + +[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 new file mode 100644 index 00000000..f192fe87 --- /dev/null +++ b/docs/checks/ProtoLayoutMinSchema.md.html @@ -0,0 +1,163 @@ + +(#) 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.0 and 8.1 +Compiled +: Lint 8.0 and 8.1 +Artifact +: [androidx.wear.protolayout:protolayout-expression](androidx_wear_protolayout_protolayout-expression.md.html) + +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) +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). + +(##) 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.1.0-rc01](ProtoLayoutMinSchema.md.html) +* [ProtoLayoutMinSchema from androidx.wear.protolayout:protolayout:1.1.0-rc01](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-expression:1.1.0-rc01") + +// build.gradle +implementation 'androidx.wear.protolayout:protolayout-expression:1.1.0-rc01' + +// build.gradle.kts with version catalogs: +implementation(libs.protolayout-expression) + +# libs.versions.toml +[versions] +protolayout-expression = "1.1.0-rc01" +[libraries] +protolayout-expression = { + module = "androidx.wear.protolayout:protolayout-expression", + version.ref = "protolayout-expression" +} +``` + +1.1.0-rc01 is the version this documentation was generated from; +there may be newer versions available. + +[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: + +* 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/ProvidesMustNotBeAbstract.md.html b/docs/checks/ProvidesMustNotBeAbstract.md.html new file mode 100644 index 00000000..69ea5618 --- /dev/null +++ b/docs/checks/ProvidesMustNotBeAbstract.md.html @@ -0,0 +1,257 @@ + +(#) @Provides functions cannot be abstract. + +!!! ERROR: @Provides functions cannot be abstract. + This is an error. + +Id +: `ProvidesMustNotBeAbstract` +Summary +: @Provides functions cannot be abstract. +Severity +: Error +Category +: Correctness +Platform +: Any +Vendor +: slack +Identifier +: slack-lint +Contact +: https://github.com/slackhq/slack-lints +Feedback +: https://github.com/slackhq/slack-lints +Min +: Lint 8.0 and 8.1 +Compiled +: Lint 8.0 and 8.1 +Artifact +: [com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html) + +Affects +: 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/slack-lints/blob/main/slack-lint-checks/src/main/java/slack/lint/DaggerIssuesDetector.kt) +Tests +: [Source Code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/DaggerIssuesDetectorTest.kt) +Copyright Year +: 2021 + +@Provides functions cannot be abstract. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/foo/MyQualifier.kt:25:Error: @Provides functions cannot be abstract +[ProvidesMustNotBeAbstract] + + @Provides fun Int.bind(): Number = this@bind + -------------------------------------------- + + +src/foo/MyQualifier.kt:26:Error: @Provides functions cannot be abstract +[ProvidesMustNotBeAbstract] + + @Provides fun Long.bind(): Number = this@bind + --------------------------------------------- + + +src/foo/MyQualifier.kt:27:Error: @Provides functions cannot be abstract +[ProvidesMustNotBeAbstract] + + @Provides fun Double.bind(): Number = this@bind + ----------------------------------------------- + + +src/foo/MyQualifier.kt:28:Error: @Provides functions cannot be abstract +[ProvidesMustNotBeAbstract] + + @Provides fun Float.bind(): Number = this@bind + ---------------------------------------------- + + +src/foo/MyQualifier.kt:29:Error: @Provides functions cannot be abstract +[ProvidesMustNotBeAbstract] + + @Provides fun Short.bind(): Number = this@bind + ---------------------------------------------- + + +src/foo/MyQualifier.kt:30:Error: @Provides functions cannot be abstract +[ProvidesMustNotBeAbstract] + + @Provides fun Byte.bind(): Number = this@bind + --------------------------------------------- + + +src/foo/MyQualifier.kt:31:Error: @Provides functions cannot be abstract +[ProvidesMustNotBeAbstract] + + @Provides fun Char.bind(): Comparable<Char> = this@bind + ------------------------------------------------------- + + +src/foo/MyQualifier.kt:32:Error: @Provides functions cannot be abstract +[ProvidesMustNotBeAbstract] + + @Provides fun String.bind(): Comparable<String> = this@bind + ----------------------------------------------------------- + + +src/foo/MyQualifier.kt:33:Error: @Provides functions cannot be abstract +[ProvidesMustNotBeAbstract] + + @Provides fun @receiver:MyQualifier Boolean.bind(): Comparable<Boolean> = this@bind + ----------------------------------------------------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/foo/MyQualifier.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package foo +import javax.inject.Qualifier +import dagger.Binds +import dagger.Provides +import dagger.Module + +@Qualifier +annotation class MyQualifier + +@Module +interface MyModule { + @Binds fun Int.bind(): Number + @Binds fun Long.bind(): Number + @Binds fun Double.bind(): Number + @Binds fun Float.bind(): Number + @Binds fun Short.bind(): Number + @Binds fun Byte.bind(): Number + @Binds fun Char.bind(): Comparable + @Binds fun String.bind(): Comparable + @Binds fun @receiver:MyQualifier Boolean.bind(): Comparable +} + +@Module +interface MyModule2 { + @Provides fun Int.bind(): Number = this@bind + @Provides fun Long.bind(): Number = this@bind + @Provides fun Double.bind(): Number = this@bind + @Provides fun Float.bind(): Number = this@bind + @Provides fun Short.bind(): Number = this@bind + @Provides fun Byte.bind(): Number = this@bind + @Provides fun Char.bind(): Comparable = this@bind + @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) +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, `DaggerIssuesDetector.bindings cannot be extension functions`. +To report a problem with this extracted sample, visit +https://github.com/slackhq/slack-lints. + +(##) 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.slack.lint:slack-lint-checks:0.7.0") + +// build.gradle +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' + +// build.gradle.kts with version catalogs: +lintChecks(libs.slack-lint-checks) + +# libs.versions.toml +[versions] +slack-lint-checks = "0.7.0" +[libraries] +slack-lint-checks = { + module = "com.slack.lint:slack-lint-checks", + version.ref = "slack-lint-checks" +} +``` + +0.7.0 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.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("ProvidesMustNotBeAbstract") + fun method() { + problematicStatement() + } + ``` + + or + + ```java + // Java + @SuppressWarnings("ProvidesMustNotBeAbstract") + void method() { + problematicStatement(); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection ProvidesMustNotBeAbstract + 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="ProvidesMustNotBeAbstract" 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 'ProvidesMustNotBeAbstract' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore ProvidesMustNotBeAbstract ...` + ``` + +* 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/PublicKeyCredential.md.html b/docs/checks/PublicKeyCredential.md.html new file mode 100644 index 00000000..141e793b --- /dev/null +++ b/docs/checks/PublicKeyCredential.md.html @@ -0,0 +1,146 @@ + +(#) Creating public key credential + +!!! WARNING: Creating public key credential + This is a warning. + +Id +: `PublicKeyCredential` +Summary +: Creating public key credential +Severity +: Warning +Category +: Correctness +Platform +: Android +Vendor +: Android Open Source Project +Feedback +: https://issuetracker.google.com/issues/new?component=192708 +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/PublicKeyCredentialDetector.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/PublicKeyCredentialDetectorTest.kt) +Copyright Year +: 2023 + +Credential Manager API supports creating public key credential +(Passkeys) starting Android 9 or higher. Please check for the Android +version before calling the method. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/main/kotlin/test/pkg/Test.kt:7:Warning: PublicKeyCredential is only +supported from Android 9 (API level 28) and higher +[PublicKeyCredential] + + val request = CreatePublicKeyCredentialRequest() + ---------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here are the relevant source files: + +`build.gradle`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~groovy linenumbers +dependencies { + implementation 'androidx.credentials:credentials-play-services-auth:+' +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`src/main/kotlin/test/pkg/Test.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package test.pkg + +import androidx.credentials.CreatePublicKeyCredentialRequest + +class Test { + fun test() { + val request = CreatePublicKeyCredentialRequest() + } +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`src/CreatePublicKeyCredentialRequest.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package androidx.credentials + +class 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) +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 PublicKeyCredential + problematicStatement() + ``` + +* Using a suppression annotation like this on the enclosing + element: + + ```kt + // Kotlin + @Suppress("PublicKeyCredential") + fun method() { + CreatePublicKeyCredentialRequest(...) + } + ``` + + or + + ```java + // Java + @SuppressWarnings("PublicKeyCredential") + void method() { + new CreatePublicKeyCredentialRequest(...); + } + ``` + +* 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="PublicKeyCredential" 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 'PublicKeyCredential' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore PublicKeyCredential ...` + ``` + +* 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 6eeda1c2..74eff689 100644 --- a/docs/checks/Range.md.html +++ b/docs/checks/Range.md.html @@ -29,7 +29,7 @@ Copyright Year : 2017 -Some parameters are required to in a particular numerical range; this +Some parameters are required to be in a particular numerical range; this check makes sure that arguments passed fall within the range. For arrays, Strings and collections this refers to the size or length. diff --git a/docs/checks/RawColor.md.html b/docs/checks/RawColor.md.html index dfb07f69..bca2a665 100644 --- a/docs/checks/RawColor.md.html +++ b/docs/checks/RawColor.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,44 +29,12 @@ : Resource files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/RawColorDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/RawColorDetectorTest.kt) Color value should all be defined as color resources. This has the benefit that you can easily see all of your colors in one file. One benefit is an easier addition to Dark Theme for instance. This check will run on layouts as well as xml drawables. -(##) Example - -Here is an example of lint warnings produced by this check: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -res/layout/layout.xml:2:Warning: Should be using a color resource -instead. [RawColor] - - app:someCustomColor="#fff"/> - ---- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`res/layout/layout.xml`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~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/java/com/vanniktech/lintrules/android/RawColorDetectorTest.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, `RawColorDetector.appCustomColor`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -76,17 +44,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -94,7 +62,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/RawDimen.md.html b/docs/checks/RawDimen.md.html index 3ae84813..2689265d 100644 --- a/docs/checks/RawDimen.md.html +++ b/docs/checks/RawDimen.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,10 +29,6 @@ : Resource files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/RawDimenDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/RawDimenDetectorTest.kt) Dimensions should all be defined as dimension resources. This has the benefit that you can easily see all of your dimensions in one file. One @@ -40,33 +36,6 @@ you only have to adjust it in one place. This check will run on layouts as well as xml drawables. -(##) Example - -Here is an example of lint warnings produced by this check: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -res/layout/ids.xml:1:Warning: Should be using a dimension resource -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/java/com/vanniktech/lintrules/android/RawDimenDetectorTest.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, `RawDimenDetector.appCustom`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -76,17 +45,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -94,7 +63,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/RawDispatchersUse.md.html b/docs/checks/RawDispatchersUse.md.html index eedf9add..12563b99 100644 --- a/docs/checks/RawDispatchersUse.md.html +++ b/docs/checks/RawDispatchersUse.md.html @@ -138,17 +138,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -156,7 +156,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/RedactedInJavaUsage.md.html b/docs/checks/RedactedInJavaUsage.md.html index fe33acd1..9a3693d1 100644 --- a/docs/checks/RedactedInJavaUsage.md.html +++ b/docs/checks/RedactedInJavaUsage.md.html @@ -118,17 +118,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -136,7 +136,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/RedundantBinds.md.html b/docs/checks/RedundantBinds.md.html new file mode 100644 index 00000000..d142cf28 --- /dev/null +++ b/docs/checks/RedundantBinds.md.html @@ -0,0 +1,190 @@ + +(#) @Binds functions should return a different type (including annotations) than the input type. + +!!! ERROR: @Binds functions should return a different type (including annotations) than the input type. + This is an error. + +Id +: `RedundantBinds` +Summary +: @Binds functions should return a different type (including annotations) than the input type. +Severity +: Error +Category +: Correctness +Platform +: Any +Vendor +: slack +Identifier +: slack-lint +Contact +: https://github.com/slackhq/slack-lints +Feedback +: https://github.com/slackhq/slack-lints +Min +: Lint 8.0 and 8.1 +Compiled +: Lint 8.0 and 8.1 +Artifact +: [com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html) + +Affects +: 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/slack-lints/blob/main/slack-lint-checks/src/main/java/slack/lint/DaggerIssuesDetector.kt) +Tests +: [Source Code](https://github.com/slackhq/slack-lints/tree/main/slack-lint-checks/src/test/java/slack/lint/DaggerIssuesDetectorTest.kt) +Copyright Year +: 2021 + +@Binds functions should return a different type (including annotations) +than the input type. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/foo/MyQualifier.kt:13:Error: @Binds functions should return a +different type [RedundantBinds] + + @Binds fun invalidBind(real: Long): Long + ---------------------------------------- + + +src/foo/MyQualifier.kt:14:Error: @Binds functions should return a +different type [RedundantBinds] + + @Binds fun invalidBind(real: Long): Long + ---------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/foo/MyQualifier.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package foo +import javax.inject.Qualifier +import dagger.Binds +import dagger.Module + +@Qualifier +annotation class MyQualifier + +@Module +interface MyModule { + @MyQualifier @Binds fun validBind(real: Boolean): Boolean + @Binds fun validBind(@MyQualifier real: Boolean): Boolean + @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) +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, `DaggerIssuesDetector.redundant types`. +To report a problem with this extracted sample, visit +https://github.com/slackhq/slack-lints. + +(##) 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.slack.lint:slack-lint-checks:0.7.0") + +// build.gradle +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' + +// build.gradle.kts with version catalogs: +lintChecks(libs.slack-lint-checks) + +# libs.versions.toml +[versions] +slack-lint-checks = "0.7.0" +[libraries] +slack-lint-checks = { + module = "com.slack.lint:slack-lint-checks", + version.ref = "slack-lint-checks" +} +``` + +0.7.0 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.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("RedundantBinds") + fun method() { + problematicStatement() + } + ``` + + or + + ```java + // Java + @SuppressWarnings("RedundantBinds") + void method() { + problematicStatement(); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection RedundantBinds + 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="RedundantBinds" 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 'RedundantBinds' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore RedundantBinds ...` + ``` + +* 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/RememberReturnType.md.html b/docs/checks/RememberReturnType.md.html index eb8b5e44..7d08d8cd 100644 --- a/docs/checks/RememberReturnType.md.html +++ b/docs/checks/RememberReturnType.md.html @@ -21,11 +21,11 @@ Feedback : https://issuetracker.google.com/issues/new?component=612128 Min -: Lint 7.0 +: Lint 8.0 and 8.1 Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.runtime:runtime](androidx_compose_runtime_runtime.md.html) +: [androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html) Affects : Kotlin and Java files and test sources @@ -302,28 +302,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime:1.5.0-beta02") +implementation("androidx.compose.runtime:runtime-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.runtime:runtime:1.5.0-beta02' +implementation 'androidx.compose.runtime:runtime-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.runtime) +implementation(libs.runtime-android) # libs.versions.toml [versions] -runtime = "1.5.0-beta02" +runtime-android = "1.7.0-alpha01" [libraries] -runtime = { - module = "androidx.compose.runtime:runtime", - version.ref = "runtime" +runtime-android = { + module = "androidx.compose.runtime:runtime-android", + version.ref = "runtime-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.runtime:runtime](androidx_compose_runtime_runtime.md.html). +[Additional details about androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html). (##) Suppressing You can suppress false positives using one of the following mechanisms: diff --git a/docs/checks/RememberSaveableSaverParameter.md.html b/docs/checks/RememberSaveableSaverParameter.md.html index 49647938..947d44c9 100644 --- a/docs/checks/RememberSaveableSaverParameter.md.html +++ b/docs/checks/RememberSaveableSaverParameter.md.html @@ -25,7 +25,7 @@ Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.runtime:runtime-saveable](androidx_compose_runtime_runtime-saveable.md.html) +: [androidx.compose.runtime:runtime-saveable-android](androidx_compose_runtime_runtime-saveable-android.md.html) Affects : Kotlin and Java files and test sources @@ -152,28 +152,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime-saveable:1.5.0-beta02") +implementation("androidx.compose.runtime:runtime-saveable-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.runtime:runtime-saveable:1.5.0-beta02' +implementation 'androidx.compose.runtime:runtime-saveable-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.runtime-saveable) +implementation(libs.runtime-saveable-android) # libs.versions.toml [versions] -runtime-saveable = "1.5.0-beta02" +runtime-saveable-android = "1.7.0-alpha01" [libraries] -runtime-saveable = { - module = "androidx.compose.runtime:runtime-saveable", - version.ref = "runtime-saveable" +runtime-saveable-android = { + module = "androidx.compose.runtime:runtime-saveable-android", + version.ref = "runtime-saveable-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.runtime:runtime-saveable](androidx_compose_runtime_runtime-saveable.md.html). +[Additional details about androidx.compose.runtime:runtime-saveable-android](androidx_compose_runtime_runtime-saveable-android.md.html). (##) Suppressing You can suppress false positives using one of the following mechanisms: diff --git a/docs/checks/RemoteViewLayout.md.html b/docs/checks/RemoteViewLayout.md.html index 9cf1a0fc..aaf3ada0 100644 --- a/docs/checks/RemoteViewLayout.md.html +++ b/docs/checks/RemoteViewLayout.md.html @@ -45,7 +45,7 @@ --------------------------------------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Here is the source file referenced above: +Here are the relevant source files: `src/test/pkg/test.kt`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers @@ -57,15 +57,45 @@ } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +`res/layout/test.xml`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers +<merge> + <Button /> + <AdapterViewFlipper /> + <FrameLayout /> + <GridLayout /> + <GridView /> + <LinearLayout /> + <ListView /> + <RelativeLayout /> + <StackView /> + <ViewFlipper /> + <AnalogClock /> + <Button /> + <Chronometer /> + <ImageButton /> + <ImageView /> + <ProgressBar /> + <TextClock /> + <TextView /> + <DatePicker /> + <CheckBox /> + <Switch /> + <RadioButton /> + <RadioGroup /> + <androidx.appcompat.widget.AppCompatTextView /> +</merge> +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`test.pkg`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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) 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, `RemoteViewDetector.testBasic`. -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/RemoveWorkManagerInitializer.md.html b/docs/checks/RemoveWorkManagerInitializer.md.html index ea60d82c..b9b2dfdc 100644 --- a/docs/checks/RemoveWorkManagerInitializer.md.html +++ b/docs/checks/RemoveWorkManagerInitializer.md.html @@ -86,17 +86,17 @@ ``` // build.gradle.kts -implementation("androidx.work:work-runtime:2.9.0-alpha01") +implementation("androidx.work:work-runtime:2.10.0-alpha01") // build.gradle -implementation 'androidx.work:work-runtime:2.9.0-alpha01' +implementation 'androidx.work:work-runtime:2.10.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.work-runtime) # libs.versions.toml [versions] -work-runtime = "2.9.0-alpha01" +work-runtime = "2.10.0-alpha01" [libraries] work-runtime = { module = "androidx.work:work-runtime", @@ -104,7 +104,7 @@ } ``` -2.9.0-alpha01 is the version this documentation was generated from; +2.10.0-alpha01 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.md.html b/docs/checks/RepeatOnLifecycleWrongUsage.md.html index 94177390..3369897d 100644 --- a/docs/checks/RepeatOnLifecycleWrongUsage.md.html +++ b/docs/checks/RepeatOnLifecycleWrongUsage.md.html @@ -50,17 +50,17 @@ ``` // build.gradle.kts -implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1") +implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.0-alpha01") // build.gradle -implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1' +implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.8.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.lifecycle-runtime-ktx) # libs.versions.toml [versions] -lifecycle-runtime-ktx = "2.6.1" +lifecycle-runtime-ktx = "2.8.0-alpha01" [libraries] lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", @@ -68,7 +68,7 @@ } ``` -2.6.1 is the version this documentation was generated from; +2.8.0-alpha01 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.lifecycle:lifecycle-runtime-ktx](androidx_lifecycle_lifecycle-runtime-ktx.md.html). diff --git a/docs/checks/ReportShortcutUsage.md.html b/docs/checks/ReportShortcutUsage.md.html index 40725e89..259b9a7d 100644 --- a/docs/checks/ReportShortcutUsage.md.html +++ b/docs/checks/ReportShortcutUsage.md.html @@ -45,7 +45,7 @@ shortcut usage and allow launchers to adjust which shortcuts appear based on activation history. Please see https://developer.android.com/develop/ui/views/launch/shortcuts/managing-shortcuts#track-usage - [ReportShortcutUsage] +[ReportShortcutUsage] ShortcutManagerCompat.setDynamicShortcuts(context, shortcuts); ------------------------------------------------------------- diff --git a/docs/checks/ResourcesGetColorCall.md.html b/docs/checks/ResourcesGetColorCall.md.html index a4014efa..2428c0af 100644 --- a/docs/checks/ResourcesGetColorCall.md.html +++ b/docs/checks/ResourcesGetColorCall.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,48 +29,10 @@ : Kotlin and Java files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/AndroidDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/AndroidDetectorTest.kt) Instead of getColor(), ContextCompat or the method with the Theme Overload should be used instead. -(##) Example - -Here is an example of lint warnings produced by this check: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/foo/Example.java:6:Warning: Calling deprecated getColor -[ResourcesGetColorCall] - - resources.getColor(0); - -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`src/foo/Example.java`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers -package foo; -import android.content.res.Resources; -class Example { - public void foo() { - Resources resources = null; - resources.getColor(0); - } -} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can also visit the -[source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/AndroidDetectorTest.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, `AndroidDetector.callingGetColor`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -80,17 +42,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -98,7 +60,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/ResourcesGetColorStateListCall.md.html b/docs/checks/ResourcesGetColorStateListCall.md.html index db8cecb7..64c5ce3c 100644 --- a/docs/checks/ResourcesGetColorStateListCall.md.html +++ b/docs/checks/ResourcesGetColorStateListCall.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,48 +29,10 @@ : Kotlin and Java files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/AndroidDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/AndroidDetectorTest.kt) Instead of getColorStateList(), ContextCompat or the method with the Theme Overload should be used instead. -(##) Example - -Here is an example of lint warnings produced by this check: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/foo/Example.java:6:Warning: Calling deprecated getColorStateList -[ResourcesGetColorStateListCall] - - resources.getColorStateList(0); - ----------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`src/foo/Example.java`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers -package foo; -import android.content.res.Resources; -class Example { - public void foo() { - Resources resources = null; - resources.getColorStateList(0); - } -} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can also visit the -[source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/AndroidDetectorTest.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, `AndroidDetector.callingGetColorStateList`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -80,17 +42,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -98,7 +60,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/ResourcesGetDrawableCall.md.html b/docs/checks/ResourcesGetDrawableCall.md.html index aa8561e2..a9c822d7 100644 --- a/docs/checks/ResourcesGetDrawableCall.md.html +++ b/docs/checks/ResourcesGetDrawableCall.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,48 +29,10 @@ : Kotlin and Java files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/AndroidDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/AndroidDetectorTest.kt) Instead of getDrawable(), ContextCompat or the method with the Theme Overload should be used instead. -(##) Example - -Here is an example of lint warnings produced by this check: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/foo/Example.java:6:Warning: Calling deprecated getDrawable -[ResourcesGetDrawableCall] - - resources.getDrawable(0); - ----------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`src/foo/Example.java`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers -package foo; -import android.content.res.Resources; -class Example { - public void foo() { - Resources resources = null; - resources.getDrawable(0); - } -} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can also visit the -[source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/AndroidDetectorTest.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, `AndroidDetector.callingGetDrawable`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -80,17 +42,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -98,7 +60,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/RestrictCallsTo.md.html b/docs/checks/RestrictCallsTo.md.html index ac5c11a2..f2ac8762 100644 --- a/docs/checks/RestrictCallsTo.md.html +++ b/docs/checks/RestrictCallsTo.md.html @@ -124,17 +124,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -142,7 +142,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/RestrictedApi.md.html b/docs/checks/RestrictedApi.md.html index c9ebb954..75377934 100644 --- a/docs/checks/RestrictedApi.md.html +++ b/docs/checks/RestrictedApi.md.html @@ -98,11 +98,6 @@ [source code](https://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 -found for this lint check, `RestrictToDetector.testRestrictToSubClass`. -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/RetrofitUsage.md.html b/docs/checks/RetrofitUsage.md.html index 32a74751..cd155d54 100644 --- a/docs/checks/RetrofitUsage.md.html +++ b/docs/checks/RetrofitUsage.md.html @@ -117,17 +117,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -135,7 +135,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/ReturnFromAwaitPointerEventScope.md.html b/docs/checks/ReturnFromAwaitPointerEventScope.md.html index 06e5fde1..93a17737 100644 --- a/docs/checks/ReturnFromAwaitPointerEventScope.md.html +++ b/docs/checks/ReturnFromAwaitPointerEventScope.md.html @@ -25,7 +25,7 @@ Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.ui:ui](androidx_compose_ui_ui.md.html) +: [androidx.compose.ui:ui-android](androidx_compose_ui_ui-android.md.html) Affects : Kotlin and Java files and test sources @@ -52,28 +52,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui:1.5.0-beta02") +implementation("androidx.compose.ui:ui-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.ui:ui:1.5.0-beta02' +implementation 'androidx.compose.ui:ui-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.ui) +implementation(libs.ui-android) # libs.versions.toml [versions] -ui = "1.5.0-beta02" +ui-android = "1.7.0-alpha01" [libraries] -ui = { - module = "androidx.compose.ui:ui", - version.ref = "ui" +ui-android = { + module = "androidx.compose.ui:ui-android", + version.ref = "ui-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.ui:ui](androidx_compose_ui_ui.md.html). +[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: diff --git a/docs/checks/RiskyLibrary.md.html b/docs/checks/RiskyLibrary.md.html index e273bc4c..29c9cb36 100644 --- a/docs/checks/RiskyLibrary.md.html +++ b/docs/checks/RiskyLibrary.md.html @@ -23,7 +23,7 @@ Editing : This check runs on the fly in the IDE editor See -: https://play.google.com/sdks +: https://developer.android.com/distribute/sdk-index See : https://goo.gle/RiskyLibrary Implementation @@ -76,7 +76,17 @@ compile 'com.example.ads.third.party:example:8.0.0' // OK compile 'com.example.ads.third.party:example:7.2.2' // OK compile 'com.example.ads.third.party:example:7.2.1' // OK - compile 'com.example.ads.third.party:example:7.2.0' // Outdated & Non compliant & Critical + compile 'com.example.ads.third.party:example:7.2.0' // Outdated + Critical + Policy (multiple issues), no severity + compile 'com.example.ads.third.party:example:7.1.0' // Policy (Ads), non-blocking + compile 'com.example.ads.third.party:example:7.1.1' // Policy (Device and Network Abuse), blocking + compile 'com.example.ads.third.party:example:7.1.2' // Policy (Deceptive Behavior), no severity + compile 'com.example.ads.third.party:example:7.1.3' // Policy (User Data), non-blocking + compile 'com.example.ads.third.party:example:7.1.4' // Policy (Permissions), blocking + compile 'com.example.ads.third.party:example:7.1.5' // Policy (Mobile Unwanted Software), no-severity + compile 'com.example.ads.third.party:example:7.1.6' // Policy (Malware), non-blocking + compile 'com.example.ads.third.party:example:7.1.7' // Policy (multiple types), non-blocking + compile 'com.example.ads.third.party:example:7.1.8' // Policy (multiple types), blocking + compile 'com.example.ads.third.party:example:7.1.9' // Policy (multiple types), no severity compile 'log4j:log4j:latest.release' // OK compile 'log4j:log4j' // OK diff --git a/docs/checks/RxJava2DefaultScheduler.md.html b/docs/checks/RxJava2DefaultScheduler.md.html index 2f63456d..a4e6131d 100644 --- a/docs/checks/RxJava2DefaultScheduler.md.html +++ b/docs/checks/RxJava2DefaultScheduler.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-rxjava2](com_vanniktech_lint-rules-rxjava2.md.html) @@ -29,51 +29,11 @@ : Kotlin and Java files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-rxjava2-lint/src/main/java/com/vanniktech/lintrules/rxjava2/RxJava2DefaultSchedulerDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-rxjava2-lint/src/test/java/com/vanniktech/lintrules/rxjava2/RxJava2DefaultSchedulerDetectorTest.kt) Calling this method will rely on a default scheduler. This is not necessary the best default. Being explicit and taking the overload for passing one is preferred. -(##) Example - -Here is an example of lint warnings produced by this check: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/foo/Example.java:8:Warning: interval() is using its default -scheduler [RxJava2DefaultScheduler] - - Observable.interval(5, TimeUnit.SECONDS); - -------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`src/foo/Example.java`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers -package foo; - -import java.util.concurrent.TimeUnit; -import io.reactivex.Observable; - -class Example { - public void foo() { - 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/java/com/vanniktech/lintrules/rxjava2/RxJava2DefaultSchedulerDetectorTest.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, `RxJava2DefaultSchedulerDetector.schedulerSupportComputation`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -83,17 +43,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-rxjava2:0.24.0") +lintChecks("com.vanniktech:lint-rules-rxjava2:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-rxjava2:0.24.0' +lintChecks 'com.vanniktech:lint-rules-rxjava2:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-rxjava2) # libs.versions.toml [versions] -lint-rules-rxjava2 = "0.24.0" +lint-rules-rxjava2 = "0.25.0" [libraries] lint-rules-rxjava2 = { module = "com.vanniktech:lint-rules-rxjava2", @@ -101,7 +61,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-rxjava2](com_vanniktech_lint-rules-rxjava2.md.html). diff --git a/docs/checks/RxJava2DisposableAddAllCall.md.html b/docs/checks/RxJava2DisposableAddAllCall.md.html index 75ed0b79..99360ec4 100644 --- a/docs/checks/RxJava2DisposableAddAllCall.md.html +++ b/docs/checks/RxJava2DisposableAddAllCall.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-rxjava2](com_vanniktech_lint-rules-rxjava2.md.html) @@ -29,48 +29,10 @@ : Kotlin and Java files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-rxjava2-lint/src/main/java/com/vanniktech/lintrules/rxjava2/RxJava2DisposableAddAllCallDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-rxjava2-lint/src/test/java/com/vanniktech/lintrules/rxjava2/RxJava2DisposableAddAllCallDetectorTest.kt) Instead of using addAll(), add() should be used separately for each Disposable. -(##) Example - -Here is an example of lint warnings produced by this check: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/foo/Example.java:6:Warning: Calling addAll instead of add separately -[RxJava2DisposableAddAllCall] - - cd.addAll(); - ------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`src/foo/Example.java`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers -package foo; -import io.reactivex.disposables.CompositeDisposable; -class Example { - public void foo() { - CompositeDisposable cd = null; - cd.addAll(); - } -} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can also visit the -[source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-rxjava2-lint/src/test/java/com/vanniktech/lintrules/rxjava2/RxJava2DisposableAddAllCallDetectorTest.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, `RxJava2DisposableAddAllCallDetector.callingCompositeDisposableAddAll`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -80,17 +42,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-rxjava2:0.24.0") +lintChecks("com.vanniktech:lint-rules-rxjava2:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-rxjava2:0.24.0' +lintChecks 'com.vanniktech:lint-rules-rxjava2:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-rxjava2) # libs.versions.toml [versions] -lint-rules-rxjava2 = "0.24.0" +lint-rules-rxjava2 = "0.25.0" [libraries] lint-rules-rxjava2 = { module = "com.vanniktech:lint-rules-rxjava2", @@ -98,7 +60,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-rxjava2](com_vanniktech_lint-rules-rxjava2.md.html). diff --git a/docs/checks/RxJava2DisposableDisposeCall.md.html b/docs/checks/RxJava2DisposableDisposeCall.md.html index 5d267ac1..3471f986 100644 --- a/docs/checks/RxJava2DisposableDisposeCall.md.html +++ b/docs/checks/RxJava2DisposableDisposeCall.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-rxjava2](com_vanniktech_lint-rules-rxjava2.md.html) @@ -29,54 +29,11 @@ : Kotlin and Java files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-rxjava2-lint/src/main/java/com/vanniktech/lintrules/rxjava2/RxJava2DisposableDisposeCallDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-rxjava2-lint/src/test/java/com/vanniktech/lintrules/rxjava2/RxJava2DisposableDisposeCallDetectorTest.kt) Instead of using dispose(), clear() should be used. Calling clear will result in a CompositeDisposable that can be used further to add more Disposables. When using dispose() this is not the case. -!!! 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/Example.java:8:Warning: Calling dispose instead of clear -[RxJava2DisposableDisposeCall] - - cd.dispose(); - ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`src/foo/Example.java`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers -package foo; - -import io.reactivex.disposables.CompositeDisposable; - -class Example { - public void foo() { - CompositeDisposable cd = null; - cd.dispose(); - } -} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can also visit the -[source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-rxjava2-lint/src/test/java/com/vanniktech/lintrules/rxjava2/RxJava2DisposableDisposeCallDetectorTest.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, `RxJava2DisposableDisposeCallDetector.callingCompositeDisposableDispose`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -86,17 +43,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-rxjava2:0.24.0") +lintChecks("com.vanniktech:lint-rules-rxjava2:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-rxjava2:0.24.0' +lintChecks 'com.vanniktech:lint-rules-rxjava2:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-rxjava2) # libs.versions.toml [versions] -lint-rules-rxjava2 = "0.24.0" +lint-rules-rxjava2 = "0.25.0" [libraries] lint-rules-rxjava2 = { module = "com.vanniktech:lint-rules-rxjava2", @@ -104,7 +61,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-rxjava2](com_vanniktech_lint-rules-rxjava2.md.html). diff --git a/docs/checks/RxJava2MethodMissingCheckReturnValue.md.html b/docs/checks/RxJava2MethodMissingCheckReturnValue.md.html index 17a59842..eab05ebd 100644 --- a/docs/checks/RxJava2MethodMissingCheckReturnValue.md.html +++ b/docs/checks/RxJava2MethodMissingCheckReturnValue.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-rxjava2](com_vanniktech_lint-rules-rxjava2.md.html) @@ -29,10 +29,6 @@ : Kotlin and Java files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-rxjava2-lint/src/main/java/com/vanniktech/lintrules/rxjava2/RxJava2MethodMissingCheckReturnValueDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-rxjava2-lint/src/test/java/com/vanniktech/lintrules/rxjava2/RxJava2MethodMissingCheckReturnValueDetectorTest.kt) Methods returning RxJava Reactive Types should be annotated with the @CheckReturnValue annotation. Static analyze tools such as Lint or @@ -40,163 +36,6 @@ This is usually an indication of a bug. If this is done on purpose (e.g. fire & forget) it should be stated explicitly. -!!! 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/Example.java:15:Warning: Method should have @CheckReturnValue -annotation [RxJava2MethodMissingCheckReturnValue] - - private Observable<Object> observable() { - ---------- - - -src/foo/Example.java:19:Warning: Method should have @CheckReturnValue -annotation [RxJava2MethodMissingCheckReturnValue] - - protected Flowable<Object> flowable() { - -------- - - -src/foo/Example.java:23:Warning: Method should have @CheckReturnValue -annotation [RxJava2MethodMissingCheckReturnValue] - - protected Single<Object> single() { - ------ - - -src/foo/Example.java:27:Warning: Method should have @CheckReturnValue -annotation [RxJava2MethodMissingCheckReturnValue] - - protected Maybe<Object> single() { - ------ - - -src/foo/Example.java:31:Warning: Method should have @CheckReturnValue -annotation [RxJava2MethodMissingCheckReturnValue] - - public Completable completable() { - ----------- - - -src/foo/Example.java:35:Warning: Method should have @CheckReturnValue -annotation [RxJava2MethodMissingCheckReturnValue] - - public Disposable disposable() { - ---------- - - -src/foo/Example.java:39:Warning: Method should have @CheckReturnValue -annotation [RxJava2MethodMissingCheckReturnValue] - - public CompositeDisposable compositeDisposable() { - ------------------- - - -src/foo/Example.java:43:Warning: Method should have @CheckReturnValue -annotation [RxJava2MethodMissingCheckReturnValue] - - public TestObserver testObserver() { - ------------ - - -src/foo/Example.java:47:Warning: Method should have @CheckReturnValue -annotation [RxJava2MethodMissingCheckReturnValue] - - public TestSubscriber testSubscriber() { - -------------- - - -src/foo/Example.java:51:Warning: Method should have @CheckReturnValue -annotation [RxJava2MethodMissingCheckReturnValue] - - public Scheduler scheduler() { - --------- - - -src/foo/Example.java:55:Warning: Method should have @CheckReturnValue -annotation [RxJava2MethodMissingCheckReturnValue] - - private Observable<List<Object>> observableList() { - -------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`src/foo/Example.java`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers -package foo; - -import io.reactivex.Observable; -import io.reactivex.Flowable; -import io.reactivex.Single; -import io.reactivex.Maybe; -import io.reactivex.Completable; -import io.reactivex.disposables.Disposable; -import io.reactivex.disposables.CompositeDisposable; -import io.reactivex.observers.TestObserver; -import io.reactivex.subscribers.TestSubscriber; -import io.reactivex.Scheduler; - -class Example { - private Observable observable() { - return null; - } - - protected Flowable flowable() { - return null; - } - - protected Single single() { - return null; - } - - protected Maybe single() { - return null; - } - - public Completable completable() { - return null; - } - - public Disposable disposable() { - return null; - } - - public CompositeDisposable compositeDisposable() { - return null; - } - - public TestObserver testObserver() { - return null; - } - - public TestSubscriber testSubscriber() { - return null; - } - - public Scheduler scheduler() { - return null; - } - - private Observable> observableList() { - return null; - } -} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can also visit the -[source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-rxjava2-lint/src/test/java/com/vanniktech/lintrules/rxjava2/RxJava2MethodMissingCheckReturnValueDetectorTest.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, `RxJava2MethodMissingCheckReturnValueDetector.methodMissingCheckReturnValue`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -206,17 +45,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-rxjava2:0.24.0") +lintChecks("com.vanniktech:lint-rules-rxjava2:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-rxjava2:0.24.0' +lintChecks 'com.vanniktech:lint-rules-rxjava2:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-rxjava2) # libs.versions.toml [versions] -lint-rules-rxjava2 = "0.24.0" +lint-rules-rxjava2 = "0.25.0" [libraries] lint-rules-rxjava2 = { module = "com.vanniktech:lint-rules-rxjava2", @@ -224,7 +63,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-rxjava2](com_vanniktech_lint-rules-rxjava2.md.html). diff --git a/docs/checks/RxJava2MissingCompositeDisposableClear.md.html b/docs/checks/RxJava2MissingCompositeDisposableClear.md.html index 675da259..92377d0c 100644 --- a/docs/checks/RxJava2MissingCompositeDisposableClear.md.html +++ b/docs/checks/RxJava2MissingCompositeDisposableClear.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-rxjava2](com_vanniktech_lint-rules-rxjava2.md.html) @@ -29,49 +29,12 @@ : Kotlin and Java files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-rxjava2-lint/src/main/java/com/vanniktech/lintrules/rxjava2/RxJava2MissingCompositeDisposableClearDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-rxjava2-lint/src/test/java/com/vanniktech/lintrules/rxjava2/RxJava2MissingCompositeDisposableClearDetectorTest.kt) A class is using CompositeDisposable and not calling clear(). This can leave operations running and even cause memory leaks. It's best to always call clear() once you're done. e.g. in onDestroy() for Activitys. -(##) Example - -Here is an example of lint warnings produced by this check: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/foo/Example.java:6:Error: clear() is not called -[RxJava2MissingCompositeDisposableClear] - - CompositeDisposable cd; - ----------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`src/foo/Example.java`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers -package foo; - -import io.reactivex.disposables.CompositeDisposable; - -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/java/com/vanniktech/lintrules/rxjava2/RxJava2MissingCompositeDisposableClearDetectorTest.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, `RxJava2MissingCompositeDisposableClearDetector.compositeDisposableMissingClear`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -81,17 +44,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-rxjava2:0.24.0") +lintChecks("com.vanniktech:lint-rules-rxjava2:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-rxjava2:0.24.0' +lintChecks 'com.vanniktech:lint-rules-rxjava2:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-rxjava2) # libs.versions.toml [versions] -lint-rules-rxjava2 = "0.24.0" +lint-rules-rxjava2 = "0.25.0" [libraries] lint-rules-rxjava2 = { module = "com.vanniktech:lint-rules-rxjava2", @@ -99,7 +62,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-rxjava2](com_vanniktech_lint-rules-rxjava2.md.html). diff --git a/docs/checks/RxJava2SchedulersFactoryCall.md.html b/docs/checks/RxJava2SchedulersFactoryCall.md.html index 37d4ec67..0ea85f79 100644 --- a/docs/checks/RxJava2SchedulersFactoryCall.md.html +++ b/docs/checks/RxJava2SchedulersFactoryCall.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-rxjava2](com_vanniktech_lint-rules-rxjava2.md.html) @@ -29,53 +29,12 @@ : Kotlin and Java files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-rxjava2-lint/src/main/java/com/vanniktech/lintrules/rxjava2/RxJava2SchedulersFactoryCallDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-rxjava2-lint/src/test/java/com/vanniktech/lintrules/rxjava2/RxJava2SchedulersFactoryCallDetectorTest.kt) Injecting the Schedulers instead of accessing them via the factory methods has the benefit that unit testing is way easier. Instead of overriding them via the Plugin mechanism we can just pass a custom Scheduler. -(##) Example - -Here is an example of lint warnings produced by this check: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/foo/Example.java:9:Warning: Inject this Scheduler instead of calling -it directly [RxJava2SchedulersFactoryCall] - - return Schedulers.io(); - -- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`src/foo/Example.java`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers -package foo; - -import io.reactivex.annotations.CheckReturnValue; -import io.reactivex.Scheduler; -import io.reactivex.schedulers.Schedulers; - -class Example { - @CheckReturnValue Scheduler provideSchedulerIo() { - return Schedulers.io(); - } -} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can also visit the -[source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-rxjava2-lint/src/test/java/com/vanniktech/lintrules/rxjava2/RxJava2SchedulersFactoryCallDetectorTest.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, `RxJava2SchedulersFactoryCallDetector.ioCallInsideCheckReturnValueMethod`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -85,17 +44,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-rxjava2:0.24.0") +lintChecks("com.vanniktech:lint-rules-rxjava2:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-rxjava2:0.24.0' +lintChecks 'com.vanniktech:lint-rules-rxjava2:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-rxjava2) # libs.versions.toml [versions] -lint-rules-rxjava2 = "0.24.0" +lint-rules-rxjava2 = "0.25.0" [libraries] lint-rules-rxjava2 = { module = "com.vanniktech:lint-rules-rxjava2", @@ -103,7 +62,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-rxjava2](com_vanniktech_lint-rules-rxjava2.md.html). diff --git a/docs/checks/RxJava2SubscribeMissingOnError.md.html b/docs/checks/RxJava2SubscribeMissingOnError.md.html index 3b7d1080..a5938d02 100644 --- a/docs/checks/RxJava2SubscribeMissingOnError.md.html +++ b/docs/checks/RxJava2SubscribeMissingOnError.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-rxjava2](com_vanniktech_lint-rules-rxjava2.md.html) @@ -29,51 +29,11 @@ : Kotlin and Java files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-rxjava2-lint/src/main/java/com/vanniktech/lintrules/rxjava2/RxJava2SubscribeMissingOnErrorDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-rxjava2-lint/src/test/java/com/vanniktech/lintrules/rxjava2/RxJava2SubscribeMissingOnErrorDetectorTest.kt) When calling the subscribe() method an error Consumer should always be used. Otherwise errors might be thrown and may crash the application or get forwarded to the Plugin Error handler. -(##) Example - -Here is an example of lint warnings produced by this check: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/foo/Example.java:8:Error: Using a version of subscribe() without an -error Consumer [RxJava2SubscribeMissingOnError] - - o.subscribe(); - --------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`src/foo/Example.java`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers -package foo; - -import io.reactivex.Observable; - -class Example { - public void foo() { - Observable o = null; - o.subscribe(); - } -} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can also visit the -[source code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-rxjava2-lint/src/test/java/com/vanniktech/lintrules/rxjava2/RxJava2SubscribeMissingOnErrorDetectorTest.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, `RxJava2SubscribeMissingOnErrorDetector.callingObservableSubscribe`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -83,17 +43,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-rxjava2:0.24.0") +lintChecks("com.vanniktech:lint-rules-rxjava2:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-rxjava2:0.24.0' +lintChecks 'com.vanniktech:lint-rules-rxjava2:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-rxjava2) # libs.versions.toml [versions] -lint-rules-rxjava2 = "0.24.0" +lint-rules-rxjava2 = "0.25.0" [libraries] lint-rules-rxjava2 = { module = "com.vanniktech:lint-rules-rxjava2", @@ -101,7 +61,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-rxjava2](com_vanniktech_lint-rules-rxjava2.md.html). diff --git a/docs/checks/ScrollViewSize.md.html b/docs/checks/ScrollViewSize.md.html index 5fac6071..1ff0919a 100644 --- a/docs/checks/ScrollViewSize.md.html +++ b/docs/checks/ScrollViewSize.md.html @@ -23,7 +23,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/ScrollViewChildDetector.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/ScrollViewChildDetector.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/ScrollViewChildDetectorTest.kt) Copyright Year @@ -68,11 +68,6 @@ [source code](https://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) 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, `ScrollViewChildDetector.testScrollView`. -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/SecretInSource.md.html b/docs/checks/SecretInSource.md.html new file mode 100644 index 00000000..c8e1b2b3 --- /dev/null +++ b/docs/checks/SecretInSource.md.html @@ -0,0 +1,143 @@ + +(#) Secret in source code + +!!! WARNING: Secret in source code + This is a warning. + +Id +: `SecretInSource` +Summary +: Secret in source code +Severity +: Warning +Category +: Security +Platform +: Any +Vendor +: Android Open Source Project +Feedback +: https://issuetracker.google.com/issues/new?component=192708 +Affects +: Kotlin and Java files +Editing +: This check runs on the fly in the IDE editor +See +: https://developers.google.com/maps/documentation/android-sdk/secrets-gradle-plugin +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/SecretDetector.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/SecretDetectorTest.kt) +Copyright Year +: 2023 + +Including secrets, such as API keys, in source code is a security risk. +It is generally best practice to not include API keys in source code, +and instead use something like the Secrets Gradle Plugin for Android. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/com/pkg/keydemo/test.kt:8:Warning: This argument looks like an API +key that has come from source code; API keys should not be included in +source code [SecretInSource] + + val model1 = GenerativeModel("name", KEY) + --- + + +src/com/pkg/keydemo/test.kt:9:Warning: This argument looks like an API +key that has come from source code; API keys should not be included in +source code [SecretInSource] + + val model2 = GenerativeModel("name", "AIzadGhpcyBpcyBhbm90aGVy_IHQ-akd==") + ---------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/com/pkg/keydemo/test.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package com.pkg.keydemo + +import com.google.ai.client.generativeai.GenerativeModel + +val KEY = "AIzadGhpcyBpcyBhbm90aGVy_IHQ-akd==" + +fun foo(extra: String) { + 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) +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("SecretInSource") + fun method() { + GenerativeModel(...) + } + ``` + + or + + ```java + // Java + @SuppressWarnings("SecretInSource") + void method() { + new GenerativeModel(...); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection SecretInSource + 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="SecretInSource" 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 'SecretInSource' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore SecretInSource ...` + ``` + +* 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/SelectedPhotoAccess.md.html b/docs/checks/SelectedPhotoAccess.md.html new file mode 100644 index 00000000..0f655e45 --- /dev/null +++ b/docs/checks/SelectedPhotoAccess.md.html @@ -0,0 +1,137 @@ + +(#) Behavior change when requesting photo library access + +!!! WARNING: Behavior change when requesting photo library access + This is a warning. + +Id +: `SelectedPhotoAccess` +Summary +: Behavior change when requesting photo library access +Severity +: Warning +Category +: Correctness +Platform +: Android +Vendor +: Android Open Source Project +Feedback +: https://issuetracker.google.com/issues/new?component=192708 +Affects +: Manifest files +Editing +: This check runs on the fly in the IDE editor +See +: https://developer.android.com/about/versions/14/changes/partial-photo-video-access +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/SelectedPhotoAccessDetector.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/SelectedPhotoAccessDetectorTest.kt) +Copyright Year +: 2022 + +Selected Photo Access is a new ability for users to share partial access +to their photo library when apps request access to their device storage +on Android 14+. + +Instead of letting the system manage the selection lifecycle, we +recommend you adapt your app to handle partial access to the photo +library. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +AndroidManifest.xml:11:Warning: Your app is currently not handling +Selected Photos Access introduced in Android 14+ [SelectedPhotoAccess] + + <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" android:minSdkVersion="33" /> + ------------------------------------ + + +AndroidManifest.xml:13:Warning: Your app is currently not handling +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: + +`AndroidManifest.xml`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers + <manifest xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + package="foo.bar" + android:versionCode="990000000" + android:versionName="9.1.0.0.0x"> + + <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="34" /> + + <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32"/> + <!-- Media permissions introduced in Android 13 (T) --> + <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" android:minSdkVersion="33" /> + <uses-permission android:name="android.permission.READ_MEDIA_AUDIO" android:minSdkVersion="33" /> + <uses-permission android:name="android.permission.READ_MEDIA_VIDEO" android:minSdkVersion="33"/> + <uses-permission android:name="android.permission.CAMERA" /> + + <application + android:icon="@drawable/ic_launcher" + android:label="@string/app_name" + android:permission="android.permission.READ_CONTACTS"> + </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) +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="SelectedPhotoAccess"` 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="SelectedPhotoAccess" 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 'SelectedPhotoAccess' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore SelectedPhotoAccess ...` + ``` + +* 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/SerializableUsage.md.html b/docs/checks/SerializableUsage.md.html index b9a7a6b6..bf16ccd8 100644 --- a/docs/checks/SerializableUsage.md.html +++ b/docs/checks/SerializableUsage.md.html @@ -86,17 +86,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -104,7 +104,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/ShouldUseStaticImport.md.html b/docs/checks/ShouldUseStaticImport.md.html index 5e83f749..0e3afe23 100644 --- a/docs/checks/ShouldUseStaticImport.md.html +++ b/docs/checks/ShouldUseStaticImport.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,47 +29,10 @@ : Kotlin and Java files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/ShouldUseStaticImportDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/ShouldUseStaticImportDetectorTest.kt) Certain declarations like TimeUnit.SECONDS should be statically imported to increase the readability. -(##) Example - -Here is an example of lint warnings produced by this check: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/foo/Example.java:5:Warning: Should statically import SECONDS -[ShouldUseStaticImport] - - TimeUnit.SECONDS.toDays(1); - ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`src/foo/Example.java`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers -package foo; -import java.util.concurrent.TimeUnit; -class Example { - public void foo() { - 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/java/com/vanniktech/lintrules/android/ShouldUseStaticImportDetectorTest.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, `ShouldUseStaticImportDetector.timeUnitSeconds`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -79,17 +42,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -97,7 +60,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/SpanMarkPointMissingMask.md.html b/docs/checks/SpanMarkPointMissingMask.md.html index 4e8e99d2..066cf11d 100644 --- a/docs/checks/SpanMarkPointMissingMask.md.html +++ b/docs/checks/SpanMarkPointMissingMask.md.html @@ -92,17 +92,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -110,7 +110,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/SpecifyForegroundServiceType.md.html b/docs/checks/SpecifyForegroundServiceType.md.html index c09aabd1..24409e64 100644 --- a/docs/checks/SpecifyForegroundServiceType.md.html +++ b/docs/checks/SpecifyForegroundServiceType.md.html @@ -52,17 +52,17 @@ ``` // build.gradle.kts -implementation("androidx.work:work-runtime:2.9.0-alpha01") +implementation("androidx.work:work-runtime:2.10.0-alpha01") // build.gradle -implementation 'androidx.work:work-runtime:2.9.0-alpha01' +implementation 'androidx.work:work-runtime:2.10.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.work-runtime) # libs.versions.toml [versions] -work-runtime = "2.9.0-alpha01" +work-runtime = "2.10.0-alpha01" [libraries] work-runtime = { module = "androidx.work:work-runtime", @@ -70,7 +70,7 @@ } ``` -2.9.0-alpha01 is the version this documentation was generated from; +2.10.0-alpha01 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 bc40b7db..6a155fff 100644 --- a/docs/checks/SpecifyJobSchedulerIdRange.md.html +++ b/docs/checks/SpecifyJobSchedulerIdRange.md.html @@ -53,17 +53,17 @@ ``` // build.gradle.kts -implementation("androidx.work:work-runtime:2.9.0-alpha01") +implementation("androidx.work:work-runtime:2.10.0-alpha01") // build.gradle -implementation 'androidx.work:work-runtime:2.9.0-alpha01' +implementation 'androidx.work:work-runtime:2.10.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.work-runtime) # libs.versions.toml [versions] -work-runtime = "2.9.0-alpha01" +work-runtime = "2.10.0-alpha01" [libraries] work-runtime = { module = "androidx.work:work-runtime", @@ -71,7 +71,7 @@ } ``` -2.9.0-alpha01 is the version this documentation was generated from; +2.10.0-alpha01 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 3d8bb039..d887dd4a 100644 --- a/docs/checks/SquareAndRoundTilePreviews.md.html +++ b/docs/checks/SquareAndRoundTilePreviews.md.html @@ -22,6 +22,8 @@ : Binary resource files and manifest files Editing : This check can *not* run live in the IDE editor +See +: https://developer.android.com/design/ui/wear/guides/surfaces/tiles#tile-previews 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/TileProviderDetector.kt) Tests @@ -38,7 +40,7 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -AndroidManifest.xml:7:Warning: Tiles need preview assets +AndroidManifest.xml:8:Warning: Tiles need preview assets [SquareAndRoundTilePreviews] <service @@ -51,6 +53,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="test.pkg"> + <uses-feature android:name="android.hardware.type.watch" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > diff --git a/docs/checks/StartActivityAndCollapseDeprecated.md.html b/docs/checks/StartActivityAndCollapseDeprecated.md.html new file mode 100644 index 00000000..9a865e82 --- /dev/null +++ b/docs/checks/StartActivityAndCollapseDeprecated.md.html @@ -0,0 +1,135 @@ + +(#) TileService.startActivityAndCollapse(Intent) is deprecated + +!!! ERROR: TileService.startActivityAndCollapse(Intent) is deprecated + This is an error. + +Id +: `StartActivityAndCollapseDeprecated` +Summary +: TileService.startActivityAndCollapse(Intent) is deprecated +Severity +: Error +Category +: Correctness +Platform +: Android +Vendor +: Android Open Source Project +Feedback +: https://issuetracker.google.com/issues/new?component=192708 +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/TileServiceActivityDetector.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/TileServiceActivityDetectorTest.kt) +Copyright Year +: 2023 + +`TileService#startActivityAndCollapse(Intent)` has been deprecated, and +will throw an `UnsupportedOperationException` if used in apps targeting +Android versions UpsideDownCake and higher. Convert the Intent to a +PendingIntent. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/test.kt:6:Error: TileService#startActivityAndCollapse(Intent) is +deprecated. Use TileService#startActivityAndCollapse(PendingIntent) +instead. [StartActivityAndCollapseDeprecated] + + tileService.startActivityAndCollapse(intent) // ERROR + ------ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/test.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +import android.app.PendingIntent +import android.content.Intent +import android.service.quicksettings.TileService + +fun callAMethod(tileService: TileService, intent: Intent) { + tileService.startActivityAndCollapse(intent) // ERROR +} + +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) +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("StartActivityAndCollapseDeprecated") + fun method() { + startActivityAndCollapse(...) + } + ``` + + or + + ```java + // Java + @SuppressWarnings("StartActivityAndCollapseDeprecated") + void method() { + startActivityAndCollapse(...); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection StartActivityAndCollapseDeprecated + 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="StartActivityAndCollapseDeprecated" 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 'StartActivityAndCollapseDeprecated' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore StartActivityAndCollapseDeprecated ...` + ``` + +* 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/StateFlowValueCalledInComposition.md.html b/docs/checks/StateFlowValueCalledInComposition.md.html index 971bee79..172f404f 100644 --- a/docs/checks/StateFlowValueCalledInComposition.md.html +++ b/docs/checks/StateFlowValueCalledInComposition.md.html @@ -21,11 +21,11 @@ Feedback : https://issuetracker.google.com/issues/new?component=612128 Min -: Lint 7.0 +: Lint 8.0 and 8.1 Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.runtime:runtime](androidx_compose_runtime_runtime.md.html) +: [androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html) Affects : Kotlin and Java files and test sources @@ -136,28 +136,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime:1.5.0-beta02") +implementation("androidx.compose.runtime:runtime-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.runtime:runtime:1.5.0-beta02' +implementation 'androidx.compose.runtime:runtime-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.runtime) +implementation(libs.runtime-android) # libs.versions.toml [versions] -runtime = "1.5.0-beta02" +runtime-android = "1.7.0-alpha01" [libraries] -runtime = { - module = "androidx.compose.runtime:runtime", - version.ref = "runtime" +runtime-android = { + module = "androidx.compose.runtime:runtime-android", + version.ref = "runtime-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.runtime:runtime](androidx_compose_runtime_runtime.md.html). +[Additional details about androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html). (##) Suppressing You can suppress false positives using one of the following mechanisms: diff --git a/docs/checks/StringNotCapitalized.md.html b/docs/checks/StringNotCapitalized.md.html index 228400ea..feac8b5d 100644 --- a/docs/checks/StringNotCapitalized.md.html +++ b/docs/checks/StringNotCapitalized.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,45 +29,9 @@ : Resource files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/StringNotCapitalizedDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/StringNotCapitalizedDetectorTest.kt) Every string should be capitalized. If not, it is flagged. -!!! 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/values/strings.xml:2:Warning: String is not capitalized -[StringNotCapitalized] - - <string name="my_string">my string</string> - ^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`res/values/strings.xml`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers -<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/java/com/vanniktech/lintrules/android/StringNotCapitalizedDetectorTest.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, `StringNotCapitalizedDetector.lowercase`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -77,17 +41,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -95,7 +59,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/SubscribeOnMain.md.html b/docs/checks/SubscribeOnMain.md.html index 5778f706..cdbea0b0 100644 --- a/docs/checks/SubscribeOnMain.md.html +++ b/docs/checks/SubscribeOnMain.md.html @@ -98,17 +98,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -116,7 +116,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/SuperfluousMarginDeclaration.md.html b/docs/checks/SuperfluousMarginDeclaration.md.html index db075fec..3840293a 100644 --- a/docs/checks/SuperfluousMarginDeclaration.md.html +++ b/docs/checks/SuperfluousMarginDeclaration.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,49 +29,10 @@ : Resource files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/SuperfluousMarginDeclarationDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/SuperfluousMarginDeclarationDetectorTest.kt) Instead of using start-, end-, bottom- and top margins, layout_margin can be used. -!!! 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/layout/ids.xml:1:Warning: Should be using layout_margin instead. -[SuperfluousMarginDeclaration] - -<TextView -^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`res/layout/ids.xml`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers -<TextView - xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_marginTop="16dp" - 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/java/com/vanniktech/lintrules/android/SuperfluousMarginDeclarationDetectorTest.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, `SuperfluousMarginDeclarationDetector.androidMarginSame`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -81,17 +42,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -99,7 +60,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/SuperfluousNameSpace.md.html b/docs/checks/SuperfluousNameSpace.md.html index 694b47db..4507b37c 100644 --- a/docs/checks/SuperfluousNameSpace.md.html +++ b/docs/checks/SuperfluousNameSpace.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,47 +29,9 @@ : Resource files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/SuperfluousNameSpaceDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/SuperfluousNameSpaceDetectorTest.kt) Re-declaring a namespace is unnecessary and hence can be just removed. -!!! 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/layout/activity_home.xml:3:Warning: This name space is already -declared and hence not needed [SuperfluousNameSpace] - - xmlns:android="http://schemas.android.com/apk/res/android" - ---------------------------------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`res/layout/activity_home.xml`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"> - <TextView - 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/java/com/vanniktech/lintrules/android/SuperfluousNameSpaceDetectorTest.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, `SuperfluousNameSpaceDetector.androidNamespaceOnChild`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -79,17 +41,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -97,7 +59,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/SuperfluousPaddingDeclaration.md.html b/docs/checks/SuperfluousPaddingDeclaration.md.html index d73447e1..2cfa5d84 100644 --- a/docs/checks/SuperfluousPaddingDeclaration.md.html +++ b/docs/checks/SuperfluousPaddingDeclaration.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,49 +29,10 @@ : Resource files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/SuperfluousPaddingDeclarationDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/SuperfluousPaddingDeclarationDetectorTest.kt) Instead of using start-, end-, bottom- and top paddings, padding can be used. -!!! 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/layout/ids.xml:1:Warning: Should be using padding instead. -[SuperfluousPaddingDeclaration] - -<TextView -^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`res/layout/ids.xml`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers -<TextView - xmlns:android="http://schemas.android.com/apk/res/android" - android:paddingTop="16dp" - 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/java/com/vanniktech/lintrules/android/SuperfluousPaddingDeclarationDetectorTest.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, `SuperfluousPaddingDeclarationDetector.androidPaddingSame`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -81,17 +42,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -99,7 +60,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/SuspiciousCompositionLocalModifierRead.md.html b/docs/checks/SuspiciousCompositionLocalModifierRead.md.html index 176edcdb..3411e0fc 100644 --- a/docs/checks/SuspiciousCompositionLocalModifierRead.md.html +++ b/docs/checks/SuspiciousCompositionLocalModifierRead.md.html @@ -25,7 +25,7 @@ Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.ui:ui](androidx_compose_ui_ui.md.html) +: [androidx.compose.ui:ui-android](androidx_compose_ui_ui-android.md.html) Affects : Kotlin and Java files and test sources @@ -120,28 +120,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui:1.5.0-beta02") +implementation("androidx.compose.ui:ui-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.ui:ui:1.5.0-beta02' +implementation 'androidx.compose.ui:ui-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.ui) +implementation(libs.ui-android) # libs.versions.toml [versions] -ui = "1.5.0-beta02" +ui-android = "1.7.0-alpha01" [libraries] -ui = { - module = "androidx.compose.ui:ui", - version.ref = "ui" +ui-android = { + module = "androidx.compose.ui:ui-android", + version.ref = "ui-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.ui:ui](androidx_compose_ui_ui.md.html). +[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: diff --git a/docs/checks/TestLifecycleOwnerInCoroutine.md.html b/docs/checks/TestLifecycleOwnerInCoroutine.md.html new file mode 100644 index 00000000..82cc641a --- /dev/null +++ b/docs/checks/TestLifecycleOwnerInCoroutine.md.html @@ -0,0 +1,141 @@ + +(#) Use the suspending function setCurrentState(), rather than directly accessing the currentState property. + +!!! ERROR: Use the suspending function setCurrentState(), rather than directly accessing the currentState property. + This is an error. + +Id +: `TestLifecycleOwnerInCoroutine` +Summary +: Use the suspending function setCurrentState(), rather than directly accessing the currentState property. +Severity +: Error +Category +: Correctness +Platform +: Android +Vendor +: Android Open Source Project +Identifier +: androidx.lifecycle +Feedback +: https://issuetracker.google.com/issues/new?component=413132 +Min +: Lint 7.0 +Compiled +: Lint 8.0 and 8.1 +Artifact +: [androidx.lifecycle:lifecycle-runtime-testing](androidx_lifecycle_lifecycle-runtime-testing.md.html) + +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-runtime-testing-lint/src/main/java/androidx/lifecycle/testing/lint/TestLifecycleOwnerInCoroutineDetector.kt) +Copyright Year +: 2021 + +When using TestLifecycleOwner, one of the main use cases is to change + the currentState property. Under the hood, we do this using +runBlocking to keep it thread-safe. However, when using +TestLifecycleOwner from the context of a coroutine (like +runTest), this will cause the setter to hang, since coroutines + should remain asynchronous. + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("androidx.lifecycle:lifecycle-runtime-testing:2.8.0-alpha01") + +// build.gradle +implementation 'androidx.lifecycle:lifecycle-runtime-testing:2.8.0-alpha01' + +// build.gradle.kts with version catalogs: +implementation(libs.lifecycle-runtime-testing) + +# libs.versions.toml +[versions] +lifecycle-runtime-testing = "2.8.0-alpha01" +[libraries] +lifecycle-runtime-testing = { + module = "androidx.lifecycle:lifecycle-runtime-testing", + version.ref = "lifecycle-runtime-testing" +} +``` + +2.8.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). +(##) 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("TestLifecycleOwnerInCoroutine") + fun method() { + runTest(...) + } + ``` + + or + + ```java + // Java + @SuppressWarnings("TestLifecycleOwnerInCoroutine") + void method() { + runTest(...); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection TestLifecycleOwnerInCoroutine + 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="TestLifecycleOwnerInCoroutine" 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 'TestLifecycleOwnerInCoroutine' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore TestLifecycleOwnerInCoroutine ...` + ``` + +* 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/TestManifestGradleConfiguration.md.html b/docs/checks/TestManifestGradleConfiguration.md.html index 87059248..d1b87847 100644 --- a/docs/checks/TestManifestGradleConfiguration.md.html +++ b/docs/checks/TestManifestGradleConfiguration.md.html @@ -130,17 +130,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui-test-manifest:1.5.0-beta02") +implementation("androidx.compose.ui:ui-test-manifest:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.ui:ui-test-manifest:1.5.0-beta02' +implementation 'androidx.compose.ui:ui-test-manifest:1.7.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.ui-test-manifest) # libs.versions.toml [versions] -ui-test-manifest = "1.5.0-beta02" +ui-test-manifest = "1.7.0-alpha01" [libraries] ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest", @@ -148,7 +148,7 @@ } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.compose.ui:ui-test-manifest](androidx_compose_ui_ui-test-manifest.md.html). diff --git a/docs/checks/TilePreviewImageFormat.md.html b/docs/checks/TilePreviewImageFormat.md.html new file mode 100644 index 00000000..7e526b97 --- /dev/null +++ b/docs/checks/TilePreviewImageFormat.md.html @@ -0,0 +1,131 @@ + +(#) Tile preview is not compliant with standards + +!!! ERROR: Tile preview is not compliant with standards + This is an error. + +Id +: `TilePreviewImageFormat` +Summary +: Tile preview is not compliant with standards +Severity +: Error +Category +: Usability: Icons +Platform +: Android +Vendor +: Android Open Source Project +Feedback +: https://issuetracker.google.com/issues/new?component=192708 +Affects +: Binary resource files and manifest files +Editing +: This check can *not* run live in the IDE editor +See +: https://developer.android.com/design/ui/wear/guides/surfaces/tiles#tile-previews +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/TileProviderDetector.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/TileProviderDetectorTest.kt) +Copyright Year +: 2021 + +Tile projects should specify preview resources with aspect ratio 1:1 and +at least 384px by 384px in size. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +AndroidManifest.xml:13:Error: Tile previews should have 1:1 aspect ratio +[TilePreviewImageFormat] + + android:resource="@drawable/ic_walk" /> + ----------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +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-feature android:name="android.hardware.type.watch" /> + <application android:icon="@drawable/ic_launcher" + android:label="@string/app_name" > + </application> + <service android:name=".MyTileProvider" + android:permission="com.google.android.wearable.permission.BIND_TILE_PROVIDER"> + <intent-filter> + <action android:name="androidx.wear.tiles.action.BIND_TILE_PROVIDER" /> + </intent-filter> + <meta-data android:name="androidx.wear.tiles.PREVIEW" + 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) +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, `TileProviderDetector.testAspectRatioAndSize`. +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="TilePreviewImageFormat"` 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="TilePreviewImageFormat" .../> + ... + </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="TilePreviewImageFormat" 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 'TilePreviewImageFormat' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore TilePreviewImageFormat ...` + ``` + +* 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/TileProviderPermissions.md.html b/docs/checks/TileProviderPermissions.md.html index ff1cf74b..b049ab49 100644 --- a/docs/checks/TileProviderPermissions.md.html +++ b/docs/checks/TileProviderPermissions.md.html @@ -40,7 +40,7 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -AndroidManifest.xml:7:Warning: TileProvider does not specify +AndroidManifest.xml:8:Warning: TileProvider does not specify BIND_TILE_PROVIDER permission [TileProviderPermissions] <service @@ -53,6 +53,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="test.pkg"> + <uses-feature android:name="android.hardware.type.watch" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > diff --git a/docs/checks/Todo.md.html b/docs/checks/Todo.md.html index 6eccbf31..72878684 100644 --- a/docs/checks/Todo.md.html +++ b/docs/checks/Todo.md.html @@ -21,9 +21,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -31,43 +31,9 @@ : Gradle build files, Kotlin and Java files, manifest files, resource files and shrinking configuration files Editing : This check can *not* run live in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/TodoDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/TodoDetectorTest.kt) Marks todo in any given file since they should be resolved. -(##) Example - -Here is an example of lint warnings produced by this check: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/foo/Example.java:4:Error: Contains todo [Todo] - - // TODO something - ---- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`src/foo/Example.java`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers -package foo; - -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/java/com/vanniktech/lintrules/android/TodoDetectorTest.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, `TodoDetector.javaFile`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -77,17 +43,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -95,7 +61,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/TrulyRandom.md.html b/docs/checks/TrulyRandom.md.html index 8e50ab62..51344dd2 100644 --- a/docs/checks/TrulyRandom.md.html +++ b/docs/checks/TrulyRandom.md.html @@ -40,7 +40,7 @@ If your application relies on cryptographically secure random number generation you should apply the workaround described in https://android-developers.blogspot.com/2013/08/some-securerandom-thoughts.html - . +. This lint rule is mostly informational; it does not accurately detect whether cryptographically secure RNG is required, or whether the @@ -54,7 +54,7 @@ src/test/pkg/PrngCalls.java:13:Warning: Potentially insecure random numbers on Android 4.3 and older. Read https://android-developers.blogspot.com/2013/08/some-securerandom-thoughts.html - for more info. [TrulyRandom] +for more info. [TrulyRandom] KeyGenerator generator = KeyGenerator.getInstance("AES", "BC"); ----------- diff --git a/docs/checks/TypographyQuotes.md.html b/docs/checks/TypographyQuotes.md.html index 1574bb8a..2316c42c 100644 --- a/docs/checks/TypographyQuotes.md.html +++ b/docs/checks/TypographyQuotes.md.html @@ -1,13 +1,13 @@ -(#) Straight quotes can be replaced with curvy quotes +(#) Straight quotes can be replaced with curvy quotes, and apostrophes with typographic apostrophes. -!!! WARNING: Straight quotes can be replaced with curvy quotes +!!! WARNING: Straight quotes can be replaced with curvy quotes, and apostrophes with typographic apostrophes. This is a warning. Id : `TypographyQuotes` Summary -: Straight quotes can be replaced with curvy quotes +: Straight quotes can be replaced with curvy quotes, and apostrophes with typographic apostrophes. Note : **This issue is disabled by default**; use `--enable TypographyQuotes` Severity @@ -34,10 +34,10 @@ : 2011 Straight single quotes and double quotes, when used as a pair, can be -replaced by "curvy quotes" (or directional quotes). This can make the -text more readable. Note that you should never use grave accents and -apostrophes to quote, `like this'. (Also note that you should not use -curvy quotes for code fragments.) +replaced by "curvy quotes" (or directional quotes). Use the right single +quotation mark for apostrophes. Never use generic quotes ", ' or +free-standing accents `, ´ for quotation marks, apostrophes, or primes. +This can make the text more readable. !!! Tip This lint check has an associated quickfix available in the IDE. @@ -71,14 +71,14 @@ typographic apostrophe (’, ’) ? [TypographyQuotes] <string name="single">Android's</string> - --------- + - res/values/typography.xml:9:Warning: Replace apostrophe (') with typographic apostrophe (’, ’) ? [TypographyQuotes] <string name="badquotes1">`First'</string> - ------- + - res/values/typography.xml:10:Warning: Avoid quoting with grave accents; @@ -94,6 +94,20 @@ <string name="notbadquotes">Type Option-` then 'Escape'</string> --------------------------- + + +res/values/typography.xml:22:Warning: Replace apostrophe (') with +typographic apostrophe (’, ’) ? [TypographyQuotes] + + <string name="notdirectional">A's and B's</string> + ----------- + + +res/values/typography.xml:29:Warning: Replace apostrophe (') with +typographic apostrophe (’, ’) ? [TypographyQuotes] + + <string>something somthing d\'avoir something something l\'écran.</string> + --------------------------------------------------------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: diff --git a/docs/checks/UnnecessaryComposedModifier.md.html b/docs/checks/UnnecessaryComposedModifier.md.html index 05a0f1da..47170011 100644 --- a/docs/checks/UnnecessaryComposedModifier.md.html +++ b/docs/checks/UnnecessaryComposedModifier.md.html @@ -25,7 +25,7 @@ Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.ui:ui](androidx_compose_ui_ui.md.html) +: [androidx.compose.ui:ui-android](androidx_compose_ui_ui-android.md.html) Affects : Kotlin and Java files and test sources @@ -122,28 +122,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui:1.5.0-beta02") +implementation("androidx.compose.ui:ui-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.ui:ui:1.5.0-beta02' +implementation 'androidx.compose.ui:ui-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.ui) +implementation(libs.ui-android) # libs.versions.toml [versions] -ui = "1.5.0-beta02" +ui-android = "1.7.0-alpha01" [libraries] -ui = { - module = "androidx.compose.ui:ui", - version.ref = "ui" +ui-android = { + module = "androidx.compose.ui:ui-android", + version.ref = "ui-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.ui:ui](androidx_compose_ui_ui.md.html). +[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: diff --git a/docs/checks/UnrememberedAnimatable.md.html b/docs/checks/UnrememberedAnimatable.md.html index 19333a83..64422dd6 100644 --- a/docs/checks/UnrememberedAnimatable.md.html +++ b/docs/checks/UnrememberedAnimatable.md.html @@ -25,7 +25,7 @@ Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.animation:animation-core](androidx_compose_animation_animation-core.md.html) +: [androidx.compose.animation:animation-core-android](androidx_compose_animation_animation-core-android.md.html) Affects : Kotlin and Java files and test sources @@ -319,28 +319,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.animation:animation-core:1.5.0-beta02") +implementation("androidx.compose.animation:animation-core-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.animation:animation-core:1.5.0-beta02' +implementation 'androidx.compose.animation:animation-core-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.animation-core) +implementation(libs.animation-core-android) # libs.versions.toml [versions] -animation-core = "1.5.0-beta02" +animation-core-android = "1.7.0-alpha01" [libraries] -animation-core = { - module = "androidx.compose.animation:animation-core", - version.ref = "animation-core" +animation-core-android = { + module = "androidx.compose.animation:animation-core-android", + version.ref = "animation-core-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.animation:animation-core](androidx_compose_animation_animation-core.md.html). +[Additional details about androidx.compose.animation:animation-core-android](androidx_compose_animation_animation-core-android.md.html). (##) Suppressing You can suppress false positives using one of the following mechanisms: diff --git a/docs/checks/UnrememberedGetBackStackEntry.md.html b/docs/checks/UnrememberedGetBackStackEntry.md.html index f7f5ceb6..c736e754 100644 --- a/docs/checks/UnrememberedGetBackStackEntry.md.html +++ b/docs/checks/UnrememberedGetBackStackEntry.md.html @@ -191,17 +191,17 @@ ``` // build.gradle.kts -implementation("androidx.navigation:navigation-compose:2.7.0-beta01") +implementation("androidx.navigation:navigation-compose:2.8.0-alpha01") // build.gradle -implementation 'androidx.navigation:navigation-compose:2.7.0-beta01' +implementation 'androidx.navigation:navigation-compose:2.8.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.navigation-compose) # libs.versions.toml [versions] -navigation-compose = "2.7.0-beta01" +navigation-compose = "2.8.0-alpha01" [libraries] navigation-compose = { module = "androidx.navigation:navigation-compose", @@ -209,7 +209,7 @@ } ``` -2.7.0-beta01 is the version this documentation was generated from; +2.8.0-alpha01 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/UnrememberedMutableInteractionSource.md.html b/docs/checks/UnrememberedMutableInteractionSource.md.html new file mode 100644 index 00000000..3e3ea4d8 --- /dev/null +++ b/docs/checks/UnrememberedMutableInteractionSource.md.html @@ -0,0 +1,272 @@ + +(#) Creating a MutableInteractionSource during composition without using `remember` + +!!! ERROR: Creating a MutableInteractionSource during composition without using `remember` + This is an error. + +Id +: `UnrememberedMutableInteractionSource` +Summary +: Creating a MutableInteractionSource during composition without using `remember` +Severity +: Error +Category +: Correctness +Platform +: Any +Vendor +: Jetpack Compose +Identifier +: androidx.compose.foundation +Feedback +: https://issuetracker.google.com/issues/new?component=612128 +Min +: Lint 7.0 +Compiled +: Lint 8.0 and 8.1 +Artifact +: [androidx.compose.foundation:foundation-android](androidx_compose_foundation_foundation-android.md.html) + +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/foundation/foundation-lint/src/main/java/androidx/compose/foundation/lint/UnrememberedMutableInteractionSourceDetector.kt) +Tests +: [Source Code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:/compose/foundation/foundation-lint/src/test/java/androidx/compose/foundation/lint/UnrememberedMutableInteractionSourceDetectorTest.kt) +Copyright Year +: 2023 + +MutableInteractionSource instances created during composition need to be +`remember`ed, otherwise they will be recreated during recomposition, and +lose their state. Either hoist the MutableInteractionSource to an object +that is not created during composition, or wrap the +MutableInteractionSource in a call to `remember`. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/test/{.kt:9:Error: Creating a MutableInteractionSource during +composition without using remember +[UnrememberedMutableInteractionSource] + + val interactionSource = MutableInteractionSource() + ------------------------ + + +src/test/{.kt:13:Error: Creating a MutableInteractionSource during +composition without using remember +[UnrememberedMutableInteractionSource] + + val interactionSource = MutableInteractionSource() + ------------------------ + + +src/test/{.kt:17:Error: Creating a MutableInteractionSource during +composition without using remember +[UnrememberedMutableInteractionSource] + + val interactionSource = MutableInteractionSource() + ------------------------ + + +src/test/{.kt:26:Error: Creating a MutableInteractionSource during +composition without using remember +[UnrememberedMutableInteractionSource] + + val interactionSource = MutableInteractionSource() + ------------------------ + + +src/test/{.kt:29:Error: Creating a MutableInteractionSource during +composition without using remember +[UnrememberedMutableInteractionSource] + + val interactionSource = MutableInteractionSource() + ------------------------ + + +src/test/{.kt:35:Error: Creating a MutableInteractionSource during +composition without using remember +[UnrememberedMutableInteractionSource] + + val interactionSource = MutableInteractionSource() + ------------------------ + + +src/test/{.kt:39:Error: Creating a MutableInteractionSource during +composition without using remember +[UnrememberedMutableInteractionSource] + + val interactionSource = MutableInteractionSource() + ------------------------ + + +src/test/{.kt:46:Error: Creating a MutableInteractionSource during +composition without using remember +[UnrememberedMutableInteractionSource] + + val interactionSource = MutableInteractionSource() + ------------------------ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/test/{.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package test + +import androidx.compose.foundation.interaction.* +import androidx.compose.runtime.* + +@Composable +fun Test() { + val interactionSource = MutableInteractionSource() +} + +val lambda = @Composable { + val interactionSource = MutableInteractionSource() +} + +val lambda2: @Composable () -> Unit = { + val interactionSource = MutableInteractionSource() +} + +@Composable +fun LambdaParameter(content: @Composable () -> Unit) {} + +@Composable +fun Test2() { + LambdaParameter(content = { + val interactionSource = MutableInteractionSource() + }) + LambdaParameter { + val interactionSource = MutableInteractionSource() + } +} + +fun test3() { + val localLambda1 = @Composable { + val interactionSource = MutableInteractionSource() + } + + val localLambda2: @Composable () -> Unit = { + val interactionSource = MutableInteractionSource() + } +} + +@Composable +fun Test4() { + val localObject = object { + val interactionSource = MutableInteractionSource() + } +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +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/UnrememberedMutableInteractionSourceDetectorTest.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, `UnrememberedMutableInteractionSourceDetector.notRemembered`. +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.foundation:foundation-android:1.7.0-alpha01") + +// build.gradle +implementation 'androidx.compose.foundation:foundation-android:1.7.0-alpha01' + +// build.gradle.kts with version catalogs: +implementation(libs.foundation-android) + +# libs.versions.toml +[versions] +foundation-android = "1.7.0-alpha01" +[libraries] +foundation-android = { + module = "androidx.compose.foundation:foundation-android", + version.ref = "foundation-android" +} +``` + +1.7.0-alpha01 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about androidx.compose.foundation:foundation-android](androidx_compose_foundation_foundation-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("UnrememberedMutableInteractionSource") + fun method() { + MutableInteractionSource(...) + } + ``` + + or + + ```java + // Java + @SuppressWarnings("UnrememberedMutableInteractionSource") + void method() { + MutableInteractionSource(...); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection UnrememberedMutableInteractionSource + 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="UnrememberedMutableInteractionSource" 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 'UnrememberedMutableInteractionSource' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore UnrememberedMutableInteractionSource ...` + ``` + +* 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/UnrememberedMutableState.md.html b/docs/checks/UnrememberedMutableState.md.html index e8dd0fa2..dd5f3ccf 100644 --- a/docs/checks/UnrememberedMutableState.md.html +++ b/docs/checks/UnrememberedMutableState.md.html @@ -21,11 +21,11 @@ Feedback : https://issuetracker.google.com/issues/new?component=612128 Min -: Lint 7.0 +: Lint 8.0 and 8.1 Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.runtime:runtime](androidx_compose_runtime_runtime.md.html) +: [androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html) Affects : Kotlin and Java files and test sources @@ -364,28 +364,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.runtime:runtime:1.5.0-beta02") +implementation("androidx.compose.runtime:runtime-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.runtime:runtime:1.5.0-beta02' +implementation 'androidx.compose.runtime:runtime-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.runtime) +implementation(libs.runtime-android) # libs.versions.toml [versions] -runtime = "1.5.0-beta02" +runtime-android = "1.7.0-alpha01" [libraries] -runtime = { - module = "androidx.compose.runtime:runtime", - version.ref = "runtime" +runtime-android = { + module = "androidx.compose.runtime:runtime-android", + version.ref = "runtime-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.runtime:runtime](androidx_compose_runtime_runtime.md.html). +[Additional details about androidx.compose.runtime:runtime-android](androidx_compose_runtime_runtime-android.md.html). (##) Suppressing You can suppress false positives using one of the following mechanisms: diff --git a/docs/checks/UnsafeLifecycleWhenUsage.md.html b/docs/checks/UnsafeLifecycleWhenUsage.md.html index 50ae7751..264c4029 100644 --- a/docs/checks/UnsafeLifecycleWhenUsage.md.html +++ b/docs/checks/UnsafeLifecycleWhenUsage.md.html @@ -59,17 +59,17 @@ ``` // build.gradle.kts -implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1") +implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.0-alpha01") // build.gradle -implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1' +implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.8.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.lifecycle-runtime-ktx) # libs.versions.toml [versions] -lifecycle-runtime-ktx = "2.6.1" +lifecycle-runtime-ktx = "2.8.0-alpha01" [libraries] lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", @@ -77,7 +77,7 @@ } ``` -2.6.1 is the version this documentation was generated from; +2.8.0-alpha01 is the version this documentation was generated from; there may be newer versions available. [Additional details about androidx.lifecycle:lifecycle-runtime-ktx](androidx_lifecycle_lifecycle-runtime-ktx.md.html). diff --git a/docs/checks/UnsafeOptInUsageError.md.html b/docs/checks/UnsafeOptInUsageError.md.html index 7db9f117..f684525a 100644 --- a/docs/checks/UnsafeOptInUsageError.md.html +++ b/docs/checks/UnsafeOptInUsageError.md.html @@ -23,7 +23,7 @@ Min : Lint 7.0 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [androidx.annotation:annotation-experimental](androidx_annotation_annotation-experimental.md.html) @@ -70,17 +70,17 @@ ``` // build.gradle.kts -implementation("androidx.annotation:annotation-experimental:1.4.0-dev01") +implementation("androidx.annotation:annotation-experimental:1.4.0") // build.gradle -implementation 'androidx.annotation:annotation-experimental:1.4.0-dev01' +implementation 'androidx.annotation:annotation-experimental:1.4.0' // build.gradle.kts with version catalogs: implementation(libs.annotation-experimental) # libs.versions.toml [versions] -annotation-experimental = "1.4.0-dev01" +annotation-experimental = "1.4.0" [libraries] annotation-experimental = { module = "androidx.annotation:annotation-experimental", @@ -88,7 +88,7 @@ } ``` -1.4.0-dev01 is the version this documentation was generated from; +1.4.0 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 c81ef2bf..ec71e816 100644 --- a/docs/checks/UnsafeOptInUsageWarning.md.html +++ b/docs/checks/UnsafeOptInUsageWarning.md.html @@ -23,7 +23,7 @@ Min : Lint 7.0 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [androidx.annotation:annotation-experimental](androidx_annotation_annotation-experimental.md.html) @@ -70,17 +70,17 @@ ``` // build.gradle.kts -implementation("androidx.annotation:annotation-experimental:1.4.0-dev01") +implementation("androidx.annotation:annotation-experimental:1.4.0") // build.gradle -implementation 'androidx.annotation:annotation-experimental:1.4.0-dev01' +implementation 'androidx.annotation:annotation-experimental:1.4.0' // build.gradle.kts with version catalogs: implementation(libs.annotation-experimental) # libs.versions.toml [versions] -annotation-experimental = "1.4.0-dev01" +annotation-experimental = "1.4.0" [libraries] annotation-experimental = { module = "androidx.annotation:annotation-experimental", @@ -88,7 +88,7 @@ } ``` -1.4.0-dev01 is the version this documentation was generated from; +1.4.0 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/UnsafeRepeatOnLifecycleDetector.md.html b/docs/checks/UnsafeRepeatOnLifecycleDetector.md.html index 9b6b748d..14dde395 100644 --- a/docs/checks/UnsafeRepeatOnLifecycleDetector.md.html +++ b/docs/checks/UnsafeRepeatOnLifecycleDetector.md.html @@ -49,17 +49,17 @@ ``` // build.gradle.kts -implementation("androidx.fragment:fragment:1.7.0-alpha01") +implementation("androidx.fragment:fragment:1.7.0-alpha09") // build.gradle -implementation 'androidx.fragment:fragment:1.7.0-alpha01' +implementation 'androidx.fragment:fragment:1.7.0-alpha09' // build.gradle.kts with version catalogs: implementation(libs.fragment) # libs.versions.toml [versions] -fragment = "1.7.0-alpha01" +fragment = "1.7.0-alpha09" [libraries] fragment = { module = "androidx.fragment:fragment", @@ -67,7 +67,7 @@ } ``` -1.7.0-alpha01 is the version this documentation was generated from; +1.7.0-alpha09 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/UnspecifiedImmutableFlag.md.html b/docs/checks/UnspecifiedImmutableFlag.md.html index f94151be..baff5645 100644 --- a/docs/checks/UnspecifiedImmutableFlag.md.html +++ b/docs/checks/UnspecifiedImmutableFlag.md.html @@ -41,7 +41,7 @@ `FLAG_IMMUTABLE` is available since target SDK 23, and is almost always the best choice. See https://developer.android.com/guide/components/intents-filters#CreateImmutablePendingIntents - for a list of common exceptions to this rule. +for a list of common exceptions to this rule. !!! Tip This lint check has an associated quickfix available in the IDE. diff --git a/docs/checks/UnsupportedLayoutAttribute.md.html b/docs/checks/UnsupportedLayoutAttribute.md.html index cfefda44..f8990923 100644 --- a/docs/checks/UnsupportedLayoutAttribute.md.html +++ b/docs/checks/UnsupportedLayoutAttribute.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,48 +29,12 @@ : Resource files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/UnsupportedLayoutAttributeDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/UnsupportedLayoutAttributeDetectorTest.kt) Some layout attributes are not supported. Your app will still compile but it makes no sense to have them around. This can happen when refactoring a LinearLayout to a ScrollView. The orientation is no longer needed and can be removed. -!!! 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/layout/activity_home.xml:3:Error: orientation is not allowed in -RelativeLayout [UnsupportedLayoutAttribute] - - android:orientation="vertical"/> - ------------------------------ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`res/layout/activity_home.xml`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers -<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/java/com/vanniktech/lintrules/android/UnsupportedLayoutAttributeDetectorTest.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, `UnsupportedLayoutAttributeDetector.orientationInRelativeLayout`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -80,17 +44,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -98,7 +62,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/UnusedBoxWithConstraintsScope.md.html b/docs/checks/UnusedBoxWithConstraintsScope.md.html new file mode 100644 index 00000000..a5b8d44a --- /dev/null +++ b/docs/checks/UnusedBoxWithConstraintsScope.md.html @@ -0,0 +1,201 @@ + +(#) BoxWithConstraints content should use the constraints provided via BoxWithConstraintsScope + +!!! ERROR: BoxWithConstraints content should use the constraints provided via BoxWithConstraintsScope + This is an error. + +Id +: `UnusedBoxWithConstraintsScope` +Summary +: BoxWithConstraints content should use the constraints provided via BoxWithConstraintsScope +Severity +: Error +Category +: Correctness +Platform +: Any +Vendor +: Jetpack Compose +Identifier +: androidx.compose.foundation +Feedback +: https://issuetracker.google.com/issues/new?component=612128 +Min +: Lint 7.0 +Compiled +: Lint 8.0 and 8.1 +Artifact +: [androidx.compose.foundation:foundation-android](androidx_compose_foundation_foundation-android.md.html) + +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/foundation/foundation-lint/src/main/java/androidx/compose/foundation/lint/BoxWithConstraintsDetector.kt) +Tests +: [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) +Copyright Year +: 2023 + +The `content` lambda in BoxWithConstraints has a scope which will +include the incoming constraints. If this scope is ignored, then the +cost of subcomposition is being wasted and this BoxWithConstraints +should be replaced with a Box. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/foo/test.kt:9:Error: BoxWithConstraints scope is not used +[UnusedBoxWithConstraintsScope] + + BoxWithConstraints { /**/ } + -------- + + +src/foo/test.kt:10:Error: BoxWithConstraints scope is not used +[UnusedBoxWithConstraintsScope] + + BoxWithConstraints { foo } + ------- + + +src/foo/test.kt:11:Error: BoxWithConstraints scope is not used +[UnusedBoxWithConstraintsScope] + + BoxWithConstraints(content = { /**/ }) + -------- + + +src/foo/test.kt:12:Error: BoxWithConstraints scope is not used +[UnusedBoxWithConstraintsScope] + + BoxWithConstraints(propagateMinConstraints = false, content = { /**/ }) + -------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/foo/test.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package foo + +import androidx.compose.foundation.layout.BoxWithConstraints +import androidx.compose.runtime.Composable + +@Composable +fun Test() { + val foo = 123 + BoxWithConstraints { /**/ } + BoxWithConstraints { foo } + 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) +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, `BoxWithConstraintsDetector.unreferencedConstraints`. +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.foundation:foundation-android:1.7.0-alpha01") + +// build.gradle +implementation 'androidx.compose.foundation:foundation-android:1.7.0-alpha01' + +// build.gradle.kts with version catalogs: +implementation(libs.foundation-android) + +# libs.versions.toml +[versions] +foundation-android = "1.7.0-alpha01" +[libraries] +foundation-android = { + module = "androidx.compose.foundation:foundation-android", + version.ref = "foundation-android" +} +``` + +1.7.0-alpha01 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about androidx.compose.foundation:foundation-android](androidx_compose_foundation_foundation-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("UnusedBoxWithConstraintsScope") + fun method() { + BoxWithConstraints(...) + } + ``` + + or + + ```java + // Java + @SuppressWarnings("UnusedBoxWithConstraintsScope") + void method() { + BoxWithConstraints(...); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection UnusedBoxWithConstraintsScope + 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="UnusedBoxWithConstraintsScope" 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 'UnusedBoxWithConstraintsScope' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore UnusedBoxWithConstraintsScope ...` + ``` + +* 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/UnusedContentLambdaTargetStateParameter.md.html b/docs/checks/UnusedContentLambdaTargetStateParameter.md.html index c8d4ea3c..06216ed4 100644 --- a/docs/checks/UnusedContentLambdaTargetStateParameter.md.html +++ b/docs/checks/UnusedContentLambdaTargetStateParameter.md.html @@ -25,7 +25,7 @@ Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.animation:animation](androidx_compose_animation_animation.md.html) +: [androidx.compose.animation:animation-android](androidx_compose_animation_animation-android.md.html) Affects : Kotlin and Java files and test sources @@ -179,28 +179,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.animation:animation:1.5.0-beta02") +implementation("androidx.compose.animation:animation-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.animation:animation:1.5.0-beta02' +implementation 'androidx.compose.animation:animation-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.animation) +implementation(libs.animation-android) # libs.versions.toml [versions] -animation = "1.5.0-beta02" +animation-android = "1.7.0-alpha01" [libraries] -animation = { - module = "androidx.compose.animation:animation", - version.ref = "animation" +animation-android = { + module = "androidx.compose.animation:animation-android", + version.ref = "animation-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.animation:animation](androidx_compose_animation_animation.md.html). +[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: diff --git a/docs/checks/UnusedCrossfadeTargetStateParameter.md.html b/docs/checks/UnusedCrossfadeTargetStateParameter.md.html index 930fcec6..713535e1 100644 --- a/docs/checks/UnusedCrossfadeTargetStateParameter.md.html +++ b/docs/checks/UnusedCrossfadeTargetStateParameter.md.html @@ -25,7 +25,7 @@ Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.animation:animation](androidx_compose_animation_animation.md.html) +: [androidx.compose.animation:animation-android](androidx_compose_animation_animation-android.md.html) Affects : Kotlin and Java files and test sources @@ -131,28 +131,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.animation:animation:1.5.0-beta02") +implementation("androidx.compose.animation:animation-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.animation:animation:1.5.0-beta02' +implementation 'androidx.compose.animation:animation-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.animation) +implementation(libs.animation-android) # libs.versions.toml [versions] -animation = "1.5.0-beta02" +animation-android = "1.7.0-alpha01" [libraries] -animation = { - module = "androidx.compose.animation:animation", - version.ref = "animation" +animation-android = { + module = "androidx.compose.animation:animation-android", + version.ref = "animation-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.animation:animation](androidx_compose_animation_animation.md.html). +[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: diff --git a/docs/checks/UnusedMaterial3ScaffoldPaddingParameter.md.html b/docs/checks/UnusedMaterial3ScaffoldPaddingParameter.md.html index 7860b961..991a6a37 100644 --- a/docs/checks/UnusedMaterial3ScaffoldPaddingParameter.md.html +++ b/docs/checks/UnusedMaterial3ScaffoldPaddingParameter.md.html @@ -25,7 +25,7 @@ Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.material3:material3](androidx_compose_material3_material3.md.html) +: [androidx.compose.material3:material3-android](androidx_compose_material3_material3-android.md.html) Affects : Kotlin and Java files and test sources @@ -127,28 +127,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.material3:material3:1.2.0-alpha02") +implementation("androidx.compose.material3:material3-android:1.2.0-rc01") // build.gradle -implementation 'androidx.compose.material3:material3:1.2.0-alpha02' +implementation 'androidx.compose.material3:material3-android:1.2.0-rc01' // build.gradle.kts with version catalogs: -implementation(libs.material3) +implementation(libs.material3-android) # libs.versions.toml [versions] -material3 = "1.2.0-alpha02" +material3-android = "1.2.0-rc01" [libraries] -material3 = { - module = "androidx.compose.material3:material3", - version.ref = "material3" +material3-android = { + module = "androidx.compose.material3:material3-android", + version.ref = "material3-android" } ``` -1.2.0-alpha02 is the version this documentation was generated from; +1.2.0-rc01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.material3:material3](androidx_compose_material3_material3.md.html). +[Additional details about androidx.compose.material3:material3-android](androidx_compose_material3_material3-android.md.html). (##) Suppressing You can suppress false positives using one of the following mechanisms: diff --git a/docs/checks/UnusedMaterialScaffoldPaddingParameter.md.html b/docs/checks/UnusedMaterialScaffoldPaddingParameter.md.html index ae6028b3..f8448097 100644 --- a/docs/checks/UnusedMaterialScaffoldPaddingParameter.md.html +++ b/docs/checks/UnusedMaterialScaffoldPaddingParameter.md.html @@ -25,7 +25,7 @@ Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.material:material](androidx_compose_material_material.md.html) +: [androidx.compose.material:material-android](androidx_compose_material_material-android.md.html) Affects : Kotlin and Java files and test sources @@ -127,28 +127,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.material:material:1.5.0-beta02") +implementation("androidx.compose.material:material-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.material:material:1.5.0-beta02' +implementation 'androidx.compose.material:material-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.material) +implementation(libs.material-android) # libs.versions.toml [versions] -material = "1.5.0-beta02" +material-android = "1.7.0-alpha01" [libraries] -material = { - module = "androidx.compose.material:material", - version.ref = "material" +material-android = { + module = "androidx.compose.material:material-android", + version.ref = "material-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.material:material](androidx_compose_material_material.md.html). +[Additional details about androidx.compose.material:material-android](androidx_compose_material_material-android.md.html). (##) Suppressing You can suppress false positives using one of the following mechanisms: diff --git a/docs/checks/UnusedMergeAttributes.md.html b/docs/checks/UnusedMergeAttributes.md.html index c5c56c87..cd61a81a 100644 --- a/docs/checks/UnusedMergeAttributes.md.html +++ b/docs/checks/UnusedMergeAttributes.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,49 +29,10 @@ : Resource files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/UnusedMergeAttributesDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/UnusedMergeAttributesDetectorTest.kt) Adding android, app and other attributes to won't be used by the system for custom views and hence can lead to errors. -!!! 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/layout/view_custom.xml:4:Warning: Attribute won't be used -[UnusedMergeAttributes] - - android:layout_marginTop="64dp" - ------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`res/layout/view_custom.xml`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers -<merge - xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:tools="http://schemas.android.com/tools" - 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/java/com/vanniktech/lintrules/android/UnusedMergeAttributesDetectorTest.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, `UnusedMergeAttributesDetector.androidAttribute`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -81,17 +42,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -99,7 +60,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/UnusedTransitionTargetStateParameter.md.html b/docs/checks/UnusedTransitionTargetStateParameter.md.html index f4b66334..7d1b4a83 100644 --- a/docs/checks/UnusedTransitionTargetStateParameter.md.html +++ b/docs/checks/UnusedTransitionTargetStateParameter.md.html @@ -25,7 +25,7 @@ Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.animation:animation-core](androidx_compose_animation_animation-core.md.html) +: [androidx.compose.animation:animation-core-android](androidx_compose_animation_animation-core-android.md.html) Affects : Kotlin and Java files and test sources @@ -134,28 +134,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.animation:animation-core:1.5.0-beta02") +implementation("androidx.compose.animation:animation-core-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.animation:animation-core:1.5.0-beta02' +implementation 'androidx.compose.animation:animation-core-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.animation-core) +implementation(libs.animation-core-android) # libs.versions.toml [versions] -animation-core = "1.5.0-beta02" +animation-core-android = "1.7.0-alpha01" [libraries] -animation-core = { - module = "androidx.compose.animation:animation-core", - version.ref = "animation-core" +animation-core-android = { + module = "androidx.compose.animation:animation-core-android", + version.ref = "animation-core-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.animation:animation-core](androidx_compose_animation_animation-core.md.html). +[Additional details about androidx.compose.animation:animation-core-android](androidx_compose_animation_animation-core-android.md.html). (##) Suppressing You can suppress false positives using one of the following mechanisms: diff --git a/docs/checks/UseAndroidAlpha.md.html b/docs/checks/UseAndroidAlpha.md.html index f5926613..c2249a2e 100644 --- a/docs/checks/UseAndroidAlpha.md.html +++ b/docs/checks/UseAndroidAlpha.md.html @@ -23,7 +23,7 @@ Min : Lint 7.0 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [androidx.appcompat:appcompat](androidx_appcompat_appcompat.md.html) @@ -51,17 +51,17 @@ ``` // build.gradle.kts -implementation("androidx.appcompat:appcompat:1.7.0-alpha02") +implementation("androidx.appcompat:appcompat:1.7.0-alpha03") // build.gradle -implementation 'androidx.appcompat:appcompat:1.7.0-alpha02' +implementation 'androidx.appcompat:appcompat:1.7.0-alpha03' // build.gradle.kts with version catalogs: implementation(libs.appcompat) # libs.versions.toml [versions] -appcompat = "1.7.0-alpha02" +appcompat = "1.7.0-alpha03" [libraries] appcompat = { module = "androidx.appcompat:appcompat", @@ -69,7 +69,7 @@ } ``` -1.7.0-alpha02 is the version this documentation was generated from; +1.7.0-alpha03 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 33381987..7c6468aa 100644 --- a/docs/checks/UseAppTint.md.html +++ b/docs/checks/UseAppTint.md.html @@ -23,7 +23,7 @@ Min : Lint 7.0 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [androidx.appcompat:appcompat](androidx_appcompat_appcompat.md.html) @@ -51,17 +51,17 @@ ``` // build.gradle.kts -implementation("androidx.appcompat:appcompat:1.7.0-alpha02") +implementation("androidx.appcompat:appcompat:1.7.0-alpha03") // build.gradle -implementation 'androidx.appcompat:appcompat:1.7.0-alpha02' +implementation 'androidx.appcompat:appcompat:1.7.0-alpha03' // build.gradle.kts with version catalogs: implementation(libs.appcompat) # libs.versions.toml [versions] -appcompat = "1.7.0-alpha02" +appcompat = "1.7.0-alpha03" [libraries] appcompat = { module = "androidx.appcompat:appcompat", @@ -69,7 +69,7 @@ } ``` -1.7.0-alpha02 is the version this documentation was generated from; +1.7.0-alpha03 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/UseCompatLoadingForColorStateLists.md.html b/docs/checks/UseCompatLoadingForColorStateLists.md.html index 8f36d9fa..64590f2e 100644 --- a/docs/checks/UseCompatLoadingForColorStateLists.md.html +++ b/docs/checks/UseCompatLoadingForColorStateLists.md.html @@ -23,7 +23,7 @@ Min : Lint 7.0 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [androidx.appcompat:appcompat](androidx_appcompat_appcompat.md.html) @@ -48,17 +48,17 @@ ``` // build.gradle.kts -implementation("androidx.appcompat:appcompat:1.7.0-alpha02") +implementation("androidx.appcompat:appcompat:1.7.0-alpha03") // build.gradle -implementation 'androidx.appcompat:appcompat:1.7.0-alpha02' +implementation 'androidx.appcompat:appcompat:1.7.0-alpha03' // build.gradle.kts with version catalogs: implementation(libs.appcompat) # libs.versions.toml [versions] -appcompat = "1.7.0-alpha02" +appcompat = "1.7.0-alpha03" [libraries] appcompat = { module = "androidx.appcompat:appcompat", @@ -66,7 +66,7 @@ } ``` -1.7.0-alpha02 is the version this documentation was generated from; +1.7.0-alpha03 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 1903b418..613287a1 100644 --- a/docs/checks/UseCompatLoadingForDrawables.md.html +++ b/docs/checks/UseCompatLoadingForDrawables.md.html @@ -23,7 +23,7 @@ Min : Lint 7.0 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [androidx.appcompat:appcompat](androidx_appcompat_appcompat.md.html) @@ -48,17 +48,17 @@ ``` // build.gradle.kts -implementation("androidx.appcompat:appcompat:1.7.0-alpha02") +implementation("androidx.appcompat:appcompat:1.7.0-alpha03") // build.gradle -implementation 'androidx.appcompat:appcompat:1.7.0-alpha02' +implementation 'androidx.appcompat:appcompat:1.7.0-alpha03' // build.gradle.kts with version catalogs: implementation(libs.appcompat) # libs.versions.toml [versions] -appcompat = "1.7.0-alpha02" +appcompat = "1.7.0-alpha03" [libraries] appcompat = { module = "androidx.appcompat:appcompat", @@ -66,7 +66,7 @@ } ``` -1.7.0-alpha02 is the version this documentation was generated from; +1.7.0-alpha03 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 75ebc490..00a68bf4 100644 --- a/docs/checks/UseCompatTextViewDrawableApis.md.html +++ b/docs/checks/UseCompatTextViewDrawableApis.md.html @@ -23,7 +23,7 @@ Min : Lint 7.0 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [androidx.appcompat:appcompat](androidx_appcompat_appcompat.md.html) @@ -48,17 +48,17 @@ ``` // build.gradle.kts -implementation("androidx.appcompat:appcompat:1.7.0-alpha02") +implementation("androidx.appcompat:appcompat:1.7.0-alpha03") // build.gradle -implementation 'androidx.appcompat:appcompat:1.7.0-alpha02' +implementation 'androidx.appcompat:appcompat:1.7.0-alpha03' // build.gradle.kts with version catalogs: implementation(libs.appcompat) # libs.versions.toml [versions] -appcompat = "1.7.0-alpha02" +appcompat = "1.7.0-alpha03" [libraries] appcompat = { module = "androidx.appcompat:appcompat", @@ -66,7 +66,7 @@ } ``` -1.7.0-alpha02 is the version this documentation was generated from; +1.7.0-alpha03 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 af34b36e..e11d2453 100644 --- a/docs/checks/UseCompatTextViewDrawableXml.md.html +++ b/docs/checks/UseCompatTextViewDrawableXml.md.html @@ -23,7 +23,7 @@ Min : Lint 7.0 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [androidx.appcompat:appcompat](androidx_appcompat_appcompat.md.html) @@ -52,17 +52,17 @@ ``` // build.gradle.kts -implementation("androidx.appcompat:appcompat:1.7.0-alpha02") +implementation("androidx.appcompat:appcompat:1.7.0-alpha03") // build.gradle -implementation 'androidx.appcompat:appcompat:1.7.0-alpha02' +implementation 'androidx.appcompat:appcompat:1.7.0-alpha03' // build.gradle.kts with version catalogs: implementation(libs.appcompat) # libs.versions.toml [versions] -appcompat = "1.7.0-alpha02" +appcompat = "1.7.0-alpha03" [libraries] appcompat = { module = "androidx.appcompat:appcompat", @@ -70,7 +70,7 @@ } ``` -1.7.0-alpha02 is the version this documentation was generated from; +1.7.0-alpha03 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/UseGetLayoutInflater.md.html b/docs/checks/UseGetLayoutInflater.md.html index 3227d0b8..dccb1b9c 100644 --- a/docs/checks/UseGetLayoutInflater.md.html +++ b/docs/checks/UseGetLayoutInflater.md.html @@ -100,17 +100,17 @@ ``` // build.gradle.kts -implementation("androidx.fragment:fragment:1.7.0-alpha01") +implementation("androidx.fragment:fragment:1.7.0-alpha09") // build.gradle -implementation 'androidx.fragment:fragment:1.7.0-alpha01' +implementation 'androidx.fragment:fragment:1.7.0-alpha09' // build.gradle.kts with version catalogs: implementation(libs.fragment) # libs.versions.toml [versions] -fragment = "1.7.0-alpha01" +fragment = "1.7.0-alpha09" [libraries] fragment = { module = "androidx.fragment:fragment", @@ -118,7 +118,7 @@ } ``` -1.7.0-alpha01 is the version this documentation was generated from; +1.7.0-alpha09 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/UseOfNonLambdaOffsetOverload.md.html b/docs/checks/UseOfNonLambdaOffsetOverload.md.html index b8c1d245..27c41c60 100644 --- a/docs/checks/UseOfNonLambdaOffsetOverload.md.html +++ b/docs/checks/UseOfNonLambdaOffsetOverload.md.html @@ -25,7 +25,7 @@ Compiled : Lint 8.0 and 8.1 Artifact -: [androidx.compose.foundation:foundation](androidx_compose_foundation_foundation.md.html) +: [androidx.compose.foundation:foundation-android](androidx_compose_foundation_foundation-android.md.html) Affects : Kotlin and Java files and test sources @@ -50,28 +50,28 @@ ``` // build.gradle.kts -implementation("androidx.compose.foundation:foundation:1.5.0-beta02") +implementation("androidx.compose.foundation:foundation-android:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.foundation:foundation:1.5.0-beta02' +implementation 'androidx.compose.foundation:foundation-android:1.7.0-alpha01' // build.gradle.kts with version catalogs: -implementation(libs.foundation) +implementation(libs.foundation-android) # libs.versions.toml [versions] -foundation = "1.5.0-beta02" +foundation-android = "1.7.0-alpha01" [libraries] -foundation = { - module = "androidx.compose.foundation:foundation", - version.ref = "foundation" +foundation-android = { + module = "androidx.compose.foundation:foundation-android", + version.ref = "foundation-android" } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. -[Additional details about androidx.compose.foundation:foundation](androidx_compose_foundation_foundation.md.html). +[Additional details about androidx.compose.foundation:foundation-android](androidx_compose_foundation_foundation-android.md.html). (##) Suppressing You can suppress false positives using one of the following mechanisms: diff --git a/docs/checks/UseRequireInsteadOfGet.md.html b/docs/checks/UseRequireInsteadOfGet.md.html index f23e2b35..eb1a544c 100644 --- a/docs/checks/UseRequireInsteadOfGet.md.html +++ b/docs/checks/UseRequireInsteadOfGet.md.html @@ -169,17 +169,17 @@ ``` // build.gradle.kts -implementation("androidx.fragment:fragment:1.7.0-alpha01") +implementation("androidx.fragment:fragment:1.7.0-alpha09") // build.gradle -implementation 'androidx.fragment:fragment:1.7.0-alpha01' +implementation 'androidx.fragment:fragment:1.7.0-alpha09' // build.gradle.kts with version catalogs: implementation(libs.fragment) # libs.versions.toml [versions] -fragment = "1.7.0-alpha01" +fragment = "1.7.0-alpha09" [libraries] fragment = { module = "androidx.fragment:fragment", @@ -187,7 +187,7 @@ } ``` -1.7.0-alpha01 is the version this documentation was generated from; +1.7.0-alpha09 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/UseRxSetProgress2.md.html b/docs/checks/UseRxSetProgress2.md.html index 45234c0d..e206cd67 100644 --- a/docs/checks/UseRxSetProgress2.md.html +++ b/docs/checks/UseRxSetProgress2.md.html @@ -54,17 +54,17 @@ ``` // build.gradle.kts -implementation("androidx.work:work-runtime:2.9.0-alpha01") +implementation("androidx.work:work-runtime:2.10.0-alpha01") // build.gradle -implementation 'androidx.work:work-runtime:2.9.0-alpha01' +implementation 'androidx.work:work-runtime:2.10.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.work-runtime) # libs.versions.toml [versions] -work-runtime = "2.9.0-alpha01" +work-runtime = "2.10.0-alpha01" [libraries] work-runtime = { module = "androidx.work:work-runtime", @@ -72,7 +72,7 @@ } ``` -2.9.0-alpha01 is the version this documentation was generated from; +2.10.0-alpha01 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 new file mode 100644 index 00000000..c1162759 --- /dev/null +++ b/docs/checks/UseSdkSuppress.md.html @@ -0,0 +1,143 @@ + +(#) Using `@SdkSuppress` instead of `@RequiresApi` + +!!! ERROR: Using `@SdkSuppress` instead of `@RequiresApi` + This is an error. + +Id +: `UseSdkSuppress` +Summary +: Using `@SdkSuppress` instead of `@RequiresApi` +Severity +: Error +Category +: Correctness +Platform +: Any +Vendor +: Android Open Source Project +Feedback +: https://issuetracker.google.com/issues/new?component=192708 +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/android-studio/platform/tools/base/+/mirror-goog-studio-main:lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/SdkSuppressDetector.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/SdkSuppressDetectorTest.kt) +Copyright Year +: 2022 + +In tests, you should be using `@SdkSuppress` instead of `@RequiresApi`. +The `@RequiresApi` annotation is used to propagate a version requirement +out to the caller of the API -- but the testing framework is only +looking for `@SdkSuppress`, which it uses to skip tests that are +intended for newer versions. + +!!! 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/java/test/pkg/UnitTestKotlin.kt:4:Error: Don't use @RequiresApi +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: + +`src/test/java/test/pkg/UnitTestKotlin.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +import android.widget.GridLayout +import androidx.annotation.RequiresApi + +@RequiresApi(29) // ERROR: don't use in tests, use @SdkSuppress instead +class UnitTestKotlin { + private val field1 = GridLayout(null) // OK via @RequiresApiSuppress +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`build.gradle`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~groovy linenumbers +android { + lintOptions { + 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) +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("UseSdkSuppress") + fun method() { + problematicStatement() + } + ``` + + or + + ```java + // Java + @SuppressWarnings("UseSdkSuppress") + void method() { + problematicStatement(); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection UseSdkSuppress + 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="UseSdkSuppress" 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 'UseSdkSuppress' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore UseSdkSuppress ...` + ``` + +* 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/UseSupportActionBar.md.html b/docs/checks/UseSupportActionBar.md.html index 9dcd71e7..c5291d1e 100644 --- a/docs/checks/UseSupportActionBar.md.html +++ b/docs/checks/UseSupportActionBar.md.html @@ -23,7 +23,7 @@ Min : Lint 7.0 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [androidx.appcompat:appcompat](androidx_appcompat_appcompat.md.html) @@ -48,17 +48,17 @@ ``` // build.gradle.kts -implementation("androidx.appcompat:appcompat:1.7.0-alpha02") +implementation("androidx.appcompat:appcompat:1.7.0-alpha03") // build.gradle -implementation 'androidx.appcompat:appcompat:1.7.0-alpha02' +implementation 'androidx.appcompat:appcompat:1.7.0-alpha03' // build.gradle.kts with version catalogs: implementation(libs.appcompat) # libs.versions.toml [versions] -appcompat = "1.7.0-alpha02" +appcompat = "1.7.0-alpha03" [libraries] appcompat = { module = "androidx.appcompat:appcompat", @@ -66,7 +66,7 @@ } ``` -1.7.0-alpha02 is the version this documentation was generated from; +1.7.0-alpha03 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 6e28f6d4..6558578a 100644 --- a/docs/checks/UseSwitchCompatOrMaterialCode.md.html +++ b/docs/checks/UseSwitchCompatOrMaterialCode.md.html @@ -23,7 +23,7 @@ Min : Lint 7.0 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [androidx.appcompat:appcompat](androidx_appcompat_appcompat.md.html) @@ -49,17 +49,17 @@ ``` // build.gradle.kts -implementation("androidx.appcompat:appcompat:1.7.0-alpha02") +implementation("androidx.appcompat:appcompat:1.7.0-alpha03") // build.gradle -implementation 'androidx.appcompat:appcompat:1.7.0-alpha02' +implementation 'androidx.appcompat:appcompat:1.7.0-alpha03' // build.gradle.kts with version catalogs: implementation(libs.appcompat) # libs.versions.toml [versions] -appcompat = "1.7.0-alpha02" +appcompat = "1.7.0-alpha03" [libraries] appcompat = { module = "androidx.appcompat:appcompat", @@ -67,7 +67,7 @@ } ``` -1.7.0-alpha02 is the version this documentation was generated from; +1.7.0-alpha03 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 b7105be0..554b6cf3 100644 --- a/docs/checks/UseSwitchCompatOrMaterialXml.md.html +++ b/docs/checks/UseSwitchCompatOrMaterialXml.md.html @@ -23,7 +23,7 @@ Min : Lint 7.0 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [androidx.appcompat:appcompat](androidx_appcompat_appcompat.md.html) @@ -49,17 +49,17 @@ ``` // build.gradle.kts -implementation("androidx.appcompat:appcompat:1.7.0-alpha02") +implementation("androidx.appcompat:appcompat:1.7.0-alpha03") // build.gradle -implementation 'androidx.appcompat:appcompat:1.7.0-alpha02' +implementation 'androidx.appcompat:appcompat:1.7.0-alpha03' // build.gradle.kts with version catalogs: implementation(libs.appcompat) # libs.versions.toml [versions] -appcompat = "1.7.0-alpha02" +appcompat = "1.7.0-alpha03" [libraries] appcompat = { module = "androidx.appcompat:appcompat", @@ -67,7 +67,7 @@ } ``` -1.7.0-alpha02 is the version this documentation was generated from; +1.7.0-alpha03 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/UsingMaterialAndMaterial3Libraries.md.html b/docs/checks/UsingMaterialAndMaterial3Libraries.md.html new file mode 100644 index 00000000..615f49ca --- /dev/null +++ b/docs/checks/UsingMaterialAndMaterial3Libraries.md.html @@ -0,0 +1,178 @@ + +(#) material and material3 are separate, incompatible design system libraries + +!!! WARNING: material and material3 are separate, incompatible design system libraries + This is a warning. + +Id +: `UsingMaterialAndMaterial3Libraries` +Summary +: material and material3 are separate, incompatible design system libraries +Severity +: Warning +Category +: Correctness +Platform +: Any +Vendor +: Jetpack Compose +Identifier +: androidx.compose.material3 +Feedback +: https://issuetracker.google.com/issues/new?component=612128 +Min +: Lint 7.0 +Compiled +: Lint 8.0 and 8.1 +Artifact +: [androidx.compose.material3:material3-android](androidx_compose_material3_material3-android.md.html) + +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/material3/material3-lint/src/main/java/androidx/compose/material3/lint/MaterialImportDetector.kt) +Tests +: [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) +Copyright Year +: 2023 + +material and material3 are separate design system libraries that are +incompatible with each other, as they have their own distinct theming +systems. Using components from both libraries concurrently can cause +issues: for example material components will not pick up the correct +content color from a material3 container, and vice versa. + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/foo/test.kt:4:Warning: Using a material import while also using the +material3 library [UsingMaterialAndMaterial3Libraries] + + import androidx.compose.material.Button + -------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/foo/test.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +package foo + +import androidx.compose.material.Button +import androidx.compose.material.ExperimentalMaterialApi +import androidx.compose.material3.Button +import androidx.compose.material.ripple.rememberRipple +import androidx.compose.material.icons.Icons +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) +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, `MaterialImportDetector.material_imports`. +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.material3:material3-android:1.2.0-rc01") + +// build.gradle +implementation 'androidx.compose.material3:material3-android:1.2.0-rc01' + +// build.gradle.kts with version catalogs: +implementation(libs.material3-android) + +# libs.versions.toml +[versions] +material3-android = "1.2.0-rc01" +[libraries] +material3-android = { + module = "androidx.compose.material3:material3-android", + version.ref = "material3-android" +} +``` + +1.2.0-rc01 is the version this documentation was generated from; +there may be newer versions available. + +[Additional details about androidx.compose.material3:material3-android](androidx_compose_material3_material3-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("UsingMaterialAndMaterial3Libraries") + fun method() { + problematicStatement() + } + ``` + + or + + ```java + // Java + @SuppressWarnings("UsingMaterialAndMaterial3Libraries") + void method() { + problematicStatement(); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection UsingMaterialAndMaterial3Libraries + 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="UsingMaterialAndMaterial3Libraries" 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 'UsingMaterialAndMaterial3Libraries' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore UsingMaterialAndMaterial3Libraries ...` + ``` + +* 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/UsingOnClickInXml.md.html b/docs/checks/UsingOnClickInXml.md.html index 2a2f02c1..0c14f262 100644 --- a/docs/checks/UsingOnClickInXml.md.html +++ b/docs/checks/UsingOnClickInXml.md.html @@ -23,7 +23,7 @@ Min : Lint 7.0 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [androidx.appcompat:appcompat](androidx_appcompat_appcompat.md.html) @@ -49,17 +49,17 @@ ``` // build.gradle.kts -implementation("androidx.appcompat:appcompat:1.7.0-alpha02") +implementation("androidx.appcompat:appcompat:1.7.0-alpha03") // build.gradle -implementation 'androidx.appcompat:appcompat:1.7.0-alpha02' +implementation 'androidx.appcompat:appcompat:1.7.0-alpha03' // build.gradle.kts with version catalogs: implementation(libs.appcompat) # libs.versions.toml [versions] -appcompat = "1.7.0-alpha02" +appcompat = "1.7.0-alpha03" [libraries] appcompat = { module = "androidx.appcompat:appcompat", @@ -67,7 +67,7 @@ } ``` -1.7.0-alpha02 is the version this documentation was generated from; +1.7.0-alpha03 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/VectorDrawableCompat.md.html b/docs/checks/VectorDrawableCompat.md.html index da23a9b6..40893ad5 100644 --- a/docs/checks/VectorDrawableCompat.md.html +++ b/docs/checks/VectorDrawableCompat.md.html @@ -39,6 +39,9 @@ `build.gradle` file, and second, use `app:srcCompat` instead of `android:src` to refer to vector drawables. +!!! Tip + This lint check has an associated quickfix available in the IDE. + (##) Suppressing You can suppress false positives using one of the following mechanisms: diff --git a/docs/checks/VisibleForTests.md.html b/docs/checks/VisibleForTests.md.html index 9f3d0f27..00cfd2e6 100644 --- a/docs/checks/VisibleForTests.md.html +++ b/docs/checks/VisibleForTests.md.html @@ -29,19 +29,32 @@ Copyright Year : 2017 -With the `@VisibleForTesting` annotation you can specify an `otherwise=` -attribute which specifies the intended visibility if the method had not -been made more widely visible for the tests. - This check looks for accesses from production code (e.g. not tests) where the access would not have been allowed with the intended production visibility. +Depending on your development environment, you may be able to use an +`@VisibleForTesting` annotation to specify the intended visibility if +the method had not been more widely visible for the tests. + +When using `androidx.annotations.VisibleForTesting`, the production +visibility is assumed to be private unless specified with the +`otherwise=` parameter. +`com.google.common.annotations.VisibleForTesting` and +`com.android.internal.annotations.VisibleForTesting` work similarly with +their own parameters called `productionVisibility` and `visibility`. + +If instead you use `org.jetbrains.annotations.VisibleForTesting`, there +is no such parameter, and the production visibility is instead assumed +to be "one step down" from the testing visibility. For example, if the +testing visibility is public, the production visibility is assumed to be +package-private. + (##) Example Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/Code.kt:4:Warning: This method should only be accessed from tests or +src/Code.kt:3:Warning: This method should only be accessed from tests or within private scope [VisibleForTests] ProductionCode().initialize() // Not allowed; this method is intended to be private diff --git a/docs/checks/Wakelock.md.html b/docs/checks/Wakelock.md.html index affa48d6..d58d99f6 100644 --- a/docs/checks/Wakelock.md.html +++ b/docs/checks/Wakelock.md.html @@ -19,13 +19,13 @@ Feedback : https://issuetracker.google.com/issues/new?component=192708 Affects -: Class files +: 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/WakelockDetector.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/WakelockDetector.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/WakelockDetectorTest.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/WakelockDetectorTest.kt) Copyright Year : 2012 @@ -45,49 +45,76 @@ Here is an example of lint warnings produced by this check: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -src/test/pkg/WakelockActivity1.java:15:Warning: Found a wakelock -acquire() but no release() calls anywhere [Wakelock] +src/test/pkg/WakelockActivity3.java:13:Warning: The release() call is +not always reached (because of a possible exception in the path +acquire() → randomCall() → exit; use try/finally to ensure release is +always called) [Wakelock] - mWakeLock.acquire(); // Never released - ------- + lock.release(); // Should be in finally block + ------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the source file referenced above: -`src/test/pkg/WakelockActivity1.java`: +`src/test/pkg/WakelockActivity3.java`: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers package test.pkg; import android.app.Activity; -import android.os.Bundle; import android.os.PowerManager; -public class WakelockActivity1 extends Activity { - private PowerManager.WakeLock mWakeLock; - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); +public class WakelockActivity3 extends Activity { + void wrongFlow() { PowerManager manager = (PowerManager) getSystemService(POWER_SERVICE); - mWakeLock = manager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "Test"); - mWakeLock.acquire(); // Never released + PowerManager.WakeLock lock = + manager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "Test"); + lock.acquire(); + randomCall(); + lock.release(); // Should be in finally block + } + + static void randomCall() { + 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.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/WakelockDetectorTest.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, `WakelockDetector.test1`. -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("Wakelock") + fun method() { + acquire(...) + } + ``` + + or + + ```java + // Java + @SuppressWarnings("Wakelock") + void method() { + acquire(...); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection Wakelock + 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: diff --git a/docs/checks/WakelockTimeout.md.html b/docs/checks/WakelockTimeout.md.html index 41c1923a..92dd4a95 100644 --- a/docs/checks/WakelockTimeout.md.html +++ b/docs/checks/WakelockTimeout.md.html @@ -23,9 +23,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/WakelockDetector.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/WakelockDetector.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/WakelockDetectorTest.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/WakelockDetectorTest.kt) Copyright Year : 2012 @@ -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/WakelockDetectorTest.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/WakelockDetectorTest.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/WearBackNavigation.md.html b/docs/checks/WearBackNavigation.md.html index 10de2c0c..b446de78 100644 --- a/docs/checks/WearBackNavigation.md.html +++ b/docs/checks/WearBackNavigation.md.html @@ -21,7 +21,7 @@ Affects : Resource files Editing -: This check can *not* run live in the IDE editor +: This check runs on the fly in the IDE editor See : https://developer.android.com/training/wearables/views/exit#disabling-swipe-to-dismiss Implementation @@ -94,6 +94,20 @@ You can suppress false positives using one of the following mechanisms: +* Adding the suppression attribute `tools:ignore="WearBackNavigation"` + 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"?> + <item xmlns:tools="http://schemas.android.com/tools" + tools:ignore="WearBackNavigation" ...> + ... + </item> + ``` + * 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: diff --git a/docs/checks/WearMaterialTheme.md.html b/docs/checks/WearMaterialTheme.md.html new file mode 100644 index 00000000..6ffa7667 --- /dev/null +++ b/docs/checks/WearMaterialTheme.md.html @@ -0,0 +1,135 @@ + +(#) Using not non-Wear `MaterialTheme` in a Wear OS project + +!!! ERROR: Using not non-Wear `MaterialTheme` in a Wear OS project + This is an error. + +Id +: `WearMaterialTheme` +Summary +: Using not non-Wear `MaterialTheme` in a Wear OS project +Severity +: Error +Category +: Correctness +Platform +: Android +Vendor +: Android Open Source Project +Feedback +: https://issuetracker.google.com/issues/new?component=192708 +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/WearMaterialThemeDetector.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/WearMaterialThemeDetectorTest.kt) +Copyright Year +: 2023 + +Wear projects should use `androidx.wear.compose.material.MaterialTheme` +instead of `androidx.compose.material.MaterialTheme` + +(##) Example + +Here is an example of lint warnings produced by this check: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text +src/test/pkg/BadImport.java:3:Error: Don't use +androidx.compose.material.MaterialTheme in a Wear OS project; use +androidx.wear.compose.material.MaterialTheme instead +[WearMaterialTheme] + +import androidx.compose.material.MaterialTheme; // ERROR +-------------------------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here is the source file referenced above: + +`src/test/pkg/BadImport.java`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers +package test.pkg; + +import androidx.compose.material.MaterialTheme; // ERROR +import androidx.wear.compose.material.MaterialTheme; // OK + +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) +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, `WearMaterialThemeDetector.testJava`. +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("WearMaterialTheme") + fun method() { + problematicStatement() + } + ``` + + or + + ```java + // Java + @SuppressWarnings("WearMaterialTheme") + void method() { + problematicStatement(); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection WearMaterialTheme + 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="WearMaterialTheme" 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 'WearMaterialTheme' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore WearMaterialTheme ...` + ``` + +* 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/WearRecents.md.html b/docs/checks/WearRecents.md.html new file mode 100644 index 00000000..3464d53e --- /dev/null +++ b/docs/checks/WearRecents.md.html @@ -0,0 +1,151 @@ + +(#) Wear OS: Recents and app resume + +!!! WARNING: Wear OS: Recents and app resume + This is a warning. + +Id +: `WearRecents` +Summary +: Wear OS: Recents and app resume +Severity +: Warning +Category +: Usability +Platform +: Android +Vendor +: Android Open Source Project +Feedback +: https://issuetracker.google.com/issues/new?component=192708 +Affects +: Kotlin and Java files and manifest files +Editing +: This check runs on the fly in the IDE editor +See +: https://developer.android.com/training/wearables/apps/launcher +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/WearRecentsDetector.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/WearRecentsDetectorTest.kt) +Copyright Year +: 2023 + +In recents, correctly represent your app's activities, consistent with +device implementation. + +!!! 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:8:Warning: Set taskAffinity for Wear activities to +make them appear correctly in recents [WearRecents] + + <activity android:name=".MainActivity" /> + ----------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +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" + android:versionCode="1" + android:versionName="1.0"> + <uses-sdk android:minSdkVersion="30" /> + <uses-feature android:name="android.hardware.type.watch" /> + <application android:icon="@drawable/icon" android:label="@string/app_name"> + <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) +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="WearRecents"` 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 tools:ignore="WearRecents" .../> + ... + </manifest> + ``` + +* Using a suppression annotation like this on the enclosing + element: + + ```kt + // Kotlin + @Suppress("WearRecents") + fun method() { + problematicStatement() + } + ``` + + or + + ```java + // Java + @SuppressWarnings("WearRecents") + void method() { + problematicStatement(); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection WearRecents + 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="WearRecents" 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 'WearRecents' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore WearRecents ...` + ``` + +* 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/WearSplashScreen.md.html b/docs/checks/WearSplashScreen.md.html new file mode 100644 index 00000000..f7836585 --- /dev/null +++ b/docs/checks/WearSplashScreen.md.html @@ -0,0 +1,97 @@ + +(#) Wear: Use `SplashScreen` library + +!!! WARNING: Wear: Use `SplashScreen` library + This is a warning. + +Id +: `WearSplashScreen` +Summary +: Wear: Use `SplashScreen` library +Severity +: Warning +Category +: Usability +Platform +: Android +Vendor +: Android Open Source Project +Feedback +: https://issuetracker.google.com/issues/new?component=192708 +Affects +: Manifest files +Editing +: This check runs on the fly in the IDE editor +See +: https://developer.android.com/training/wearables/apps/splash-screen +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/WearSplashScreenDetector.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/WearSplashScreenDetectorTest.kt) +Copyright Year +: 2023 + +If your app implements a custom splash screen or uses a launcher theme, +migrate your app to the `SplashScreen` library, available in Jetpack, to +ensure it displays correctly on all Wear OS versions. Starting in +Android 12, the system always applies the new Android system default +splash screen on cold and warm starts for all apps. By default, this +system default splash screen is constructed using your app’s launcher +icon element and the `windowBackground` of your theme (if it's a single +color). If you do not migrate your app, your app launch experience on +Android 12 and higher will be either degraded or may have unintended +results. + +(##) Suppressing + +You can suppress false positives using one of the following mechanisms: + +* Adding the suppression attribute `tools:ignore="WearSplashScreen"` + 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 tools:ignore="WearSplashScreen" .../> + ... + </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="WearSplashScreen" 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 'WearSplashScreen' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore WearSplashScreen ...` + ``` + +* 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/WorkerHasAPublicModifier.md.html b/docs/checks/WorkerHasAPublicModifier.md.html index 7b3e66ef..1605745f 100644 --- a/docs/checks/WorkerHasAPublicModifier.md.html +++ b/docs/checks/WorkerHasAPublicModifier.md.html @@ -52,17 +52,17 @@ ``` // build.gradle.kts -implementation("androidx.work:work-runtime:2.9.0-alpha01") +implementation("androidx.work:work-runtime:2.10.0-alpha01") // build.gradle -implementation 'androidx.work:work-runtime:2.9.0-alpha01' +implementation 'androidx.work:work-runtime:2.10.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.work-runtime) # libs.versions.toml [versions] -work-runtime = "2.9.0-alpha01" +work-runtime = "2.10.0-alpha01" [libraries] work-runtime = { module = "androidx.work:work-runtime", @@ -70,7 +70,7 @@ } ``` -2.9.0-alpha01 is the version this documentation was generated from; +2.10.0-alpha01 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/WrongAnnotationOrder.md.html b/docs/checks/WrongAnnotationOrder.md.html index 37c3b1a3..ed49a0a2 100644 --- a/docs/checks/WrongAnnotationOrder.md.html +++ b/docs/checks/WrongAnnotationOrder.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,50 +29,10 @@ : Kotlin and Java files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/AnnotationOrderDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/AnnotationOrderDetectorTest.kt) Annotations should always be applied with the same order to have consistency across the code base. -!!! 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/MyTest.java:5:Warning: Annotations are in wrong order. Should be -@Override @Test [WrongAnnotationOrder] - - @Test @Override int something; - --------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`src/foo/MyTest.java`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers -package foo; - -public class MyTest { - void something() { - @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/java/com/vanniktech/lintrules/android/AnnotationOrderDetectorTest.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, `AnnotationOrderDetector.overrideComesFirstOnVariables`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -82,17 +42,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -100,7 +60,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/WrongCommentType.md.html b/docs/checks/WrongCommentType.md.html new file mode 100644 index 00000000..3cbf16c6 --- /dev/null +++ b/docs/checks/WrongCommentType.md.html @@ -0,0 +1,159 @@ + +(#) Wrong Comment Type + +!!! WARNING: Wrong Comment Type + This is a warning. + +Id +: `WrongCommentType` +Summary +: Wrong Comment Type +Severity +: Warning +Category +: Correctness +Platform +: Any +Vendor +: Android Open Source Project +Feedback +: https://issuetracker.google.com/issues/new?component=192708 +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/WrongCommentTypeDetector.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/WrongCommentTypeDetectorTest.kt) +Copyright Year +: 2023 + +This check flags any block comments which look like they had been +intended to be KDoc or javadoc comments instead. + +If you really want to use Javadoc-like constructs in a block comment, +there's a convention you can use: include `(non-Javadoc)` somewhere in +the comment, e.g. +``` + /* (non-Javadoc) + * @see org.xml.sax.helpers.DefaultHandler#setDocumentLocator(org.xml.sax.Locator) + */ + @Override + public void setDocumentLocator(Locator locator) { +``` +(see https://stackoverflow.com/questions/5172841/non-javadoc-meaning) + +!!! 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/ParentClass.kt:2:Warning: This block comment looks like it was +intended to be a KDoc comment [WrongCommentType] + + * @see tags point to KDoc + ----------------------- + + +src/Test.java:2:Warning: This block comment looks like it was intended +to be a javadoc comment [WrongCommentType] + + /* @since 1.5 */ String text; + ---------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Here are the relevant source files: + +`src/ParentClass.kt`: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~kotlin linenumbers +/* Block comment + * @see tags point to KDoc + */ +open class ParentClass { + /** Ok, already KDoc */ + open fun someMethod(arg: Int) { } + /* 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) +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("WrongCommentType") + fun method() { + problematicStatement() + } + ``` + + or + + ```java + // Java + @SuppressWarnings("WrongCommentType") + void method() { + problematicStatement(); + } + ``` + +* Using a suppression comment like this on the line above: + + ```kt + //noinspection WrongCommentType + 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="WrongCommentType" 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 'WrongCommentType' + } + ``` + In Android projects this should be nested inside an `android { }` + block. + +* For manual invocations of `lint`, using the `--ignore` flag: + ``` + $ lint --ignore WrongCommentType ...` + ``` + +* 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/WrongConstraintLayoutUsage.md.html b/docs/checks/WrongConstraintLayoutUsage.md.html index e8800447..02ca91ae 100644 --- a/docs/checks/WrongConstraintLayoutUsage.md.html +++ b/docs/checks/WrongConstraintLayoutUsage.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,49 +29,9 @@ : Resource files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/WrongConstraintLayoutUsageDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/WrongConstraintLayoutUsageDetectorTest.kt) Instead of using left & right constraints start & end should be used. -!!! 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/layout/ids.xml:6:Error: This attribute won't work with RTL. Please -use layout_constraintStart_toStartOf instead. -[WrongConstraintLayoutUsage] - - app:layout_constraintLeft_toLeftOf="parent"/> - ---------------------------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`res/layout/ids.xml`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers -<TextView - xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:app="http://schemas.android.com/apk/res-auto" - 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/java/com/vanniktech/lintrules/android/WrongConstraintLayoutUsageDetectorTest.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, `WrongConstraintLayoutUsageDetector.constraintLeftToLeftOf`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -81,17 +41,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -99,7 +59,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/WrongDrawableName.md.html b/docs/checks/WrongDrawableName.md.html index 6fa18ef2..e1f5670e 100644 --- a/docs/checks/WrongDrawableName.md.html +++ b/docs/checks/WrongDrawableName.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,10 +29,6 @@ : Resource files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/WrongDrawableNameDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/WrongDrawableNameDetectorTest.kt) The drawable file name should be prefixed with one of the following: animated_selector, animated_vector_, background_, ic_, img_, @@ -40,34 +36,6 @@ improve consistency in your code base as well as enforce a certain structure. -(##) Example - -Here is an example of lint warnings produced by this check: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -res/drawable/random.xml:Warning: Drawable does not start with one of the -following prefixes: animated_selector, animated_vector_, background_, -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/java/com/vanniktech/lintrules/android/WrongDrawableNameDetectorTest.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, `WrongDrawableNameDetector.randomDrawableFile`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -77,17 +45,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -95,7 +63,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/WrongGlobalIconColor.md.html b/docs/checks/WrongGlobalIconColor.md.html index 6af7803e..12985310 100644 --- a/docs/checks/WrongGlobalIconColor.md.html +++ b/docs/checks/WrongGlobalIconColor.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,54 +29,11 @@ : Resource files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/WrongGlobalIconColorDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/WrongGlobalIconColorDetectorTest.kt) In order to reuse icons, it's best if all icons share the same color and can be used at every position in the app. On the target side, tinting can be applied. -!!! 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/drawable/ic_drawable.xml:7:Warning: Should use global tint color -[WrongGlobalIconColor] - - android:fillColor="#FF0000" - ------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`res/drawable/ic_drawable.xml`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers -<vector xmlns:android="http://schemas.android.com/apk/res/android" - android:height="24dp" - android:viewportHeight="24" - android:viewportWidth="24" - android:width="24dp"> - <path - android:fillColor="#FF0000" - 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/java/com/vanniktech/lintrules/android/WrongGlobalIconColorDetectorTest.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, `WrongGlobalIconColorDetector.flagsIcDrawable`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -86,17 +43,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -104,7 +61,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/WrongLayoutName.md.html b/docs/checks/WrongLayoutName.md.html index 1ddd6f0e..f25873f6 100644 --- a/docs/checks/WrongLayoutName.md.html +++ b/docs/checks/WrongLayoutName.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,43 +29,12 @@ : Resource files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/WrongLayoutNameDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/WrongLayoutNameDetectorTest.kt) The layout file name should be prefixed with one of the following: activity_, view_, fragment_, dialog_, bottom_sheet_, adapter_item_, divider_, space_, popup_window_. This will improve consistency in your code base as well as enforce a certain structure. -(##) Example - -Here is an example of lint warnings produced by this check: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~text -res/layout/random.xml:Warning: Layout does not start with one of the -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/java/com/vanniktech/lintrules/android/WrongLayoutNameDetectorTest.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, `WrongLayoutNameDetector.randomLayoutFile`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -75,17 +44,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -93,7 +62,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/WrongMenuIdFormat.md.html b/docs/checks/WrongMenuIdFormat.md.html index 22664cdf..91e4c178 100644 --- a/docs/checks/WrongMenuIdFormat.md.html +++ b/docs/checks/WrongMenuIdFormat.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,46 +29,10 @@ : Resource files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/WrongMenuIdFormatDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/WrongMenuIdFormatDetectorTest.kt) Menu ids should be in lowerCamelCase format. This has the benefit of saving an unnecessary underscore and also just looks nicer. -!!! 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/menu/ids.xml:2:Warning: Id is not in lowerCamelCaseFormat -[WrongMenuIdFormat] - - <item android:id="@+id/CamelCase"/> - -------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`res/menu/ids.xml`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers -<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/java/com/vanniktech/lintrules/android/WrongMenuIdFormatDetectorTest.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, `WrongMenuIdFormatDetector.idCamelCase`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -78,17 +42,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -96,7 +60,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/WrongRequiresOptIn.md.html b/docs/checks/WrongRequiresOptIn.md.html index 35475a06..01f91baa 100644 --- a/docs/checks/WrongRequiresOptIn.md.html +++ b/docs/checks/WrongRequiresOptIn.md.html @@ -23,7 +23,7 @@ Min : Lint 7.0 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [androidx.annotation:annotation-experimental](androidx_annotation_annotation-experimental.md.html) @@ -52,17 +52,17 @@ ``` // build.gradle.kts -implementation("androidx.annotation:annotation-experimental:1.4.0-dev01") +implementation("androidx.annotation:annotation-experimental:1.4.0") // build.gradle -implementation 'androidx.annotation:annotation-experimental:1.4.0-dev01' +implementation 'androidx.annotation:annotation-experimental:1.4.0' // build.gradle.kts with version catalogs: implementation(libs.annotation-experimental) # libs.versions.toml [versions] -annotation-experimental = "1.4.0-dev01" +annotation-experimental = "1.4.0" [libraries] annotation-experimental = { module = "androidx.annotation:annotation-experimental", @@ -70,7 +70,7 @@ } ``` -1.4.0-dev01 is the version this documentation was generated from; +1.4.0 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 90dfd3f2..ed3a3a75 100644 --- a/docs/checks/WrongResourceImportAlias.md.html +++ b/docs/checks/WrongResourceImportAlias.md.html @@ -108,17 +108,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -126,7 +126,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html). diff --git a/docs/checks/WrongTestMethodName.md.html b/docs/checks/WrongTestMethodName.md.html index a90c036e..8222fc58 100644 --- a/docs/checks/WrongTestMethodName.md.html +++ b/docs/checks/WrongTestMethodName.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,50 +29,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/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/WrongTestMethodNameDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/WrongTestMethodNameDetectorTest.kt) The @Test annotation already states that this is a test hence the test prefix is not necessary. -!!! 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/MyTest.java:6:Warning: Test method starts with test -[WrongTestMethodName] - - @Test public void testSomething() { } - ------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`src/foo/MyTest.java`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~java linenumbers -package foo; - -import org.junit.Test; - -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/java/com/vanniktech/lintrules/android/WrongTestMethodNameDetectorTest.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, `WrongTestMethodNameDetector.methodStartingWithTestAndJUnitTestAnnotation`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -82,17 +42,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -100,7 +60,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/WrongViewIdFormat.md.html b/docs/checks/WrongViewIdFormat.md.html index 2b79e7ea..a93f78ab 100644 --- a/docs/checks/WrongViewIdFormat.md.html +++ b/docs/checks/WrongViewIdFormat.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,45 +29,10 @@ : Resource files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/WrongViewIdFormatDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/WrongViewIdFormatDetectorTest.kt) View ids should be in lowerCamelCase format. This has the benefit of saving an unnecessary underscore and also just looks nicer. -!!! 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/layout/ids.xml:2:Warning: Id is not in lowerCamelCaseFormat -[WrongViewIdFormat] - - android:id="@+id/CamelCase"/> - -------------- -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`res/layout/ids.xml`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~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/java/com/vanniktech/lintrules/android/WrongViewIdFormatDetectorTest.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, `WrongViewIdFormatDetector.idCamelCase`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -77,17 +42,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -95,7 +60,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/XmlSpacing.md.html b/docs/checks/XmlSpacing.md.html index 1ac0ccdf..6e0b2a78 100644 --- a/docs/checks/XmlSpacing.md.html +++ b/docs/checks/XmlSpacing.md.html @@ -19,9 +19,9 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact : [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) @@ -29,74 +29,10 @@ : Resource files Editing : This check runs on the fly in the IDE editor -Implementation -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/main/java/com/vanniktech/lintrules/android/XmlSpacingDetector.kt) -Tests -: [Source Code](https://github.com/vanniktech/lint-rules/tree/master/lint-rules-android-lint/src/test/java/com/vanniktech/lintrules/android/XmlSpacingDetectorTest.kt) Having newlines in xml files just adds noise and should be avoided. The only exception is the new lint at the end of the file. -!!! 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/layout/activity_home.xml:1:Warning: Unnecessary new line at line 1 -[XmlSpacing] - - -^ - - -res/layout/activity_home.xml:3:Warning: Unnecessary new line at line 3 -[XmlSpacing] - - -^ - - -res/layout/activity_home.xml:7:Warning: Unnecessary new line at line 7 -[XmlSpacing] - - -^ - - -res/layout/activity_home.xml:9:Warning: Unnecessary new line at line 9 -[XmlSpacing] - - -^ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Here is the source file referenced above: - -`res/layout/activity_home.xml`: -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~xml linenumbers - -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"> - - <TextView - 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/java/com/vanniktech/lintrules/android/XmlSpacingDetectorTest.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, `XmlSpacingDetector.layoutXmlFileWithNewLines`. -To report a problem with this extracted sample, visit -https://github.com/vanniktech/lint-rules/issues. - (##) Including !!! @@ -106,17 +42,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -124,7 +60,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. [Additional details about com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html). diff --git a/docs/checks/androidx_activity_activity-compose.md.html b/docs/checks/androidx_activity_activity-compose.md.html index 5cd310b9..efcf4e92 100644 --- a/docs/checks/androidx_activity_activity-compose.md.html +++ b/docs/checks/androidx_activity_activity-compose.md.html @@ -17,13 +17,14 @@ Compiled : Lint 8.0 and 8.1 Artifact -: androidx.activity:activity-compose:1.8.0-alpha05 +: androidx.activity:activity-compose:1.9.0-alpha02 (##) Included Issues |Issue Id |Issue Description | |----------------------------------------------------------|---------------------------------------------------------------------------------| |[LaunchDuringComposition](LaunchDuringComposition.md.html)|Calls to `launch` should happen inside of a SideEffect and not during composition| +|[NoCollectCallFound](NoCollectCallFound.md.html) |You must call collect on the given progress flow when using PredictiveBackHandler| (##) Including @@ -33,17 +34,17 @@ ``` // build.gradle.kts -implementation("androidx.activity:activity-compose:1.8.0-alpha05") +implementation("androidx.activity:activity-compose:1.9.0-alpha02") // build.gradle -implementation 'androidx.activity:activity-compose:1.8.0-alpha05' +implementation 'androidx.activity:activity-compose:1.9.0-alpha02' // build.gradle.kts with version catalogs: implementation(libs.activity-compose) # libs.versions.toml [versions] -activity-compose = "1.8.0-alpha05" +activity-compose = "1.9.0-alpha02" [libraries] activity-compose = { module = "androidx.activity:activity-compose", @@ -51,12 +52,13 @@ } ``` -1.8.0-alpha05 is the version this documentation was generated from; +1.9.0-alpha02 is the version this documentation was generated from; there may be newer versions available. (##) Changes * 1.4.0: First version includes LaunchDuringComposition. +* 1.8.0: Adds NoCollectCallFound. (##) Version Compatibility @@ -64,11 +66,11 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 1.8.0-alpha05|2023/06/07| 1| Yes| 8.0 and 8.1|8.0 and 8.1| -| 1.8.0-alpha04|2023/05/10| 1| Yes| 8.0 and 8.1|8.0 and 8.1| -| 1.8.0-alpha03|2023/04/12| 1| Yes| 8.0 and 8.1|8.0 and 8.1| -| 1.8.0-alpha02|2023/03/08| 1| Yes| 8.0 and 8.1| 7.0| -| 1.8.0-alpha01|2023/02/08| 1| Yes| 7.3 and 7.4| 7.0| +| 1.9.0-alpha02|2024/01/24| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.9.0-alpha01|2023/11/29| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.8.2|2023/12/13| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.8.1|2023/11/15| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.8.0|2023/10/04| 2| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.7.2|2023/05/24| 1| Yes| 8.0 and 8.1| 7.0| | 1.7.1|2023/04/19| 1| Yes| 8.0 and 8.1| 7.0| | 1.7.0|2023/03/22| 1| Yes| 8.0 and 8.1| 7.0| diff --git a/docs/checks/androidx_activity_activity.md.html b/docs/checks/androidx_activity_activity.md.html index 8980c631..9f7c7d7e 100644 --- a/docs/checks/androidx_activity_activity.md.html +++ b/docs/checks/androidx_activity_activity.md.html @@ -18,7 +18,7 @@ Compiled : Lint 8.0 and 8.1 Artifact -: androidx.activity:activity:1.8.0-alpha05 +: androidx.activity:activity:1.9.0-alpha02 (##) Included Issues @@ -34,17 +34,17 @@ ``` // build.gradle.kts -implementation("androidx.activity:activity:1.8.0-alpha05") +implementation("androidx.activity:activity:1.9.0-alpha02") // build.gradle -implementation 'androidx.activity:activity:1.8.0-alpha05' +implementation 'androidx.activity:activity:1.9.0-alpha02' // build.gradle.kts with version catalogs: implementation(libs.activity) # libs.versions.toml [versions] -activity = "1.8.0-alpha05" +activity = "1.9.0-alpha02" [libraries] activity = { module = "androidx.activity:activity", @@ -52,7 +52,7 @@ } ``` -1.8.0-alpha05 is the version this documentation was generated from; +1.9.0-alpha02 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -66,11 +66,11 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 1.8.0-alpha05|2023/06/07| 1| Yes| 8.0 and 8.1|8.0 and 8.1| -| 1.8.0-alpha04|2023/05/10| 1| Yes| 8.0 and 8.1|8.0 and 8.1| -| 1.8.0-alpha03|2023/04/12| 1| Yes| 8.0 and 8.1|8.0 and 8.1| -| 1.8.0-alpha02|2023/03/08| 1| Yes| 8.0 and 8.1| 7.0| -| 1.8.0-alpha01|2023/02/08| 1| Yes| 7.3 and 7.4| 7.0| +| 1.9.0-alpha02|2024/01/24| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.9.0-alpha01|2023/11/29| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.8.2|2023/12/13| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.8.1|2023/11/15| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.8.0|2023/10/04| 1| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.7.2|2023/05/24| 1| Yes| 8.0 and 8.1| 7.0| | 1.7.1|2023/04/19| 1| Yes| 8.0 and 8.1| 7.0| | 1.7.0|2023/03/22| 1| Yes| 8.0 and 8.1| 7.0| diff --git a/docs/checks/androidx_annotation_annotation-experimental.md.html b/docs/checks/androidx_annotation_annotation-experimental.md.html index e26aca30..b8ce3623 100644 --- a/docs/checks/androidx_annotation_annotation-experimental.md.html +++ b/docs/checks/androidx_annotation_annotation-experimental.md.html @@ -18,9 +18,9 @@ Min : Lint 7.0 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact -: androidx.annotation:annotation-experimental:1.4.0-dev01 +: androidx.annotation:annotation-experimental:1.4.0 (##) Included Issues @@ -39,17 +39,17 @@ ``` // build.gradle.kts -implementation("androidx.annotation:annotation-experimental:1.4.0-dev01") +implementation("androidx.annotation:annotation-experimental:1.4.0") // build.gradle -implementation 'androidx.annotation:annotation-experimental:1.4.0-dev01' +implementation 'androidx.annotation:annotation-experimental:1.4.0' // build.gradle.kts with version catalogs: implementation(libs.annotation-experimental) # libs.versions.toml [versions] -annotation-experimental = "1.4.0-dev01" +annotation-experimental = "1.4.0" [libraries] annotation-experimental = { module = "androidx.annotation:annotation-experimental", @@ -57,7 +57,7 @@ } ``` -1.4.0-dev01 is the version this documentation was generated from; +1.4.0 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -67,7 +67,7 @@ * 1.1.0: Adds UnsafeOptInUsageError, UnsafeOptInUsageWarning. Removes UnsafeExperimentalUsageError, UnsafeExperimentalUsageWarning. * 1.2.0: Adds ExperimentalAnnotationRetention. -* 1.4.0-dev01: Adds WrongRequiresOptIn. +* 1.3.1: Adds WrongRequiresOptIn. (##) Version Compatibility @@ -75,7 +75,8 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 1.4.0-dev01|2023/02/08| 4| Yes| 7.3 and 7.4| 7.0| +| 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| | 1.3.0|2022/09/07| 3| Yes| 7.3 and 7.4| 7.0| | 1.2.0|2021/12/15| 3| No[^1]| 7.1| 4.1| | 1.1.0|2021/04/07| 2| Yes| 4.1| 4.1| diff --git a/docs/checks/androidx_appcompat_appcompat.md.html b/docs/checks/androidx_appcompat_appcompat.md.html index 2cf867a8..3ff62280 100644 --- a/docs/checks/androidx_appcompat_appcompat.md.html +++ b/docs/checks/androidx_appcompat_appcompat.md.html @@ -1,12 +1,10 @@ (#) androidx.appcompat:appcompat Name -: Android AppCompat Library +: AppCompat Description -: The Support Library is a static library that you can add to your Android -: application in order to use APIs that are either not available for older -: platform versions or utility APIs that aren't a part of the framework -: APIs. Compatible on devices running API 14 or later. +: Provides backwards-compatible implementations of UI-related Android SDK +: functionality, including dark mode and Material theming. License : [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) Vendor @@ -18,9 +16,9 @@ Min : Lint 7.0 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact -: androidx.appcompat:appcompat:1.7.0-alpha02 +: androidx.appcompat:appcompat:1.7.0-alpha03 (##) Included Issues @@ -45,17 +43,17 @@ ``` // build.gradle.kts -implementation("androidx.appcompat:appcompat:1.7.0-alpha02") +implementation("androidx.appcompat:appcompat:1.7.0-alpha03") // build.gradle -implementation 'androidx.appcompat:appcompat:1.7.0-alpha02' +implementation 'androidx.appcompat:appcompat:1.7.0-alpha03' // build.gradle.kts with version catalogs: implementation(libs.appcompat) # libs.versions.toml [versions] -appcompat = "1.7.0-alpha02" +appcompat = "1.7.0-alpha03" [libraries] appcompat = { module = "androidx.appcompat:appcompat", @@ -63,7 +61,7 @@ } ``` -1.7.0-alpha02 is the version this documentation was generated from; +1.7.0-alpha03 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -80,6 +78,7 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| +| 1.7.0-alpha03|2023/07/26| 10| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.7.0-alpha02|2023/02/08| 10| Yes| 7.3 and 7.4| 7.0| | 1.7.0-alpha01|2022/10/05| 10| Yes| 7.3 and 7.4| 7.0| | 1.6.1|2023/02/08| 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 new file mode 100644 index 00000000..c160b67b --- /dev/null +++ b/docs/checks/androidx_compose_animation_animation-android.md.html @@ -0,0 +1,77 @@ +(#) androidx.compose.animation:animation-android + +Name +: Compose Animation +Description +: Compose animation library +License +: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +Vendor +: Jetpack Compose +Identifier +: androidx.compose.animation +Feedback +: https://issuetracker.google.com/issues/new?component=612128 +Min +: Lint 7.0 +Compiled +: Lint 8.0 and 8.1 +Artifact +: androidx.compose.animation:animation-android:1.7.0-alpha01 + +(##) 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| + +(##) 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.7.0-alpha01") + +// build.gradle +implementation 'androidx.compose.animation:animation-android:1.7.0-alpha01' + +// build.gradle.kts with version catalogs: +implementation(libs.animation-android) + +# libs.versions.toml +[versions] +animation-android = "1.7.0-alpha01" +[libraries] +animation-android = { + module = "androidx.compose.animation:animation-android", + version.ref = "animation-android" +} +``` + +1.7.0-alpha01 is the version this documentation was generated from; +there may be newer versions available. + +(##) Changes + +* 1.5.0: First version includes UnusedContentLambdaTargetStateParameter, + UnusedCrossfadeTargetStateParameter. + +(##) Version Compatibility + +There are multiple older versions available of this library: + +| Version | Date | Issues | Compatible | Compiled | Requires | +|-------------------:|----------|-------:|------------|--------------:|---------:| +| 1.7.0-alpha01|2024/01/24| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.6.0|2024/01/24| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.4|2023/10/18| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.3|2023/10/04| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.2|2023/09/27| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.1|2023/09/06| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.0|2023/08/09| 2| Yes| 8.0 and 8.1|8.0 and 8.1| + + \ No newline at end of file diff --git a/docs/checks/androidx_compose_animation_animation-core-android.md.html b/docs/checks/androidx_compose_animation_animation-core-android.md.html new file mode 100644 index 00000000..32af25f1 --- /dev/null +++ b/docs/checks/androidx_compose_animation_animation-core-android.md.html @@ -0,0 +1,80 @@ +(#) androidx.compose.animation:animation-core-android + +Name +: Compose Animation Core +Description +: Animation engine and animation primitives that are the building blocks +: of the Compose animation library +License +: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +Vendor +: Jetpack Compose +Identifier +: androidx.compose.animation.core +Feedback +: https://issuetracker.google.com/issues/new?component=612128 +Min +: Lint 7.0 +Compiled +: Lint 8.0 and 8.1 +Artifact +: androidx.compose.animation:animation-core-android:1.7.0-alpha01 + +(##) Included Issues + +|Issue Id |Issue Description | +|------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------| +|[UnusedTransitionTargetStateParameter](UnusedTransitionTargetStateParameter.md.html)|Transition.animate* calls should use the provided targetState when defining values | +|[UnrememberedAnimatable](UnrememberedAnimatable.md.html) |Creating an Animatable during composition without using `remember` | +|[ArcAnimationSpecTypeIssue](ArcAnimationSpecTypeIssue.md.html) |ArcAnimationSpec is designed for 2D values. Particularly, for positional values such as Offset.| + +(##) 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-core-android:1.7.0-alpha01") + +// build.gradle +implementation 'androidx.compose.animation:animation-core-android:1.7.0-alpha01' + +// build.gradle.kts with version catalogs: +implementation(libs.animation-core-android) + +# libs.versions.toml +[versions] +animation-core-android = "1.7.0-alpha01" +[libraries] +animation-core-android = { + module = "androidx.compose.animation:animation-core-android", + version.ref = "animation-core-android" +} +``` + +1.7.0-alpha01 is the version this documentation was generated from; +there may be newer versions available. + +(##) Changes + +* 1.5.0: First version includes UnrememberedAnimatable, + UnusedTransitionTargetStateParameter. +* 1.7.0-alpha01: Adds ArcAnimationSpecTypeIssue. + +(##) Version Compatibility + +There are multiple older versions available of this library: + +| Version | Date | Issues | Compatible | Compiled | Requires | +|-------------------:|----------|-------:|------------|--------------:|---------:| +| 1.7.0-alpha01|2024/01/24| 3| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.6.0|2024/01/24| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.4|2023/10/18| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.3|2023/10/04| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.2|2023/09/27| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.1|2023/09/06| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.0|2023/08/09| 2| Yes| 8.0 and 8.1|8.0 and 8.1| + + \ No newline at end of file diff --git a/docs/checks/androidx_compose_foundation_foundation-android.md.html b/docs/checks/androidx_compose_foundation_foundation-android.md.html new file mode 100644 index 00000000..dbfd3b0c --- /dev/null +++ b/docs/checks/androidx_compose_foundation_foundation-android.md.html @@ -0,0 +1,83 @@ +(#) androidx.compose.foundation:foundation-android + +Name +: Compose Foundation +Description +: Higher level abstractions of the Compose UI primitives. This library is +: design system agnostic, providing the high-level building blocks for +: both application and design-system developers +License +: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +Vendor +: Jetpack Compose +Identifier +: androidx.compose.foundation +Feedback +: https://issuetracker.google.com/issues/new?component=612128 +Min +: Lint 7.0 +Compiled +: Lint 8.0 and 8.1 +Artifact +: androidx.compose.foundation:foundation-android:1.7.0-alpha01 + +(##) Included Issues + +|Issue Id |Issue Description | +|------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------| +|[FrequentlyChangedStateReadInComposition](FrequentlyChangedStateReadInComposition.md.html)|Frequently changing state should not be directly read in composable function | +|[UnrememberedMutableInteractionSource](UnrememberedMutableInteractionSource.md.html) |Creating a MutableInteractionSource during composition without using `remember` | +|[UseOfNonLambdaOffsetOverload](UseOfNonLambdaOffsetOverload.md.html) |Modifier.offset{ } is preferred over Modifier.offset() for `State` backed arguments. | +|[UnusedBoxWithConstraintsScope](UnusedBoxWithConstraintsScope.md.html) |BoxWithConstraints content should use the constraints provided via BoxWithConstraintsScope| + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("androidx.compose.foundation:foundation-android:1.7.0-alpha01") + +// build.gradle +implementation 'androidx.compose.foundation:foundation-android:1.7.0-alpha01' + +// build.gradle.kts with version catalogs: +implementation(libs.foundation-android) + +# libs.versions.toml +[versions] +foundation-android = "1.7.0-alpha01" +[libraries] +foundation-android = { + module = "androidx.compose.foundation:foundation-android", + version.ref = "foundation-android" +} +``` + +1.7.0-alpha01 is the version this documentation was generated from; +there may be newer versions available. + +(##) Changes + +* 1.5.0: First version includes FrequentlyChangedStateReadInComposition, + UseOfNonLambdaOffsetOverload. +* 1.6.0: Adds UnrememberedMutableInteractionSource, + UnusedBoxWithConstraintsScope. + +(##) Version Compatibility + +There are multiple older versions available of this library: + +| Version | Date | Issues | Compatible | Compiled | Requires | +|-------------------:|----------|-------:|------------|--------------:|---------:| +| 1.7.0-alpha01|2024/01/24| 4| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.6.0|2024/01/24| 4| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.4|2023/10/18| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.3|2023/10/04| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.2|2023/09/27| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.1|2023/09/06| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.0|2023/08/09| 2| Yes| 8.0 and 8.1|8.0 and 8.1| + + \ No newline at end of file diff --git a/docs/checks/androidx_compose_material3_material3-android.md.html b/docs/checks/androidx_compose_material3_material3-android.md.html new file mode 100644 index 00000000..cffa9469 --- /dev/null +++ b/docs/checks/androidx_compose_material3_material3-android.md.html @@ -0,0 +1,85 @@ +(#) androidx.compose.material3:material3-android + +Name +: Compose Material3 Components +Description +: Compose Material You Design Components library +License +: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +Vendor +: Jetpack Compose +Identifier +: androidx.compose.material3 +Feedback +: https://issuetracker.google.com/issues/new?component=612128 +Min +: Lint 7.0 +Compiled +: Lint 8.0 and 8.1 +Artifact +: androidx.compose.material3:material3-android:1.2.0-rc01 + +(##) Included Issues + +|Issue Id |Issue Description | +|------------------------------------------------------------------------------------------|-------------------------------------------------------------------------| +|[UsingMaterialAndMaterial3Libraries](UsingMaterialAndMaterial3Libraries.md.html) |material and material3 are separate, incompatible design system libraries| +|[UnusedMaterial3ScaffoldPaddingParameter](UnusedMaterial3ScaffoldPaddingParameter.md.html)|Scaffold content should use the padding provided as a lambda parameter | + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("androidx.compose.material3:material3-android:1.2.0-rc01") + +// build.gradle +implementation 'androidx.compose.material3:material3-android:1.2.0-rc01' + +// build.gradle.kts with version catalogs: +implementation(libs.material3-android) + +# libs.versions.toml +[versions] +material3-android = "1.2.0-rc01" +[libraries] +material3-android = { + module = "androidx.compose.material3:material3-android", + version.ref = "material3-android" +} +``` + +1.2.0-rc01 is the version this documentation was generated from; +there may be newer versions available. + +(##) Changes + +* 1.2.0-alpha02: First version includes + UnusedMaterial3ScaffoldPaddingParameter. +* 1.2.0-alpha04: Adds UsingMaterialAndMaterial3Libraries. + +(##) Version Compatibility + +There are multiple older versions available of this library: + +| Version | Date | Issues | Compatible | Compiled | Requires | +|-------------------:|----------|-------:|------------|--------------:|---------:| +| 1.2.0-rc01|2024/01/24| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.2.0-beta02|2024/01/10| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.2.0-beta01|2023/12/13| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.2.0-alpha12|2023/11/29| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.2.0-alpha11|2023/11/15| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.2.0-alpha10|2023/10/18| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.2.0-alpha09|2023/10/04| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.2.0-alpha08|2023/09/20| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.2.0-alpha07|2023/09/06| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.2.0-alpha06|2023/08/23| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.2.0-alpha05|2023/08/09| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.2.0-alpha04|2023/07/26| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.2.0-alpha03|2023/06/21| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.2.0-alpha02|2023/05/24| 1| Yes| 8.0 and 8.1|8.0 and 8.1| + + \ No newline at end of file diff --git a/docs/checks/androidx_compose_material_material-android.md.html b/docs/checks/androidx_compose_material_material-android.md.html new file mode 100644 index 00000000..84ff2e7b --- /dev/null +++ b/docs/checks/androidx_compose_material_material-android.md.html @@ -0,0 +1,77 @@ +(#) androidx.compose.material:material-android + +Name +: Compose Material Components +Description +: Compose Material Design Components library +License +: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +Vendor +: Jetpack Compose +Identifier +: androidx.compose.material +Feedback +: https://issuetracker.google.com/issues/new?component=612128 +Min +: Lint 7.0 +Compiled +: Lint 8.0 and 8.1 +Artifact +: androidx.compose.material:material-android:1.7.0-alpha01 + +(##) Included Issues + +|Issue Id |Issue Description | +|----------------------------------------------------------------------------------------|----------------------------------------------------------------------| +|[ConflictingOnColor](ConflictingOnColor.md.html) |Background colors with the same value should have the same 'on' color | +|[UnusedMaterialScaffoldPaddingParameter](UnusedMaterialScaffoldPaddingParameter.md.html)|Scaffold content should use the padding provided as a lambda parameter| + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("androidx.compose.material:material-android:1.7.0-alpha01") + +// build.gradle +implementation 'androidx.compose.material:material-android:1.7.0-alpha01' + +// build.gradle.kts with version catalogs: +implementation(libs.material-android) + +# libs.versions.toml +[versions] +material-android = "1.7.0-alpha01" +[libraries] +material-android = { + module = "androidx.compose.material:material-android", + version.ref = "material-android" +} +``` + +1.7.0-alpha01 is the version this documentation was generated from; +there may be newer versions available. + +(##) Changes + +* 1.5.0: First version includes ConflictingOnColor, + UnusedMaterialScaffoldPaddingParameter. + +(##) Version Compatibility + +There are multiple older versions available of this library: + +| Version | Date | Issues | Compatible | Compiled | Requires | +|-------------------:|----------|-------:|------------|--------------:|---------:| +| 1.7.0-alpha01|2024/01/24| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.6.0|2024/01/24| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.4|2023/10/18| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.3|2023/10/04| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.2|2023/09/27| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.1|2023/09/06| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.0|2023/08/09| 2| Yes| 8.0 and 8.1|8.0 and 8.1| + + \ No newline at end of file diff --git a/docs/checks/androidx_compose_runtime_runtime-android.md.html b/docs/checks/androidx_compose_runtime_runtime-android.md.html new file mode 100644 index 00000000..2487b44b --- /dev/null +++ b/docs/checks/androidx_compose_runtime_runtime-android.md.html @@ -0,0 +1,95 @@ +(#) androidx.compose.runtime:runtime-android + +Name +: Compose Runtime +Description +: Tree composition support for code generated by the Compose compiler +: plugin and corresponding public API +License +: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +Vendor +: Jetpack Compose +Identifier +: androidx.compose.runtime +Feedback +: https://issuetracker.google.com/issues/new?component=612128 +Min +: Lint 8.0 and 8.1 +Compiled +: Lint 8.0 and 8.1 +Artifact +: androidx.compose.runtime:runtime-android:1.7.0-alpha01 + +(##) Included Issues + +|Issue Id |Issue Description | +|--------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------| +|[AutoboxingStateValueProperty](AutoboxingStateValueProperty.md.html) |State access causes value to be autoboxed | +|[AutoboxingStateCreation](AutoboxingStateCreation.md.html) |`State` will autobox values assigned to this state. Use a specialized state type instead.| +|[CoroutineCreationDuringComposition](CoroutineCreationDuringComposition.md.html)|Calls to `async` or `launch` should happen inside a LaunchedEffect and not composition | +|[FlowOperatorInvokedInComposition](FlowOperatorInvokedInComposition.md.html) |Flow operator functions should not be invoked within composition | +|[ComposableLambdaParameterNaming](ComposableLambdaParameterNaming.md.html) |Primary composable lambda parameter not named `content` | +|[ComposableLambdaParameterPosition](ComposableLambdaParameterPosition.md.html) |Non-trailing primary composable lambda parameter | +|[ComposableNaming](ComposableNaming.md.html) |Incorrect naming for @Composable functions | +|[StateFlowValueCalledInComposition](StateFlowValueCalledInComposition.md.html) |StateFlow.value should not be called within composition | +|[CompositionLocalNaming](CompositionLocalNaming.md.html) |CompositionLocal properties should be prefixed with `Local` | +|[MutableCollectionMutableState](MutableCollectionMutableState.md.html) |Creating a MutableState object with a mutable collection type | +|[ProduceStateDoesNotAssignValue](ProduceStateDoesNotAssignValue.md.html) |produceState calls should assign `value` inside the producer lambda | +|[RememberReturnType](RememberReturnType.md.html) |`remember` calls must not return `Unit` | +|[OpaqueUnitKey](OpaqueUnitKey.md.html) |Passing an expression which always returns `Unit` as a key argument | +|[UnrememberedMutableState](UnrememberedMutableState.md.html) |Creating a state object during composition without using `remember` | + +(##) 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-android:1.7.0-alpha01") + +// build.gradle +implementation 'androidx.compose.runtime:runtime-android:1.7.0-alpha01' + +// build.gradle.kts with version catalogs: +implementation(libs.runtime-android) + +# libs.versions.toml +[versions] +runtime-android = "1.7.0-alpha01" +[libraries] +runtime-android = { + module = "androidx.compose.runtime:runtime-android", + version.ref = "runtime-android" +} +``` + +1.7.0-alpha01 is the version this documentation was generated from; +there may be newer versions available. + +(##) Changes + +* 1.5.0: First version includes AutoboxingStateCreation, + AutoboxingStateValueProperty, ComposableLambdaParameterNaming, + ComposableLambdaParameterPosition, ComposableNaming, + CompositionLocalNaming, CoroutineCreationDuringComposition, + FlowOperatorInvokedInComposition, MutableCollectionMutableState, + OpaqueUnitKey, ProduceStateDoesNotAssignValue, RememberReturnType, + StateFlowValueCalledInComposition, UnrememberedMutableState. + +(##) Version Compatibility + +There are multiple older versions available of this library: + +| Version | Date | Issues | Compatible | Compiled | Requires | +|-------------------:|----------|-------:|------------|--------------:|---------:| +| 1.7.0-alpha01|2024/01/24| 14| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.6.0|2024/01/24| 14| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.4|2023/10/18| 14| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.3|2023/10/04| 14| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.2|2023/09/27| 14| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.1|2023/09/06| 14| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.0|2023/08/09| 14| Yes| 8.0 and 8.1|8.0 and 8.1| + + \ 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 new file mode 100644 index 00000000..762fd407 --- /dev/null +++ b/docs/checks/androidx_compose_runtime_runtime-saveable-android.md.html @@ -0,0 +1,75 @@ +(#) androidx.compose.runtime:runtime-saveable-android + +Name +: Compose Saveable +Description +: Compose components that allow saving and restoring the local ui state +License +: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +Vendor +: Jetpack Compose +Identifier +: androidx.compose.runtime.saveable +Feedback +: https://issuetracker.google.com/issues/new?component=612128 +Min +: Lint 7.0 +Compiled +: Lint 8.0 and 8.1 +Artifact +: androidx.compose.runtime:runtime-saveable-android:1.7.0-alpha01 + +(##) Included Issues + +|Issue Id |Issue Description | +|------------------------------------------------------------------------|------------------------------------------------------------------------------------------| +|[RememberSaveableSaverParameter](RememberSaveableSaverParameter.md.html)|`Saver` objects should be passed to the saver parameter, not the vararg `inputs` parameter| + +(##) 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-saveable-android:1.7.0-alpha01") + +// build.gradle +implementation 'androidx.compose.runtime:runtime-saveable-android:1.7.0-alpha01' + +// build.gradle.kts with version catalogs: +implementation(libs.runtime-saveable-android) + +# libs.versions.toml +[versions] +runtime-saveable-android = "1.7.0-alpha01" +[libraries] +runtime-saveable-android = { + module = "androidx.compose.runtime:runtime-saveable-android", + version.ref = "runtime-saveable-android" +} +``` + +1.7.0-alpha01 is the version this documentation was generated from; +there may be newer versions available. + +(##) Changes + +* 1.5.0: First version includes RememberSaveableSaverParameter. + +(##) Version Compatibility + +There are multiple older versions available of this library: + +| Version | Date | Issues | Compatible | Compiled | Requires | +|-------------------:|----------|-------:|------------|--------------:|---------:| +| 1.7.0-alpha01|2024/01/24| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.6.0|2024/01/24| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.4|2023/10/18| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.3|2023/10/04| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.2|2023/09/27| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.1|2023/09/06| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.0|2023/08/09| 1| Yes| 8.0 and 8.1|8.0 and 8.1| + + \ No newline at end of file diff --git a/docs/checks/androidx_compose_ui_ui-android.md.html b/docs/checks/androidx_compose_ui_ui-android.md.html new file mode 100644 index 00000000..4cf0b1dc --- /dev/null +++ b/docs/checks/androidx_compose_ui_ui-android.md.html @@ -0,0 +1,91 @@ +(#) androidx.compose.ui:ui-android + +Name +: Compose UI +Description +: Compose UI primitives. This library contains the primitives that form +: the Compose UI Toolkit, such as drawing, measurement and layout. +License +: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +Vendor +: Jetpack Compose +Identifier +: androidx.compose.ui +Feedback +: https://issuetracker.google.com/issues/new?component=612128 +Min +: Lint 7.0 +Compiled +: Lint 8.0 and 8.1 +Artifact +: androidx.compose.ui:ui-android:1.7.0-alpha01 + +(##) Included Issues + +|Issue Id |Issue Description | +|----------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------| +|[UnnecessaryComposedModifier](UnnecessaryComposedModifier.md.html) |Modifier.composed should only be used for modifiers that invoke @Composable functions | +|[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 | +|[ModifierNodeInspectableProperties](ModifierNodeInspectableProperties.md.html) |ModifierNodeElement missing inspectableProperties | +|[ModifierParameter](ModifierParameter.md.html) |Guidelines for Modifier parameters in a Composable function | +|[MultipleAwaitPointerEventScopes](MultipleAwaitPointerEventScopes.md.html) |Suspicious use of multiple awaitPointerEventScope blocks. Using multiple awaitPointerEventScope blocks may cause some input events to be dropped.| +|[ReturnFromAwaitPointerEventScope](ReturnFromAwaitPointerEventScope.md.html) |Returning from awaitPointerEventScope may cause some input events to be dropped | +|[SuspiciousCompositionLocalModifierRead](SuspiciousCompositionLocalModifierRead.md.html)|CompositionLocals should not be read in Modifier.onAttach() or Modifier.onDetach() | + +(##) 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.7.0-alpha01") + +// build.gradle +implementation 'androidx.compose.ui:ui-android:1.7.0-alpha01' + +// build.gradle.kts with version catalogs: +implementation(libs.ui-android) + +# libs.versions.toml +[versions] +ui-android = "1.7.0-alpha01" +[libraries] +ui-android = { + module = "androidx.compose.ui:ui-android", + version.ref = "ui-android" +} +``` + +1.7.0-alpha01 is the version this documentation was generated from; +there may be newer versions available. + +(##) Changes + +* 1.5.0: First version includes ComposableModifierFactory, + ModifierFactoryExtensionFunction, ModifierFactoryReturnType, + ModifierFactoryUnreferencedReceiver, + ModifierNodeInspectableProperties, ModifierParameter, + MultipleAwaitPointerEventScopes, ReturnFromAwaitPointerEventScope, + SuspiciousCompositionLocalModifierRead, + UnnecessaryComposedModifier. +* 1.6.0: Removes ComposableModifierFactory. + +(##) Version Compatibility + +There are multiple older versions available of this library: + +| Version | Date | Issues | Compatible | Compiled | Requires | +|-------------------:|----------|-------:|------------|--------------:|---------:| +| 1.7.0-alpha01|2024/01/24| 9| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.6.0|2024/01/24| 9| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.4|2023/10/18| 10| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.3|2023/10/04| 10| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.2|2023/09/27| 10| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.1|2023/09/06| 10| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.0|2023/08/09| 10| Yes| 8.0 and 8.1|8.0 and 8.1| + + \ No newline at end of file diff --git a/docs/checks/androidx_compose_ui_ui-graphics-android.md.html b/docs/checks/androidx_compose_ui_ui-graphics-android.md.html new file mode 100644 index 00000000..90410f6d --- /dev/null +++ b/docs/checks/androidx_compose_ui_ui-graphics-android.md.html @@ -0,0 +1,77 @@ +(#) androidx.compose.ui:ui-graphics-android + +Name +: Compose Graphics +Description +: Compose graphics +License +: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +Vendor +: Jetpack Compose +Identifier +: androidx.compose.ui.graphics +Feedback +: https://issuetracker.google.com/issues/new?component=612128 +Min +: Lint 7.0 +Compiled +: Lint 8.0 and 8.1 +Artifact +: androidx.compose.ui:ui-graphics-android:1.7.0-alpha01 + +(##) Included Issues + +|Issue Id |Issue Description | +|------------------------------------------------------------|---------------------------| +|[MissingColorAlphaChannel](MissingColorAlphaChannel.md.html)|Missing Color alpha channel| +|[InvalidColorHexValue](InvalidColorHexValue.md.html) |Invalid Color hex value | + +(##) 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-graphics-android:1.7.0-alpha01") + +// build.gradle +implementation 'androidx.compose.ui:ui-graphics-android:1.7.0-alpha01' + +// build.gradle.kts with version catalogs: +implementation(libs.ui-graphics-android) + +# libs.versions.toml +[versions] +ui-graphics-android = "1.7.0-alpha01" +[libraries] +ui-graphics-android = { + module = "androidx.compose.ui:ui-graphics-android", + version.ref = "ui-graphics-android" +} +``` + +1.7.0-alpha01 is the version this documentation was generated from; +there may be newer versions available. + +(##) Changes + +* 1.5.0: First version includes InvalidColorHexValue, + MissingColorAlphaChannel. + +(##) Version Compatibility + +There are multiple older versions available of this library: + +| Version | Date | Issues | Compatible | Compiled | Requires | +|-------------------:|----------|-------:|------------|--------------:|---------:| +| 1.7.0-alpha01|2024/01/24| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.6.0|2024/01/24| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.4|2023/10/18| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.3|2023/10/04| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.2|2023/09/27| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.1|2023/09/06| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.0|2023/08/09| 2| Yes| 8.0 and 8.1|8.0 and 8.1| + + \ No newline at end of file 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 acbe2e83..bcde774c 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.0 and 8.1 Artifact -: androidx.compose.ui:ui-test-manifest:1.5.0-beta02 +: androidx.compose.ui:ui-test-manifest:1.7.0-alpha01 (##) Included Issues @@ -35,17 +35,17 @@ ``` // build.gradle.kts -implementation("androidx.compose.ui:ui-test-manifest:1.5.0-beta02") +implementation("androidx.compose.ui:ui-test-manifest:1.7.0-alpha01") // build.gradle -implementation 'androidx.compose.ui:ui-test-manifest:1.5.0-beta02' +implementation 'androidx.compose.ui:ui-test-manifest:1.7.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.ui-test-manifest) # libs.versions.toml [versions] -ui-test-manifest = "1.5.0-beta02" +ui-test-manifest = "1.7.0-alpha01" [libraries] ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest", @@ -53,7 +53,7 @@ } ``` -1.5.0-beta02 is the version this documentation was generated from; +1.7.0-alpha01 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -66,12 +66,13 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 1.5.0-beta02|2023/06/07| 1| Yes| 8.0 and 8.1|8.0 and 8.1| -| 1.5.0-beta01|2023/05/24| 1| Yes| 8.0 and 8.1|8.0 and 8.1| -| 1.5.0-alpha04|2023/05/10| 1| Yes| 8.0 and 8.1|8.0 and 8.1| -| 1.5.0-alpha03|2023/04/19| 1| Yes| 8.0 and 8.1|8.0 and 8.1| -| 1.5.0-alpha02|2023/04/05| 1| Yes| 8.0 and 8.1| 7.0| -| 1.5.0-alpha01|2023/03/22| 1| Yes| 8.0 and 8.1| 7.0| +| 1.7.0-alpha01|2024/01/24| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.6.0|2024/01/24| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.4|2023/10/18| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.3|2023/10/04| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.2|2023/09/27| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.1|2023/09/06| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.5.0|2023/08/09| 1| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.4.3|2023/05/03| 1| Yes| 8.0 and 8.1| 7.0| | 1.4.2|2023/04/19| 1| Yes| 8.0 and 8.1| 7.0| | 1.4.1|2023/04/05| 1| Yes| 8.0 and 8.1| 7.0| diff --git a/docs/checks/androidx_constraintlayout_constraintlayout-compose.md.html b/docs/checks/androidx_constraintlayout_constraintlayout-compose.md.html index 030ad662..222954cd 100644 --- a/docs/checks/androidx_constraintlayout_constraintlayout-compose.md.html +++ b/docs/checks/androidx_constraintlayout_constraintlayout-compose.md.html @@ -18,7 +18,7 @@ Compiled : Lint 8.0 and 8.1 Artifact -: androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha10 +: androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha13 (##) Included Issues @@ -36,17 +36,17 @@ ``` // build.gradle.kts -implementation("androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha10") +implementation("androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha13") // build.gradle -implementation 'androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha10' +implementation 'androidx.constraintlayout:constraintlayout-compose:1.1.0-alpha13' // build.gradle.kts with version catalogs: implementation(libs.constraintlayout-compose) # libs.versions.toml [versions] -constraintlayout-compose = "1.1.0-alpha10" +constraintlayout-compose = "1.1.0-alpha13" [libraries] constraintlayout-compose = { module = "androidx.constraintlayout:constraintlayout-compose", @@ -54,7 +54,7 @@ } ``` -1.1.0-alpha10 is the version this documentation was generated from; +1.1.0-alpha13 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -69,6 +69,9 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| +| 1.1.0-alpha13|2023/10/04| 3| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.1.0-alpha12|2023/08/09| 3| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.1.0-alpha11|2023/07/26| 3| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.1.0-alpha10|2023/05/24| 3| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.1.0-alpha09|2023/03/22| 3| No[^1]| 8.0 and 8.1| 7.0| | 1.1.0-alpha08|2023/03/08| 3| No[^1]| 8.0 and 8.1| 7.0| diff --git a/docs/checks/androidx_fragment_fragment-testing-manifest.md.html b/docs/checks/androidx_fragment_fragment-testing-manifest.md.html index 4b836da1..99316c84 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.7.0-alpha01 +: androidx.fragment:fragment-testing-manifest:1.7.0-alpha09 (##) Included Issues @@ -35,17 +35,17 @@ ``` // build.gradle.kts -implementation("androidx.fragment:fragment-testing-manifest:1.7.0-alpha01") +implementation("androidx.fragment:fragment-testing-manifest:1.7.0-alpha09") // build.gradle -implementation 'androidx.fragment:fragment-testing-manifest:1.7.0-alpha01' +implementation 'androidx.fragment:fragment-testing-manifest:1.7.0-alpha09' // build.gradle.kts with version catalogs: implementation(libs.fragment-testing-manifest) # libs.versions.toml [versions] -fragment-testing-manifest = "1.7.0-alpha01" +fragment-testing-manifest = "1.7.0-alpha09" [libraries] fragment-testing-manifest = { module = "androidx.fragment:fragment-testing-manifest", @@ -53,7 +53,7 @@ } ``` -1.7.0-alpha01 is the version this documentation was generated from; +1.7.0-alpha09 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -66,7 +66,17 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| +| 1.7.0-alpha09|2024/01/24| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.7.0-alpha08|2024/01/10| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.7.0-alpha07|2023/11/29| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.7.0-alpha06|2023/10/04| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.7.0-alpha05|2023/09/20| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.7.0-alpha04|2023/09/06| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.7.0-alpha03|2023/08/23| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.7.0-alpha02|2023/08/09| 1| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.7.0-alpha01|2023/06/07| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.6.2|2023/11/01| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.6.1|2023/07/26| 1| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.6.0|2023/06/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_fragment_fragment-testing.md.html b/docs/checks/androidx_fragment_fragment-testing.md.html index 1e34d687..b3fc1fa0 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.7.0-alpha01 +: androidx.fragment:fragment-testing:1.7.0-alpha09 (##) Included Issues @@ -33,17 +33,17 @@ ``` // build.gradle.kts -implementation("androidx.fragment:fragment-testing:1.7.0-alpha01") +implementation("androidx.fragment:fragment-testing:1.7.0-alpha09") // build.gradle -implementation 'androidx.fragment:fragment-testing:1.7.0-alpha01' +implementation 'androidx.fragment:fragment-testing:1.7.0-alpha09' // build.gradle.kts with version catalogs: implementation(libs.fragment-testing) # libs.versions.toml [versions] -fragment-testing = "1.7.0-alpha01" +fragment-testing = "1.7.0-alpha09" [libraries] fragment-testing = { module = "androidx.fragment:fragment-testing", @@ -51,7 +51,7 @@ } ``` -1.7.0-alpha01 is the version this documentation was generated from; +1.7.0-alpha09 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -64,7 +64,17 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| +| 1.7.0-alpha09|2024/01/24| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.7.0-alpha08|2024/01/10| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.7.0-alpha07|2023/11/29| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.7.0-alpha06|2023/10/04| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.7.0-alpha05|2023/09/20| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.7.0-alpha04|2023/09/06| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.7.0-alpha03|2023/08/23| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.7.0-alpha02|2023/08/09| 1| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.7.0-alpha01|2023/06/07| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.6.2|2023/11/01| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.6.1|2023/07/26| 1| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.6.0|2023/06/07| 1| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.5.7|2023/04/19| 1| Yes| 7.3 and 7.4| 7.0| | 1.5.6|2023/03/22| 1| Yes| 7.3 and 7.4| 7.0| diff --git a/docs/checks/androidx_fragment_fragment.md.html b/docs/checks/androidx_fragment_fragment.md.html index 7943a657..5567f645 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.7.0-alpha01 +: androidx.fragment:fragment:1.7.0-alpha09 (##) Included Issues @@ -44,17 +44,17 @@ ``` // build.gradle.kts -implementation("androidx.fragment:fragment:1.7.0-alpha01") +implementation("androidx.fragment:fragment:1.7.0-alpha09") // build.gradle -implementation 'androidx.fragment:fragment:1.7.0-alpha01' +implementation 'androidx.fragment:fragment:1.7.0-alpha09' // build.gradle.kts with version catalogs: implementation(libs.fragment) # libs.versions.toml [versions] -fragment = "1.7.0-alpha01" +fragment = "1.7.0-alpha09" [libraries] fragment = { module = "androidx.fragment:fragment", @@ -62,7 +62,7 @@ } ``` -1.7.0-alpha01 is the version this documentation was generated from; +1.7.0-alpha09 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -80,7 +80,17 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| +| 1.7.0-alpha09|2024/01/24| 9| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.7.0-alpha08|2024/01/10| 9| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.7.0-alpha07|2023/11/29| 9| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.7.0-alpha06|2023/10/04| 9| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.7.0-alpha05|2023/09/20| 9| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.7.0-alpha04|2023/09/06| 9| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.7.0-alpha03|2023/08/23| 9| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.7.0-alpha02|2023/08/09| 9| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.7.0-alpha01|2023/06/07| 9| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.6.2|2023/11/01| 9| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.6.1|2023/07/26| 9| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.6.0|2023/06/07| 9| Yes| 8.0 and 8.1|8.0 and 8.1| | 1.5.7|2023/04/19| 9| Yes| 7.3 and 7.4| 7.0| | 1.5.6|2023/03/22| 9| Yes| 7.3 and 7.4| 7.0| diff --git a/docs/checks/androidx_lifecycle_lifecycle-livedata-core-ktx.md.html b/docs/checks/androidx_lifecycle_lifecycle-livedata-core-ktx.md.html index 70565773..65c422f5 100644 --- a/docs/checks/androidx_lifecycle_lifecycle-livedata-core-ktx.md.html +++ b/docs/checks/androidx_lifecycle_lifecycle-livedata-core-ktx.md.html @@ -17,7 +17,7 @@ Compiled : Lint 8.0 and 8.1 Artifact -: androidx.lifecycle:lifecycle-livedata-core-ktx:2.6.1 +: androidx.lifecycle:lifecycle-livedata-core-ktx:2.8.0-alpha01 (##) Included Issues @@ -33,17 +33,17 @@ ``` // build.gradle.kts -implementation("androidx.lifecycle:lifecycle-livedata-core-ktx:2.6.1") +implementation("androidx.lifecycle:lifecycle-livedata-core-ktx:2.8.0-alpha01") // build.gradle -implementation 'androidx.lifecycle:lifecycle-livedata-core-ktx:2.6.1' +implementation 'androidx.lifecycle:lifecycle-livedata-core-ktx:2.8.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.lifecycle-livedata-core-ktx) # libs.versions.toml [versions] -lifecycle-livedata-core-ktx = "2.6.1" +lifecycle-livedata-core-ktx = "2.8.0-alpha01" [libraries] lifecycle-livedata-core-ktx = { module = "androidx.lifecycle:lifecycle-livedata-core-ktx", @@ -51,7 +51,7 @@ } ``` -2.6.1 is the version this documentation was generated from; +2.8.0-alpha01 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -64,6 +64,9 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| +| 2.8.0-alpha01|2024/01/24| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.7.0|2024/01/10| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.6.2|2023/09/06| 1| Yes| 8.0 and 8.1| 7.0| | 2.6.1|2023/03/22| 1| Yes| 8.0 and 8.1| 7.0| | 2.6.0|2023/03/08| 1| Yes| 8.0 and 8.1| 7.0| | 2.5.1|2022/07/27| 1| Yes| 7.3 and 7.4| 7.0| diff --git a/docs/checks/androidx_lifecycle_lifecycle-runtime-ktx.md.html b/docs/checks/androidx_lifecycle_lifecycle-runtime-ktx.md.html index e7e6497c..b06363d9 100644 --- a/docs/checks/androidx_lifecycle_lifecycle-runtime-ktx.md.html +++ b/docs/checks/androidx_lifecycle_lifecycle-runtime-ktx.md.html @@ -1,7 +1,7 @@ (#) androidx.lifecycle:lifecycle-runtime-ktx Name -: Android Lifecycle Kotlin Extensions +: Lifecycle Kotlin Extensions Description : Kotlin extensions for 'lifecycle' artifact License @@ -17,7 +17,7 @@ Compiled : Lint 8.0 and 8.1 Artifact -: androidx.lifecycle:lifecycle-runtime-ktx:2.6.1 +: androidx.lifecycle:lifecycle-runtime-ktx:2.8.0-alpha01 (##) Included Issues @@ -34,17 +34,17 @@ ``` // build.gradle.kts -implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1") +implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.0-alpha01") // build.gradle -implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1' +implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.8.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.lifecycle-runtime-ktx) # libs.versions.toml [versions] -lifecycle-runtime-ktx = "2.6.1" +lifecycle-runtime-ktx = "2.8.0-alpha01" [libraries] lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", @@ -52,7 +52,7 @@ } ``` -2.6.1 is the version this documentation was generated from; +2.8.0-alpha01 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -66,6 +66,9 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| +| 2.8.0-alpha01|2024/01/24| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.7.0|2024/01/10| 2| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.6.2|2023/09/06| 2| Yes| 8.0 and 8.1| 7.0| | 2.6.1|2023/03/22| 2| Yes| 8.0 and 8.1| 7.0| | 2.6.0|2023/03/08| 2| Yes| 8.0 and 8.1| 7.0| | 2.5.1|2022/07/27| 2| Yes| 7.3 and 7.4| 7.0| diff --git a/docs/checks/androidx_lifecycle_lifecycle-runtime-testing.md.html b/docs/checks/androidx_lifecycle_lifecycle-runtime-testing.md.html new file mode 100644 index 00000000..9c58576d --- /dev/null +++ b/docs/checks/androidx_lifecycle_lifecycle-runtime-testing.md.html @@ -0,0 +1,70 @@ +(#) androidx.lifecycle:lifecycle-runtime-testing + +Name +: Lifecycle Runtime Testing +Description +: Testing utilities for 'lifecycle' artifact +License +: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +Vendor +: Android Open Source Project +Identifier +: androidx.lifecycle +Feedback +: https://issuetracker.google.com/issues/new?component=413132 +Min +: Lint 7.0 +Compiled +: Lint 8.0 and 8.1 +Artifact +: androidx.lifecycle:lifecycle-runtime-testing:2.8.0-alpha01 + +(##) Included Issues + +|Issue Id |Issue Description | +|----------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------| +|[TestLifecycleOwnerInCoroutine](TestLifecycleOwnerInCoroutine.md.html)|Use the suspending function setCurrentState(), rather than directly accessing the currentState property.| + +(##) Including + +!!! + This is not a built-in check. To include it, add the below dependency + to your project. + +``` +// build.gradle.kts +implementation("androidx.lifecycle:lifecycle-runtime-testing:2.8.0-alpha01") + +// build.gradle +implementation 'androidx.lifecycle:lifecycle-runtime-testing:2.8.0-alpha01' + +// build.gradle.kts with version catalogs: +implementation(libs.lifecycle-runtime-testing) + +# libs.versions.toml +[versions] +lifecycle-runtime-testing = "2.8.0-alpha01" +[libraries] +lifecycle-runtime-testing = { + module = "androidx.lifecycle:lifecycle-runtime-testing", + version.ref = "lifecycle-runtime-testing" +} +``` + +2.8.0-alpha01 is the version this documentation was generated from; +there may be newer versions available. + +(##) Changes + +* 2.7.0: First version includes TestLifecycleOwnerInCoroutine. + +(##) Version Compatibility + +There are multiple older versions available of this library: + +| Version | Date | Issues | Compatible | Compiled | Requires | +|-------------------:|----------|-------:|------------|--------------:|---------:| +| 2.8.0-alpha01|2024/01/24| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.7.0|2024/01/10| 1| Yes| 8.0 and 8.1|8.0 and 8.1| + + \ No newline at end of file diff --git a/docs/checks/androidx_navigation_navigation-common.md.html b/docs/checks/androidx_navigation_navigation-common.md.html index 4aeed813..6215c5b9 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.0 and 8.1 Artifact -: androidx.navigation:navigation-common:2.7.0-beta01 +: androidx.navigation:navigation-common:2.8.0-alpha01 (##) Included Issues @@ -33,17 +33,17 @@ ``` // build.gradle.kts -implementation("androidx.navigation:navigation-common:2.7.0-beta01") +implementation("androidx.navigation:navigation-common:2.8.0-alpha01") // build.gradle -implementation 'androidx.navigation:navigation-common:2.7.0-beta01' +implementation 'androidx.navigation:navigation-common:2.8.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.navigation-common) # libs.versions.toml [versions] -navigation-common = "2.7.0-beta01" +navigation-common = "2.8.0-alpha01" [libraries] navigation-common = { module = "androidx.navigation:navigation-common", @@ -51,7 +51,7 @@ } ``` -2.7.0-beta01 is the version this documentation was generated from; +2.8.0-alpha01 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -64,8 +64,14 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 2.7.0-beta01|2023/06/07| 1| Yes| 8.0 and 8.1|8.0 and 8.1| -| 2.7.0-alpha01|2023/05/24| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.8.0-alpha01|2024/01/24| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.7.6|2023/12/13| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.7.5|2023/11/01| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.7.4|2023/10/04| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.7.3|2023/09/20| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.7.2|2023/09/06| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.7.1|2023/08/23| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.7.0|2023/08/09| 1| Yes| 8.0 and 8.1|8.0 and 8.1| | 2.6.0|2023/06/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_navigation_navigation-compose.md.html b/docs/checks/androidx_navigation_navigation-compose.md.html index 6eb081f6..881687db 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.0 and 8.1 Artifact -: androidx.navigation:navigation-compose:2.7.0-beta01 +: androidx.navigation:navigation-compose:2.8.0-alpha01 (##) Included Issues @@ -33,17 +33,17 @@ ``` // build.gradle.kts -implementation("androidx.navigation:navigation-compose:2.7.0-beta01") +implementation("androidx.navigation:navigation-compose:2.8.0-alpha01") // build.gradle -implementation 'androidx.navigation:navigation-compose:2.7.0-beta01' +implementation 'androidx.navigation:navigation-compose:2.8.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.navigation-compose) # libs.versions.toml [versions] -navigation-compose = "2.7.0-beta01" +navigation-compose = "2.8.0-alpha01" [libraries] navigation-compose = { module = "androidx.navigation:navigation-compose", @@ -51,7 +51,7 @@ } ``` -2.7.0-beta01 is the version this documentation was generated from; +2.8.0-alpha01 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -65,8 +65,14 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 2.7.0-beta01|2023/06/07| 3| Yes| 8.0 and 8.1|8.0 and 8.1| -| 2.7.0-alpha01|2023/05/24| 3| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.8.0-alpha01|2024/01/24| 3| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.7.6|2023/12/13| 3| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.7.5|2023/11/01| 3| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.7.4|2023/10/04| 3| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.7.3|2023/09/20| 3| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.7.2|2023/09/06| 3| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.7.1|2023/08/23| 3| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.7.0|2023/08/09| 3| Yes| 8.0 and 8.1|8.0 and 8.1| | 2.6.0|2023/06/07| 3| Yes| 8.0 and 8.1|8.0 and 8.1| | 2.5.3|2022/10/24| 3| Yes| 7.3 and 7.4| 7.0| | 2.5.2|2022/09/07| 3| Yes| 7.3 and 7.4| 7.0| diff --git a/docs/checks/androidx_navigation_navigation-runtime.md.html b/docs/checks/androidx_navigation_navigation-runtime.md.html index 4eedd536..db73a1d9 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.0 and 8.1 Artifact -: androidx.navigation:navigation-runtime:2.7.0-beta01 +: androidx.navigation:navigation-runtime:2.8.0-alpha01 (##) Included Issues @@ -33,17 +33,17 @@ ``` // build.gradle.kts -implementation("androidx.navigation:navigation-runtime:2.7.0-beta01") +implementation("androidx.navigation:navigation-runtime:2.8.0-alpha01") // build.gradle -implementation 'androidx.navigation:navigation-runtime:2.7.0-beta01' +implementation 'androidx.navigation:navigation-runtime:2.8.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.navigation-runtime) # libs.versions.toml [versions] -navigation-runtime = "2.7.0-beta01" +navigation-runtime = "2.8.0-alpha01" [libraries] navigation-runtime = { module = "androidx.navigation:navigation-runtime", @@ -51,7 +51,7 @@ } ``` -2.7.0-beta01 is the version this documentation was generated from; +2.8.0-alpha01 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -64,8 +64,14 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 2.7.0-beta01|2023/06/07| 1| Yes| 8.0 and 8.1|8.0 and 8.1| -| 2.7.0-alpha01|2023/05/24| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.8.0-alpha01|2024/01/24| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.7.6|2023/12/13| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.7.5|2023/11/01| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.7.4|2023/10/04| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.7.3|2023/09/20| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.7.2|2023/09/06| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.7.1|2023/08/23| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.7.0|2023/08/09| 1| Yes| 8.0 and 8.1|8.0 and 8.1| | 2.6.0|2023/06/07| 1| Yes| 8.0 and 8.1|8.0 and 8.1| | 2.5.3|2022/10/24| 1| Yes| 7.3 and 7.4| 7.0| | 2.5.2|2022/09/07| 1| Yes| 7.3 and 7.4| 7.0| diff --git a/docs/checks/androidx_recyclerview_recyclerview.md.html b/docs/checks/androidx_recyclerview_recyclerview.md.html index 05eb6757..a1fd2602 100644 --- a/docs/checks/androidx_recyclerview_recyclerview.md.html +++ b/docs/checks/androidx_recyclerview_recyclerview.md.html @@ -1,7 +1,7 @@ (#) androidx.recyclerview:recyclerview Name -: Android Support RecyclerView +: RecyclerView Description : Android Support RecyclerView License @@ -15,9 +15,9 @@ Min : Lint 7.0 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact -: androidx.recyclerview:recyclerview:1.3.1-rc01 +: androidx.recyclerview:recyclerview:1.4.0-alpha01 (##) Included Issues @@ -34,17 +34,17 @@ ``` // build.gradle.kts -implementation("androidx.recyclerview:recyclerview:1.3.1-rc01") +implementation("androidx.recyclerview:recyclerview:1.4.0-alpha01") // build.gradle -implementation 'androidx.recyclerview:recyclerview:1.3.1-rc01' +implementation 'androidx.recyclerview:recyclerview:1.4.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.recyclerview) # libs.versions.toml [versions] -recyclerview = "1.3.1-rc01" +recyclerview = "1.4.0-alpha01" [libraries] recyclerview = { module = "androidx.recyclerview:recyclerview", @@ -52,7 +52,7 @@ } ``` -1.3.1-rc01 is the version this documentation was generated from; +1.4.0-alpha01 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -65,7 +65,9 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 1.3.1-rc01|2023/05/24| 1| Yes| 7.3 and 7.4| 7.0| +| 1.4.0-alpha01|2023/10/18| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.3.2|2023/10/18| 1| Yes| 7.3 and 7.4| 7.0| +| 1.3.1|2023/07/26| 1| Yes| 7.3 and 7.4| 7.0| | 1.3.0|2023/03/08| 1| Yes| 7.3 and 7.4| 7.0| | 1.2.1|2021/06/02| 1| Yes| 4.1| 3.3| | 1.2.0|2021/04/07| 1| Yes| 4.1| 3.3| 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..1346a42a --- /dev/null +++ b/docs/checks/androidx_wear_protolayout_protolayout-expression.md.html @@ -0,0 +1,71 @@ +(#) 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.0 and 8.1 +Compiled +: Lint 8.0 and 8.1 +Artifact +: androidx.wear.protolayout:protolayout-expression:1.1.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.| + +(##) 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.1.0-rc01") + +// build.gradle +implementation 'androidx.wear.protolayout:protolayout-expression:1.1.0-rc01' + +// build.gradle.kts with version catalogs: +implementation(libs.protolayout-expression) + +# libs.versions.toml +[versions] +protolayout-expression = "1.1.0-rc01" +[libraries] +protolayout-expression = { + module = "androidx.wear.protolayout:protolayout-expression", + version.ref = "protolayout-expression" +} +``` + +1.1.0-rc01 is the version this documentation was generated from; +there may be newer versions available. + +(##) Changes + +* 1.1.0-alpha04: First version includes ProtoLayoutMinSchema. + +(##) Version Compatibility + +There are multiple older versions available of this library: + +| Version | Date | Issues | Compatible | Compiled | Requires | +|-------------------:|----------|-------:|------------|--------------:|---------:| +| 1.1.0-rc01|2024/01/24| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.1.0-beta01|2024/01/10| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.1.0-alpha04|2023/12/13| 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 new file mode 100644 index 00000000..79e7a7e2 --- /dev/null +++ b/docs/checks/androidx_wear_protolayout_protolayout.md.html @@ -0,0 +1,71 @@ +(#) androidx.wear.protolayout:protolayout + +Name +: ProtoLayout +Description +: Create layouts that can be rendered by a remote host. +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.0 and 8.1 +Compiled +: Lint 8.0 and 8.1 +Artifact +: androidx.wear.protolayout:protolayout:1.1.0-rc01 + +(##) Included Issues + +|Issue Id |Issue Description | +|------------------------------------------------------|-------------------------------------------------------------------------------| +|[ProtoLayoutMinSchema](ProtoLayoutMinSchema-2.md.html)|ProtoLayout feature is not guaranteed to be available on the target device API.| + +(##) 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.1.0-rc01") + +// build.gradle +implementation 'androidx.wear.protolayout:protolayout:1.1.0-rc01' + +// build.gradle.kts with version catalogs: +implementation(libs.protolayout) + +# libs.versions.toml +[versions] +protolayout = "1.1.0-rc01" +[libraries] +protolayout = { + module = "androidx.wear.protolayout:protolayout", + version.ref = "protolayout" +} +``` + +1.1.0-rc01 is the version this documentation was generated from; +there may be newer versions available. + +(##) Changes + +* 1.1.0-alpha04: First version includes ProtoLayoutMinSchema. + +(##) Version Compatibility + +There are multiple older versions available of this library: + +| Version | Date | Issues | Compatible | Compiled | Requires | +|-------------------:|----------|-------:|------------|--------------:|---------:| +| 1.1.0-rc01|2024/01/24| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.1.0-beta01|2024/01/10| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 1.1.0-alpha04|2023/12/13| 1| Yes| 8.0 and 8.1|8.0 and 8.1| + + \ No newline at end of file diff --git a/docs/checks/androidx_work_work-runtime.md.html b/docs/checks/androidx_work_work-runtime.md.html index da7ec829..e83fb4fb 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.0 and 8.1 Artifact -: androidx.work:work-runtime:2.9.0-alpha01 +: androidx.work:work-runtime:2.10.0-alpha01 (##) Included Issues @@ -41,17 +41,17 @@ ``` // build.gradle.kts -implementation("androidx.work:work-runtime:2.9.0-alpha01") +implementation("androidx.work:work-runtime:2.10.0-alpha01") // build.gradle -implementation 'androidx.work:work-runtime:2.9.0-alpha01' +implementation 'androidx.work:work-runtime:2.10.0-alpha01' // build.gradle.kts with version catalogs: implementation(libs.work-runtime) # libs.versions.toml [versions] -work-runtime = "2.9.0-alpha01" +work-runtime = "2.10.0-alpha01" [libraries] work-runtime = { module = "androidx.work:work-runtime", @@ -59,7 +59,7 @@ } ``` -2.9.0-alpha01 is the version this documentation was generated from; +2.10.0-alpha01 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -78,7 +78,8 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| -| 2.9.0-alpha01|2023/06/07| 9| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.10.0-alpha01|2024/01/24| 9| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.9.0|2023/11/29| 9| Yes| 8.0 and 8.1|8.0 and 8.1| | 2.8.1|2023/03/22| 9| Yes| 7.3 and 7.4| 7.0| | 2.8.0|2023/02/08| 9| Yes| 7.3 and 7.4| 7.0| | 2.7.1|2021/11/17| 9| Yes| 7.1| 4.1| diff --git a/docs/checks/categories.md.html b/docs/checks/categories.md.html index 76dd1adf..36179b73 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 (463) +* Correctness (490) - [AaptCrash: Potential AAPT crash](AaptCrash.md.html) - [AccidentalOctal: Accidental Octal](AccidentalOctal.md.html) @@ -16,17 +16,25 @@ - [AppCompatMethod: Using Wrong AppCompat Method](AppCompatMethod.md.html) - [AppCompatResource: Menu namespace](AppCompatResource.md.html) - [AppIndexingService: App Indexing Background Services](AppIndexingService.md.html) + - [AppLinkUrlError: URI invalid](AppLinkUrlError.md.html) - [AppLinksAutoVerify: App Links Auto Verification Failure](AppLinksAutoVerify.md.html) - [ApplySharedPref: Use `apply()` on `SharedPreferences`](ApplySharedPref.md.html) + - [ArcAnimationSpecTypeIssue: ArcAnimationSpec is designed for 2D values. Particularly, for positional values such as Offset.](ArcAnimationSpecTypeIssue.md.html) - [AssertjImport: Flags Java 6 incompatible imports.](AssertjImport.md.html) - [AutoDispose: Missing Disposable handling: Apply AutoDispose or cache the Disposable instance manually and enable lenient mode.](AutoDispose.md.html) - [BadConfigurationProvider: Invalid WorkManager Configuration Provider](BadConfigurationProvider.md.html) - [BadPeriodicWorkRequestEnqueue: Use `enqueueUniquePeriodicWork()` instead of `enqueue()`](BadPeriodicWorkRequestEnqueue.md.html) - [BatteryLife: Battery Life Issues](BatteryLife.md.html) + - [BindingReceiverParameter: @Binds/@Provides functions cannot be extension functions.](BindingReceiverParameter.md.html) + - [BindingReturnType: @Binds/@Provides functions must have a return type. Cannot be void or Unit.](BindingReturnType.md.html) + - [BindsMustBeAbstract: @Binds functions must be abstract and cannot have function bodies.](BindsMustBeAbstract.md.html) + - [BindsTypeMismatch: @Binds function parameters must be type-assignable to their return types.](BindsTypeMismatch.md.html) + - [BindsWrongParameterCount: @Binds functions require a single parameter as an input to bind.](BindsWrongParameterCount.md.html) - [BlockedPrivateApi: Using Blocked Private API](BlockedPrivateApi.md.html) - [BomWithoutPlatform: Using a BOM without platform call](BomWithoutPlatform.md.html) - [BottomAppBar: BottomAppBar Problems](BottomAppBar.md.html) - [BrokenIterator: Broken Iterator](BrokenIterator.md.html) + - [BuildListAdds: Missing `add` call in `buildList`](BuildListAdds.md.html) - [CanvasSize: Wrong Canvas Size](CanvasSize.md.html) - [CastingViewContextToActivity: Unsafe cast of `Context` to `Activity`](CastingViewContextToActivity.md.html) - [CheckResult: Ignoring results](CheckResult.md.html) @@ -37,7 +45,6 @@ - [ComposableDestinationInComposeScope: Building composable destination in compose scope](ComposableDestinationInComposeScope.md.html) - [ComposableLambdaParameterNaming: Primary composable lambda parameter not named `content`](ComposableLambdaParameterNaming.md.html) - [ComposableLambdaParameterPosition: Non-trailing primary composable lambda parameter](ComposableLambdaParameterPosition.md.html) - - [ComposableModifierFactory: Modifier factory functions should not be @Composable](ComposableModifierFactory.md.html) - [ComposableNaming: Incorrect naming for @Composable functions](ComposableNaming.md.html) - [ComposableNavGraphInComposeScope: Building navigation graph in compose scope](ComposableNavGraphInComposeScope.md.html) - [ComposeComposableModifier: Using @Composable builder functions for modifiers is not recommended](ComposeComposableModifier.md.html) @@ -48,6 +55,7 @@ - [ConflictingOnColor: Background colors with the same value should have the same 'on' color](ConflictingOnColor.md.html) - [ConstraintLayoutToolsEditorAttribute: Flags tools:layout_editor xml properties.](ConstraintLayoutToolsEditorAttribute.md.html) - [CoroutineCreationDuringComposition: Calls to `async` or `launch` should happen inside a LaunchedEffect and not composition](CoroutineCreationDuringComposition.md.html) + - [CredentialDependency: `credentials-play-services-auth` is Required](CredentialDependency.md.html) - [CustomSplashScreen: Application-defined Launch Screen](CustomSplashScreen.md.html) - [CustomViewStyleable: Mismatched Styleable/Custom View Name](CustomViewStyleable.md.html) - [CutPasteId: Likely cut & paste mistakes](CutPasteId.md.html) @@ -58,6 +66,7 @@ - [DefaultLayoutAttribute: Flags default layout values.](DefaultLayoutAttribute.md.html) - [DefaultLocale: Implied default locale in case conversion](DefaultLocale.md.html) - [DenyListedApi: Deny-listed API](DenyListedApi.md.html) + - [DenyListedBlockingApi: Deny-listed API](DenyListedBlockingApi.md.html) - [Deprecated: Using deprecated resources](Deprecated.md.html) - [DeprecatedCall: This class or method is deprecated; consider using an alternative.](DeprecatedCall.md.html) - [DeprecatedSinceApi: Using a method deprecated in earlier SDK](DeprecatedSinceApi.md.html) @@ -74,6 +83,7 @@ - [DoNotMockAutoValue: AutoValue classes represent pure data classes, so mocking them should not be necessary.](DoNotMockAutoValue.md.html) - [DoNotMockDataClass: data classes represent pure data classes, so mocking them should not be necessary.](DoNotMockDataClass.md.html) - [DoNotMockObjectClass: object classes are singletons, so mocking them should not be necessary](DoNotMockObjectClass.md.html) + - [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) - [DuplicateActivity: Activity registered more than once](DuplicateActivity.md.html) @@ -92,6 +102,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) + - [ExceptionMessage: Please provide a string for the lazyMessage parameter](ExceptionMessage.md.html) - [ExifInterface: Using `android.media.ExifInterface`](ExifInterface.md.html) - [ExperimentalAnnotationRetention: Experimental annotation with incorrect retention](ExperimentalAnnotationRetention.md.html) - [ExtraText: Extraneous text in resource files](ExtraText.md.html) @@ -277,6 +288,7 @@ - [MotionSceneFileValidationError: Validation errors in `MotionScene` files](MotionSceneFileValidationError.md.html) - [MultipleAwaitPointerEventScopes: Suspicious use of multiple awaitPointerEventScope blocks. Using multiple awaitPointerEventScope blocks may cause some input events to be dropped.](MultipleAwaitPointerEventScopes.md.html) - [MultipleUsesSdk: Multiple `` elements in the manifest](MultipleUsesSdk.md.html) + - [MustBeInModule: @Binds/@Provides function must be in `@Module`-annotated classes.](MustBeInModule.md.html) - [MutableCollectionMutableState: Creating a MutableState object with a mutable collection type](MutableCollectionMutableState.md.html) - [MutatingSharedPrefs: Mutating an Immutable SharedPrefs Set](MutatingSharedPrefs.md.html) - [NamespaceTypo: Misspelled namespace declaration](NamespaceTypo.md.html) @@ -286,6 +298,7 @@ - [NewApi: Calling new methods on older versions](NewApi.md.html) - [NewerVersionAvailable: Newer Library Versions Available](NewerVersionAvailable.md.html) - [NfcTechWhitespace: Whitespace in NFC tech lists](NfcTechWhitespace.md.html) + - [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) - [NonResizeableActivity: Activity is set to be non resizeable](NonResizeableActivity.md.html) @@ -315,6 +328,10 @@ - [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) + - [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.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) - [Range: Outside Range](Range.md.html) @@ -323,6 +340,7 @@ - [RawDispatchersUse: Use SlackDispatchers.](RawDispatchersUse.md.html) - [RecyclerView: RecyclerView Problems](RecyclerView.md.html) - [RedactedInJavaUsage: @Redacted is only supported in Kotlin classes!](RedactedInJavaUsage.md.html) + - [RedundantBinds: @Binds functions should return a different type (including annotations) than the input type.](RedundantBinds.md.html) - [RedundantLabel: Redundant label on activity](RedundantLabel.md.html) - [ReferenceType: Incorrect reference types](ReferenceType.md.html) - [Registered: Class is not registered in the manifest](Registered.md.html) @@ -356,6 +374,7 @@ - [ScrollViewCount: `ScrollView` can have only one child](ScrollViewCount.md.html) - [ScrollViewSize: ScrollView size validation](ScrollViewSize.md.html) - [SdCardPath: Hardcoded reference to `/sdcard`](SdCardPath.md.html) + - [SelectedPhotoAccess: Behavior change when requesting photo library access](SelectedPhotoAccess.md.html) - [SerializableUsage: Don't use Serializable.](SerializableUsage.md.html) - [ServiceCast: Wrong system service casts](ServiceCast.md.html) - [SetAndClearCommunicationDevice: Clearing communication device](SetAndClearCommunicationDevice.md.html) @@ -371,6 +390,7 @@ - [SpanMarkPointMissingMask: Check that Span flags use the bitwise mask SPAN_POINT_MARK_MASK when being compared to.](SpanMarkPointMissingMask.md.html) - [SpecifyForegroundServiceType: Specify foreground service type](SpecifyForegroundServiceType.md.html) - [SpecifyJobSchedulerIdRange: Specify a range of JobScheduler ids](SpecifyJobSchedulerIdRange.md.html) + - [StartActivityAndCollapseDeprecated: TileService.startActivityAndCollapse(Intent) is deprecated](StartActivityAndCollapseDeprecated.md.html) - [StateFlowValueCalledInComposition: StateFlow.value should not be called within composition](StateFlowValueCalledInComposition.md.html) - [StateListReachable: Unreachable state in a ``](StateListReachable.md.html) - [StopShip: Code contains `STOPSHIP` marker](StopShip.md.html) @@ -387,6 +407,7 @@ - [SuspiciousIndentation: Suspicious indentation](SuspiciousIndentation.md.html) - [SwitchIntDef: Missing @IntDef in Switch](SwitchIntDef.md.html) - [TestAppLink: Unmatched URLs](TestAppLink.md.html) + - [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) - [TextViewEdits: TextView should probably be an EditText instead](TextViewEdits.md.html) - [TimberExceptionLogging: Exception Logging](TimberExceptionLogging.md.html) @@ -401,6 +422,7 @@ - [UnnecessaryComposedModifier: Modifier.composed should only be used for modifiers that invoke @Composable functions](UnnecessaryComposedModifier.md.html) - [UnrememberedAnimatable: Creating an Animatable during composition without using `remember`](UnrememberedAnimatable.md.html) - [UnrememberedGetBackStackEntry: Calling getBackStackEntry during composition without using `remember`with a NavBackStackEntry key](UnrememberedGetBackStackEntry.md.html) + - [UnrememberedMutableInteractionSource: Creating a MutableInteractionSource during composition without using `remember`](UnrememberedMutableInteractionSource.md.html) - [UnrememberedMutableState: Creating a state object during composition without using `remember`](UnrememberedMutableState.md.html) - [UnsafeLifecycleWhenUsage: Unsafe UI operation in finally/catch of Lifecycle.whenStarted of similar method](UnsafeLifecycleWhenUsage.md.html) - [UnsafeOptInUsageError: Unsafe opt-in usage intended to be error-level severity](UnsafeOptInUsageError.md.html) @@ -411,6 +433,7 @@ - [UnsupportedLayoutAttribute: Marks layout attributes which are not supported.](UnsupportedLayoutAttribute.md.html) - [UnsupportedTvHardware: Unsupported TV Hardware Feature](UnsupportedTvHardware.md.html) - [UnusedAttribute: Attribute unused on older versions](UnusedAttribute.md.html) + - [UnusedBoxWithConstraintsScope: BoxWithConstraints content should use the constraints provided via BoxWithConstraintsScope](UnusedBoxWithConstraintsScope.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) - [UnusedMaterial3ScaffoldPaddingParameter: Scaffold content should use the padding provided as a lambda parameter](UnusedMaterial3ScaffoldPaddingParameter.md.html) @@ -427,9 +450,11 @@ - [UseGetLayoutInflater: Use getLayoutInflater() to get the LayoutInflater instead of calling LayoutInflater.from(Context).](UseGetLayoutInflater.md.html) - [UseRequireInsteadOfGet: Use the 'require_____()' API rather than 'get____()' API for more descriptive error messages when it's null.](UseRequireInsteadOfGet.md.html) - [UseRxSetProgress2: `setProgress` is deprecated. Use `setCompletableProgress` instead.](UseRxSetProgress2.md.html) + - [UseSdkSuppress: Using `@SdkSuppress` instead of `@RequiresApi`](UseSdkSuppress.md.html) - [UseSupportActionBar: Should not call `Activity.setActionBar` if you extend `AppCompatActivity`](UseSupportActionBar.md.html) - [UseSwitchCompatOrMaterialCode: Replace usage of `Switch` widget](UseSwitchCompatOrMaterialCode.md.html) - [UseSwitchCompatOrMaterialXml: Replace usage of `Switch` widget](UseSwitchCompatOrMaterialXml.md.html) + - [UsingMaterialAndMaterial3Libraries: material and material3 are separate, incompatible design system libraries](UsingMaterialAndMaterial3Libraries.md.html) - [UsingOnClickInXml: Using `android:onClick` on older version of the platform is broken](UsingOnClickInXml.md.html) - [ValidActionsXml: Invalid Action Descriptor](ValidActionsXml.md.html) - [ValidFragment: Fragment not instantiatable](ValidFragment.md.html) @@ -440,6 +465,7 @@ - [VisibleForTests: Visible Only For Tests](VisibleForTests.md.html) - [WatchFaceEditor: Watch face editor must use launchMode="standard"](WatchFaceEditor.md.html) - [WatchFaceForAndroidX: AndroidX watch faces must use action `WATCH_FACE_EDITOR`](WatchFaceForAndroidX.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) - [WearableActionDuplicate: Duplicate watch face configuration activities found](WearableActionDuplicate.md.html) - [WearableConfigurationAction: Wear configuration action metadata must match an activity](WearableConfigurationAction.md.html) @@ -451,6 +477,7 @@ - [WrongAnnotationOrder: Checks that Annotations comply with a certain order.](WrongAnnotationOrder.md.html) - [WrongCall: Using wrong draw/layout method](WrongCall.md.html) - [WrongCase: Wrong case for view tag](WrongCase.md.html) + - [WrongCommentType: Wrong Comment Type](WrongCommentType.md.html) - [WrongConstant: Incorrect constant](WrongConstant.md.html) - [WrongConstraintLayoutUsage: Marks a wrong usage of the Constraint Layout.](WrongConstraintLayoutUsage.md.html) - [WrongDrawableName: Drawable names should be prefixed accordingly.](WrongDrawableName.md.html) @@ -502,7 +529,7 @@ - [PermissionImpliesUnsupportedChromeOsHardware: Permission Implies Unsupported Chrome OS Hardware](PermissionImpliesUnsupportedChromeOsHardware.md.html) - [UnsupportedChromeOsHardware: Unsupported Chrome OS Hardware Feature](UnsupportedChromeOsHardware.md.html) -* Security (57) +* Security (60) - [AcceptsUserCertificates: Allowing User Certificates](AcceptsUserCertificates.md.html) - [AddJavascriptInterface: `addJavascriptInterface` Called](AddJavascriptInterface.md.html) @@ -527,9 +554,11 @@ - [HardwareIds: Hardware Id Usage](HardwareIds.md.html) - [InsecureBaseConfiguration: Insecure Base Configuration](InsecureBaseConfiguration.md.html) - [IntentFilterExportedReceiver: Unspecified `android:exported` in manifest](IntentFilterExportedReceiver.md.html) + - [IntentWithNullActionLaunch: Unsafe intent launched with no action set](IntentWithNullActionLaunch.md.html) - [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) + - [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) - [ProviderReadPermissionOnly: Provider with readPermission only and implemented write APIs](ProviderReadPermissionOnly.md.html) @@ -538,6 +567,7 @@ - [RiskyLibrary: Libraries with Privacy or Security Risks](RiskyLibrary.md.html) - [SSLCertificateSocketFactoryCreateSocket: Insecure call to `SSLCertificateSocketFactory.createSocket()`](SSLCertificateSocketFactoryCreateSocket.md.html) - [SSLCertificateSocketFactoryGetInsecure: Call to `SSLCertificateSocketFactory.getInsecure()`](SSLCertificateSocketFactoryGetInsecure.md.html) + - [SecretInSource: Secret in source code](SecretInSource.md.html) - [SecureRandom: Using a fixed seed with `SecureRandom`](SecureRandom.md.html) - [SetJavaScriptEnabled: Using `setJavaScriptEnabled`](SetJavaScriptEnabled.md.html) - [SetWorldReadable: `File.setReadable()` used to make file world-readable](SetWorldReadable.md.html) @@ -562,11 +592,12 @@ - [WorldReadableFiles: `openFileOutput()` with `MODE_WORLD_READABLE`](WorldReadableFiles.md.html) - [WorldWriteableFiles: `openFileOutput()` with `MODE_WORLD_WRITEABLE`](WorldWriteableFiles.md.html) -* Compliance (5) +* Compliance (6) - [ExpiredTargetSdkVersion: TargetSdkVersion No Longer Supported](ExpiredTargetSdkVersion.md.html) - [ExpiringTargetSdkVersion: TargetSdkVersion Soon Expiring](ExpiringTargetSdkVersion.md.html) - [OutdatedLibrary: Outdated Library](OutdatedLibrary.md.html) + - [PlaySdkIndexGenericIssues: Library has issues in SDK Index](PlaySdkIndexGenericIssues.md.html) - [PlaySdkIndexNonCompliant: Library has policy issues in SDK Index](PlaySdkIndexNonCompliant.md.html) - [QueryAllPackagesPermission: Using the QUERY_ALL_PACKAGES permission](QueryAllPackagesPermission.md.html) @@ -631,10 +662,11 @@ - [TypographyEllipsis: Ellipsis string can be replaced with ellipsis character](TypographyEllipsis.md.html) - [TypographyFractions: Fraction string can be replaced with fraction character](TypographyFractions.md.html) - [TypographyOther: Other typographical problems](TypographyOther.md.html) - - [TypographyQuotes: Straight quotes can be replaced with curvy quotes](TypographyQuotes.md.html) + - [TypographyQuotes: Straight quotes can be replaced with curvy quotes, and apostrophes with typographic apostrophes.](TypographyQuotes.md.html) -* Usability: Icons (20) +* Usability: Icons (22) + - [ActivityIconColor: Ongoing activity icon is not white](ActivityIconColor.md.html) - [ConvertToWebp: Convert to WebP](ConvertToWebp.md.html) - [GifUsage: Using `.gif` format for bitmaps is discouraged](GifUsage.md.html) - [IconColors: Icon colors do not follow the recommended visual style](IconColors.md.html) @@ -654,15 +686,14 @@ - [MissingApplicationIcon: Missing application icon](MissingApplicationIcon.md.html) - [MonochromeLauncherIcon: Monochrome icon is not defined](MonochromeLauncherIcon.md.html) - [SquareAndRoundTilePreviews: TileProvider does not have round and square previews](SquareAndRoundTilePreviews.md.html) + - [TilePreviewImageFormat: Tile preview is not compliant with standards](TilePreviewImageFormat.md.html) - [WebpUnsupported: WebP Unsupported](WebpUnsupported.md.html) * Usability (17) - [AlwaysShowAction: Usage of `showAsAction=always`](AlwaysShowAction.md.html) - - [AppLinkUrlError: URL not supported by app for Firebase App Indexing](AppLinkUrlError.md.html) - [Autofill: Use Autofill](Autofill.md.html) - [BackButton: Back button](BackButton.md.html) - - [BindsCanBeExtensionFunction: @Binds-annotated functions can be extension functions.](BindsCanBeExtensionFunction.md.html) - [ButtonCase: Cancel/OK dialog button capitalization](ButtonCase.md.html) - [ButtonOrder: Button order](ButtonOrder.md.html) - [ButtonStyle: Button should be borderless](ButtonStyle.md.html) @@ -675,6 +706,8 @@ - [ViewConstructor: Missing View constructors for XML inflation](ViewConstructor.md.html) - [WearBackNavigation: Wear: Disabling Back navigation](WearBackNavigation.md.html) - [WearPasswordInput: Wear: Using password input](WearPasswordInput.md.html) + - [WearRecents: Wear OS: Recents and app resume](WearRecents.md.html) + - [WearSplashScreen: Wear: Use `SplashScreen` library](WearSplashScreen.md.html) * Productivity (17) diff --git a/docs/checks/com_google_dagger_dagger-lint.md.html b/docs/checks/com_google_dagger_dagger-lint.md.html index e56d8e9f..dedd1bad 100644 --- a/docs/checks/com_google_dagger_dagger-lint.md.html +++ b/docs/checks/com_google_dagger_dagger-lint.md.html @@ -21,7 +21,7 @@ Compiled : Lint 7.1 Artifact -: com.google.dagger:dagger-lint:2.46.1 +: com.google.dagger:dagger-lint:2.50 (##) Included Issues @@ -40,17 +40,17 @@ ``` // build.gradle.kts -implementation("com.google.dagger:dagger-lint:2.46.1") +implementation("com.google.dagger:dagger-lint:2.50") // build.gradle -implementation 'com.google.dagger:dagger-lint:2.46.1' +implementation 'com.google.dagger:dagger-lint:2.50' // build.gradle.kts with version catalogs: implementation(libs.dagger-lint) # libs.versions.toml [versions] -dagger-lint = "2.46.1" +dagger-lint = "2.50" [libraries] dagger-lint = { module = "com.google.dagger:dagger-lint", @@ -58,12 +58,12 @@ } ``` -2.46.1 is the version this documentation was generated from; +2.50 is the version this documentation was generated from; there may be newer versions available. (##) Changes -* 2.38.1: First version includes FieldSiteTargetOnQualifierAnnotation, +* 2.40.2: First version includes FieldSiteTargetOnQualifierAnnotation, JvmStaticProvidesInObjectDetector, ModuleCompanionObjects, ModuleCompanionObjectsNotInModuleParent. @@ -73,6 +73,11 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| +| 2.50|2023/12/19| 4| Yes| 7.1| 7.1| +| 2.49|2023/12/01| 4| Yes| 7.1| 7.1| +| 2.48.1|2023/10/03| 4| Yes| 7.1| 7.1| +| 2.48|2023/08/30| 4| Yes| 7.1| 7.1| +| 2.47|2023/07/13| 4| Yes| 7.1| 7.1| | 2.46.1|2023/05/12| 4| Yes| 7.1| 7.1| | 2.46|2023/04/28| 4| Yes| 7.1| 7.1| | 2.45|2023/02/09| 4| Yes| 7.1| 7.1| @@ -88,14 +93,5 @@ | 2.40.4|2021/12/02| 4| Yes| 4.1| 3.6| | 2.40.3|2021/11/29| 4| Yes| 4.1| 3.6| | 2.40.2|2021/11/24| 4| Yes| 4.1| 3.6| -| 2.40.1|2021/11/11| 4| Yes| 4.1| 3.6| -| 2.40|2021/10/27| 4| Yes| 4.1| 3.6| -| 2.39.1|2021/10/01| 4| No[^1]| 4.1| 3.6| -| 2.39|2021/09/29| 4| No[^1]| 4.1| 3.6| -| 2.38.1|2021/07/27| 4| No[^1]| 4.1| 3.6| - -Compatibility Problems: - -[^1]: org.jetbrains.uast.kotlin.KotlinUClass: org.jetbrains.kotlin.psi.KtClassOrObject getKtClass() is not accessible \ No newline at end of file diff --git a/docs/checks/com_slack_lint_slack-lint-checks.md.html b/docs/checks/com_slack_lint_slack-lint-checks.md.html index 821f2bad..79cf8304 100644 --- a/docs/checks/com_slack_lint_slack-lint-checks.md.html +++ b/docs/checks/com_slack_lint_slack-lint-checks.md.html @@ -19,7 +19,7 @@ Compiled : Lint 8.0 and 8.1 Artifact -: com.slack.lint:slack-lint-checks:0.3.0 +: com.slack.lint:slack-lint-checks:0.7.0 (##) Included Issues @@ -27,7 +27,14 @@ |--------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------| |[CastingViewContextToActivity](CastingViewContextToActivity.md.html) |Unsafe cast of `Context` to `Activity` | |[ArgInFormattedQuantityStringRes](ArgInFormattedQuantityStringRes.md.html) |Count value in formatted string resource. | -|[BindsCanBeExtensionFunction](BindsCanBeExtensionFunction.md.html) |@Binds-annotated functions can be extension functions. | +|[BindsTypeMismatch](BindsTypeMismatch.md.html) |@Binds function parameters must be type-assignable to their return types. | +|[BindingReturnType](BindingReturnType.md.html) |@Binds/@Provides functions must have a return type. Cannot be void or Unit. | +|[BindingReceiverParameter](BindingReceiverParameter.md.html) |@Binds/@Provides functions cannot be extension functions. | +|[BindsWrongParameterCount](BindsWrongParameterCount.md.html) |@Binds functions require a single parameter as an input to bind. | +|[BindsMustBeAbstract](BindsMustBeAbstract.md.html) |@Binds functions must be abstract and cannot have function bodies. | +|[RedundantBinds](RedundantBinds.md.html) |@Binds functions should return a different type (including annotations) than the input type. | +|[MustBeInModule](MustBeInModule.md.html) |@Binds/@Provides function must be in `@Module`-annotated classes. | +|[ProvidesMustNotBeAbstract](ProvidesMustNotBeAbstract.md.html) |@Provides functions cannot be abstract. | |[KotlinPairNotCreated](KotlinPairNotCreated.md.html) |Use Kotlin's kotlin.Pair instead of other Pair types from other libraries like AndroidX and Slack commons | |[DoNotCallProviders](DoNotCallProviders.md.html) |Dagger provider methods should not be called directly by user code. | |[InclusiveNaming](InclusiveNaming.md.html) |Use inclusive naming. | @@ -41,6 +48,7 @@ |[SubscribeOnMain](SubscribeOnMain.md.html) |subscribeOn called with the main thread scheduler. | |[GuavaChecksUsed](GuavaChecksUsed.md.html) |Use Slack's JavaPreconditions instead of Guava's Preconditions checks | |[GuavaPreconditionsUsedInKotlin](GuavaPreconditionsUsedInKotlin.md.html) |Kotlin precondition checks should use the Kotlin standard library checks | +|[DoNotMockPlatformTypes](DoNotMockPlatformTypes.md.html) |platform types should not be mocked | |[DoNotMockDataClass](DoNotMockDataClass.md.html) |data classes represent pure data classes, so mocking them should not be necessary. | |[DoNotMock](DoNotMock.md.html) | | |[DoNotMockSealedClass](DoNotMockSealedClass.md.html) |sealed classes have a restricted type hierarchy, use a subtype instead | @@ -105,7 +113,9 @@ |[MissingResourceImportAlias](MissingResourceImportAlias.md.html) |Missing import alias for R class. | |[WrongResourceImportAlias](WrongResourceImportAlias.md.html) |Wrong import alias for this R class. | |[DenyListedApi](DenyListedApi.md.html) |Deny-listed API | +|[DenyListedBlockingApi](DenyListedBlockingApi.md.html) |Deny-listed API | |[ParcelizeFunctionProperty](ParcelizeFunctionProperty.md.html) |Function type properties should not be used in Parcelize classes | +|[ExceptionMessage](ExceptionMessage.md.html) |Please provide a string for the lazyMessage parameter | (##) Including @@ -116,17 +126,17 @@ ``` // build.gradle.kts -lintChecks("com.slack.lint:slack-lint-checks:0.3.0") +lintChecks("com.slack.lint:slack-lint-checks:0.7.0") // build.gradle -lintChecks 'com.slack.lint:slack-lint-checks:0.3.0' +lintChecks 'com.slack.lint:slack-lint-checks:0.7.0' // build.gradle.kts with version catalogs: lintChecks(libs.slack-lint-checks) # libs.versions.toml [versions] -slack-lint-checks = "0.3.0" +slack-lint-checks = "0.7.0" [libraries] slack-lint-checks = { module = "com.slack.lint:slack-lint-checks", @@ -134,7 +144,7 @@ } ``` -0.3.0 is the version this documentation was generated from; +0.7.0 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -192,6 +202,14 @@ * 0.2.3: Adds ParcelizeFunctionProperty. * 0.3.0: Adds DoNotMockObjectClass, DoNotMockRecordClass, DoNotMockSealedClass. +* 0.4.0: Adds DoNotMockPlatformTypes. +* 0.5.0: Adds BindingReceiverParameter, BindingReturnType, + BindsMustBeAbstract, BindsMustBeInModule, BindsTypeMismatch, + BindsWrongParameterCount, ProvidesMustNotBeAbstract, RedundantBinds. + Removes BindsCanBeExtensionFunction. +* 0.5.1: Adds MustBeInModule. Removes BindsMustBeInModule. +* 0.6.0: Adds ExceptionMessage. +* 0.7.0: Adds DenyListedBlockingApi. (##) Version Compatibility @@ -199,6 +217,12 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| +| 0.7.0|2023/10/27| 91| Yes| 8.0 and 8.1|8.0 and 8.1| +| 0.6.1|2023/10/09| 90| Yes| 8.0 and 8.1|8.0 and 8.1| +| 0.6.0|2023/09/26| 90| Yes| 8.0 and 8.1|8.0 and 8.1| +| 0.5.1|2023/09/09| 89| Yes| 8.0 and 8.1|8.0 and 8.1| +| 0.5.0|2023/09/08| 89| Yes| 8.0 and 8.1|8.0 and 8.1| +| 0.4.0|2023/07/20| 82| Yes| 8.0 and 8.1|8.0 and 8.1| | 0.3.0|2023/05/31| 81| Yes| 8.0 and 8.1|8.0 and 8.1| | 0.2.3|2023/02/22| 78| Yes| 8.0 and 8.1| 7.2| | 0.2.2|2023/02/09| 77| Yes| 8.0 and 8.1| 7.2| diff --git a/docs/checks/com_uber_autodispose2_autodispose-lint.md.html b/docs/checks/com_uber_autodispose2_autodispose-lint.md.html index d77bf8b5..ca352a0a 100644 --- a/docs/checks/com_uber_autodispose2_autodispose-lint.md.html +++ b/docs/checks/com_uber_autodispose2_autodispose-lint.md.html @@ -7,7 +7,7 @@ Project : https://github.com/uber/AutoDispose License -: [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) +: [The Apache Software License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt) Vendor : Uber Identifier @@ -15,11 +15,11 @@ Feedback : https://github.com/uber/AutoDispose/issues Min -: Lint 7.0 +: Lint 8.0 and 8.1 Compiled -: Lint 7.0 +: Lint 8.0 and 8.1 Artifact -: com.uber.autodispose2:autodispose-lint:2.1.1 +: com.uber.autodispose2:autodispose-lint:2.2.1 (##) Included Issues @@ -36,17 +36,17 @@ ``` // build.gradle.kts -lintChecks("com.uber.autodispose2:autodispose-lint:2.1.1") +lintChecks("com.uber.autodispose2:autodispose-lint:2.2.1") // build.gradle -lintChecks 'com.uber.autodispose2:autodispose-lint:2.1.1' +lintChecks 'com.uber.autodispose2:autodispose-lint:2.2.1' // build.gradle.kts with version catalogs: lintChecks(libs.autodispose-lint) # libs.versions.toml [versions] -autodispose-lint = "2.1.1" +autodispose-lint = "2.2.1" [libraries] autodispose-lint = { module = "com.uber.autodispose2:autodispose-lint", @@ -54,7 +54,7 @@ } ``` -2.1.1 is the version this documentation was generated from; +2.2.1 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -67,6 +67,8 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| +| 2.2.1|2023/07/26| 1| Yes| 8.0 and 8.1|8.0 and 8.1| +| 2.2.0|2023/07/23| 1| Yes| 8.0 and 8.1|8.0 and 8.1| | 2.1.1|2021/09/07| 1| Yes| 7.0| 7.0| | 2.1.0|2021/08/09| 1| Yes| 7.0| 7.0| diff --git a/docs/checks/com_vanniktech_lint-rules-android.md.html b/docs/checks/com_vanniktech_lint-rules-android.md.html index 528b0867..35ea3971 100644 --- a/docs/checks/com_vanniktech_lint-rules-android.md.html +++ b/docs/checks/com_vanniktech_lint-rules-android.md.html @@ -13,11 +13,11 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact -: com.vanniktech:lint-rules-android:0.24.0 +: com.vanniktech:lint-rules-android:0.25.0 (##) Included Issues @@ -74,17 +74,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-android:0.24.0") +lintChecks("com.vanniktech:lint-rules-android:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-android:0.24.0' +lintChecks 'com.vanniktech:lint-rules-android:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-android) # libs.versions.toml [versions] -lint-rules-android = "0.24.0" +lint-rules-android = "0.25.0" [libraries] lint-rules-android = { module = "com.vanniktech:lint-rules-android", @@ -92,7 +92,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -121,6 +121,7 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| +| 0.25.0|2023/09/17| 41| Yes| 8.0 and 8.1|8.0 and 8.1| | 0.24.0|2023/02/21| 41| Yes| 7.3 and 7.4|7.3 and 7.4| | 0.13.0|2020/03/22| 33| No[^1]| 3.6| 3.6| | 0.12.0|2019/04/29| 33| No[^1]| 3.4| 3.4| diff --git a/docs/checks/com_vanniktech_lint-rules-kotlin.md.html b/docs/checks/com_vanniktech_lint-rules-kotlin.md.html index ec57386d..7a9481a5 100644 --- a/docs/checks/com_vanniktech_lint-rules-kotlin.md.html +++ b/docs/checks/com_vanniktech_lint-rules-kotlin.md.html @@ -13,11 +13,11 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact -: com.vanniktech:lint-rules-kotlin:0.24.0 +: com.vanniktech:lint-rules-kotlin:0.25.0 (##) Included Issues @@ -34,17 +34,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-kotlin:0.24.0") +lintChecks("com.vanniktech:lint-rules-kotlin:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-kotlin:0.24.0' +lintChecks 'com.vanniktech:lint-rules-kotlin:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-kotlin) # libs.versions.toml [versions] -lint-rules-kotlin = "0.24.0" +lint-rules-kotlin = "0.25.0" [libraries] lint-rules-kotlin = { module = "com.vanniktech:lint-rules-kotlin", @@ -52,7 +52,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -65,6 +65,7 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| +| 0.25.0|2023/09/17| 1| Yes| 8.0 and 8.1|8.0 and 8.1| | 0.24.0|2023/02/21| 1| Yes| 7.3 and 7.4|7.3 and 7.4| | 0.23.0|2022/12/20| 1| Yes| 7.3 and 7.4| 7.0| | 0.22.0|2022/08/05| 1| Yes| 7.2| 7.0| diff --git a/docs/checks/com_vanniktech_lint-rules-rxjava2.md.html b/docs/checks/com_vanniktech_lint-rules-rxjava2.md.html index 52bc37b6..9297cba3 100644 --- a/docs/checks/com_vanniktech_lint-rules-rxjava2.md.html +++ b/docs/checks/com_vanniktech_lint-rules-rxjava2.md.html @@ -13,11 +13,11 @@ Feedback : https://github.com/vanniktech/lint-rules/issues Min -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Compiled -: Lint 7.3 and 7.4 +: Lint 8.0 and 8.1 Artifact -: com.vanniktech:lint-rules-rxjava2:0.24.0 +: com.vanniktech:lint-rules-rxjava2:0.25.0 (##) Included Issues @@ -40,17 +40,17 @@ ``` // build.gradle.kts -lintChecks("com.vanniktech:lint-rules-rxjava2:0.24.0") +lintChecks("com.vanniktech:lint-rules-rxjava2:0.25.0") // build.gradle -lintChecks 'com.vanniktech:lint-rules-rxjava2:0.24.0' +lintChecks 'com.vanniktech:lint-rules-rxjava2:0.25.0' // build.gradle.kts with version catalogs: lintChecks(libs.lint-rules-rxjava2) # libs.versions.toml [versions] -lint-rules-rxjava2 = "0.24.0" +lint-rules-rxjava2 = "0.25.0" [libraries] lint-rules-rxjava2 = { module = "com.vanniktech:lint-rules-rxjava2", @@ -58,7 +58,7 @@ } ``` -0.24.0 is the version this documentation was generated from; +0.25.0 is the version this documentation was generated from; there may be newer versions available. (##) Changes @@ -75,6 +75,7 @@ | Version | Date | Issues | Compatible | Compiled | Requires | |-------------------:|----------|-------:|------------|--------------:|---------:| +| 0.25.0|2023/09/17| 7| Yes| 8.0 and 8.1|8.0 and 8.1| | 0.24.0|2023/02/21| 7| Yes| 7.3 and 7.4|7.3 and 7.4| | 0.23.0|2022/12/20| 7| Yes| 7.3 and 7.4| 7.0| | 0.22.0|2022/08/05| 7| Yes| 7.2| 7.0| diff --git a/docs/checks/index.md.html b/docs/checks/index.md.html index 1c34194d..bd29e356 100644 --- a/docs/checks/index.md.html +++ b/docs/checks/index.md.html @@ -6,6 +6,7 @@ - [AaptCrash: Potential AAPT crash](AaptCrash.md.html) - [AcceptsUserCertificates: Allowing User Certificates](AcceptsUserCertificates.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) - [AlertDialogUsage: Use the support library AlertDialog instead of android.app.AlertDialog.](AlertDialogUsage.md.html) @@ -21,9 +22,10 @@ - [AppCompatMethod: Using Wrong AppCompat Method](AppCompatMethod.md.html) - [AppCompatResource: Menu namespace](AppCompatResource.md.html) - [AppIndexingService: App Indexing Background Services](AppIndexingService.md.html) - - [AppLinkUrlError: URL not supported by app for Firebase App Indexing](AppLinkUrlError.md.html) + - [AppLinkUrlError: URI invalid](AppLinkUrlError.md.html) - [AppLinksAutoVerify: App Links Auto Verification Failure](AppLinksAutoVerify.md.html) - [ApplySharedPref: Use `apply()` on `SharedPreferences`](ApplySharedPref.md.html) + - [ArcAnimationSpecTypeIssue: ArcAnimationSpec is designed for 2D values. Particularly, for positional values such as Offset.](ArcAnimationSpecTypeIssue.md.html) - [ArgInFormattedQuantityStringRes: Count value in formatted string resource.](ArgInFormattedQuantityStringRes.md.html) - [AssertionSideEffect: Assertions with Side Effects](AssertionSideEffect.md.html) - [AssertjImport: Flags Java 6 incompatible imports.](AssertjImport.md.html) @@ -40,11 +42,16 @@ - [BidiSpoofing: Bidirectional text spoofing](BidiSpoofing.md.html) - [BinaryOperationInTimber: Use String#format()](BinaryOperationInTimber.md.html) - [BinderGetCallingInMainThread: Incorrect usage of getCallingUid() or getCallingPid()](BinderGetCallingInMainThread.md.html) - - [BindsCanBeExtensionFunction: @Binds-annotated functions can be extension functions.](BindsCanBeExtensionFunction.md.html) + - [BindingReceiverParameter: @Binds/@Provides functions cannot be extension functions.](BindingReceiverParameter.md.html) + - [BindingReturnType: @Binds/@Provides functions must have a return type. Cannot be void or Unit.](BindingReturnType.md.html) + - [BindsMustBeAbstract: @Binds functions must be abstract and cannot have function bodies.](BindsMustBeAbstract.md.html) + - [BindsTypeMismatch: @Binds function parameters must be type-assignable to their return types.](BindsTypeMismatch.md.html) + - [BindsWrongParameterCount: @Binds functions require a single parameter as an input to bind.](BindsWrongParameterCount.md.html) - [BlockedPrivateApi: Using Blocked Private API](BlockedPrivateApi.md.html) - [BomWithoutPlatform: Using a BOM without platform call](BomWithoutPlatform.md.html) - [BottomAppBar: BottomAppBar Problems](BottomAppBar.md.html) - [BrokenIterator: Broken Iterator](BrokenIterator.md.html) + - [BuildListAdds: Missing `add` call in `buildList`](BuildListAdds.md.html) - [ButtonCase: Cancel/OK dialog button capitalization](ButtonCase.md.html) - [ButtonOrder: Button order](ButtonOrder.md.html) - [ButtonStyle: Button should be borderless](ButtonStyle.md.html) @@ -62,7 +69,6 @@ - [ComposableDestinationInComposeScope: Building composable destination in compose scope](ComposableDestinationInComposeScope.md.html) - [ComposableLambdaParameterNaming: Primary composable lambda parameter not named `content`](ComposableLambdaParameterNaming.md.html) - [ComposableLambdaParameterPosition: Non-trailing primary composable lambda parameter](ComposableLambdaParameterPosition.md.html) - - [ComposableModifierFactory: Modifier factory functions should not be @Composable](ComposableModifierFactory.md.html) - [ComposableNaming: Incorrect naming for @Composable functions](ComposableNaming.md.html) - [ComposableNavGraphInComposeScope: Building navigation graph in compose scope](ComposableNavGraphInComposeScope.md.html) - [ComposeComposableModifier: Using @Composable builder functions for modifiers is not recommended](ComposeComposableModifier.md.html) @@ -90,6 +96,7 @@ - [ContentDescription: Image without `contentDescription`](ContentDescription.md.html) - [ConvertToWebp: Convert to WebP](ConvertToWebp.md.html) - [CoroutineCreationDuringComposition: Calls to `async` or `launch` should happen inside a LaunchedEffect and not composition](CoroutineCreationDuringComposition.md.html) + - [CredentialDependency: `credentials-play-services-auth` is Required](CredentialDependency.md.html) - [CustomPermissionTypo: Permission appears to be a custom permission with a typo](CustomPermissionTypo.md.html) - [CustomSplashScreen: Application-defined Launch Screen](CustomSplashScreen.md.html) - [CustomViewStyleable: Mismatched Styleable/Custom View Name](CustomViewStyleable.md.html) @@ -104,6 +111,7 @@ - [DefaultLocale: Implied default locale in case conversion](DefaultLocale.md.html) - [DeletedProvider: Using Deleted Provider](DeletedProvider.md.html) - [DenyListedApi: Deny-listed API](DenyListedApi.md.html) + - [DenyListedBlockingApi: Deny-listed API](DenyListedBlockingApi.md.html) - [Deprecated: Using deprecated resources](Deprecated.md.html) - [DeprecatedCall: This class or method is deprecated; consider using an alternative.](DeprecatedCall.md.html) - [DeprecatedProvider: Using BC Provider](DeprecatedProvider.md.html) @@ -123,6 +131,7 @@ - [DoNotMockAutoValue: AutoValue classes represent pure data classes, so mocking them should not be necessary.](DoNotMockAutoValue.md.html) - [DoNotMockDataClass: data classes represent pure data classes, so mocking them should not be necessary.](DoNotMockDataClass.md.html) - [DoNotMockObjectClass: object classes are singletons, so mocking them should not be necessary](DoNotMockObjectClass.md.html) + - [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) - [DrawAllocation: Memory allocations within drawing code](DrawAllocation.md.html) @@ -146,6 +155,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) + - [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) - [ExperimentalAnnotationRetention: Experimental annotation with incorrect retention](ExperimentalAnnotationRetention.md.html) @@ -169,8 +179,8 @@ - [FragmentBackPressedCallback: Use getViewLifecycleOwner() as the LifecycleOwner instead of a Fragment instance.](FragmentBackPressedCallback.md.html) - [FragmentConstructorInjection: Fragment dependencies should be injected using constructor injections only.](FragmentConstructorInjection.md.html) - [FragmentFieldInjection: Fragment dependencies should be injected using the Fragment's constructor.](FragmentFieldInjection.md.html) - - [FragmentGradleConfiguration: Include the fragment-testing library using the debugImplementation configuration.](FragmentGradleConfiguration.md.html) (from androidx.fragment:fragment-testing:1.7.0-alpha01) - - [FragmentGradleConfiguration: Include the fragment-testing-manifest library using the debugImplementation configuration.](FragmentGradleConfiguration.md.html) (from androidx.fragment:fragment-testing-manifest:1.7.0-alpha01) + - [FragmentGradleConfiguration: Include the fragment-testing library using the debugImplementation configuration.](FragmentGradleConfiguration.md.html) (from androidx.fragment:fragment-testing:1.7.0-alpha09) + - [FragmentGradleConfiguration: Include the fragment-testing-manifest library using the debugImplementation configuration.](FragmentGradleConfiguration.md.html) (from androidx.fragment:fragment-testing-manifest:1.7.0-alpha09) - [FragmentLiveDataObserve: Use getViewLifecycleOwner() as the LifecycleOwner instead of a Fragment instance when observing a LiveData object.](FragmentLiveDataObserve.md.html) - [FragmentTagUsage: Use FragmentContainerView instead of the tag](FragmentTagUsage.md.html) - [FrequentlyChangedStateReadInComposition: Frequently changing state should not be directly read in composable function](FrequentlyChangedStateReadInComposition.md.html) @@ -224,8 +234,8 @@ - [ImpliedTouchscreenHardware: Touchscreen not optional](ImpliedTouchscreenHardware.md.html) - [InOrMmUsage: Using `mm` or `in` dimensions](InOrMmUsage.md.html) - [IncludeLayoutParam: Ignored layout params on include](IncludeLayoutParam.md.html) - - [InclusiveNaming: Use inclusive naming.](InclusiveNaming.md.html) (from com.slack.lint:slack-lint-checks:0.3.0) - - [InclusiveNaming: Use inclusive naming.](InclusiveNaming.md.html) (from com.slack.lint:slack-lint-checks:0.3.0) + - [InclusiveNaming: Use inclusive naming.](InclusiveNaming.md.html) (from com.slack.lint:slack-lint-checks:0.7.0) + - [InclusiveNaming: Use inclusive naming.](InclusiveNaming.md.html) (from com.slack.lint:slack-lint-checks:0.7.0) - [IncompatibleMediaBrowserServiceCompatVersion: Obsolete version of MediaBrowserServiceCompat](IncompatibleMediaBrowserServiceCompatVersion.md.html) - [InconsistentArrays: Inconsistencies in array element counts](InconsistentArrays.md.html) - [InconsistentLayout: Inconsistent Layouts](InconsistentLayout.md.html) @@ -245,6 +255,7 @@ - [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) + - [IntentWithNullActionLaunch: Unsafe intent launched with no action set](IntentWithNullActionLaunch.md.html) - [InternalInsetResource: Using internal inset dimension resource](InternalInsetResource.md.html) - [InvalidAccessibility: Marks invalid accessibility usages.](InvalidAccessibility.md.html) - [InvalidAnalyticsName: Invalid Analytics Name](InvalidAnalyticsName.md.html) @@ -400,7 +411,9 @@ - [MotionSceneFileValidationError: Validation errors in `MotionScene` files](MotionSceneFileValidationError.md.html) - [MultipleAwaitPointerEventScopes: Suspicious use of multiple awaitPointerEventScope blocks. Using multiple awaitPointerEventScope blocks may cause some input events to be dropped.](MultipleAwaitPointerEventScopes.md.html) - [MultipleUsesSdk: Multiple `` elements in the manifest](MultipleUsesSdk.md.html) + - [MustBeInModule: @Binds/@Provides function must be in `@Module`-annotated classes.](MustBeInModule.md.html) - [MutableCollectionMutableState: Creating a MutableState object with a mutable collection type](MutableCollectionMutableState.md.html) + - [MutableImplicitPendingIntent: Mutable Implicit PendingIntent is disallowed](MutableImplicitPendingIntent.md.html) - [MutatingSharedPrefs: Mutating an Immutable SharedPrefs Set](MutatingSharedPrefs.md.html) - [NamespaceTypo: Misspelled namespace declaration](NamespaceTypo.md.html) - [NamingPattern: Names should be well named.](NamingPattern.md.html) @@ -411,6 +424,7 @@ - [NewApi: Calling new methods on older versions](NewApi.md.html) - [NewerVersionAvailable: Newer Library Versions Available](NewerVersionAvailable.md.html) - [NfcTechWhitespace: Whitespace in NFC tech lists](NfcTechWhitespace.md.html) + - [NoCollectCallFound: You must call collect on the given progress flow when using PredictiveBackHandler](NoCollectCallFound.md.html) - [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) @@ -444,6 +458,7 @@ - [PermissionImpliesUnsupportedHardware: Permission Implies Unsupported Hardware](PermissionImpliesUnsupportedHardware.md.html) - [PermissionNamingConvention: Permission name does not follow recommended convention](PermissionNamingConvention.md.html) - [PinSetExpiry: Validate `` expiration attribute](PinSetExpiry.md.html) + - [PlaySdkIndexGenericIssues: Library has issues in SDK Index](PlaySdkIndexGenericIssues.md.html) - [PlaySdkIndexNonCompliant: Library has policy issues in SDK Index](PlaySdkIndexNonCompliant.md.html) - [PluralsCandidate: Potential Plurals](PluralsCandidate.md.html) - [PrivateApi: Using Private APIs](PrivateApi.md.html) @@ -453,8 +468,12 @@ - [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) + - [ProtoLayoutMinSchema: ProtoLayout feature is not guaranteed to be available on the target device API.](ProtoLayoutMinSchema.md.html) (from androidx.wear.protolayout:protolayout-expression:1.1.0-rc01) + - [ProtoLayoutMinSchema: ProtoLayout feature is not guaranteed to be available on the target device API.](ProtoLayoutMinSchema.md.html) (from androidx.wear.protolayout:protolayout:1.1.0-rc01) - [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) + - [PublicKeyCredential: Creating public key credential](PublicKeyCredential.md.html) - [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) @@ -465,6 +484,7 @@ - [Recycle: Missing `recycle()` calls](Recycle.md.html) - [RecyclerView: RecyclerView Problems](RecyclerView.md.html) - [RedactedInJavaUsage: @Redacted is only supported in Kotlin classes!](RedactedInJavaUsage.md.html) + - [RedundantBinds: @Binds functions should return a different type (including annotations) than the input type.](RedundantBinds.md.html) - [RedundantLabel: Redundant label on activity](RedundantLabel.md.html) - [RedundantNamespace: Redundant namespace](RedundantNamespace.md.html) - [ReferenceType: Incorrect reference types](ReferenceType.md.html) @@ -512,8 +532,10 @@ - [ScrollViewCount: `ScrollView` can have only one child](ScrollViewCount.md.html) - [ScrollViewSize: ScrollView size validation](ScrollViewSize.md.html) - [SdCardPath: Hardcoded reference to `/sdcard`](SdCardPath.md.html) + - [SecretInSource: Secret in source code](SecretInSource.md.html) - [SecureRandom: Using a fixed seed with `SecureRandom`](SecureRandom.md.html) - [SelectableText: Dynamic text should probably be selectable](SelectableText.md.html) + - [SelectedPhotoAccess: Behavior change when requesting photo library access](SelectedPhotoAccess.md.html) - [SerializableUsage: Don't use Serializable.](SerializableUsage.md.html) - [ServiceCast: Wrong system service casts](ServiceCast.md.html) - [SetAndClearCommunicationDevice: Clearing communication device](SetAndClearCommunicationDevice.md.html) @@ -536,6 +558,7 @@ - [SpecifyForegroundServiceType: Specify foreground service type](SpecifyForegroundServiceType.md.html) - [SpecifyJobSchedulerIdRange: Specify a range of JobScheduler ids](SpecifyJobSchedulerIdRange.md.html) - [SquareAndRoundTilePreviews: TileProvider does not have round and square previews](SquareAndRoundTilePreviews.md.html) + - [StartActivityAndCollapseDeprecated: TileService.startActivityAndCollapse(Intent) is deprecated](StartActivityAndCollapseDeprecated.md.html) - [StateFlowValueCalledInComposition: StateFlow.value should not be called within composition](StateFlowValueCalledInComposition.md.html) - [StateListReachable: Unreachable state in a ``](StateListReachable.md.html) - [StaticFieldLeak: Static Field Leaks](StaticFieldLeak.md.html) @@ -561,10 +584,12 @@ - [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) + - [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) - [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) + - [TilePreviewImageFormat: Tile preview is not compliant with standards](TilePreviewImageFormat.md.html) - [TileProviderPermissions: TileProvider does not set permission](TileProviderPermissions.md.html) - [TimberArgCount: Formatting argument types incomplete or inconsistent](TimberArgCount.md.html) - [TimberArgTypes: Formatting string doesn't match passed arguments](TimberArgTypes.md.html) @@ -580,7 +605,7 @@ - [TypographyEllipsis: Ellipsis string can be replaced with ellipsis character](TypographyEllipsis.md.html) - [TypographyFractions: Fraction string can be replaced with fraction character](TypographyFractions.md.html) - [TypographyOther: Other typographical problems](TypographyOther.md.html) - - [TypographyQuotes: Straight quotes can be replaced with curvy quotes](TypographyQuotes.md.html) + - [TypographyQuotes: Straight quotes can be replaced with curvy quotes, and apostrophes with typographic apostrophes.](TypographyQuotes.md.html) - [Typos: Spelling error](Typos.md.html) - [UastImplementation: Avoid using UAST implementation](UastImplementation.md.html) - [UniqueConstants: Overlapping Enumeration Constants](UniqueConstants.md.html) @@ -593,6 +618,7 @@ - [UnprotectedSMSBroadcastReceiver: Unprotected SMS `BroadcastReceiver`](UnprotectedSMSBroadcastReceiver.md.html) - [UnrememberedAnimatable: Creating an Animatable during composition without using `remember`](UnrememberedAnimatable.md.html) - [UnrememberedGetBackStackEntry: Calling getBackStackEntry during composition without using `remember`with a NavBackStackEntry key](UnrememberedGetBackStackEntry.md.html) + - [UnrememberedMutableInteractionSource: Creating a MutableInteractionSource during composition without using `remember`](UnrememberedMutableInteractionSource.md.html) - [UnrememberedMutableState: Creating a state object during composition without using `remember`](UnrememberedMutableState.md.html) - [UnsafeDynamicallyLoadedCode: `load` used to dynamically load code](UnsafeDynamicallyLoadedCode.md.html) - [UnsafeImplicitIntentLaunch: Implicit intent matches an internal non-exported component](UnsafeImplicitIntentLaunch.md.html) @@ -611,6 +637,7 @@ - [UnsupportedTvHardware: Unsupported TV Hardware Feature](UnsupportedTvHardware.md.html) - [Untranslatable: Translated Untranslatable](Untranslatable.md.html) - [UnusedAttribute: Attribute unused on older versions](UnusedAttribute.md.html) + - [UnusedBoxWithConstraintsScope: BoxWithConstraints content should use the constraints provided via BoxWithConstraintsScope](UnusedBoxWithConstraintsScope.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) - [UnusedIds: Unused id](UnusedIds.md.html) @@ -637,6 +664,7 @@ - [UseOfNonLambdaOffsetOverload: Modifier.offset{ } is preferred over Modifier.offset() for `State` backed arguments.](UseOfNonLambdaOffsetOverload.md.html) - [UseRequireInsteadOfGet: Use the 'require_____()' API rather than 'get____()' API for more descriptive error messages when it's null.](UseRequireInsteadOfGet.md.html) - [UseRxSetProgress2: `setProgress` is deprecated. Use `setCompletableProgress` instead.](UseRxSetProgress2.md.html) + - [UseSdkSuppress: Using `@SdkSuppress` instead of `@RequiresApi`](UseSdkSuppress.md.html) - [UseSparseArrays: HashMap can be replaced with SparseArray](UseSparseArrays.md.html) - [UseSupportActionBar: Should not call `Activity.setActionBar` if you extend `AppCompatActivity`](UseSupportActionBar.md.html) - [UseSwitchCompatOrMaterialCode: Replace usage of `Switch` widget](UseSwitchCompatOrMaterialCode.md.html) @@ -647,6 +675,7 @@ - [UselessParent: Unnecessary parent layout](UselessParent.md.html) - [UsingC2DM: Using C2DM](UsingC2DM.md.html) - [UsingHttp: Using HTTP instead of HTTPS](UsingHttp.md.html) + - [UsingMaterialAndMaterial3Libraries: material and material3 are separate, incompatible design system libraries](UsingMaterialAndMaterial3Libraries.md.html) - [UsingOnClickInXml: Using `android:onClick` on older version of the platform is broken](UsingOnClickInXml.md.html) - [ValidActionsXml: Invalid Action Descriptor](ValidActionsXml.md.html) - [ValidFragment: Fragment not instantiatable](ValidFragment.md.html) @@ -664,7 +693,10 @@ - [WatchFaceEditor: Watch face editor must use launchMode="standard"](WatchFaceEditor.md.html) - [WatchFaceForAndroidX: AndroidX watch faces must use action `WATCH_FACE_EDITOR`](WatchFaceForAndroidX.md.html) - [WearBackNavigation: Wear: Disabling Back navigation](WearBackNavigation.md.html) + - [WearMaterialTheme: Using not non-Wear `MaterialTheme` in a Wear OS project](WearMaterialTheme.md.html) - [WearPasswordInput: Wear: Using password input](WearPasswordInput.md.html) + - [WearRecents: Wear OS: Recents and app resume](WearRecents.md.html) + - [WearSplashScreen: Wear: Use `SplashScreen` library](WearSplashScreen.md.html) - [WearStandaloneAppFlag: Invalid or missing Wear standalone app flag](WearStandaloneAppFlag.md.html) - [WearableActionDuplicate: Duplicate watch face configuration activities found](WearableActionDuplicate.md.html) - [WearableBindListener: Usage of Android Wear BIND_LISTENER is deprecated](WearableBindListener.md.html) @@ -682,6 +714,7 @@ - [WrongAnnotationOrder: Checks that Annotations comply with a certain order.](WrongAnnotationOrder.md.html) - [WrongCall: Using wrong draw/layout method](WrongCall.md.html) - [WrongCase: Wrong case for view tag](WrongCase.md.html) + - [WrongCommentType: Wrong Comment Type](WrongCommentType.md.html) - [WrongConstant: Incorrect constant](WrongConstant.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/checks/libraries.md.html b/docs/checks/libraries.md.html index 08aced19..a8bac4b2 100644 --- a/docs/checks/libraries.md.html +++ b/docs/checks/libraries.md.html @@ -10,24 +10,25 @@ * [com.vanniktech:lint-rules-rxjava2](com_vanniktech_lint-rules-rxjava2.md.html) (7 checks) * [com.vanniktech:lint-rules-kotlin](com_vanniktech_lint-rules-kotlin.md.html) (1 checks) * [com.vanniktech:lint-rules-android](com_vanniktech_lint-rules-android.md.html) (41 checks) -* [com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html) (81 checks) +* [com.slack.lint:slack-lint-checks](com_slack_lint_slack-lint-checks.md.html) (91 checks) * [com.slack.lint.compose:compose-lint-checks](com_slack_lint_compose_compose-lint-checks.md.html) (18 checks) Android archive libraries which also contain bundled lint checks: -* [androidx.activity:activity-compose](androidx_activity_activity-compose.md.html) (1 checks) +* [androidx.activity:activity-compose](androidx_activity_activity-compose.md.html) (2 checks) * [androidx.activity:activity](androidx_activity_activity.md.html) (1 checks) -* [androidx.compose.ui:ui](androidx_compose_ui_ui.md.html) (10 checks) * [androidx.compose.ui:ui-test-manifest](androidx_compose_ui_ui-test-manifest.md.html) (1 checks) -* [androidx.compose.ui:ui-graphics](androidx_compose_ui_ui-graphics.md.html) (2 checks) -* [androidx.compose.runtime:runtime-saveable](androidx_compose_runtime_runtime-saveable.md.html) (1 checks) -* [androidx.compose.runtime:runtime](androidx_compose_runtime_runtime.md.html) (14 checks) -* [androidx.compose.animation:animation-core](androidx_compose_animation_animation-core.md.html) (2 checks) -* [androidx.compose.animation:animation](androidx_compose_animation_animation.md.html) (2 checks) -* [androidx.compose.foundation:foundation](androidx_compose_foundation_foundation.md.html) (2 checks) -* [androidx.compose.material3:material3](androidx_compose_material3_material3.md.html) (1 checks) -* [androidx.compose.material:material](androidx_compose_material_material.md.html) (2 checks) +* [androidx.compose.ui:ui-android](androidx_compose_ui_ui-android.md.html) (9 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) (14 checks) +* [androidx.compose.animation:animation-core-android](androidx_compose_animation_animation-core-android.md.html) (3 checks) +* [androidx.compose.animation:animation-android](androidx_compose_animation_animation-android.md.html) (2 checks) +* [androidx.compose.foundation:foundation-android](androidx_compose_foundation_foundation-android.md.html) (4 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) * [androidx.lifecycle:lifecycle-livedata-core-ktx](androidx_lifecycle_lifecycle-livedata-core-ktx.md.html) (1 checks) +* [androidx.lifecycle:lifecycle-runtime-testing](androidx_lifecycle_lifecycle-runtime-testing.md.html) (1 checks) * [androidx.lifecycle:lifecycle-runtime-ktx](androidx_lifecycle_lifecycle-runtime-ktx.md.html) (2 checks) * [androidx.navigation:navigation-compose](androidx_navigation_navigation-compose.md.html) (3 checks) * [androidx.navigation:navigation-runtime](androidx_navigation_navigation-runtime.md.html) (1 checks) @@ -40,6 +41,8 @@ * [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) (1 checks) +* [androidx.wear.protolayout:protolayout](androidx_wear_protolayout_protolayout.md.html) (1 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 2cea6925..2dfa4985 100644 --- a/docs/checks/severity.md.html +++ b/docs/checks/severity.md.html @@ -60,16 +60,21 @@ - [WrongFolder: Resource file in the wrong `res` folder](WrongFolder.md.html) - [WrongManifestParent: Wrong manifest parent](WrongManifestParent.md.html) -* Error (258) +* Error (280) - [AccidentalOctal: Accidental Octal](AccidentalOctal.md.html) - [AppCompatCustomView: Appcompat Custom Widgets](AppCompatCustomView.md.html) - [AppCompatResource: Menu namespace](AppCompatResource.md.html) - - [AppLinkUrlError: URL not supported by app for Firebase App Indexing](AppLinkUrlError.md.html) + - [AppLinkUrlError: URI invalid](AppLinkUrlError.md.html) - [AppLinksAutoVerify: App Links Auto Verification Failure](AppLinksAutoVerify.md.html) - [AutoDispose: Missing Disposable handling: Apply AutoDispose or cache the Disposable instance manually and enable lenient mode.](AutoDispose.md.html) - [BidiSpoofing: Bidirectional text spoofing](BidiSpoofing.md.html) - [BinderGetCallingInMainThread: Incorrect usage of getCallingUid() or getCallingPid()](BinderGetCallingInMainThread.md.html) + - [BindingReceiverParameter: @Binds/@Provides functions cannot be extension functions.](BindingReceiverParameter.md.html) + - [BindingReturnType: @Binds/@Provides functions must have a return type. Cannot be void or Unit.](BindingReturnType.md.html) + - [BindsMustBeAbstract: @Binds functions must be abstract and cannot have function bodies.](BindsMustBeAbstract.md.html) + - [BindsTypeMismatch: @Binds function parameters must be type-assignable to their return types.](BindsTypeMismatch.md.html) + - [BindsWrongParameterCount: @Binds functions require a single parameter as an input to bind.](BindsWrongParameterCount.md.html) - [BottomAppBar: BottomAppBar Problems](BottomAppBar.md.html) - [ByteOrderMark: Byte order mark inside files](ByteOrderMark.md.html) - [CastingViewContextToActivity: Unsafe cast of `Context` to `Activity`](CastingViewContextToActivity.md.html) @@ -98,6 +103,7 @@ - [DefaultEncoding: Using Default Character Encoding](DefaultEncoding.md.html) - [DeletedProvider: Using Deleted Provider](DeletedProvider.md.html) - [DenyListedApi: Deny-listed API](DenyListedApi.md.html) + - [DenyListedBlockingApi: Deny-listed API](DenyListedBlockingApi.md.html) - [DiffUtilEquals: Suspicious DiffUtil Equality](DiffUtilEquals.md.html) - [DoNotCallProviders: Dagger provider methods should not be called directly by user code.](DoNotCallProviders.md.html) - [DoNotExposeEitherNetInRepositories: Repository APIs should not expose EitherNet types directly.](DoNotExposeEitherNetInRepositories.md.html) @@ -105,6 +111,7 @@ - [DoNotMockAutoValue: AutoValue classes represent pure data classes, so mocking them should not be necessary.](DoNotMockAutoValue.md.html) - [DoNotMockDataClass: data classes represent pure data classes, so mocking them should not be necessary.](DoNotMockDataClass.md.html) - [DoNotMockObjectClass: object classes are singletons, so mocking them should not be necessary](DoNotMockObjectClass.md.html) + - [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) - [DuplicateDefinition: Duplicate definitions of resources](DuplicateDefinition.md.html) @@ -113,8 +120,8 @@ - [EmptyNavDeepLink: NavDeepLink must define an uri, action, and/or mimetype to be valid.](EmptyNavDeepLink.md.html) - [ErrorProneDoNotMockUsage: Use Slack's internal `@DoNotMock` annotation.](ErrorProneDoNotMockUsage.md.html) - [ExactAlarm: Invalid Usage of Exact Alarms](ExactAlarm.md.html) + - [ExceptionMessage: Please provide a string for the lazyMessage parameter](ExceptionMessage.md.html) - [ExperimentalAnnotationRetention: Experimental annotation with incorrect retention](ExperimentalAnnotationRetention.md.html) - - [ExpiringTargetSdkVersion: TargetSdkVersion Soon Expiring](ExpiringTargetSdkVersion.md.html) - [ExtraText: Extraneous text in resource files](ExtraText.md.html) - [FlowOperatorInvokedInComposition: Flow operator functions should not be invoked within composition](FlowOperatorInvokedInComposition.md.html) - [FontValidation: Validation of font files](FontValidation.md.html) @@ -226,7 +233,10 @@ - [MotionLayoutInvalidSceneFileReference: layoutDescription must specify a scene file](MotionLayoutInvalidSceneFileReference.md.html) - [MotionLayoutMissingId: Views inside `MotionLayout` require an `android:id`](MotionLayoutMissingId.md.html) - [MotionSceneFileValidationError: Validation errors in `MotionScene` files](MotionSceneFileValidationError.md.html) + - [MustBeInModule: @Binds/@Provides function must be in `@Module`-annotated classes.](MustBeInModule.md.html) + - [MutableImplicitPendingIntent: Mutable Implicit PendingIntent is disallowed](MutableImplicitPendingIntent.md.html) - [NewApi: Calling new methods on older versions](NewApi.md.html) + - [NoCollectCallFound: You must call collect on the given progress flow when using PredictiveBackHandler](NoCollectCallFound.md.html) - [NotInterpolated: Incorrect Interpolation](NotInterpolated.md.html) - [NotificationId0: Notification Id is 0](NotificationId0.md.html) - [NotificationPermission: Notifications Without Permission](NotificationPermission.md.html) @@ -240,15 +250,20 @@ - [ParcelizeFunctionProperty: Function type properties should not be used in Parcelize classes](ParcelizeFunctionProperty.md.html) - [PendingBindings: Missing Pending Bindings](PendingBindings.md.html) - [PermissionImpliesUnsupportedChromeOsHardware: Permission Implies Unsupported Chrome OS Hardware](PermissionImpliesUnsupportedChromeOsHardware.md.html) + - [PlaySdkIndexGenericIssues: Library has issues in SDK Index](PlaySdkIndexGenericIssues.md.html) - [PlaySdkIndexNonCompliant: Library has policy issues in SDK Index](PlaySdkIndexNonCompliant.md.html) - [ProduceStateDoesNotAssignValue: produceState calls should assign `value` inside the producer lambda](ProduceStateDoesNotAssignValue.md.html) - [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.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) - [RawDispatchersUse: Use SlackDispatchers.](RawDispatchersUse.md.html) - [RecyclerView: RecyclerView Problems](RecyclerView.md.html) - [RedactedInJavaUsage: @Redacted is only supported in Kotlin classes!](RedactedInJavaUsage.md.html) + - [RedundantBinds: @Binds functions should return a different type (including annotations) than the input type.](RedundantBinds.md.html) - [RememberReturnType: `remember` calls must not return `Unit`](RememberReturnType.md.html) - [RememberSaveableSaverParameter: `Saver` objects should be passed to the saver parameter, not the vararg `inputs` parameter](RememberSaveableSaverParameter.md.html) - [RemoteViewLayout: Unsupported View in RemoteView](RemoteViewLayout.md.html) @@ -269,6 +284,7 @@ - [ServiceCast: Wrong system service casts](ServiceCast.md.html) - [SoonBlockedPrivateApi: Using Soon-to-Be Blocked Private API](SoonBlockedPrivateApi.md.html) - [SpanMarkPointMissingMask: Check that Span flags use the bitwise mask SPAN_POINT_MARK_MASK when being compared to.](SpanMarkPointMissingMask.md.html) + - [StartActivityAndCollapseDeprecated: TileService.startActivityAndCollapse(Intent) is deprecated](StartActivityAndCollapseDeprecated.md.html) - [StateFlowValueCalledInComposition: StateFlow.value should not be called within composition](StateFlowValueCalledInComposition.md.html) - [StringEscaping: Invalid string escapes](StringEscaping.md.html) - [StringFormatInvalid: Invalid format string](StringFormatInvalid.md.html) @@ -279,12 +295,15 @@ - [Suspicious0dp: Suspicious 0dp dimension](Suspicious0dp.md.html) - [SuspiciousCompositionLocalModifierRead: CompositionLocals should not be read in Modifier.onAttach() or Modifier.onDetach()](SuspiciousCompositionLocalModifierRead.md.html) - [SuspiciousIndentation: Suspicious indentation](SuspiciousIndentation.md.html) + - [TestLifecycleOwnerInCoroutine: Use the suspending function setCurrentState(), rather than directly accessing the currentState property.](TestLifecycleOwnerInCoroutine.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) - [TimberTagLength: Too Long Log Tags](TimberTagLength.md.html) - [UniqueConstants: Overlapping Enumeration Constants](UniqueConstants.md.html) - [UnrememberedAnimatable: Creating an Animatable during composition without using `remember`](UnrememberedAnimatable.md.html) - [UnrememberedGetBackStackEntry: Calling getBackStackEntry during composition without using `remember`with a NavBackStackEntry key](UnrememberedGetBackStackEntry.md.html) + - [UnrememberedMutableInteractionSource: Creating a MutableInteractionSource during composition without using `remember`](UnrememberedMutableInteractionSource.md.html) - [UnrememberedMutableState: Creating a state object during composition without using `remember`](UnrememberedMutableState.md.html) - [UnsafeImplicitIntentLaunch: Implicit intent matches an internal non-exported component](UnsafeImplicitIntentLaunch.md.html) - [UnsafeLifecycleWhenUsage: Unsafe UI operation in finally/catch of Lifecycle.whenStarted of similar method](UnsafeLifecycleWhenUsage.md.html) @@ -294,6 +313,7 @@ - [UnsupportedChromeOsHardware: Unsupported Chrome OS Hardware Feature](UnsupportedChromeOsHardware.md.html) - [UnsupportedLayoutAttribute: Marks layout attributes which are not supported.](UnsupportedLayoutAttribute.md.html) - [UnsupportedTvHardware: Unsupported TV Hardware Feature](UnsupportedTvHardware.md.html) + - [UnusedBoxWithConstraintsScope: BoxWithConstraints content should use the constraints provided via BoxWithConstraintsScope](UnusedBoxWithConstraintsScope.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) - [UnusedMaterial3ScaffoldPaddingParameter: Scaffold content should use the padding provided as a lambda parameter](UnusedMaterial3ScaffoldPaddingParameter.md.html) @@ -302,10 +322,12 @@ - [UseAndroidAlpha: `android:alpha` attribute missing on `ColorStateList`](UseAndroidAlpha.md.html) - [UseAppTint: `app:tint` attribute should be used on `ImageView` and `ImageButton`](UseAppTint.md.html) - [UseRequireInsteadOfGet: Use the 'require_____()' API rather than 'get____()' API for more descriptive error messages when it's null.](UseRequireInsteadOfGet.md.html) + - [UseSdkSuppress: Using `@SdkSuppress` instead of `@RequiresApi`](UseSdkSuppress.md.html) - [UsingC2DM: Using C2DM](UsingC2DM.md.html) - [ValidFragment: Fragment not instantiatable](ValidFragment.md.html) - [VectorDrawableCompat: Using VectorDrawableCompat](VectorDrawableCompat.md.html) - [ViewBindingType: `tools:viewBindingType` issues](ViewBindingType.md.html) + - [WearMaterialTheme: Using not non-Wear `MaterialTheme` in a Wear OS project](WearMaterialTheme.md.html) - [WearPasswordInput: Wear: Using password input](WearPasswordInput.md.html) - [WearStandaloneAppFlag: Invalid or missing Wear standalone app flag](WearStandaloneAppFlag.md.html) - [WebViewLayout: WebViews in wrap_content parents](WebViewLayout.md.html) @@ -321,9 +343,10 @@ - [WrongViewCast: Mismatched view type](WrongViewCast.md.html) - [XmlEscapeNeeded: Missing XML Escape](XmlEscapeNeeded.md.html) -* Warning (378) +* Warning (388) - [AcceptsUserCertificates: Allowing User Certificates](AcceptsUserCertificates.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) - [AlertDialogUsage: Use the support library AlertDialog instead of android.app.AlertDialog.](AlertDialogUsage.md.html) @@ -342,7 +365,6 @@ - [AssertionSideEffect: Assertions with Side Effects](AssertionSideEffect.md.html) - [AssertjImport: Flags Java 6 incompatible imports.](AssertjImport.md.html) - [AuthLeak: Code might contain an auth leak](AuthLeak.md.html) - - [AutoboxingStateCreation: `State` will autobox values assigned to this state. Use a specialized state type instead.](AutoboxingStateCreation.md.html) - [AutoboxingStateValueProperty: State access causes value to be autoboxed](AutoboxingStateValueProperty.md.html) - [Autofill: Use Autofill](Autofill.md.html) - [BackButton: Back button](BackButton.md.html) @@ -352,6 +374,7 @@ - [BinaryOperationInTimber: Use String#format()](BinaryOperationInTimber.md.html) - [BomWithoutPlatform: Using a BOM without platform call](BomWithoutPlatform.md.html) - [BrokenIterator: Broken Iterator](BrokenIterator.md.html) + - [BuildListAdds: Missing `add` call in `buildList`](BuildListAdds.md.html) - [ButtonCase: Cancel/OK dialog button capitalization](ButtonCase.md.html) - [ButtonOrder: Button order](ButtonOrder.md.html) - [ButtonStyle: Button should be borderless](ButtonStyle.md.html) @@ -365,7 +388,6 @@ - [CommitTransaction: Missing `commit()` calls](CommitTransaction.md.html) - [ComposableLambdaParameterNaming: Primary composable lambda parameter not named `content`](ComposableLambdaParameterNaming.md.html) - [ComposableLambdaParameterPosition: Non-trailing primary composable lambda parameter](ComposableLambdaParameterPosition.md.html) - - [ComposableModifierFactory: Modifier factory functions should not be @Composable](ComposableModifierFactory.md.html) - [ComposableNaming: Incorrect naming for @Composable functions](ComposableNaming.md.html) - [ComposeCompositionLocalUsage: CompositionLocals are discouraged](ComposeCompositionLocalUsage.md.html) - [ComposeUnstableCollections: Immutable collections should ideally be used in Composables](ComposeUnstableCollections.md.html) @@ -374,6 +396,7 @@ - [ConstraintLayoutToolsEditorAttribute: Flags tools:layout_editor xml properties.](ConstraintLayoutToolsEditorAttribute.md.html) - [ContentDescription: Image without `contentDescription`](ContentDescription.md.html) - [ConvertToWebp: Convert to WebP](ConvertToWebp.md.html) + - [CredentialDependency: `credentials-play-services-auth` is Required](CredentialDependency.md.html) - [CustomPermissionTypo: Permission appears to be a custom permission with a typo](CustomPermissionTypo.md.html) - [CustomSplashScreen: Application-defined Launch Screen](CustomSplashScreen.md.html) - [CustomViewStyleable: Mismatched Styleable/Custom View Name](CustomViewStyleable.md.html) @@ -407,6 +430,7 @@ - [ErroneousLayoutAttribute: Layout attribute that's not applicable to a particular view.](ErroneousLayoutAttribute.md.html) - [ExifInterface: Using `android.media.ExifInterface`](ExifInterface.md.html) - [ExpensiveAssertion: Expensive Assertions](ExpensiveAssertion.md.html) + - [ExpiringTargetSdkVersion: TargetSdkVersion Soon Expiring](ExpiringTargetSdkVersion.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) @@ -464,6 +488,7 @@ - [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) + - [IntentWithNullActionLaunch: Unsafe intent launched with no action set](IntentWithNullActionLaunch.md.html) - [InternalInsetResource: Using internal inset dimension resource](InternalInsetResource.md.html) - [InvalidAccessibility: Marks invalid accessibility usages.](InvalidAccessibility.md.html) - [InvalidColorHexValue: Invalid Color hex value](InvalidColorHexValue.md.html) @@ -553,6 +578,7 @@ - [ProguardSplit: Proguard.cfg file contains generic Android rules](ProguardSplit.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) - [RawColor: Flags color that are not defined as resource.](RawColor.md.html) @@ -583,8 +609,10 @@ - [ScrollViewCount: `ScrollView` can have only one child](ScrollViewCount.md.html) - [ScrollViewSize: ScrollView size validation](ScrollViewSize.md.html) - [SdCardPath: Hardcoded reference to `/sdcard`](SdCardPath.md.html) + - [SecretInSource: Secret in source code](SecretInSource.md.html) - [SecureRandom: Using a fixed seed with `SecureRandom`](SecureRandom.md.html) - [SelectableText: Dynamic text should probably be selectable](SelectableText.md.html) + - [SelectedPhotoAccess: Behavior change when requesting photo library access](SelectedPhotoAccess.md.html) - [SetAndClearCommunicationDevice: Clearing communication device](SetAndClearCommunicationDevice.md.html) - [SetJavaScriptEnabled: Using `setJavaScriptEnabled`](SetJavaScriptEnabled.md.html) - [SetTextI18n: TextView Internationalization](SetTextI18n.md.html) @@ -630,7 +658,7 @@ - [TypographyEllipsis: Ellipsis string can be replaced with ellipsis character](TypographyEllipsis.md.html) - [TypographyFractions: Fraction string can be replaced with fraction character](TypographyFractions.md.html) - [TypographyOther: Other typographical problems](TypographyOther.md.html) - - [TypographyQuotes: Straight quotes can be replaced with curvy quotes](TypographyQuotes.md.html) + - [TypographyQuotes: Straight quotes can be replaced with curvy quotes, and apostrophes with typographic apostrophes.](TypographyQuotes.md.html) - [Typos: Spelling error](Typos.md.html) - [UastImplementation: Avoid using UAST implementation](UastImplementation.md.html) - [UnknownIdInLayout: Reference to an id that is not in the current layout](UnknownIdInLayout.md.html) @@ -672,6 +700,7 @@ - [UselessLeaf: Unnecessary leaf layout](UselessLeaf.md.html) - [UselessParent: Unnecessary parent layout](UselessParent.md.html) - [UsingHttp: Using HTTP instead of HTTPS](UsingHttp.md.html) + - [UsingMaterialAndMaterial3Libraries: material and material3 are separate, incompatible design system libraries](UsingMaterialAndMaterial3Libraries.md.html) - [UsingOnClickInXml: Using `android:onClick` on older version of the platform is broken](UsingOnClickInXml.md.html) - [VectorPath: Long vector paths](VectorPath.md.html) - [VectorRaster: Vector Image Generation](VectorRaster.md.html) @@ -684,6 +713,8 @@ - [WatchFaceEditor: Watch face editor must use launchMode="standard"](WatchFaceEditor.md.html) - [WatchFaceForAndroidX: AndroidX watch faces must use action `WATCH_FACE_EDITOR`](WatchFaceForAndroidX.md.html) - [WearBackNavigation: Wear: Disabling Back navigation](WearBackNavigation.md.html) + - [WearRecents: Wear OS: Recents and app resume](WearRecents.md.html) + - [WearSplashScreen: Wear: Use `SplashScreen` library](WearSplashScreen.md.html) - [WearableActionDuplicate: Duplicate watch face configuration activities found](WearableActionDuplicate.md.html) - [WearableConfigurationAction: Wear configuration action metadata must match an activity](WearableConfigurationAction.md.html) - [WebViewApiAvailability: WebView API Availability](WebViewApiAvailability.md.html) @@ -693,6 +724,7 @@ - [WorldReadableFiles: `openFileOutput()` with `MODE_WORLD_READABLE`](WorldReadableFiles.md.html) - [WorldWriteableFiles: `openFileOutput()` with `MODE_WORLD_WRITEABLE`](WorldWriteableFiles.md.html) - [WrongAnnotationOrder: Checks that Annotations comply with a certain order.](WrongAnnotationOrder.md.html) + - [WrongCommentType: Wrong Comment Type](WrongCommentType.md.html) - [WrongDrawableName: Drawable names should be prefixed accordingly.](WrongDrawableName.md.html) - [WrongGlobalIconColor: Each icon should have the same global color defined.](WrongGlobalIconColor.md.html) - [WrongLayoutName: Layout names should be prefixed accordingly.](WrongLayoutName.md.html) @@ -702,9 +734,10 @@ - [WrongViewIdFormat: Flag view ids that are not in lowerCamelCase Format.](WrongViewIdFormat.md.html) - [XmlSpacing: XML files should not contain any new lines.](XmlSpacing.md.html) -* Information (7) +* Information (8) - - [BindsCanBeExtensionFunction: @Binds-annotated functions can be extension functions.](BindsCanBeExtensionFunction.md.html) + - [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) - [KtxExtensionAvailable: KTX Extension Available](KtxExtensionAvailable.md.html) - [ModifierNodeInspectableProperties: ModifierNodeElement missing inspectableProperties](ModifierNodeInspectableProperties.md.html) - [MoshiUsageNonMoshiClassCollection: Concrete Collection type '%HINT%' is not natively supported by Moshi.](MoshiUsageNonMoshiClassCollection.md.html) diff --git a/docs/checks/vendors.md.html b/docs/checks/vendors.md.html index f97d43f9..f42c94ea 100644 --- a/docs/checks/vendors.md.html +++ b/docs/checks/vendors.md.html @@ -3,11 +3,12 @@ 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 (448) +* Built In (464) - [AaptCrash: Potential AAPT crash](AaptCrash.md.html) - [AcceptsUserCertificates: Allowing User Certificates](AcceptsUserCertificates.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) - [AllCaps: Combining textAllCaps and markup](AllCaps.md.html) @@ -22,7 +23,7 @@ - [AppCompatMethod: Using Wrong AppCompat Method](AppCompatMethod.md.html) - [AppCompatResource: Menu namespace](AppCompatResource.md.html) - [AppIndexingService: App Indexing Background Services](AppIndexingService.md.html) - - [AppLinkUrlError: URL not supported by app for Firebase App Indexing](AppLinkUrlError.md.html) + - [AppLinkUrlError: URI invalid](AppLinkUrlError.md.html) - [AppLinksAutoVerify: App Links Auto Verification Failure](AppLinksAutoVerify.md.html) - [ApplySharedPref: Use `apply()` on `SharedPreferences`](ApplySharedPref.md.html) - [AssertionSideEffect: Assertions with Side Effects](AssertionSideEffect.md.html) @@ -37,6 +38,7 @@ - [BomWithoutPlatform: Using a BOM without platform call](BomWithoutPlatform.md.html) - [BottomAppBar: BottomAppBar Problems](BottomAppBar.md.html) - [BrokenIterator: Broken Iterator](BrokenIterator.md.html) + - [BuildListAdds: Missing `add` call in `buildList`](BuildListAdds.md.html) - [ButtonCase: Cancel/OK dialog button capitalization](ButtonCase.md.html) - [ButtonOrder: Button order](ButtonOrder.md.html) - [ButtonStyle: Button should be borderless](ButtonStyle.md.html) @@ -52,6 +54,7 @@ - [ConstantLocale: Constant Locale](ConstantLocale.md.html) - [ContentDescription: Image without `contentDescription`](ContentDescription.md.html) - [ConvertToWebp: Convert to WebP](ConvertToWebp.md.html) + - [CredentialDependency: `credentials-play-services-auth` is Required](CredentialDependency.md.html) - [CustomPermissionTypo: Permission appears to be a custom permission with a typo](CustomPermissionTypo.md.html) - [CustomSplashScreen: Application-defined Launch Screen](CustomSplashScreen.md.html) - [CustomViewStyleable: Mismatched Styleable/Custom View Name](CustomViewStyleable.md.html) @@ -161,6 +164,7 @@ - [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) + - [IntentWithNullActionLaunch: Unsafe intent launched with no action set](IntentWithNullActionLaunch.md.html) - [InternalInsetResource: Using internal inset dimension resource](InternalInsetResource.md.html) - [InvalidAnalyticsName: Invalid Analytics Name](InvalidAnalyticsName.md.html) - [InvalidId: Invalid ID declaration](InvalidId.md.html) @@ -241,6 +245,7 @@ - [MotionLayoutMissingId: Views inside `MotionLayout` require an `android:id`](MotionLayoutMissingId.md.html) - [MotionSceneFileValidationError: Validation errors in `MotionScene` files](MotionSceneFileValidationError.md.html) - [MultipleUsesSdk: Multiple `` elements in the manifest](MultipleUsesSdk.md.html) + - [MutableImplicitPendingIntent: Mutable Implicit PendingIntent is disallowed](MutableImplicitPendingIntent.md.html) - [MutatingSharedPrefs: Mutating an Immutable SharedPrefs Set](MutatingSharedPrefs.md.html) - [NamespaceTypo: Misspelled namespace declaration](NamespaceTypo.md.html) - [NegativeMargin: Negative Margins](NegativeMargin.md.html) @@ -280,6 +285,7 @@ - [PermissionImpliesUnsupportedHardware: Permission Implies Unsupported Hardware](PermissionImpliesUnsupportedHardware.md.html) - [PermissionNamingConvention: Permission name does not follow recommended convention](PermissionNamingConvention.md.html) - [PinSetExpiry: Validate `` expiration attribute](PinSetExpiry.md.html) + - [PlaySdkIndexGenericIssues: Library has issues in SDK Index](PlaySdkIndexGenericIssues.md.html) - [PlaySdkIndexNonCompliant: Library has policy issues in SDK Index](PlaySdkIndexNonCompliant.md.html) - [PluralsCandidate: Potential Plurals](PluralsCandidate.md.html) - [PrivateApi: Using Private APIs](PrivateApi.md.html) @@ -290,6 +296,7 @@ - [ProtectedPermissions: Using system app permission](ProtectedPermissions.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) - [QueryAllPackagesPermission: Using the QUERY_ALL_PACKAGES permission](QueryAllPackagesPermission.md.html) - [QueryPermissionsNeeded: Using APIs affected by query permissions](QueryPermissionsNeeded.md.html) @@ -326,8 +333,10 @@ - [ScrollViewCount: `ScrollView` can have only one child](ScrollViewCount.md.html) - [ScrollViewSize: ScrollView size validation](ScrollViewSize.md.html) - [SdCardPath: Hardcoded reference to `/sdcard`](SdCardPath.md.html) + - [SecretInSource: Secret in source code](SecretInSource.md.html) - [SecureRandom: Using a fixed seed with `SecureRandom`](SecureRandom.md.html) - [SelectableText: Dynamic text should probably be selectable](SelectableText.md.html) + - [SelectedPhotoAccess: Behavior change when requesting photo library access](SelectedPhotoAccess.md.html) - [ServiceCast: Wrong system service casts](ServiceCast.md.html) - [SetAndClearCommunicationDevice: Clearing communication device](SetAndClearCommunicationDevice.md.html) - [SetJavaScriptEnabled: Using `setJavaScriptEnabled`](SetJavaScriptEnabled.md.html) @@ -345,6 +354,7 @@ - [SourceLockedOrientationActivity: Incompatible setRequestedOrientation value](SourceLockedOrientationActivity.md.html) - [SpUsage: Using `dp` instead of `sp` for text sizes](SpUsage.md.html) - [SquareAndRoundTilePreviews: TileProvider does not have round and square previews](SquareAndRoundTilePreviews.md.html) + - [StartActivityAndCollapseDeprecated: TileService.startActivityAndCollapse(Intent) is deprecated](StartActivityAndCollapseDeprecated.md.html) - [StateListReachable: Unreachable state in a ``](StateListReachable.md.html) - [StaticFieldLeak: Static Field Leaks](StaticFieldLeak.md.html) - [StopShip: Code contains `STOPSHIP` marker](StopShip.md.html) @@ -364,6 +374,7 @@ - [TestAppLink: Unmatched URLs](TestAppLink.md.html) - [TextFields: Missing `inputType`](TextFields.md.html) - [TextViewEdits: TextView should probably be an EditText instead](TextViewEdits.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) - [TooManyViews: Layout has too many views](TooManyViews.md.html) @@ -374,7 +385,7 @@ - [TypographyEllipsis: Ellipsis string can be replaced with ellipsis character](TypographyEllipsis.md.html) - [TypographyFractions: Fraction string can be replaced with fraction character](TypographyFractions.md.html) - [TypographyOther: Other typographical problems](TypographyOther.md.html) - - [TypographyQuotes: Straight quotes can be replaced with curvy quotes](TypographyQuotes.md.html) + - [TypographyQuotes: Straight quotes can be replaced with curvy quotes, and apostrophes with typographic apostrophes.](TypographyQuotes.md.html) - [Typos: Spelling error](Typos.md.html) - [UastImplementation: Avoid using UAST implementation](UastImplementation.md.html) - [UniqueConstants: Overlapping Enumeration Constants](UniqueConstants.md.html) @@ -406,6 +417,7 @@ - [UseCheckPermission: Using the result of check permission calls](UseCheckPermission.md.html) - [UseCompoundDrawables: Node can be replaced by a `TextView` with compound drawables](UseCompoundDrawables.md.html) - [UseOfBundledGooglePlayServices: Use of bundled version of Google Play services](UseOfBundledGooglePlayServices.md.html) + - [UseSdkSuppress: Using `@SdkSuppress` instead of `@RequiresApi`](UseSdkSuppress.md.html) - [UseSparseArrays: HashMap can be replaced with SparseArray](UseSparseArrays.md.html) - [UseTomlInstead: Use TOML Version Catalog Instead](UseTomlInstead.md.html) - [UseValueOf: Should use `valueOf` instead of `new`](UseValueOf.md.html) @@ -429,7 +441,10 @@ - [WatchFaceEditor: Watch face editor must use launchMode="standard"](WatchFaceEditor.md.html) - [WatchFaceForAndroidX: AndroidX watch faces must use action `WATCH_FACE_EDITOR`](WatchFaceForAndroidX.md.html) - [WearBackNavigation: Wear: Disabling Back navigation](WearBackNavigation.md.html) + - [WearMaterialTheme: Using not non-Wear `MaterialTheme` in a Wear OS project](WearMaterialTheme.md.html) - [WearPasswordInput: Wear: Using password input](WearPasswordInput.md.html) + - [WearRecents: Wear OS: Recents and app resume](WearRecents.md.html) + - [WearSplashScreen: Wear: Use `SplashScreen` library](WearSplashScreen.md.html) - [WearStandaloneAppFlag: Invalid or missing Wear standalone app flag](WearStandaloneAppFlag.md.html) - [WearableActionDuplicate: Duplicate watch face configuration activities found](WearableActionDuplicate.md.html) - [WearableBindListener: Usage of Android Wear BIND_LISTENER is deprecated](WearableBindListener.md.html) @@ -445,6 +460,7 @@ - [WorldWriteableFiles: `openFileOutput()` with `MODE_WORLD_WRITEABLE`](WorldWriteableFiles.md.html) - [WrongCall: Using wrong draw/layout method](WrongCall.md.html) - [WrongCase: Wrong case for view tag](WrongCase.md.html) + - [WrongCommentType: Wrong Comment Type](WrongCommentType.md.html) - [WrongConstant: Incorrect constant](WrongConstant.md.html) - [WrongFolder: Resource file in the wrong `res` folder](WrongFolder.md.html) - [WrongManifestParent: Wrong manifest parent](WrongManifestParent.md.html) @@ -508,10 +524,11 @@ - [FragmentGradleConfiguration: Include the fragment-testing-manifest library using the debugImplementation configuration.](FragmentGradleConfiguration.md.html) -* Android Open Source Project (androidx.lifecycle) (3) +* Android Open Source Project (androidx.lifecycle) (4) - [NullSafeMutableLiveData: LiveData value assignment nullability mismatch](NullSafeMutableLiveData.md.html) - [RepeatOnLifecycleWrongUsage: Wrong usage of repeatOnLifecycle.](RepeatOnLifecycleWrongUsage.md.html) + - [TestLifecycleOwnerInCoroutine: Use the suspending function setCurrentState(), rather than directly accessing the currentState property.](TestLifecycleOwnerInCoroutine.md.html) - [UnsafeLifecycleWhenUsage: Unsafe UI operation in finally/catch of Lifecycle.whenStarted of similar method](UnsafeLifecycleWhenUsage.md.html) * Android Open Source Project (androidx.navigation.common) (1) @@ -532,6 +549,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) +* Android Open Source Project (androidx.wear.protolayout) (2) + + - [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.md.html) + * Android Open Source Project (androidx.work) (9) - [BadConfigurationProvider: Invalid WorkManager Configuration Provider](BadConfigurationProvider.md.html) @@ -562,23 +584,27 @@ - [TimberExceptionLogging: Exception Logging](TimberExceptionLogging.md.html) - [TimberTagLength: Too Long Log Tags](TimberTagLength.md.html) -* Jetpack Activity Compose (androidx.activity.compose) (1) +* Jetpack Activity Compose (androidx.activity.compose) (2) - [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) (2) - [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) -* Jetpack Compose (androidx.compose.animation.core) (2) +* Jetpack Compose (androidx.compose.animation.core) (3) + - [ArcAnimationSpecTypeIssue: ArcAnimationSpec is designed for 2D values. Particularly, for positional values such as Offset.](ArcAnimationSpecTypeIssue.md.html) - [UnrememberedAnimatable: Creating an Animatable during composition without using `remember`](UnrememberedAnimatable.md.html) - [UnusedTransitionTargetStateParameter: Transition.animate* calls should use the provided targetState when defining values](UnusedTransitionTargetStateParameter.md.html) -* Jetpack Compose (androidx.compose.foundation) (2) +* Jetpack Compose (androidx.compose.foundation) (4) - [FrequentlyChangedStateReadInComposition: Frequently changing state should not be directly read in composable function](FrequentlyChangedStateReadInComposition.md.html) + - [UnrememberedMutableInteractionSource: Creating a MutableInteractionSource during composition without using `remember`](UnrememberedMutableInteractionSource.md.html) + - [UnusedBoxWithConstraintsScope: BoxWithConstraints content should use the constraints provided via BoxWithConstraintsScope](UnusedBoxWithConstraintsScope.md.html) - [UseOfNonLambdaOffsetOverload: Modifier.offset{ } is preferred over Modifier.offset() for `State` backed arguments.](UseOfNonLambdaOffsetOverload.md.html) * Jetpack Compose (androidx.compose.material) (2) @@ -586,9 +612,10 @@ - [ConflictingOnColor: Background colors with the same value should have the same 'on' color](ConflictingOnColor.md.html) - [UnusedMaterialScaffoldPaddingParameter: Scaffold content should use the padding provided as a lambda parameter](UnusedMaterialScaffoldPaddingParameter.md.html) -* Jetpack Compose (androidx.compose.material3) (1) +* Jetpack Compose (androidx.compose.material3) (2) - [UnusedMaterial3ScaffoldPaddingParameter: Scaffold content should use the padding provided as a lambda parameter](UnusedMaterial3ScaffoldPaddingParameter.md.html) + - [UsingMaterialAndMaterial3Libraries: material and material3 are separate, incompatible design system libraries](UsingMaterialAndMaterial3Libraries.md.html) * Jetpack Compose (androidx.compose.runtime) (14) @@ -611,9 +638,8 @@ - [RememberSaveableSaverParameter: `Saver` objects should be passed to the saver parameter, not the vararg `inputs` parameter](RememberSaveableSaverParameter.md.html) -* Jetpack Compose (androidx.compose.ui) (10) +* Jetpack Compose (androidx.compose.ui) (9) - - [ComposableModifierFactory: Modifier factory functions should not be @Composable](ComposableModifierFactory.md.html) - [ModifierFactoryExtensionFunction: Modifier factory functions should be extensions on Modifier](ModifierFactoryExtensionFunction.md.html) - [ModifierFactoryReturnType: Modifier factory functions should return Modifier](ModifierFactoryReturnType.md.html) - [ModifierFactoryUnreferencedReceiver: Modifier factory functions must use the receiver Modifier instance](ModifierFactoryUnreferencedReceiver.md.html) @@ -656,12 +682,17 @@ - [ComposeViewModelForwarding: Forwarding a ViewModel through multiple @Composable functions should be avoided](ComposeViewModelForwarding.md.html) - [ComposeViewModelInjection: Implicit dependencies of composables should be made explicit](ComposeViewModelInjection.md.html) -* slack (slack-lint) (81) +* slack (slack-lint) (91) - [ArgInFormattedQuantityStringRes: Count value in formatted string resource.](ArgInFormattedQuantityStringRes.md.html) - - [BindsCanBeExtensionFunction: @Binds-annotated functions can be extension functions.](BindsCanBeExtensionFunction.md.html) + - [BindingReceiverParameter: @Binds/@Provides functions cannot be extension functions.](BindingReceiverParameter.md.html) + - [BindingReturnType: @Binds/@Provides functions must have a return type. Cannot be void or Unit.](BindingReturnType.md.html) + - [BindsMustBeAbstract: @Binds functions must be abstract and cannot have function bodies.](BindsMustBeAbstract.md.html) + - [BindsTypeMismatch: @Binds function parameters must be type-assignable to their return types.](BindsTypeMismatch.md.html) + - [BindsWrongParameterCount: @Binds functions require a single parameter as an input to bind.](BindsWrongParameterCount.md.html) - [CastingViewContextToActivity: Unsafe cast of `Context` to `Activity`](CastingViewContextToActivity.md.html) - [DenyListedApi: Deny-listed API](DenyListedApi.md.html) + - [DenyListedBlockingApi: Deny-listed API](DenyListedBlockingApi.md.html) - [DeprecatedCall: This class or method is deprecated; consider using an alternative.](DeprecatedCall.md.html) - [DeprecatedSqlUsage: Use SqlDelight!](DeprecatedSqlUsage.md.html) - [DoNotCallProviders: Dagger provider methods should not be called directly by user code.](DoNotCallProviders.md.html) @@ -670,9 +701,11 @@ - [DoNotMockAutoValue: AutoValue classes represent pure data classes, so mocking them should not be necessary.](DoNotMockAutoValue.md.html) - [DoNotMockDataClass: data classes represent pure data classes, so mocking them should not be necessary.](DoNotMockDataClass.md.html) - [DoNotMockObjectClass: object classes are singletons, so mocking them should not be necessary](DoNotMockObjectClass.md.html) + - [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) - [ErrorProneDoNotMockUsage: Use Slack's internal `@DoNotMock` annotation.](ErrorProneDoNotMockUsage.md.html) + - [ExceptionMessage: Please provide a string for the lazyMessage parameter](ExceptionMessage.md.html) - [FragmentConstructorInjection: Fragment dependencies should be injected using constructor injections only.](FragmentConstructorInjection.md.html) - [FragmentFieldInjection: Fragment dependencies should be injected using the Fragment's constructor.](FragmentFieldInjection.md.html) - [FullyQualifiedResource: Resources should use an import alias instead of being fully qualified.](FullyQualifiedResource.md.html) @@ -730,9 +763,12 @@ - [MoshiUsageUnsupportedType: This type cannot be annotated with @JsonClass.](MoshiUsageUnsupportedType.md.html) - [MoshiUsageUseData: Model classes should be immutable data classes.](MoshiUsageUseData.md.html) - [MoshiUsageVarProperty: Moshi properties should be immutable.](MoshiUsageVarProperty.md.html) + - [MustBeInModule: @Binds/@Provides function must be in `@Module`-annotated classes.](MustBeInModule.md.html) - [ParcelizeFunctionProperty: Function type properties should not be used in Parcelize classes](ParcelizeFunctionProperty.md.html) + - [ProvidesMustNotBeAbstract: @Provides functions cannot be abstract.](ProvidesMustNotBeAbstract.md.html) - [RawDispatchersUse: Use SlackDispatchers.](RawDispatchersUse.md.html) - [RedactedInJavaUsage: @Redacted is only supported in Kotlin classes!](RedactedInJavaUsage.md.html) + - [RedundantBinds: @Binds functions should return a different type (including annotations) than the input type.](RedundantBinds.md.html) - [RestrictCallsTo: Methods annotated with @RestrictedCallsTo should only be called from the specified scope.](RestrictCallsTo.md.html) - [RetrofitUsage: This is replaced by the caller.](RetrofitUsage.md.html) - [SerializableUsage: Don't use Serializable.](SerializableUsage.md.html) diff --git a/docs/checks/year.md.html b/docs/checks/year.md.html index 4669ac27..f9c1e533 100644 --- a/docs/checks/year.md.html +++ b/docs/checks/year.md.html @@ -3,8 +3,13 @@ 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) -* 2023 (28) +* 2024 (1) + - [BuildListAdds: Missing `add` call in `buildList`](BuildListAdds.md.html) + +* 2023 (45) + + - [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) - [AutoboxingStateValueProperty: State access causes value to be autoboxed](AutoboxingStateValueProperty.md.html) - [ComposeComposableModifier: Using @Composable builder functions for modifiers is not recommended](ComposeComposableModifier.md.html) @@ -24,23 +29,41 @@ - [ComposeUnstableCollections: Immutable collections should ideally be used in Composables](ComposeUnstableCollections.md.html) - [ComposeViewModelForwarding: Forwarding a ViewModel through multiple @Composable functions should be avoided](ComposeViewModelForwarding.md.html) - [ComposeViewModelInjection: Implicit dependencies of composables should be made explicit](ComposeViewModelInjection.md.html) + - [ExceptionMessage: Please provide a string for the lazyMessage parameter](ExceptionMessage.md.html) - [ForegroundServicePermission: Missing permissions required by foregroundServiceType](ForegroundServicePermission.md.html) - [ForegroundServiceType: Missing `foregroundServiceType` attribute in manifest](ForegroundServiceType.md.html) + - [IntentWithNullActionLaunch: Unsafe intent launched with no action set](IntentWithNullActionLaunch.md.html) - [ModifierNodeInspectableProperties: ModifierNodeElement missing inspectableProperties](ModifierNodeInspectableProperties.md.html) + - [MutableImplicitPendingIntent: Mutable Implicit PendingIntent is disallowed](MutableImplicitPendingIntent.md.html) + - [NoCollectCallFound: You must call collect on the given progress flow when using PredictiveBackHandler](NoCollectCallFound.md.html) - [OpaqueUnitKey: Passing an expression which always returns `Unit` as a key argument](OpaqueUnitKey.md.html) - [ParcelizeFunctionProperty: Function type properties should not be used in Parcelize classes](ParcelizeFunctionProperty.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.md.html) + - [PublicKeyCredential: Creating public key credential](PublicKeyCredential.md.html) + - [SecretInSource: Secret in source code](SecretInSource.md.html) + - [StartActivityAndCollapseDeprecated: TileService.startActivityAndCollapse(Intent) is deprecated](StartActivityAndCollapseDeprecated.md.html) - [SuspiciousCompositionLocalModifierRead: CompositionLocals should not be read in Modifier.onAttach() or Modifier.onDetach()](SuspiciousCompositionLocalModifierRead.md.html) + - [UnrememberedMutableInteractionSource: Creating a MutableInteractionSource during composition without using `remember`](UnrememberedMutableInteractionSource.md.html) + - [UnusedBoxWithConstraintsScope: BoxWithConstraints content should use the constraints provided via BoxWithConstraintsScope](UnusedBoxWithConstraintsScope.md.html) - [UnusedContentLambdaTargetStateParameter: AnimatedContent calls should use the provided `T` parameter in the content lambda](UnusedContentLambdaTargetStateParameter.md.html) + - [UsingMaterialAndMaterial3Libraries: material and material3 are separate, incompatible design system libraries](UsingMaterialAndMaterial3Libraries.md.html) - [WearBackNavigation: Wear: Disabling Back navigation](WearBackNavigation.md.html) + - [WearMaterialTheme: Using not non-Wear `MaterialTheme` in a Wear OS project](WearMaterialTheme.md.html) - [WearPasswordInput: Wear: Using password input](WearPasswordInput.md.html) + - [WearRecents: Wear OS: Recents and app resume](WearRecents.md.html) + - [WearSplashScreen: Wear: Use `SplashScreen` library](WearSplashScreen.md.html) + - [WrongCommentType: Wrong Comment Type](WrongCommentType.md.html) -* 2022 (44) +* 2022 (48) + - [ActivityIconColor: Ongoing activity icon is not white](ActivityIconColor.md.html) - [BinderGetCallingInMainThread: Incorrect usage of getCallingUid() or getCallingPid()](BinderGetCallingInMainThread.md.html) - [ComposeM2Api: Using a Compose M2 API is not recommended](ComposeM2Api.md.html) - [CustomPermissionTypo: Permission appears to be a custom permission with a typo](CustomPermissionTypo.md.html) - [DeepLinkInActivityDestination: A should not be attached to an destination](DeepLinkInActivityDestination.md.html) - [DenyListedApi: Deny-listed API](DenyListedApi.md.html) + - [DenyListedBlockingApi: Deny-listed API](DenyListedBlockingApi.md.html) - [DeprecatedSinceApi: Using a method deprecated in earlier SDK](DeprecatedSinceApi.md.html) - [DoNotExposeEitherNetInRepositories: Repository APIs should not expose EitherNet types directly.](DoNotExposeEitherNetInRepositories.md.html) - [EmptyNavDeepLink: NavDeepLink must define an uri, action, and/or mimetype to be valid.](EmptyNavDeepLink.md.html) @@ -68,6 +91,7 @@ - [ReservedSystemPermission: Permission name is a reserved Android permission](ReservedSystemPermission.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) + - [SelectedPhotoAccess: Behavior change when requesting photo library access](SelectedPhotoAccess.md.html) - [SetAndClearCommunicationDevice: Clearing communication device](SetAndClearCommunicationDevice.md.html) - [StringEscaping: Invalid string escapes](StringEscaping.md.html) - [SystemPermissionTypo: Permission appears to be a standard permission with a typo](SystemPermissionTypo.md.html) @@ -79,15 +103,20 @@ - [UnusedMaterialScaffoldPaddingParameter: Scaffold content should use the padding provided as a lambda parameter](UnusedMaterialScaffoldPaddingParameter.md.html) - [UnusedTranslation: Unused Translation](UnusedTranslation.md.html) - [UseOfNonLambdaOffsetOverload: Modifier.offset{ } is preferred over Modifier.offset() for `State` backed arguments.](UseOfNonLambdaOffsetOverload.md.html) + - [UseSdkSuppress: Using `@SdkSuppress` instead of `@RequiresApi`](UseSdkSuppress.md.html) - [WrongResourceImportAlias: Wrong import alias for this R class.](WrongResourceImportAlias.md.html) -* 2021 (120) +* 2021 (130) - [AnnotateVersionCheck: Annotate SDK_INT checks](AnnotateVersionCheck.md.html) - [AppBundleLocaleChanges: App Bundle handling of runtime locale changes](AppBundleLocaleChanges.md.html) - [ArgInFormattedQuantityStringRes: Count value in formatted string resource.](ArgInFormattedQuantityStringRes.md.html) - [BidiSpoofing: Bidirectional text spoofing](BidiSpoofing.md.html) - - [BindsCanBeExtensionFunction: @Binds-annotated functions can be extension functions.](BindsCanBeExtensionFunction.md.html) + - [BindingReceiverParameter: @Binds/@Provides functions cannot be extension functions.](BindingReceiverParameter.md.html) + - [BindingReturnType: @Binds/@Provides functions must have a return type. Cannot be void or Unit.](BindingReturnType.md.html) + - [BindsMustBeAbstract: @Binds functions must be abstract and cannot have function bodies.](BindsMustBeAbstract.md.html) + - [BindsTypeMismatch: @Binds function parameters must be type-assignable to their return types.](BindsTypeMismatch.md.html) + - [BindsWrongParameterCount: @Binds functions require a single parameter as an input to bind.](BindsWrongParameterCount.md.html) - [CastingViewContextToActivity: Unsafe cast of `Context` to `Activity`](CastingViewContextToActivity.md.html) - [CoarseFineLocation: Cannot use `ACCESS_FINE_LOCATION` without `ACCESS_COARSE_LOCATION`](CoarseFineLocation.md.html) - [ComposableDestinationInComposeScope: Building composable destination in compose scope](ComposableDestinationInComposeScope.md.html) @@ -105,6 +134,7 @@ - [DoNotMockAutoValue: AutoValue classes represent pure data classes, so mocking them should not be necessary.](DoNotMockAutoValue.md.html) - [DoNotMockDataClass: data classes represent pure data classes, so mocking them should not be necessary.](DoNotMockDataClass.md.html) - [DoNotMockObjectClass: object classes are singletons, so mocking them should not be necessary](DoNotMockObjectClass.md.html) + - [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) - [ErrorProneDoNotMockUsage: Use Slack's internal `@DoNotMock` annotation.](ErrorProneDoNotMockUsage.md.html) @@ -171,12 +201,15 @@ - [MoshiUsageUseData: Model classes should be immutable data classes.](MoshiUsageUseData.md.html) - [MoshiUsageVarProperty: Moshi properties should be immutable.](MoshiUsageVarProperty.md.html) - [MotionLayoutMissingId: Views inside `MotionLayout` require an `android:id`](MotionLayoutMissingId.md.html) + - [MustBeInModule: @Binds/@Provides function must be in `@Module`-annotated classes.](MustBeInModule.md.html) - [MutableCollectionMutableState: Creating a MutableState object with a mutable collection type](MutableCollectionMutableState.md.html) - [NoOp: NoOp Code](NoOp.md.html) - [NotConstructor: Not a Constructor](NotConstructor.md.html) - [ProduceStateDoesNotAssignValue: produceState calls should assign `value` inside the producer lambda](ProduceStateDoesNotAssignValue.md.html) + - [ProvidesMustNotBeAbstract: @Provides functions cannot be abstract.](ProvidesMustNotBeAbstract.md.html) - [RawDispatchersUse: Use SlackDispatchers.](RawDispatchersUse.md.html) - [RedactedInJavaUsage: @Redacted is only supported in Kotlin classes!](RedactedInJavaUsage.md.html) + - [RedundantBinds: @Binds functions should return a different type (including annotations) than the input type.](RedundantBinds.md.html) - [RememberSaveableSaverParameter: `Saver` objects should be passed to the saver parameter, not the vararg `inputs` parameter](RememberSaveableSaverParameter.md.html) - [RepeatOnLifecycleWrongUsage: Wrong usage of repeatOnLifecycle.](RepeatOnLifecycleWrongUsage.md.html) - [RestrictCallsTo: Methods annotated with @RestrictedCallsTo should only be called from the specified scope.](RestrictCallsTo.md.html) @@ -187,6 +220,8 @@ - [StateFlowValueCalledInComposition: StateFlow.value should not be called within composition](StateFlowValueCalledInComposition.md.html) - [SubscribeOnMain: subscribeOn called with the main thread scheduler.](SubscribeOnMain.md.html) - [SuspiciousIndentation: Suspicious indentation](SuspiciousIndentation.md.html) + - [TestLifecycleOwnerInCoroutine: Use the suspending function setCurrentState(), rather than directly accessing the currentState property.](TestLifecycleOwnerInCoroutine.md.html) + - [TilePreviewImageFormat: Tile preview is not compliant with standards](TilePreviewImageFormat.md.html) - [TileProviderPermissions: TileProvider does not set permission](TileProviderPermissions.md.html) - [UastImplementation: Avoid using UAST implementation](UastImplementation.md.html) - [UnnecessaryComposedModifier: Modifier.composed should only be used for modifiers that invoke @Composable functions](UnnecessaryComposedModifier.md.html) @@ -204,14 +239,12 @@ - [WebViewClientOnReceivedSslError: Proceeds with the HTTPS connection despite SSL errors](WebViewClientOnReceivedSslError.md.html) - [WrongRequiresOptIn: Experimental annotations defined in Kotlin must use kotlin.RequiresOptIn](WrongRequiresOptIn.md.html) -* 2020 (56) +* 2020 (54) - [ComposableLambdaParameterNaming: Primary composable lambda parameter not named `content`](ComposableLambdaParameterNaming.md.html) - [ComposableLambdaParameterPosition: Non-trailing primary composable lambda parameter](ComposableLambdaParameterPosition.md.html) - - [ComposableModifierFactory: Modifier factory functions should not be @Composable](ComposableModifierFactory.md.html) - [ComposableNaming: Incorrect naming for @Composable functions](ComposableNaming.md.html) - [CompositionLocalNaming: CompositionLocal properties should be prefixed with `Local`](CompositionLocalNaming.md.html) - - [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) - [FieldSiteTargetOnQualifierAnnotation: Redundant 'field:' used for Dagger qualifier annotation.](FieldSiteTargetOnQualifierAnnotation.md.html) - [IdleBatteryChargingConstraints: Constraints may not be met for some devices](IdleBatteryChargingConstraints.md.html) @@ -324,7 +357,7 @@ * 2017 (31) - - [AppLinkUrlError: URL not supported by app for Firebase App Indexing](AppLinkUrlError.md.html) + - [AppLinkUrlError: URI invalid](AppLinkUrlError.md.html) - [BlockedPrivateApi: Using Blocked Private API](BlockedPrivateApi.md.html) - [CheckResult: Ignoring results](CheckResult.md.html) - [DiscouragedPrivateApi: Using Discouraged Private API](DiscouragedPrivateApi.md.html) @@ -427,7 +460,7 @@ - [VectorRaster: Vector Image Generation](VectorRaster.md.html) - [VulnerableCordovaVersion: Vulnerable Cordova Version](VulnerableCordovaVersion.md.html) -* 2014 (69) +* 2014 (72) - [AaptCrash: Potential AAPT crash](AaptCrash.md.html) - [AccidentalOctal: Accidental Octal](AccidentalOctal.md.html) @@ -441,6 +474,7 @@ - [ByteOrderMark: Byte order mark inside files](ByteOrderMark.md.html) - [ChromeOsAbiSupport: Missing ABI Support for ChromeOS](ChromeOsAbiSupport.md.html) - [ClickableViewAccessibility: Accessibility in Custom Views](ClickableViewAccessibility.md.html) + - [CredentialDependency: `credentials-play-services-auth` is Required](CredentialDependency.md.html) - [CustomViewStyleable: Mismatched Styleable/Custom View Name](CustomViewStyleable.md.html) - [DataBindingWithoutKapt: Data Binding without Annotation Processing](DataBindingWithoutKapt.md.html) - [DeprecatedProvider: Using BC Provider](DeprecatedProvider.md.html) @@ -477,8 +511,10 @@ - [NewerVersionAvailable: Newer Library Versions Available](NewerVersionAvailable.md.html) - [NfcTechWhitespace: Whitespace in NFC tech lists](NfcTechWhitespace.md.html) - [NotInterpolated: Incorrect Interpolation](NotInterpolated.md.html) + - [OldTargetApi: Target SDK attribute is not targeting latest version](OldTargetApi.md.html) - [OutdatedLibrary: Outdated Library](OutdatedLibrary.md.html) - [OverrideAbstract: Not overriding abstract methods on older platforms](OverrideAbstract.md.html) + - [PlaySdkIndexGenericIssues: Library has issues in SDK Index](PlaySdkIndexGenericIssues.md.html) - [PlaySdkIndexNonCompliant: Library has policy issues in SDK Index](PlaySdkIndexNonCompliant.md.html) - [PropertyEscape: Incorrect property escapes](PropertyEscape.md.html) - [ProxyPassword: Proxy Password in Cleartext](ProxyPassword.md.html) @@ -581,7 +617,7 @@ - [WrongCall: Using wrong draw/layout method](WrongCall.md.html) - [WrongFolder: Resource file in the wrong `res` folder](WrongFolder.md.html) -* 2011 (98) +* 2011 (97) - [AdapterViewChildren: `AdapterView` cannot have children in XML](AdapterViewChildren.md.html) - [AppIndexingService: App Indexing Background Services](AppIndexingService.md.html) @@ -636,7 +672,6 @@ - [NotSibling: Invalid Constraints](NotSibling.md.html) - [NotificationIconCompatibility: Notification Icon Compatibility](NotificationIconCompatibility.md.html) - [ObsoleteLayoutParam: Obsolete layout params](ObsoleteLayoutParam.md.html) - - [OldTargetApi: Target SDK attribute is not targeting latest version](OldTargetApi.md.html) - [Orientation: Missing explicit orientation](Orientation.md.html) - [Overdraw: Overdraw: Painting regions more than once](Overdraw.md.html) - [PluralsCandidate: Potential Plurals](PluralsCandidate.md.html) @@ -665,7 +700,7 @@ - [TypographyEllipsis: Ellipsis string can be replaced with ellipsis character](TypographyEllipsis.md.html) - [TypographyFractions: Fraction string can be replaced with fraction character](TypographyFractions.md.html) - [TypographyOther: Other typographical problems](TypographyOther.md.html) - - [TypographyQuotes: Straight quotes can be replaced with curvy quotes](TypographyQuotes.md.html) + - [TypographyQuotes: Straight quotes can be replaced with curvy quotes, and apostrophes with typographic apostrophes.](TypographyQuotes.md.html) - [Typos: Spelling error](Typos.md.html) - [UniquePermission: Permission names are not unique](UniquePermission.md.html) - [UnknownId: Reference to an unknown id](UnknownId.md.html) @@ -682,7 +717,7 @@ - [WrongManifestParent: Wrong manifest parent](WrongManifestParent.md.html) - [WrongViewCast: Mismatched view type](WrongViewCast.md.html) -* Unknown (57) +* Unknown (58) - [AlertDialogUsage: Use the support library AlertDialog instead of android.app.AlertDialog.](AlertDialogUsage.md.html) - [AssertjImport: Flags Java 6 incompatible imports.](AssertjImport.md.html) @@ -690,6 +725,7 @@ - [ColorCasing: Raw colors should be defined with uppercase letters.](ColorCasing.md.html) - [ConstraintLayoutToolsEditorAttribute: Flags tools:layout_editor xml properties.](ConstraintLayoutToolsEditorAttribute.md.html) - [DefaultLayoutAttribute: Flags default layout values.](DefaultLayoutAttribute.md.html) + - [EnsureInitializerMetadata: Every Initializer needs to be accompanied by a corresponding entry in the AndroidManifest.xml file.](EnsureInitializerMetadata.md.html) - [ErroneousLayoutAttribute: Layout attribute that's not applicable to a particular view.](ErroneousLayoutAttribute.md.html) - [FormalGerman: Marks strings which contain formal German words.](FormalGerman.md.html) - [ImplicitStringPlaceholder: Marks implicit placeholders in strings without an index.](ImplicitStringPlaceholder.md.html) diff --git a/docs/print-command.sh b/docs/print-command.sh index ccdfa70b..c38eab56 100755 --- a/docs/print-command.sh +++ b/docs/print-command.sh @@ -10,6 +10,8 @@ export ANDROID_URI_PREFIX=https://cs.android.com/androidx/platform/frameworks/su # If running the documentation driver directly, omit the # --generate-docs flag +echo "(Also consider including --maven-central --gmaven)" + echo lint \ --generate-docs \ --output $OUTPUT \