diff options
Diffstat (limited to 'mobile/android/focus-android/quality')
7 files changed, 1339 insertions, 0 deletions
diff --git a/mobile/android/focus-android/quality/checkstyle.xml b/mobile/android/focus-android/quality/checkstyle.xml new file mode 100644 index 0000000000..b1728aebc1 --- /dev/null +++ b/mobile/android/focus-android/quality/checkstyle.xml @@ -0,0 +1,45 @@ +<?xml version="1.0"?> +<!-- This Source Code Form is subject to the terms of the Mozilla Public + - License, v. 2.0. If a copy of the MPL was not distributed with this + - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> +<!DOCTYPE module PUBLIC + "-//Puppy Crawl//DTD Check Configuration 1.2//EN" + "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> +<module name="Checker"> + <property name="charset" value="UTF-8"/> + + <module name="FileTabCharacter"> + <property name="eachLine" value="true"/> + </module> + + <module name="RegexpSingleline"> + <property name="format" value="\s+$"/> + <property name="message" value="Trailing whitespace"/> + </module> + + <module name="TreeWalker"> + <module name="GenericWhitespace"/> + <module name="NoLineWrap"> + <property name="tokens" value="IMPORT,PACKAGE_DEF"/> + </module> + <module name="OuterTypeFilename"/> + <module name="WhitespaceAfter" /> + <module name="WhitespaceAround"> + <property name="allowEmptyConstructors" value="true"/> + <property name="allowEmptyMethods" value="true"/> + <property name="allowEmptyTypes" value="true"/> + </module> + <module name="NeedBraces" /> + <module name="LeftCurly" /> + <module name="RightCurly" /> + <module name="OneStatementPerLine" /> + <module name="FallThrough" /> + + <!-- Imports --> + <module name="AvoidStarImport" /> + <module name="IllegalImport" /> + <module name="RedundantImport" /> + <module name="UnusedImports" /> + </module> + +</module> diff --git a/mobile/android/focus-android/quality/detekt-baseline.xml b/mobile/android/focus-android/quality/detekt-baseline.xml new file mode 100644 index 0000000000..91d986d5cb --- /dev/null +++ b/mobile/android/focus-android/quality/detekt-baseline.xml @@ -0,0 +1,406 @@ +<?xml version="1.0" ?> +<!-- This Source Code Form is subject to the terms of the Mozilla Public + - License, v. 2.0. If a copy of the MPL was not distributed with this + - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> + +<SmellBaseline> + <ManuallySuppressedIssues></ManuallySuppressedIssues> + <CurrentIssues> + <ID>AbsentOrWrongFileLicense:LocalesList.kt$org.mozilla.focus.generated.LocalesList.kt</ID> + <ID>CollapsibleIfStatements:MainActivity.kt$MainActivity$if (!isTaskRoot) { if (intent.hasCategory(Intent.CATEGORY_LAUNCHER) && Intent.ACTION_MAIN == intent.action) { finish() return } }</ID> + <ID>CollapsibleIfStatements:UrlInputFragment.kt$UrlInputFragment.<no name provided>$if (reverse) { if (isOverlay) { dismiss() } }</ID> + <ID>EmptyFunctionBlock:AutocompleteListFragment.kt$AutocompleteListFragment.<no name provided>${}</ID> + <ID>EmptyFunctionBlock:ExceptionsListFragment.kt$ExceptionsListFragment.<no name provided>${}</ID> + <ID>EmptyFunctionBlock:FirstrunFragment.kt$FirstrunFragment.<no name provided>${}</ID> + <ID>MayBeConst:CrashReporterFragment.kt$CrashReporterFragment.Companion$val FRAGMENT_TAG = "crash-reporter"</ID> + <ID>MayBeConst:IconGenerator.kt$IconGenerator.Companion$private val DEFAULT_ICON_CHAR = '?'</ID> + <ID>MayBeConst:IconGenerator.kt$IconGenerator.Companion$private val TEXT_SIZE_DP = 36f</ID> + <ID>MayBeConst:ManualAddSearchEnginePreference.kt$ManualAddSearchEnginePreference.Companion$private val SEARCH_ENGINE_NAME_KEY = "search-engine-name"</ID> + <ID>MayBeConst:ManualAddSearchEnginePreference.kt$ManualAddSearchEnginePreference.Companion$private val SEARCH_QUERY_KEY = "search-query"</ID> + <ID>MayBeConst:ManualAddSearchEnginePreference.kt$ManualAddSearchEnginePreference.Companion$private val SUPER_STATE_KEY = "super-state"</ID> + <ID>OutdatedDocumentation:AppAdapter.kt$AppAdapter : Adapter</ID> + <ID>OutdatedDocumentation:AppReviewUtils.kt$AppReviewUtils.Companion$fun addAppOpenings(context: Context)</ID> + <ID>OutdatedDocumentation:AppReviewUtils.kt$AppReviewUtils.Companion$fun showAppReview(activity: Activity)</ID> + <ID>OutdatedDocumentation:AppState.kt$AppState : State</ID> + <ID>OutdatedDocumentation:AppState.kt$Screen</ID> + <ID>OutdatedDocumentation:AppState.kt$Screen$Locked : Screen</ID> + <ID>OutdatedDocumentation:DefaultTopSitesStorage.kt$DefaultTopSitesStorage : TopSitesStorageObservable</ID> + <ID>OutdatedDocumentation:FocusDialog.kt$@Suppress("LongParameterList") @Composable fun FocusDialog( dialogTitle: String, dialogTextComposable: @Composable (() -> Unit)? = null, dialogText: String = "", onConfirmRequest: () -> Unit, onDismissRequest: () -> Unit, confirmButtonText: String = "null", dismissButtonText: String = "null", isConfirmButtonEnabled: Boolean = true, isDismissButtonEnabled: Boolean = true, isConfirmButtonVisible: Boolean = true, isDismissButtonVisible: Boolean = true, )</ID> + <ID>OutdatedDocumentation:HtmlLoader.kt$HtmlLoader$fun loadResourceFile( context: Context, @RawRes resourceID: Int, substitutionTable: Map<String, String>, ): String</ID> + <ID>OutdatedDocumentation:Language.kt$Language</ID> + <ID>OutdatedDocumentation:LanguageListItem.kt$LanguageListItem</ID> + <ID>OutdatedDocumentation:LanguageStorage.kt$LanguageStorage$fun saveCurrentLanguageInSharePref(languageTag: String)</ID> + <ID>OutdatedDocumentation:PrivateNotificationFeature.kt$PrivateNotificationFeature : LifecycleAwareFeature</ID> + <ID>OutdatedDocumentation:SitePermissionOptionsFragmentCompose.kt$@Composable fun OptionsPermissionList( optionsListItems: List<SitePermissionOptionListItem>, state: MutableState<Int>, permissionLabel: String?, goToPhoneSettings: () -> Unit, componentPermissionBlockedByAndroidVisibility: Boolean, )</ID> + <ID>UndocumentedPublicClass:AboutFragment.kt$AboutFragment : BaseSettingsLikeFragment</ID> + <ID>UndocumentedPublicClass:AdvancedSettingsFragment.kt$AdvancedSettingsFragment : BaseSettingsFragmentOnSharedPreferenceChangeListener</ID> + <ID>UndocumentedPublicClass:AppAction.kt$AppAction$NavigateUp : AppAction</ID> + <ID>UndocumentedPublicClass:AppAction.kt$AppAction$OpenSettings : AppAction</ID> + <ID>UndocumentedPublicClass:AppAction.kt$AppAction$OpenSitePermissionOptionsScreen : AppAction</ID> + <ID>UndocumentedPublicClass:AppConstants.kt$AppConstants</ID> + <ID>UndocumentedPublicClass:AppContentInterceptor.kt$AppContentInterceptor : RequestInterceptor</ID> + <ID>UndocumentedPublicClass:AppReviewStep.kt$AppReviewStep</ID> + <ID>UndocumentedPublicClass:AppReviewUtils.kt$AppReviewUtils</ID> + <ID>UndocumentedPublicClass:AppStartReasonProvider.kt$AppStartReasonProvider$StartReason</ID> + <ID>UndocumentedPublicClass:AppState.kt$Screen$Settings : Screen</ID> + <ID>UndocumentedPublicClass:AppState.kt$Screen$SitePermissionOptionsScreen : Screen</ID> + <ID>UndocumentedPublicClass:AppState.kt$Screen.Settings$Page</ID> + <ID>UndocumentedPublicClass:AutocompleteDomainFormatter.kt$AutocompleteDomainFormatter</ID> + <ID>UndocumentedPublicClass:AutocompleteRemoveFragment.kt$AutocompleteRemoveFragment : AutocompleteListFragmentCoroutineScope</ID> + <ID>UndocumentedPublicClass:BaseFragment.kt$BaseFragment : Fragment</ID> + <ID>UndocumentedPublicClass:BaseSettingsFragment.kt$BaseSettingsFragment : PreferenceFragmentCompatMenuProvider</ID> + <ID>UndocumentedPublicClass:BrowserMenuController.kt$BrowserMenuController</ID> + <ID>UndocumentedPublicClass:BrowserToolbarIntegration.kt$BrowserToolbarIntegration : LifecycleAwareFeature</ID> + <ID>UndocumentedPublicClass:Config.kt$Config</ID> + <ID>UndocumentedPublicClass:ConnectionDetailsPanel.kt$ConnectionDetailsPanel : BottomSheetDialog</ID> + <ID>UndocumentedPublicClass:ContextMenuCandidates.kt$ContextMenuCandidates</ID> + <ID>UndocumentedPublicClass:CookieBannerExceptionDetailsSwitch.kt$CookieBannerExceptionDetailsSwitch : ConstraintLayout</ID> + <ID>UndocumentedPublicClass:CookieBannerFragment.kt$CookieBannerFragment : BaseSettingsFragment</ID> + <ID>UndocumentedPublicClass:CookieBannerOption.kt$CookieBannerOption</ID> + <ID>UndocumentedPublicClass:CookieBannerOption.kt$CookieBannerOption$CookieBannerDisabled : CookieBannerOption</ID> + <ID>UndocumentedPublicClass:CookieBannerOption.kt$CookieBannerOption$CookieBannerRejectAll : CookieBannerOption</ID> + <ID>UndocumentedPublicClass:CookieBannerRejectAllPreference.kt$CookieBannerRejectAllPreference : LearnMoreSwitchPreference</ID> + <ID>UndocumentedPublicClass:CrashListActivity.kt$CrashListActivity : AbstractCrashListActivity</ID> + <ID>UndocumentedPublicClass:CrashReporterFragment.kt$CrashReporterFragment : Fragment</ID> + <ID>UndocumentedPublicClass:CustomTabMenu.kt$CustomTabMenu : ToolbarMenu</ID> + <ID>UndocumentedPublicClass:CustomTabsService.kt$CustomTabsService : AbstractCustomTabsService</ID> + <ID>UndocumentedPublicClass:DebugFocusApplication.kt$DebugFocusApplication : FocusApplication</ID> + <ID>UndocumentedPublicClass:DefaultBrowserPreference.kt$DefaultBrowserPreference : Preference</ID> + <ID>UndocumentedPublicClass:DefaultLanguageScreenInteractor.kt$DefaultLanguageScreenInteractor</ID> + <ID>UndocumentedPublicClass:DefaultSitePermissionOptionsScreenInteractor.kt$DefaultSitePermissionOptionsScreenInteractor</ID> + <ID>UndocumentedPublicClass:DownloadService.kt$DownloadService : AbstractFetchDownloadService</ID> + <ID>UndocumentedPublicClass:EngineProvider.kt$EngineProvider</ID> + <ID>UndocumentedPublicClass:EngineSharedPreferencesListener.kt$EngineSharedPreferencesListener$ChangeSource</ID> + <ID>UndocumentedPublicClass:EngineSharedPreferencesListener.kt$EngineSharedPreferencesListener$TrackerChanged</ID> + <ID>UndocumentedPublicClass:EraseAndOpenShortcutActivity.kt$EraseAndOpenShortcutActivity : Activity</ID> + <ID>UndocumentedPublicClass:EraseShortcutActivity.kt$EraseShortcutActivity : Activity</ID> + <ID>UndocumentedPublicClass:ExceptionsRemoveFragment.kt$ExceptionsRemoveFragment : ExceptionsListFragment</ID> + <ID>UndocumentedPublicClass:FenixProductDetector.kt$FenixProductDetector</ID> + <ID>UndocumentedPublicClass:FenixProductDetector.kt$FenixProductDetector$FenixVersion</ID> + <ID>UndocumentedPublicClass:FindInPageIntegration.kt$FindInPageIntegration : LifecycleAwareFeatureUserInteractionHandler</ID> + <ID>UndocumentedPublicClass:FirstrunCardView.kt$FirstrunCardView : CardView</ID> + <ID>UndocumentedPublicClass:FirstrunFragment.kt$FirstrunFragment : FragmentOnClickListener</ID> + <ID>UndocumentedPublicClass:FirstrunPagerAdapter.kt$FirstrunPagerAdapter : PagerAdapter</ID> + <ID>UndocumentedPublicClass:FocusApplication.kt$FocusApplication : LocaleAwareApplicationProviderCoroutineScope</ID> + <ID>UndocumentedPublicClass:FocusSnackbar.kt$FocusSnackbar : BaseTransientBottomBar</ID> + <ID>UndocumentedPublicClass:FocusSnackbarDelegate.kt$FocusSnackbarDelegate : SnackbarDelegate</ID> + <ID>UndocumentedPublicClass:FullScreenIntegration.kt$FullScreenIntegration : LifecycleAwareFeatureUserInteractionHandler</ID> + <ID>UndocumentedPublicClass:GeneralSettingsFragment.kt$GeneralSettingsFragment : BaseSettingsFragment</ID> + <ID>UndocumentedPublicClass:HardwarePermissionCheckFeature.kt$HardwarePermissionCheckFeature : DefaultLifecycleObserver</ID> + <ID>UndocumentedPublicClass:HomeMenuItem.kt$HomeMenuItem</ID> + <ID>UndocumentedPublicClass:HomeMenuItem.kt$HomeMenuItem$Help : HomeMenuItem</ID> + <ID>UndocumentedPublicClass:HomeMenuItem.kt$HomeMenuItem$Settings : HomeMenuItem</ID> + <ID>UndocumentedPublicClass:IconGenerator.kt$IconGenerator</ID> + <ID>UndocumentedPublicClass:InputToolbarIntegration.kt$InputToolbarIntegration : LifecycleAwareFeature</ID> + <ID>UndocumentedPublicClass:InstalledSearchEnginesSettingsFragment.kt$InstalledSearchEnginesSettingsFragment : BaseSettingsFragment</ID> + <ID>UndocumentedPublicClass:IntentProcessor.kt$IntentProcessor$Result</ID> + <ID>UndocumentedPublicClass:IntentProcessor.kt$IntentProcessor.Result$CustomTab : Result</ID> + <ID>UndocumentedPublicClass:IntentProcessor.kt$IntentProcessor.Result$None : Result</ID> + <ID>UndocumentedPublicClass:IntentProcessor.kt$IntentProcessor.Result$Tab : Result</ID> + <ID>UndocumentedPublicClass:IntentUtils.kt$IntentUtils</ID> + <ID>UndocumentedPublicClass:LanguageFragment.kt$LanguageFragment : BaseComposeFragment</ID> + <ID>UndocumentedPublicClass:LanguageMiddleware.kt$LanguageMiddleware : Middleware</ID> + <ID>UndocumentedPublicClass:LanguageScreenStore.kt$LanguageScreenAction$InitLanguages : LanguageScreenAction</ID> + <ID>UndocumentedPublicClass:LanguageScreenStore.kt$LanguageScreenAction$Select : LanguageScreenAction</ID> + <ID>UndocumentedPublicClass:LanguageScreenStore.kt$LanguageScreenAction$UpdateLanguages : LanguageScreenAction</ID> + <ID>UndocumentedPublicClass:LanguageScreenStore.kt$LanguageScreenStore : Store</ID> + <ID>UndocumentedPublicClass:LanguageStorage.kt$LanguageStorage</ID> + <ID>UndocumentedPublicClass:LearnMoreSwitchPreference.kt$LearnMoreSwitchPreference : SwitchPreferenceCompat</ID> + <ID>UndocumentedPublicClass:LocaleDescriptor.kt$LocaleDescriptor : Comparable</ID> + <ID>UndocumentedPublicClass:LocalizedContent.kt$LocalizedContent</ID> + <ID>UndocumentedPublicClass:LockObserver.kt$LockObserver : DefaultLifecycleObserver</ID> + <ID>UndocumentedPublicClass:MainActivity.kt$MainActivity : LocaleAwareAppCompatActivity</ID> + <ID>UndocumentedPublicClass:MainActivity.kt$MainActivity$AppOpenType</ID> + <ID>UndocumentedPublicClass:ManualAddSearchEnginePreference.kt$ManualAddSearchEnginePreference : Preference</ID> + <ID>UndocumentedPublicClass:ManualAddSearchEngineSettingsFragment.kt$ManualAddSearchEngineSettingsFragment : BaseSettingsFragment</ID> + <ID>UndocumentedPublicClass:MobileMetricsPingStorage.kt$MobileMetricsPingStorage</ID> + <ID>UndocumentedPublicClass:MozillaPreference.kt$MozillaPreference : Preference</ID> + <ID>UndocumentedPublicClass:MozillaSettingsFragment.kt$MozillaSettingsFragment : BaseSettingsFragment</ID> + <ID>UndocumentedPublicClass:MultiselectSearchEngineListPreference.kt$MultiselectSearchEngineListPreference : SearchEngineListPreference</ID> + <ID>UndocumentedPublicClass:NavigationButtonsIntegration.kt$NavigationButtonsIntegration : LifecycleAwareFeature</ID> + <ID>UndocumentedPublicClass:OnboardingController.kt$DefaultOnboardingController : OnboardingController</ID> + <ID>UndocumentedPublicClass:OnboardingController.kt$OnboardingController</ID> + <ID>UndocumentedPublicClass:OnboardingFirstFragment.kt$OnboardingFirstFragment : Fragment</ID> + <ID>UndocumentedPublicClass:OnboardingInteractor.kt$DefaultOnboardingInteractor : OnboardingInteractor</ID> + <ID>UndocumentedPublicClass:OnboardingInteractor.kt$OnboardingInteractor</ID> + <ID>UndocumentedPublicClass:OnboardingSecondFragment.kt$OnboardingSecondFragment : Fragment</ID> + <ID>UndocumentedPublicClass:OnboardingStep.kt$OnboardingStep</ID> + <ID>UndocumentedPublicClass:OnboardingStorage.kt$OnboardingStorage</ID> + <ID>UndocumentedPublicClass:PreferenceSwitch.kt$PreferenceSwitch : SwitchCompat</ID> + <ID>UndocumentedPublicClass:PreferenceToolTipCompose.kt$PreferenceToolTipCompose : Preference</ID> + <ID>UndocumentedPublicClass:PrivacySecuritySettingsFragment.kt$PrivacySecuritySettingsFragment : BaseSettingsFragmentOnSharedPreferenceChangeListener</ID> + <ID>UndocumentedPublicClass:RadioButtonPreference.kt$GroupableRadioButton</ID> + <ID>UndocumentedPublicClass:RadioButtonPreference.kt$RadioButtonPreference : PreferenceGroupableRadioButton</ID> + <ID>UndocumentedPublicClass:RadioSearchEngineListPreference.kt$RadioSearchEngineListPreference : SearchEngineListPreferenceOnCheckedChangeListener</ID> + <ID>UndocumentedPublicClass:RemoveSearchEnginesSettingsFragment.kt$RemoveSearchEnginesSettingsFragment : BaseSettingsFragment</ID> + <ID>UndocumentedPublicClass:SearchEngineListPreference.kt$SearchEngineListPreference : PreferenceCoroutineScope</ID> + <ID>UndocumentedPublicClass:SearchSettingsFragment.kt$SearchSettingsFragment : BaseSettingsFragmentOnSharedPreferenceChangeListener</ID> + <ID>UndocumentedPublicClass:SearchSuggestionsFragment.kt$SearchSuggestionsFragment : FragmentCoroutineScope</ID> + <ID>UndocumentedPublicClass:SearchSuggestionsPreferences.kt$SearchSuggestionsPreferences</ID> + <ID>UndocumentedPublicClass:SearchSuggestionsViewModel.kt$SearchSuggestionsViewModel : AndroidViewModel</ID> + <ID>UndocumentedPublicClass:SearchSuggestionsViewModel.kt$State</ID> + <ID>UndocumentedPublicClass:SearchSuggestionsViewModel.kt$State$Disabled : State</ID> + <ID>UndocumentedPublicClass:SearchSuggestionsViewModel.kt$State$NoSuggestionsAPI : State</ID> + <ID>UndocumentedPublicClass:SearchSuggestionsViewModel.kt$State$ReadyForSuggestions : State</ID> + <ID>UndocumentedPublicClass:SearchUtils.kt$SearchUtils</ID> + <ID>UndocumentedPublicClass:SearchWidgetProvider.kt$SearchWidgetProvider : AppSearchWidgetProvider</ID> + <ID>UndocumentedPublicClass:SearchWidgetUtils.kt$SearchWidgetUtils</ID> + <ID>UndocumentedPublicClass:SecretSettingsFragment.kt$SecretSettingsFragment : BaseSettingsFragmentOnSharedPreferenceChangeListener</ID> + <ID>UndocumentedPublicClass:SettingsFragment.kt$SettingsFragment : BaseSettingsFragment</ID> + <ID>UndocumentedPublicClass:SitePermission.kt$SitePermission : Parcelable</ID> + <ID>UndocumentedPublicClass:SitePermissionOption.kt$AutoplayOption</ID> + <ID>UndocumentedPublicClass:SitePermissionOption.kt$AutoplayOption$AllowAudioVideo : SitePermissionOption</ID> + <ID>UndocumentedPublicClass:SitePermissionOption.kt$AutoplayOption$BlockAudioOnly : SitePermissionOption</ID> + <ID>UndocumentedPublicClass:SitePermissionOption.kt$AutoplayOption$BlockAudioVideo : SitePermissionOption</ID> + <ID>UndocumentedPublicClass:SitePermissionOption.kt$SitePermissionOption</ID> + <ID>UndocumentedPublicClass:SitePermissionOption.kt$SitePermissionOption$Allowed : SitePermissionOption</ID> + <ID>UndocumentedPublicClass:SitePermissionOption.kt$SitePermissionOption$AskToAllow : SitePermissionOption</ID> + <ID>UndocumentedPublicClass:SitePermissionOption.kt$SitePermissionOption$Blocked : SitePermissionOption</ID> + <ID>UndocumentedPublicClass:SitePermissionOptionListItem.kt$SitePermissionOptionListItem</ID> + <ID>UndocumentedPublicClass:SitePermissionOptionsFragment.kt$SitePermissionOptionsFragment : BaseComposeFragment</ID> + <ID>UndocumentedPublicClass:SitePermissionOptionsScreenStore.kt$SitePermissionOptionsScreenAction : Action</ID> + <ID>UndocumentedPublicClass:SitePermissionOptionsScreenStore.kt$SitePermissionOptionsScreenAction$AndroidPermission : SitePermissionOptionsScreenAction</ID> + <ID>UndocumentedPublicClass:SitePermissionOptionsScreenStore.kt$SitePermissionOptionsScreenAction$InitSitePermissionOptions : SitePermissionOptionsScreenAction</ID> + <ID>UndocumentedPublicClass:SitePermissionOptionsScreenStore.kt$SitePermissionOptionsScreenAction$Select : SitePermissionOptionsScreenAction</ID> + <ID>UndocumentedPublicClass:SitePermissionOptionsScreenStore.kt$SitePermissionOptionsScreenAction$UpdateSitePermissionOptions : SitePermissionOptionsScreenAction</ID> + <ID>UndocumentedPublicClass:SitePermissionOptionsScreenStore.kt$SitePermissionOptionsScreenState : State</ID> + <ID>UndocumentedPublicClass:SitePermissionOptionsScreenStore.kt$SitePermissionOptionsScreenStore : Store</ID> + <ID>UndocumentedPublicClass:SitePermissionOptionsStorage.kt$SitePermissionOptionsStorage</ID> + <ID>UndocumentedPublicClass:SitePermissionOptionsStorageMiddleware.kt$SitePermissionOptionsStorageMiddleware : Middleware</ID> + <ID>UndocumentedPublicClass:SitePermissionsFragment.kt$SitePermissionsFragment : BaseSettingsFragment</ID> + <ID>UndocumentedPublicClass:StartupActivityLog.kt$StartupActivityLog$StartupLogActivityLifecycleCallbacks : DefaultActivityLifecycleCallbacks</ID> + <ID>UndocumentedPublicClass:StartupActivityLog.kt$StartupActivityLog$StartupLogAppLifecycleObserver : DefaultLifecycleObserver</ID> + <ID>UndocumentedPublicClass:StartupActivityLog.kt$StartupActivityLog.LogEntry$ActivityCreated : LogEntry</ID> + <ID>UndocumentedPublicClass:StartupActivityLog.kt$StartupActivityLog.LogEntry$ActivityStarted : LogEntry</ID> + <ID>UndocumentedPublicClass:StartupActivityLog.kt$StartupActivityLog.LogEntry$ActivityStopped : LogEntry</ID> + <ID>UndocumentedPublicClass:StartupActivityLog.kt$StartupActivityLog.LogEntry$AppStarted : LogEntry</ID> + <ID>UndocumentedPublicClass:StartupActivityLog.kt$StartupActivityLog.LogEntry$AppStopped : LogEntry</ID> + <ID>UndocumentedPublicClass:StartupPathProvider.kt$StartupPathProvider$StartupPath</ID> + <ID>UndocumentedPublicClass:StartupPathProvider.kt$StartupPathProvider$StartupPathLifecycleObserver : DefaultLifecycleObserver</ID> + <ID>UndocumentedPublicClass:StartupStateProvider.kt$StartupStateProvider$StartupState</ID> + <ID>UndocumentedPublicClass:StartupTypeTelemetry.kt$StartupTypeTelemetry$StartupTypeLifecycleObserver : DefaultLifecycleObserver</ID> + <ID>UndocumentedPublicClass:StudiesAdapter.kt$StudiesAdapter : ListAdapter</ID> + <ID>UndocumentedPublicClass:StudiesAdapter.kt$StudiesAdapter$StudiesDiffCallback : ItemCallback</ID> + <ID>UndocumentedPublicClass:StudiesFragment.kt$StudiesFragment : BaseSettingsLikeFragment</ID> + <ID>UndocumentedPublicClass:StudiesListItem.kt$StudiesListItem</ID> + <ID>UndocumentedPublicClass:StudiesListItem.kt$StudiesListItem$ActiveStudy : StudiesListItem</ID> + <ID>UndocumentedPublicClass:StudiesListItem.kt$StudiesListItem$Section : StudiesListItem</ID> + <ID>UndocumentedPublicClass:StudiesRecyclerView.kt$StudiesRecyclerView : RecyclerView</ID> + <ID>UndocumentedPublicClass:StudiesViewHolder.kt$StudiesViewHolder : ViewHolder</ID> + <ID>UndocumentedPublicClass:StudiesViewHolder.kt$StudiesViewHolder$ActiveStudiesViewHolder : StudiesViewHolder</ID> + <ID>UndocumentedPublicClass:StudiesViewHolder.kt$StudiesViewHolder$SectionViewHolder : StudiesViewHolder</ID> + <ID>UndocumentedPublicClass:StudiesViewModel.kt$StudiesViewModel : AndroidViewModel</ID> + <ID>UndocumentedPublicClass:SupportUtils.kt$SupportUtils</ID> + <ID>UndocumentedPublicClass:SupportUtils.kt$SupportUtils$SumoTopic</ID> + <ID>UndocumentedPublicClass:SwitchWithDescription.kt$SwitchWithDescription : ConstraintLayout</ID> + <ID>UndocumentedPublicClass:TabViewHolder.kt$TabViewHolder : ViewHolder</ID> + <ID>UndocumentedPublicClass:TabsPopup.kt$TabsPopup : PopupWindow</ID> + <ID>UndocumentedPublicClass:TelemetryMiddleware.kt$TelemetryMiddleware : Middleware</ID> + <ID>UndocumentedPublicClass:ToolbarMenu.kt$ToolbarMenu</ID> + <ID>UndocumentedPublicClass:ToolbarMenu.kt$ToolbarMenu$CustomTabItem</ID> + <ID>UndocumentedPublicClass:ToolbarMenu.kt$ToolbarMenu$Item</ID> + <ID>UndocumentedPublicClass:ToolbarMenu.kt$ToolbarMenu.CustomTabItem$AddToHomeScreen : Item</ID> + <ID>UndocumentedPublicClass:ToolbarMenu.kt$ToolbarMenu.CustomTabItem$Back : Item</ID> + <ID>UndocumentedPublicClass:ToolbarMenu.kt$ToolbarMenu.CustomTabItem$FindInPage : Item</ID> + <ID>UndocumentedPublicClass:ToolbarMenu.kt$ToolbarMenu.CustomTabItem$Forward : Item</ID> + <ID>UndocumentedPublicClass:ToolbarMenu.kt$ToolbarMenu.CustomTabItem$OpenInApp : Item</ID> + <ID>UndocumentedPublicClass:ToolbarMenu.kt$ToolbarMenu.CustomTabItem$OpenInBrowser : Item</ID> + <ID>UndocumentedPublicClass:ToolbarMenu.kt$ToolbarMenu.CustomTabItem$Reload : Item</ID> + <ID>UndocumentedPublicClass:ToolbarMenu.kt$ToolbarMenu.CustomTabItem$RequestDesktop : Item</ID> + <ID>UndocumentedPublicClass:ToolbarMenu.kt$ToolbarMenu.CustomTabItem$Stop : Item</ID> + <ID>UndocumentedPublicClass:ToolbarMenu.kt$ToolbarMenu.Item$AddToHomeScreen : Item</ID> + <ID>UndocumentedPublicClass:ToolbarMenu.kt$ToolbarMenu.Item$AddToShortcuts : Item</ID> + <ID>UndocumentedPublicClass:ToolbarMenu.kt$ToolbarMenu.Item$Back : Item</ID> + <ID>UndocumentedPublicClass:ToolbarMenu.kt$ToolbarMenu.Item$FindInPage : Item</ID> + <ID>UndocumentedPublicClass:ToolbarMenu.kt$ToolbarMenu.Item$Forward : Item</ID> + <ID>UndocumentedPublicClass:ToolbarMenu.kt$ToolbarMenu.Item$OpenInApp : Item</ID> + <ID>UndocumentedPublicClass:ToolbarMenu.kt$ToolbarMenu.Item$Reload : Item</ID> + <ID>UndocumentedPublicClass:ToolbarMenu.kt$ToolbarMenu.Item$RemoveFromShortcuts : Item</ID> + <ID>UndocumentedPublicClass:ToolbarMenu.kt$ToolbarMenu.Item$RequestDesktop : Item</ID> + <ID>UndocumentedPublicClass:ToolbarMenu.kt$ToolbarMenu.Item$Settings : Item</ID> + <ID>UndocumentedPublicClass:ToolbarMenu.kt$ToolbarMenu.Item$Share : Item</ID> + <ID>UndocumentedPublicClass:ToolbarMenu.kt$ToolbarMenu.Item$Stop : Item</ID> + <ID>UndocumentedPublicClass:TrackingProtectionPanel.kt$TrackingProtectionPanel : BottomSheetDialog</ID> + <ID>UndocumentedPublicClass:UrlInputFragment.kt$FocusCrashException : Exception</ID> + <ID>UndocumentedPublicClass:ViewUtils.kt$ViewUtils</ID> + <ID>UndocumentedPublicClass:VoiceSearchActivity.kt$VoiceSearchActivity : BaseVoiceSearchActivity</ID> + <ID>UndocumentedPublicFunction:AboutFragment.kt$@Composable fun ColumnScope.LearnMoreLink( learnMore: String, openLearnMore: () -> Job, )</ID> + <ID>UndocumentedPublicFunction:AddToHomescreenDialogFragment.kt$AddToHomescreenDialogFragment.Companion$fun newInstance( url: String, title: String, blockingEnabled: Boolean, requestDesktop: Boolean, ): AddToHomescreenDialogFragment</ID> + <ID>UndocumentedPublicFunction:AdvancedSettingsFragment.kt$AdvancedSettingsFragment.Companion$fun newInstance(): AdvancedSettingsFragment</ID> + <ID>UndocumentedPublicFunction:AutocompleteDomainFormatter.kt$AutocompleteDomainFormatter$fun format(url: String): String</ID> + <ID>UndocumentedPublicFunction:AutocompleteListFragment.kt$AutocompleteListFragment.DomainListAdapter$fun move(from: Int, to: Int)</ID> + <ID>UndocumentedPublicFunction:AutocompleteListFragment.kt$AutocompleteListFragment.DomainListAdapter$fun refresh(context: Context, body: (() -> Unit)? = null)</ID> + <ID>UndocumentedPublicFunction:AutocompleteListFragment.kt$AutocompleteListFragment.DomainListAdapter$fun selection(): List<String></ID> + <ID>UndocumentedPublicFunction:BaseFragment.kt$BaseFragment$fun cancelAnimation()</ID> + <ID>UndocumentedPublicFunction:BrowserFragment.kt$BrowserFragment$fun crashReporterIsVisible(): Boolean</ID> + <ID>UndocumentedPublicFunction:BrowserFragment.kt$BrowserFragment$fun erase(shouldEraseAllTabs: Boolean = false)</ID> + <ID>UndocumentedPublicFunction:BrowserFragment.kt$BrowserFragment$fun handleTabCrash(crash: Crash)</ID> + <ID>UndocumentedPublicFunction:BrowserFragment.kt$BrowserFragment$fun showTrackingProtectionPanel()</ID> + <ID>UndocumentedPublicFunction:BrowserFragment.kt$BrowserFragment.Companion$fun createForTab(tabId: String): BrowserFragment</ID> + <ID>UndocumentedPublicFunction:BrowserMenuController.kt$BrowserMenuController$@Suppress("ComplexMethod") fun handleMenuInteraction(item: ToolbarMenu.Item)</ID> + <ID>UndocumentedPublicFunction:BrowsersCache.kt$BrowsersCache$@Synchronized fun all(context: Context): Browsers</ID> + <ID>UndocumentedPublicFunction:ClientWrapper.kt$ClientWrapper$@Deprecated("Non-private Client usage should be prevented") fun unwrap(): Client</ID> + <ID>UndocumentedPublicFunction:CookiesPreference.kt$CookiesPreference$fun updateSummary()</ID> + <ID>UndocumentedPublicFunction:CrashReporterFragment.kt$CrashReporterFragment.Companion$fun create()</ID> + <ID>UndocumentedPublicFunction:DefaultBrowserPreference.kt$DefaultBrowserPreference$fun update()</ID> + <ID>UndocumentedPublicFunction:DefaultLanguageScreenInteractor.kt$DefaultLanguageScreenInteractor$fun handleLanguageSelected(language: Language)</ID> + <ID>UndocumentedPublicFunction:DefaultSitePermissionOptionsScreenInteractor.kt$DefaultSitePermissionOptionsScreenInteractor$fun handleSitePermissionOptionSelected(sitePermissionOption: SitePermissionOption)</ID> + <ID>UndocumentedPublicFunction:EngineProvider.kt$EngineProvider$fun createClient(context: Context): Client</ID> + <ID>UndocumentedPublicFunction:EngineProvider.kt$EngineProvider$fun createCookieBannerStorage(context: Context): GeckoCookieBannersStorage</ID> + <ID>UndocumentedPublicFunction:EngineProvider.kt$EngineProvider$fun createEngine(context: Context, defaultSettings: DefaultSettings): Engine</ID> + <ID>UndocumentedPublicFunction:ExceptionsListFragment.kt$ExceptionsListFragment.DomainListAdapter$fun move(from: Int, to: Int)</ID> + <ID>UndocumentedPublicFunction:ExceptionsListFragment.kt$ExceptionsListFragment.DomainListAdapter$fun refresh(context: Context, body: (() -> Unit)? = null)</ID> + <ID>UndocumentedPublicFunction:ExceptionsListFragment.kt$ExceptionsListFragment.DomainListAdapter$fun selection(): List<TrackingProtectionException></ID> + <ID>UndocumentedPublicFunction:FactsProcessor.kt$FactsProcessor$fun initialize()</ID> + <ID>UndocumentedPublicFunction:FenixProductDetector.kt$FenixProductDetector$fun getInstalledFenixVersions(context: Context): List<String></ID> + <ID>UndocumentedPublicFunction:FenixProductDetector.kt$FenixProductDetector$fun isFenixDefaultBrowser(defaultBrowser: ActivityInfo?): Boolean</ID> + <ID>UndocumentedPublicFunction:FindInPageIntegration.kt$FindInPageIntegration$fun hide()</ID> + <ID>UndocumentedPublicFunction:FindInPageIntegration.kt$FindInPageIntegration$fun show(sessionState: SessionState)</ID> + <ID>UndocumentedPublicFunction:FirstrunFragment.kt$FirstrunFragment.Companion$fun create(): FirstrunFragment</ID> + <ID>UndocumentedPublicFunction:FirstrunPagerAdapter.kt$FirstrunPagerAdapter$fun getPageAccessibilityDescription(position: Int): String</ID> + <ID>UndocumentedPublicFunction:FocusApplication.kt$FocusApplication$open fun updateLeakCanaryState(isEnabled: Boolean)</ID> + <ID>UndocumentedPublicFunction:FocusDialog.kt$@Composable fun FocusDialogSample()</ID> + <ID>UndocumentedPublicFunction:FocusDialog.kt$@Preview( name = "dark theme", showBackground = true, backgroundColor = 0xFF393473, uiMode = Configuration.UI_MODE_NIGHT_MASK, ) @Composable fun DialogTitlePreviewDark()</ID> + <ID>UndocumentedPublicFunction:FocusDialog.kt$@Preview( name = "light theme", showBackground = true, backgroundColor = 0xFFFBFBFE, uiMode = Configuration.UI_MODE_NIGHT_NO, ) @Composable fun DialogTitlePreviewLight()</ID> + <ID>UndocumentedPublicFunction:FocusSnackbar.kt$FocusSnackbar$fun setText(text: String)</ID> + <ID>UndocumentedPublicFunction:FocusTheme.kt$fun phoneDimensions()</ID> + <ID>UndocumentedPublicFunction:FocusTheme.kt$fun tabletDimensions()</ID> + <ID>UndocumentedPublicFunction:HomeMenu.kt$HomeMenu$fun getMenuBuilder(): BrowserMenuBuilder</ID> + <ID>UndocumentedPublicFunction:IconGenerator.kt$IconGenerator.Companion$@JvmStatic fun generateLauncherIconPreOreo(context: Context, character: Char): Bitmap</ID> + <ID>UndocumentedPublicFunction:InstallFirefoxActivity.kt$InstallFirefoxActivity.Companion$fun open(context: Context)</ID> + <ID>UndocumentedPublicFunction:InstallFirefoxActivity.kt$InstallFirefoxActivity.Companion$fun resolveAppStore(context: Context): ActivityInfo?</ID> + <ID>UndocumentedPublicFunction:InstalledSearchEnginesSettingsFragment.kt$InstalledSearchEnginesSettingsFragment.Companion$fun newInstance()</ID> + <ID>UndocumentedPublicFunction:LearnMoreSwitchPreference.kt$LearnMoreSwitchPreference$abstract fun getLearnMoreUrl(): String</ID> + <ID>UndocumentedPublicFunction:LearnMoreSwitchPreference.kt$LearnMoreSwitchPreference$open fun getDescription(): String?</ID> + <ID>UndocumentedPublicFunction:LocaleDescriptor.kt$LocaleDescriptor$fun getNativeName(): String?</ID> + <ID>UndocumentedPublicFunction:LocaleDescriptor.kt$LocaleDescriptor$fun getTag(): String</ID> + <ID>UndocumentedPublicFunction:LocaleFragmentCompose.kt$@Composable fun LanguageNameAndTagItem( language: Language, isSelected: Boolean, onClick: (String) -> Unit, )</ID> + <ID>UndocumentedPublicFunction:LocalizedContent.kt$LocalizedContent$fun loadGPL(context: Context): String</ID> + <ID>UndocumentedPublicFunction:LocalizedContent.kt$LocalizedContent$fun loadLicenses(context: Context): String</ID> + <ID>UndocumentedPublicFunction:MainActivity.kt$MainActivity$fun customizeStatusBar(backgroundColorId: Int? = null)</ID> + <ID>UndocumentedPublicFunction:MainActivity.kt$MainActivity$fun getToolbar(): ActionBar</ID> + <ID>UndocumentedPublicFunction:MainActivity.kt$MainActivity$fun hideStatusBarBackground()</ID> + <ID>UndocumentedPublicFunction:MainActivityNavigation.kt$MainActivityNavigation$@Suppress("ComplexMethod") fun settings(page: Screen.Settings.Page)</ID> + <ID>UndocumentedPublicFunction:MainActivityNavigation.kt$MainActivityNavigation$fun showOnBoardingSecondScreen()</ID> + <ID>UndocumentedPublicFunction:MainActivityNavigation.kt$MainActivityNavigation$fun sitePermissionOptionsFragment(sitePermission: SitePermission)</ID> + <ID>UndocumentedPublicFunction:ManualAddSearchEnginePreference.kt$ManualAddSearchEnginePreference$fun setProgressViewShown(isShown: Boolean)</ID> + <ID>UndocumentedPublicFunction:ManualAddSearchEnginePreference.kt$ManualAddSearchEnginePreference$fun setSearchQueryErrorText(err: String)</ID> + <ID>UndocumentedPublicFunction:ManualAddSearchEnginePreference.kt$ManualAddSearchEnginePreference$fun validateEngineNameAndShowError(engineName: String, existingEngines: List<SearchEngine>): Boolean</ID> + <ID>UndocumentedPublicFunction:ManualAddSearchEnginePreference.kt$ManualAddSearchEnginePreference$fun validateSearchQueryAndShowError(searchQuery: String): Boolean</ID> + <ID>UndocumentedPublicFunction:ManualAddSearchEngineSettingsFragment.kt$ManualAddSearchEngineSettingsFragment.Companion$@WorkerThread @JvmStatic fun isValidSearchQueryURL(client: Client, query: String): Boolean</ID> + <ID>UndocumentedPublicFunction:MobileMetricsPingStorage.kt$MobileMetricsPingStorage$fun clearStorage()</ID> + <ID>UndocumentedPublicFunction:MobileMetricsPingStorage.kt$MobileMetricsPingStorage$fun load(): JSONObject?</ID> + <ID>UndocumentedPublicFunction:MobileMetricsPingStorage.kt$MobileMetricsPingStorage$fun save(json: JSONObject)</ID> + <ID>UndocumentedPublicFunction:MobileMetricsPingStorage.kt$MobileMetricsPingStorage$fun shouldStoreMetrics(): Boolean</ID> + <ID>UndocumentedPublicFunction:MozillaSettingsFragment.kt$MozillaSettingsFragment.Companion$fun newInstance(): MozillaSettingsFragment</ID> + <ID>UndocumentedPublicFunction:MultiselectSearchEngineListPreference.kt$MultiselectSearchEngineListPreference$fun atLeastOneEngineChecked(): Boolean</ID> + <ID>UndocumentedPublicFunction:NimbusSetup.kt$fun getNimbusAppName(): String</ID> + <ID>UndocumentedPublicFunction:OnboardingController.kt$OnboardingController$fun handleActivityResultImplementation(activityResult: ActivityResult)</ID> + <ID>UndocumentedPublicFunction:OnboardingController.kt$OnboardingController$fun handleFinishOnBoarding()</ID> + <ID>UndocumentedPublicFunction:OnboardingController.kt$OnboardingController$fun handleGetStartedButtonClicked()</ID> + <ID>UndocumentedPublicFunction:OnboardingController.kt$OnboardingController$fun handleMakeFocusDefaultBrowserButtonClicked(activityResultLauncher: ActivityResultLauncher<Intent>)</ID> + <ID>UndocumentedPublicFunction:OnboardingInteractor.kt$OnboardingInteractor$fun onActivityResultImplementation(activityResult: ActivityResult)</ID> + <ID>UndocumentedPublicFunction:OnboardingInteractor.kt$OnboardingInteractor$fun onFinishOnBoarding()</ID> + <ID>UndocumentedPublicFunction:OnboardingInteractor.kt$OnboardingInteractor$fun onGetStartedButtonClicked()</ID> + <ID>UndocumentedPublicFunction:OnboardingInteractor.kt$OnboardingInteractor$fun onMakeFocusDefaultBrowserButtonClicked(activityResultLauncher: ActivityResultLauncher<Intent>)</ID> + <ID>UndocumentedPublicFunction:Performance.kt$Performance$fun processIntentIfPerformanceTest(bundle: Bundle?, context: Context)</ID> + <ID>UndocumentedPublicFunction:PreferenceSwitch.kt$PreferenceSwitch$fun onClickListener(listener: () -> Unit)</ID> + <ID>UndocumentedPublicFunction:PrivacySecuritySettingsFragment.kt$PrivacySecuritySettingsFragment.Companion$fun newInstance(): PrivacySecuritySettingsFragment</ID> + <ID>UndocumentedPublicFunction:ProfilerMarkerFactProcessor.kt$ProfilerMarkerFactProcessor.Companion$fun create(profilerProvider: () -> Profiler?)</ID> + <ID>UndocumentedPublicFunction:PromoteSearchWidgetDialogCompose.kt$@Suppress("LongMethod") @Composable fun PromoteSearchWidgetDialogCompose( onAddSearchWidgetButtonClick: () -> Unit, onDismiss: () -> Unit, )</ID> + <ID>UndocumentedPublicFunction:RadioButtonPreference.kt$GroupableRadioButton$fun addToRadioGroup(radioButton: GroupableRadioButton)</ID> + <ID>UndocumentedPublicFunction:RadioButtonPreference.kt$GroupableRadioButton$fun updateRadioValue(isChecked: Boolean)</ID> + <ID>UndocumentedPublicFunction:RadioButtonPreference.kt$RadioButtonPreference$fun onClickListener(listener: (() -> Unit))</ID> + <ID>UndocumentedPublicFunction:RadioButtonPreference.kt$fun Iterable<GroupableRadioButton>.uncheckAll()</ID> + <ID>UndocumentedPublicFunction:RemoveSearchEnginesSettingsFragment.kt$RemoveSearchEnginesSettingsFragment.Companion$fun newInstance()</ID> + <ID>UndocumentedPublicFunction:SearchEngineListPreference.kt$SearchEngineListPreference$fun refetchSearchEngines()</ID> + <ID>UndocumentedPublicFunction:SearchOverlay.kt$@OptIn(DelicateCoroutinesApi::class) @Composable fun SearchOverlay( viewModel: SearchSuggestionsViewModel, defaultSearchEngineName: String, onListScrolled: () -> Unit, )</ID> + <ID>UndocumentedPublicFunction:SearchSettingsFragment.kt$SearchSettingsFragment.Companion$fun newInstance(): SearchSettingsFragment</ID> + <ID>UndocumentedPublicFunction:SearchSuggestionsFragment.kt$SearchSuggestionsFragment.Companion$fun create()</ID> + <ID>UndocumentedPublicFunction:SearchSuggestionsPreferences.kt$SearchSuggestionsPreferences$fun disableSearchSuggestions()</ID> + <ID>UndocumentedPublicFunction:SearchSuggestionsPreferences.kt$SearchSuggestionsPreferences$fun dismissNoSuggestionsMessage()</ID> + <ID>UndocumentedPublicFunction:SearchSuggestionsPreferences.kt$SearchSuggestionsPreferences$fun enableSearchSuggestions()</ID> + <ID>UndocumentedPublicFunction:SearchSuggestionsPreferences.kt$SearchSuggestionsPreferences$fun hasUserToggledSearchSuggestions(): Boolean</ID> + <ID>UndocumentedPublicFunction:SearchSuggestionsPreferences.kt$SearchSuggestionsPreferences$fun searchSuggestionsEnabled(): Boolean</ID> + <ID>UndocumentedPublicFunction:SearchSuggestionsPreferences.kt$SearchSuggestionsPreferences$fun userHasDismissedNoSuggestionsMessage(): Boolean</ID> + <ID>UndocumentedPublicFunction:SearchSuggestionsViewModel.kt$SearchSuggestionsViewModel$fun clearAutocompleteSuggestion()</ID> + <ID>UndocumentedPublicFunction:SearchSuggestionsViewModel.kt$SearchSuggestionsViewModel$fun clearSearchSuggestion()</ID> + <ID>UndocumentedPublicFunction:SearchSuggestionsViewModel.kt$SearchSuggestionsViewModel$fun disableSearchSuggestions()</ID> + <ID>UndocumentedPublicFunction:SearchSuggestionsViewModel.kt$SearchSuggestionsViewModel$fun dismissNoSuggestionsMessage()</ID> + <ID>UndocumentedPublicFunction:SearchSuggestionsViewModel.kt$SearchSuggestionsViewModel$fun enableSearchSuggestions()</ID> + <ID>UndocumentedPublicFunction:SearchSuggestionsViewModel.kt$SearchSuggestionsViewModel$fun refresh()</ID> + <ID>UndocumentedPublicFunction:SearchSuggestionsViewModel.kt$SearchSuggestionsViewModel$fun selectSearchSuggestion( suggestion: String, defaultSearchEngineName: String, alwaysSearch: Boolean = false, )</ID> + <ID>UndocumentedPublicFunction:SearchSuggestionsViewModel.kt$SearchSuggestionsViewModel$fun setAutocompleteSuggestion(text: String)</ID> + <ID>UndocumentedPublicFunction:SearchSuggestionsViewModel.kt$SearchSuggestionsViewModel$fun setSearchQuery(query: String)</ID> + <ID>UndocumentedPublicFunction:SearchUtils.kt$SearchUtils$fun createSearchUrl(context: Context?, text: String): String</ID> + <ID>UndocumentedPublicFunction:SecretSettingsUnlocker.kt$SecretSettingsUnlocker$fun increment()</ID> + <ID>UndocumentedPublicFunction:Settings.kt$Settings$fun addSearchWidgetInstalled(count: Int)</ID> + <ID>UndocumentedPublicFunction:Settings.kt$Settings$fun createTrackingProtectionPolicy( shouldBlockCookiesValue: String = shouldBlockCookiesValue(), ): EngineSession.TrackingProtectionPolicy</ID> + <ID>UndocumentedPublicFunction:Settings.kt$Settings$fun getAppLaunchCount()</ID> + <ID>UndocumentedPublicFunction:Settings.kt$Settings$fun getClearBrowsingSessions()</ID> + <ID>UndocumentedPublicFunction:Settings.kt$Settings$fun getCurrentCookieBannerOptionFromSharePref(): CookieBannerOption</ID> + <ID>UndocumentedPublicFunction:Settings.kt$Settings$fun getHttpsOnlyMode(): Engine.HttpsOnlyMode</ID> + <ID>UndocumentedPublicFunction:Settings.kt$Settings$fun getTotalBlockedTrackersCount()</ID> + <ID>UndocumentedPublicFunction:Settings.kt$Settings$fun hasAdvertisingBlocked()</ID> + <ID>UndocumentedPublicFunction:Settings.kt$Settings$fun hasAnalyticsBlocked()</ID> + <ID>UndocumentedPublicFunction:Settings.kt$Settings$fun hasRequestedDesktop()</ID> + <ID>UndocumentedPublicFunction:Settings.kt$Settings$fun hasSocialBlocked()</ID> + <ID>UndocumentedPublicFunction:Settings.kt$Settings$fun saveCurrentCookieBannerOptionInSharePref( cookieBannerOption: CookieBannerOption, )</ID> + <ID>UndocumentedPublicFunction:Settings.kt$Settings$fun setDefaultSearchEngineByName(name: String)</ID> + <ID>UndocumentedPublicFunction:Settings.kt$Settings$fun setupSafeBrowsing(engine: Engine, shouldUseSafeBrowsing: Boolean = shouldUseSafeBrowsing())</ID> + <ID>UndocumentedPublicFunction:Settings.kt$Settings$fun shouldAutocompleteFromCustomDomainList()</ID> + <ID>UndocumentedPublicFunction:Settings.kt$Settings$fun shouldAutocompleteFromShippedDomainList()</ID> + <ID>UndocumentedPublicFunction:Settings.kt$Settings$fun shouldBlockAdTrackers()</ID> + <ID>UndocumentedPublicFunction:Settings.kt$Settings$fun shouldBlockAnalyticTrackers()</ID> + <ID>UndocumentedPublicFunction:Settings.kt$Settings$fun shouldBlockCookiesValue(): String</ID> + <ID>UndocumentedPublicFunction:Settings.kt$Settings$fun shouldBlockJavaScript(): Boolean</ID> + <ID>UndocumentedPublicFunction:Settings.kt$Settings$fun shouldBlockOtherTrackers()</ID> + <ID>UndocumentedPublicFunction:Settings.kt$Settings$fun shouldBlockSocialTrackers()</ID> + <ID>UndocumentedPublicFunction:Settings.kt$Settings$fun shouldBlockWebFonts(): Boolean</ID> + <ID>UndocumentedPublicFunction:Settings.kt$Settings$fun shouldEnableRemoteDebugging(): Boolean</ID> + <ID>UndocumentedPublicFunction:Settings.kt$Settings$fun shouldShowSearchSuggestions(): Boolean</ID> + <ID>UndocumentedPublicFunction:Settings.kt$Settings$fun shouldUseBiometrics(): Boolean</ID> + <ID>UndocumentedPublicFunction:Settings.kt$Settings$fun shouldUseSecureMode(): Boolean</ID> + <ID>UndocumentedPublicFunction:Settings.kt$Settings$fun userHasDismissedNoSuggestionsMessage(): Boolean</ID> + <ID>UndocumentedPublicFunction:Settings.kt$Settings$fun userHasToggledSearchSuggestions(): Boolean</ID> + <ID>UndocumentedPublicFunction:SettingsFragment.kt$SettingsFragment.Companion$fun newInstance(): SettingsFragment</ID> + <ID>UndocumentedPublicFunction:SitePermissionOptionsFragment.kt$SitePermissionOptionsFragment.Companion$fun addSitePermission(sitePermission: SitePermission): SitePermissionOptionsFragment</ID> + <ID>UndocumentedPublicFunction:SitePermissionOptionsStorage.kt$SitePermissionOptionsStorage$fun getSitePermissionLabel(sitePermission: SitePermission): String</ID> + <ID>UndocumentedPublicFunction:SitePermissionOptionsStorage.kt$SitePermissionOptionsStorage$fun getSitePermissionsSettingsRules()</ID> + <ID>UndocumentedPublicFunction:SitePermissionOptionsStorage.kt$SitePermissionOptionsStorage$fun isAndroidPermissionGranted(sitePermission: SitePermission): Boolean</ID> + <ID>UndocumentedPublicFunction:SitePermissionOptionsStorage.kt$SitePermissionOptionsStorage$fun isSitePermissionNotBlocked(permissionsList: Array<String>): Boolean</ID> + <ID>UndocumentedPublicFunction:StartupActivityLog.kt$StartupActivityLog$@VisibleForTesting(otherwise = NONE) fun getObserversForTesting()</ID> + <ID>UndocumentedPublicFunction:StartupActivityLog.kt$StartupActivityLog$@VisibleForTesting(otherwise = PRIVATE) fun logEntries(loggerArg: Logger = logger, logLevel: Log.Priority = Log.logLevel)</ID> + <ID>UndocumentedPublicFunction:StartupActivityLog.kt$StartupActivityLog$fun registerInAppOnCreate( application: Application, processLifecycleOwner: LifecycleOwner = ProcessLifecycleOwner.get(), )</ID> + <ID>UndocumentedPublicFunction:StartupPathProvider.kt$StartupPathProvider$@VisibleForTesting(otherwise = NONE) fun getTestCallbacks()</ID> + <ID>UndocumentedPublicFunction:StartupPathProvider.kt$StartupPathProvider$fun attachOnActivityOnCreate(lifecycle: Lifecycle, intent: Intent?)</ID> + <ID>UndocumentedPublicFunction:StartupTypeTelemetry.kt$StartupTypeTelemetry$@VisibleForTesting(otherwise = NONE) fun getTestCallbacks()</ID> + <ID>UndocumentedPublicFunction:StartupTypeTelemetry.kt$StartupTypeTelemetry$fun attachOnMainActivityOnCreate(lifecycle: Lifecycle)</ID> + <ID>UndocumentedPublicFunction:StoreLink.kt$StoreLink$fun start()</ID> + <ID>UndocumentedPublicFunction:StudiesViewHolder.kt$StudiesViewHolder.ActiveStudiesViewHolder$fun bindStudy( activeStudy: StudiesListItem.ActiveStudy, removeStudyListener: (StudiesListItem.ActiveStudy) -> Unit, )</ID> + <ID>UndocumentedPublicFunction:StudiesViewHolder.kt$StudiesViewHolder.SectionViewHolder$fun bindSection(section: StudiesListItem.Section)</ID> + <ID>UndocumentedPublicFunction:StudiesViewModel.kt$StudiesViewModel$fun removeStudy(study: StudiesListItem.ActiveStudy)</ID> + <ID>UndocumentedPublicFunction:StudiesViewModel.kt$StudiesViewModel$fun setStudiesState(state: Boolean)</ID> + <ID>UndocumentedPublicFunction:SupportUtils.kt$SupportUtils$fun getGenericSumoURLForTopic(topic: SumoTopic): String</ID> + <ID>UndocumentedPublicFunction:SupportUtils.kt$SupportUtils$fun getSafeBrowsingURL(): String</ID> + <ID>UndocumentedPublicFunction:SupportUtils.kt$SupportUtils$fun openDefaultBrowserSumoPage(context: Context)</ID> + <ID>UndocumentedPublicFunction:SupportUtils.kt$SupportUtils$fun openUrlInCustomTab(activity: FragmentActivity, destinationUrl: String)</ID> + <ID>UndocumentedPublicFunction:TabViewHolder.kt$TabViewHolder$fun bind( tab: TabSessionState, isCurrentSession: Boolean, selectSession: (TabSessionState) -> Unit, closeSession: (TabSessionState) -> Unit, )</ID> + <ID>UndocumentedPublicFunction:Theme.kt$fun Resources.Theme.resolveAttribute(attribute: Int): Int</ID> + <ID>UndocumentedPublicFunction:TopSitesOverlay.kt$@OptIn(DelicateCoroutinesApi::class) @Composable fun TopSitesOverlay(modifier: Modifier = Modifier)</ID> + <ID>UndocumentedPublicFunction:TopSitesOverlay.kt$@OptIn(DelicateCoroutinesApi::class) fun removeTopSite(item: TopSite, components: Components)</ID> + <ID>UndocumentedPublicFunction:TopSitesOverlay.kt$@OptIn(DelicateCoroutinesApi::class) fun renameTopSite(selectedTopSite: TopSite, newTitle: String, components: Components)</ID> + <ID>UndocumentedPublicFunction:TransitionDrawableGroup.kt$TransitionDrawableGroup$fun resetTransition()</ID> + <ID>UndocumentedPublicFunction:TransitionDrawableGroup.kt$TransitionDrawableGroup$fun startTransition(durationMillis: Int)</ID> + <ID>UndocumentedPublicFunction:UrlInputFragment.kt$UrlInputFragment$fun onBackPressed(): Boolean</ID> + <ID>UndocumentedPublicFunction:UrlInputFragment.kt$UrlInputFragment.Companion$@JvmStatic fun createWithTab( tabId: String, ): UrlInputFragment</ID> + <ID>UndocumentedPublicFunction:UrlInputFragment.kt$UrlInputFragment.Companion$@JvmStatic fun createWithoutSession(): UrlInputFragment</ID> + <ID>UndocumentedPublicFunction:ViewUtils.kt$ViewUtils$fun hideKeyboard(view: View?)</ID> + <ID>UndocumentedPublicFunction:ViewUtils.kt$ViewUtils$fun showKeyboard(view: View?)</ID> + <ID>UndocumentedPublicFunction:VisibilityLifeCycleCallback.kt$VisibilityLifeCycleCallback.Companion$fun isInBackground(context: Context): Boolean</ID> + <ID>UnusedPrivateMember:TelemetryMiddleware.kt$TelemetryMiddleware$@Suppress("ComplexMethod") private fun generateOptions(customTabConfig: CustomTabConfig): List<String></ID> + <ID>UseRequire:FactsProcessor.kt$throw IllegalArgumentException("Fact is not a context menu fact")</ID> + <ID>UtilityClassWithPublicConstructor:AppReviewUtils.kt$AppReviewUtils</ID> + <ID>UtilityClassWithPublicConstructor:IconGenerator.kt$IconGenerator</ID> + </CurrentIssues> +</SmellBaseline> diff --git a/mobile/android/focus-android/quality/detekt.yml b/mobile/android/focus-android/quality/detekt.yml new file mode 100644 index 0000000000..bf5a0b7da2 --- /dev/null +++ b/mobile/android/focus-android/quality/detekt.yml @@ -0,0 +1,789 @@ +# Please refer to https://github.com/mozilla-mobile/firefox-android/blob/main/android-components/config/detekt.yml +# for the source of truth for our detekt configuration. + +build: + maxIssues: 0 + excludeCorrectable: false + weights: + # complexity: 2 + # LongParameterList: 1 + # style: 1 + # comments: 1 + +config: + validation: true + warningsAsErrors: false + checkExhaustiveness: false + # when writing own rules with new properties, exclude the property path e.g.: 'my_rule_set,.*>.*>[my_property]' + excludes: '' + +processors: + active: true + exclude: + - 'DetektProgressListener' + # - 'KtFileCountProcessor' + # - 'PackageCountProcessor' + # - 'ClassCountProcessor' + # - 'FunctionCountProcessor' + # - 'PropertyCountProcessor' + # - 'ProjectComplexityProcessor' + # - 'ProjectCognitiveComplexityProcessor' + # - 'ProjectLLOCProcessor' + # - 'ProjectCLOCProcessor' + # - 'ProjectLOCProcessor' + # - 'ProjectSLOCProcessor' + # - 'LicenseHeaderLoaderExtension' + +console-reports: + active: true + exclude: + # - 'ProjectStatisticsReport' + # - 'ComplexityReport' + # - 'NotificationReport' + # - 'FindingsReport' + # - 'FileBasedFindingsReport' + # - 'LiteFindingsReport' + +output-reports: + active: true + exclude: + # - 'TxtOutputReport' + # - 'XmlOutputReport' + # - 'HtmlOutputReport' + # - 'MdOutputReport' + # - 'SarifOutputReport' + +comments: + active: true + AbsentOrWrongFileLicense: + active: true # Enabled in https://bugzilla.mozilla.org/show_bug.cgi?id=1795140 + licenseTemplateFile: 'license.template' + licenseTemplateIsRegex: false + CommentOverPrivateFunction: + active: false + CommentOverPrivateProperty: + active: false + DeprecatedBlockTag: + active: false + EndOfSentenceFormat: + active: false + endOfSentenceFormat: '([.?!][ \t\n\r\f<])|([.?!:]$)' + KDocReferencesNonPublicProperty: + active: false + excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] + OutdatedDocumentation: + active: true # Enabled in https://bugzilla.mozilla.org/show_bug.cgi?id=1848527 + matchTypeParameters: false # (Default: true) Disabled in https://bugzilla.mozilla.org/show_bug.cgi?id=1848527 + matchDeclarationsOrder: true + allowParamOnConstructorProperties: false + UndocumentedPublicClass: + active: true # Enabled in https://github.com/mozilla-mobile/android-components/issues/76 + excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] + searchInNestedClass: true + searchInInnerClass: true + searchInInnerObject: true + searchInInnerInterface: true + searchInProtectedClass: false + UndocumentedPublicFunction: + active: true # Enabled in https://github.com/mozilla-mobile/android-components/issues/76 + excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] + searchProtectedFunction: false + UndocumentedPublicProperty: + active: false + excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] + searchProtectedProperty: false + +complexity: + active: true + CognitiveComplexMethod: + active: false + threshold: 15 + ComplexCondition: + active: true + threshold: 4 + ComplexInterface: + active: false + threshold: 10 + includeStaticDeclarations: false + includePrivateDeclarations: false + ignoreOverloaded: false + CyclomaticComplexMethod: + active: true + threshold: 18 # (Default: 15) Increased in https://github.com/mozilla-mobile/android-components/pull/10328 + ignoreSingleWhenExpression: true # Enabled in https://github.com/mozilla-mobile/android-components/pull/3271 + ignoreSimpleWhenEntries: false + ignoreNestingFunctions: false + nestingFunctions: + - 'also' + - 'apply' + - 'forEach' + - 'isNotNull' + - 'ifNull' + - 'let' + - 'run' + - 'use' + - 'with' + LabeledExpression: + active: false + ignoredLabels: [] + LargeClass: + active: true + threshold: 600 + LongMethod: + active: true + threshold: 75 # (Default: 60) Increased in https://github.com/mozilla-mobile/android-components/issues/6350 + LongParameterList: + active: true + functionThreshold: 8 # (Default: 6) Increased in https://bugzilla.mozilla.org/show_bug.cgi?id=1872996 + constructorThreshold: 7 + ignoreDefaultParameters: true # Enabled in https://github.com/mozilla-mobile/android-components/issues/10835 + ignoreDataClasses: true + ignoreAnnotatedParameter: [] + MethodOverloading: + active: false + threshold: 6 + NamedArguments: + active: false + threshold: 3 + ignoreArgumentsMatchingNames: false + NestedBlockDepth: + active: true + threshold: 4 + NestedScopeFunctions: + active: false + threshold: 1 + functions: + - 'kotlin.apply' + - 'kotlin.run' + - 'kotlin.with' + - 'kotlin.let' + - 'kotlin.also' + ReplaceSafeCallChainWithRun: + active: false + StringLiteralDuplication: + active: false + excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] + threshold: 3 + ignoreAnnotation: true + excludeStringsWithLessThan5Characters: true + ignoreStringsRegex: '$^' + TooManyFunctions: + active: true + excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] + thresholdInFiles: 26 # (Default: 11) Increased in https://github.com/mozilla-mobile/android-components/pull/9927 + thresholdInClasses: 26 # (Default: 11) Increased in https://github.com/mozilla-mobile/android-components/pull/9927 + thresholdInInterfaces: 26 # (Default: 11) Increased in https://github.com/mozilla-mobile/android-components/pull/9927 + thresholdInObjects: 26 # (Default: 11) Increased in https://github.com/mozilla-mobile/android-components/pull/9927 + thresholdInEnums: 11 + ignoreDeprecated: false + ignorePrivate: false + ignoreOverridden: false + +coroutines: + active: true + GlobalCoroutineUsage: + active: false + InjectDispatcher: + active: false # (Default: true) + dispatcherNames: + - 'IO' + - 'Default' + - 'Unconfined' + RedundantSuspendModifier: + active: false # (Default: true) + SleepInsteadOfDelay: + active: false # (Default: true) + SuspendFunSwallowedCancellation: + active: false + SuspendFunWithCoroutineScopeReceiver: + active: false + SuspendFunWithFlowReturnType: + active: false # (Default: true) + +empty-blocks: + active: true + EmptyCatchBlock: + active: true + allowedExceptionNameRegex: '_|(ignore|expected).*' + EmptyClassBlock: + active: true + EmptyDefaultConstructor: + active: true + EmptyDoWhileBlock: + active: true + EmptyElseBlock: + active: true + EmptyFinallyBlock: + active: true + EmptyForBlock: + active: true + EmptyFunctionBlock: + active: true + ignoreOverridden: false + EmptyIfBlock: + active: true + EmptyInitBlock: + active: true + EmptyKtFile: + active: true + EmptySecondaryConstructor: + active: true + EmptyTryBlock: + active: true + EmptyWhenBlock: + active: true + EmptyWhileBlock: + active: true + +exceptions: + active: true + ExceptionRaisedInUnexpectedLocation: + active: false # (Default: true) + methodNames: + - 'equals' + - 'finalize' + - 'hashCode' + - 'toString' + InstanceOfCheckForException: + active: false # (Default: true) + excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] + NotImplementedDeclaration: + active: false + ObjectExtendsThrowable: + active: false + PrintStackTrace: + active: true + RethrowCaughtException: + active: false # (Default: true) + ReturnFromFinally: + active: true + ignoreLabeled: false + SwallowedException: + active: false # (Default: true) + ignoredExceptionTypes: + - 'InterruptedException' + - 'MalformedURLException' + - 'NumberFormatException' + - 'ParseException' + allowedExceptionNameRegex: '_|(ignore|expected).*' + ThrowingExceptionFromFinally: + active: true + ThrowingExceptionInMain: + active: false + ThrowingExceptionsWithoutMessageOrCause: + active: false # (Default: true) + excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] + exceptions: + - 'ArrayIndexOutOfBoundsException' + - 'Exception' + - 'IllegalArgumentException' + - 'IllegalMonitorStateException' + - 'IllegalStateException' + - 'IndexOutOfBoundsException' + - 'NullPointerException' + - 'RuntimeException' + - 'Throwable' + ThrowingNewInstanceOfSameException: + active: true + TooGenericExceptionCaught: + active: true + excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] + exceptionNames: + - 'ArrayIndexOutOfBoundsException' + - 'Error' + - 'Exception' + - 'IllegalMonitorStateException' + - 'IndexOutOfBoundsException' + - 'NullPointerException' + - 'RuntimeException' + - 'Throwable' + allowedExceptionNameRegex: '_|(ignore|expected).*' + TooGenericExceptionThrown: + active: true + exceptionNames: + - 'Error' + - 'Exception' + - 'RuntimeException' + - 'Throwable' + +naming: + active: true + BooleanPropertyNaming: + active: false + allowedPattern: '^(is|has|are)' + ClassNaming: + active: true + classPattern: '[A-Z][a-zA-Z0-9]*' + ConstructorParameterNaming: + active: true + parameterPattern: '[a-z][A-Za-z0-9]*' + privateParameterPattern: '[a-z][A-Za-z0-9]*' + excludeClassPattern: '$^' + EnumNaming: + active: true + enumEntryPattern: '[A-Z][_a-zA-Z0-9]*' + ForbiddenClassName: + active: false + forbiddenName: [] + FunctionMaxLength: + active: false + maximumFunctionNameLength: 30 + FunctionMinLength: + active: false + minimumFunctionNameLength: 3 + FunctionNaming: + active: true + excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] + functionPattern: '[a-z][a-zA-Z0-9]*' + excludeClassPattern: '$^' + ignoreAnnotated: ['Composable'] # Configuration for Compose https://github.com/mozilla-mobile/android-components/issues/11866 + FunctionParameterNaming: + active: true + parameterPattern: '[a-z][A-Za-z0-9]*' + excludeClassPattern: '$^' + InvalidPackageDeclaration: + active: false # (Default: true) + rootPackage: '' + requireRootInDeclaration: false + LambdaParameterNaming: + active: false + parameterPattern: '[a-z][A-Za-z0-9]*|_' + MatchingDeclarationName: + active: true + mustBeFirst: true + MemberNameEqualsClassName: + active: false # (Default: true) + ignoreOverridden: true + NoNameShadowing: + active: false # (Default: true) + NonBooleanPropertyPrefixedWithIs: + active: false + ObjectPropertyNaming: + active: true + constantPattern: '[A-Za-z][_A-Za-z0-9]*' + propertyPattern: '[A-Za-z][_A-Za-z0-9]*' + privatePropertyPattern: '(_)?[A-Za-z][_A-Za-z0-9]*' + PackageNaming: + active: true + packagePattern: '[a-z]+(\.[a-z][A-Za-z0-9]*)*' + TopLevelPropertyNaming: + active: true + constantPattern: '[A-Z][_A-Z0-9]*' + propertyPattern: '[A-Za-z][_A-Za-z0-9]*' + privatePropertyPattern: '_?[A-Za-z][_A-Za-z0-9]*' + VariableMaxLength: + active: false + maximumVariableNameLength: 64 + VariableMinLength: + active: false + minimumVariableNameLength: 1 + VariableNaming: + active: true + variablePattern: '[a-z][A-Za-z0-9]*' + privateVariablePattern: '(_)?[a-z][A-Za-z0-9]*' + excludeClassPattern: '$^' + +performance: + active: true + ArrayPrimitive: + active: true + CouldBeSequence: + active: false + threshold: 3 + ForEachOnRange: + active: true + excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] + SpreadOperator: + active: true + excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] + UnnecessaryPartOfBinaryExpression: + active: false + UnnecessaryTemporaryInstantiation: + active: true + +potential-bugs: + active: true + AvoidReferentialEquality: + active: false # (Default: true) + forbiddenTypePatterns: + - 'kotlin.String' + CastNullableToNonNullableType: + active: false + CastToNullableType: + active: false + Deprecation: + active: false + DontDowncastCollectionTypes: + active: false + DoubleMutabilityForCollection: + active: true + mutableTypes: + - 'kotlin.collections.MutableList' + - 'kotlin.collections.MutableMap' + - 'kotlin.collections.MutableSet' + - 'java.util.ArrayList' + - 'java.util.LinkedHashSet' + - 'java.util.HashSet' + - 'java.util.LinkedHashMap' + - 'java.util.HashMap' + ElseCaseInsteadOfExhaustiveWhen: + active: false + ignoredSubjectTypes: [] + EqualsAlwaysReturnsTrueOrFalse: + active: true + EqualsWithHashCodeExist: + active: true + ExitOutsideMain: + active: false + ExplicitGarbageCollectionCall: + active: true + HasPlatformType: + active: false # (Default: true) + IgnoredReturnValue: + active: false # (Default: true) + restrictToConfig: true + returnValueAnnotations: + - 'CheckResult' + - '*.CheckResult' + - 'CheckReturnValue' + - '*.CheckReturnValue' + ignoreReturnValueAnnotations: + - 'CanIgnoreReturnValue' + - '*.CanIgnoreReturnValue' + returnValueTypes: + - 'kotlin.sequences.Sequence' + - 'kotlinx.coroutines.flow.*Flow' + - 'java.util.stream.*Stream' + ignoreFunctionCall: [] + ImplicitDefaultLocale: + active: false # (Default: true) + ImplicitUnitReturnType: + active: false + allowExplicitReturnType: true + InvalidRange: + active: true + IteratorHasNextCallsNextMethod: + active: true + IteratorNotThrowingNoSuchElementException: + active: true + LateinitUsage: + active: false + excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] + ignoreOnClassesPattern: '' + MapGetWithNotNullAssertionOperator: + active: false # (Default: true) + MissingPackageDeclaration: + active: false + excludes: ['**/*.kts'] + NullCheckOnMutableProperty: + active: false + NullableToStringCall: + active: false + PropertyUsedBeforeDeclaration: + active: false + UnconditionalJumpStatementInLoop: + active: false + UnnecessaryNotNullCheck: + active: false + UnnecessaryNotNullOperator: + active: true + UnnecessarySafeCall: + active: true + UnreachableCatchBlock: + active: false # (Default: true) + UnreachableCode: + active: true + UnsafeCallOnNullableType: + active: true + excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] + UnsafeCast: + active: true + UnusedUnaryOperator: + active: false # (Default: true) + UselessPostfixExpression: + active: false # (Default: true) + WrongEqualsTypeParameter: + active: true + +style: + active: true + AlsoCouldBeApply: + active: false + BracesOnIfStatements: + active: true # Enabled in https://github.com/mozilla-mobile/android-components/issues/1015 + singleLine: 'consistent' # (Default: never) + multiLine: 'always' + BracesOnWhenStatements: + active: false + singleLine: 'necessary' + multiLine: 'consistent' + CanBeNonNullable: + active: false + CascadingCallWrapping: + active: false + includeElvis: true + ClassOrdering: + active: false + CollapsibleIfStatements: + active: true # Enabled in https://github.com/mozilla-mobile/android-components/pull/78 + DataClassContainsFunctions: + active: false + conversionFunctionPrefix: + - 'to' + allowOperators: false + DataClassShouldBeImmutable: + active: false + DestructuringDeclarationWithTooManyEntries: + active: false # (Default: true) + maxDestructuringEntries: 3 + DoubleNegativeLambda: + active: false + negativeFunctions: + - reason: 'Use `takeIf` instead.' + value: 'takeUnless' + - reason: 'Use `all` instead.' + value: 'none' + negativeFunctionNameParts: + - 'not' + - 'non' + EqualsNullCall: + active: true + EqualsOnSignatureLine: + active: false + ExplicitCollectionElementAccessMethod: + active: false + ExplicitItLambdaParameter: + active: false # (Default: true) + ExpressionBodySyntax: + active: false + includeLineWrapping: false + ForbiddenAnnotation: + active: false + annotations: + - reason: 'it is a java annotation. Use `Suppress` instead.' + value: 'java.lang.SuppressWarnings' + - reason: 'it is a java annotation. Use `kotlin.Deprecated` instead.' + value: 'java.lang.Deprecated' + - reason: 'it is a java annotation. Use `kotlin.annotation.MustBeDocumented` instead.' + value: 'java.lang.annotation.Documented' + - reason: 'it is a java annotation. Use `kotlin.annotation.Target` instead.' + value: 'java.lang.annotation.Target' + - reason: 'it is a java annotation. Use `kotlin.annotation.Retention` instead.' + value: 'java.lang.annotation.Retention' + - reason: 'it is a java annotation. Use `kotlin.annotation.Repeatable` instead.' + value: 'java.lang.annotation.Repeatable' + - reason: 'Kotlin does not support @Inherited annotation, see https://youtrack.jetbrains.com/issue/KT-22265' + value: 'java.lang.annotation.Inherited' + ForbiddenComment: + active: true + comments: + - reason: 'Forbidden FIXME todo marker in comment, please fix the problem.' + value: 'FIXME:' + - reason: 'Forbidden STOPSHIP todo marker in comment, please address the problem before shipping the code.' + value: 'STOPSHIP:' + - reason: 'Forbidden TODO todo marker in comment, please do the changes.' + value: 'TODO:' + allowedPatterns: '' + ForbiddenImport: + active: false + imports: [] + forbiddenPatterns: '' + ForbiddenMethodCall: + active: false + methods: + - reason: 'print does not allow you to configure the output stream. Use a logger instead.' + value: 'kotlin.io.print' + - reason: 'println does not allow you to configure the output stream. Use a logger instead.' + value: 'kotlin.io.println' + ForbiddenSuppress: + active: false + rules: [] + ForbiddenVoid: + active: false # (Default: true) + ignoreOverridden: false + ignoreUsageInGenerics: false + FunctionOnlyReturningConstant: + active: true + ignoreOverridableFunction: true + ignoreActualFunction: true + excludedFunctions: [] + LoopWithTooManyJumpStatements: + active: false # (Default: true) + maxJumpCount: 1 + MagicNumber: + active: true + excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**', '**/*.kts'] + ignoreNumbers: + - '-1' + - '0' + - '1' + - '2' + ignoreHashCodeFunction: true + ignorePropertyDeclaration: true # Enabled for Compose in https://github.com/mozilla-mobile/android-components/issues/11864 + ignoreLocalVariableDeclaration: false + ignoreConstantDeclaration: true + ignoreCompanionObjectPropertyDeclaration: true + ignoreAnnotation: false + ignoreNamedArgument: true + ignoreEnums: false + ignoreRanges: false + ignoreExtensionFunctions: true + MandatoryBracesLoops: + active: false + MaxChainedCallsOnSameLine: + active: false + maxChainedCalls: 5 + MaxLineLength: + active: true + maxLineLength: 120 + excludePackageStatements: true + excludeImportStatements: true + excludeCommentStatements: false + excludeRawStrings: true + MayBeConst: + active: true + ModifierOrder: + active: true + MultilineLambdaItParameter: + active: false + MultilineRawStringIndentation: + active: false + indentSize: 4 + trimmingMethods: + - 'trimIndent' + - 'trimMargin' + NestedClassesVisibility: + active: true + NewLineAtEndOfFile: + active: true + NoTabs: + active: true # Enabled in https://github.com/mozilla-mobile/android-components/pull/78 + NullableBooleanCheck: + active: false + ObjectLiteralToLambda: + active: false # (Default: true) + OptionalAbstractKeyword: + active: true + OptionalUnit: + active: false + PreferToOverPairSyntax: + active: false + ProtectedMemberInFinalClass: + active: true + RedundantExplicitType: + active: false + RedundantHigherOrderMapUsage: + active: false # (Default: true) + RedundantVisibilityModifierRule: + active: false + ReturnCount: + active: true + max: 3 # (Default: 2) Increased in https://github.com/mozilla-mobile/android-components/issues/3 + excludedFunctions: + - 'equals' + excludeLabeled: false + excludeReturnFromLambda: true + excludeGuardClauses: false + SafeCast: + active: true + SerialVersionUIDInSerializableClass: + active: true + SpacingBetweenPackageAndImports: + active: true # Enabled in https://github.com/mozilla-mobile/android-components/pull/78 + StringShouldBeRawString: + active: false + maxEscapedCharacterCount: 2 + ignoredCharacters: [] + ThrowsCount: + active: true + max: 2 + excludeGuardClauses: false + TrailingWhitespace: + active: false + TrimMultilineRawString: + active: false + trimmingMethods: + - 'trimIndent' + - 'trimMargin' + UnderscoresInNumericLiterals: + active: false + acceptableLength: 4 + allowNonStandardGrouping: false + UnnecessaryAbstractClass: + active: true + UnnecessaryAnnotationUseSiteTarget: + active: false + UnnecessaryApply: + active: true + UnnecessaryBackticks: + active: false + UnnecessaryBracesAroundTrailingLambda: + active: false + UnnecessaryFilter: + active: false # (Default: true) + UnnecessaryInheritance: + active: true + UnnecessaryInnerClass: + active: false + UnnecessaryLet: + active: false + UnnecessaryParentheses: + active: false + allowForUnclearPrecedence: false + UntilInsteadOfRangeTo: + active: false + UnusedImports: + active: false + UnusedParameter: + active: true + allowedNames: 'ignored|expected' + UnusedPrivateClass: + active: true + UnusedPrivateMember: + active: true + allowedNames: '' + ignoreAnnotated: ['Composable'] # Configuration for Compose https://github.com/mozilla-mobile/android-components/issues/11866 + UnusedPrivateProperty: + active: true + allowedNames: '_|ignored|expected|serialVersionUID' + UseAnyOrNoneInsteadOfFind: + active: false # (Default: true) + UseArrayLiteralsInAnnotations: + active: false # (Default: true) + UseCheckNotNull: + active: true + UseCheckOrError: + active: false # (Default: true) + UseDataClass: + active: false + allowVars: false + UseEmptyCounterpart: + active: false + UseIfEmptyOrIfBlank: + active: false + UseIfInsteadOfWhen: + active: false + ignoreWhenContainingVariableDeclaration: false + UseIsNullOrEmpty: + active: false # (Default: true) + UseLet: + active: false + UseOrEmpty: + active: true + UseRequire: + active: true + UseRequireNotNull: + active: true + UseSumOfInsteadOfFlatMapSize: + active: false + UselessCallOnNotNull: + active: true + UtilityClassWithPublicConstructor: + active: true + VarCouldBeVal: + active: true + ignoreLateinitVar: false + WildcardImport: + active: true + excludeImports: + - 'java.util.*' diff --git a/mobile/android/focus-android/quality/license.template b/mobile/android/focus-android/quality/license.template new file mode 100644 index 0000000000..e0032240a4 --- /dev/null +++ b/mobile/android/focus-android/quality/license.template @@ -0,0 +1,3 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ diff --git a/mobile/android/focus-android/quality/pmd-rules.xml b/mobile/android/focus-android/quality/pmd-rules.xml new file mode 100644 index 0000000000..16054cf1c5 --- /dev/null +++ b/mobile/android/focus-android/quality/pmd-rules.xml @@ -0,0 +1,42 @@ +<?xml version="1.0"?> +<!-- This Source Code Form is subject to the terms of the Mozilla Public + - License, v. 2.0. If a copy of the MPL was not distributed with this + - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> + +<ruleset name="Custom ruleset" + xmlns="http://pmd.sf.net/ruleset/1.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd" + xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"> + + <description>Focus Android Ruleset</description> + + <rule ref="rulesets/java/basic.xml"/> + <rule ref="rulesets/java/braces.xml"/> + <rule ref="rulesets/java/clone.xml"/> + <rule ref="rulesets/java/codesize.xml"/> + + <!-- We'll use the entire 'strings' ruleset --> + <rule ref="rulesets/java/strings.xml"/> + + <!-- Here's some rules we'll specify one at a time --> + <rule ref="rulesets/java/unusedcode.xml/UnusedLocalVariable"/> + <rule ref="rulesets/java/unusedcode.xml/UnusedPrivateField"/> + <rule ref="rulesets/java/unusedcode.xml/UnusedPrivateMethod"/> + <rule ref="rulesets/java/imports.xml/DuplicateImports"/> + <rule ref="rulesets/java/unnecessary.xml/UnnecessaryConversionTemporary"/> + + <!-- We want to customize this rule a bit, change the message and raise the priority --> + <rule + message="Must handle exceptions" + ref="rulesets/java/empty.xml/EmptyCatchBlock"> + <priority>2</priority> + </rule> + + <!-- Now we'll customize a rule's property value --> + <rule ref="rulesets/java/codesize.xml/CyclomaticComplexity"> + <properties> + <property name="reportLevel" value="5"/> + </properties> + </rule> +</ruleset>
\ No newline at end of file diff --git a/mobile/android/focus-android/quality/pre-push-recommended.sh b/mobile/android/focus-android/quality/pre-push-recommended.sh new file mode 100755 index 0000000000..cbc1f6acd4 --- /dev/null +++ b/mobile/android/focus-android/quality/pre-push-recommended.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +# We recommend you run this as a pre-push hook: to reduce +# review turn-around time, we want all pushes to run tests +# locally. Using this hook will guarantee your hook gets +# updated as the repository changes. +# +# This hook tries to run as much as possible without taking +# too long. +# +# You can use it by running this command from the project root: +# `ln -s ../../quality/pre-push-recommended.sh .git/hooks/pre-push` + +# Descriptions for each gradle task below can be found in the +# output of `./gradlew tasks`. +./gradlew -q \ + ktlint \ + detekt \ + assembleFocusDebugAndroidTest \ + testFocusDebugUnitTest + +# Tasks omitted because they take a long time to run: +# - unit test on all variants +# - UI tests +# - lint (compiles all variants) diff --git a/mobile/android/focus-android/quality/spotbugs-exclude.xml b/mobile/android/focus-android/quality/spotbugs-exclude.xml new file mode 100644 index 0000000000..90a6da87eb --- /dev/null +++ b/mobile/android/focus-android/quality/spotbugs-exclude.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<FindBugsFilter> + <!-- Disable findbugs for Kotlin source files. Code generated by the Kotlin compiler has + triggered false positive findbugs warning regularly. --> + <Match> + <Source name="~.*\.kt"/> + </Match> + <!-- FindBugs doesn't like the resource classes provided by both ourselves, and the android + support libraries. --> + <Match> + <Class name="~.*\.R\$.*"/> + </Match> + <Match> + <Class name="~.*\.Manifest\$.*"/> + </Match> + <Match> + <Class name="~.*\.*Test"/> + </Match> + <!-- Todo consider reincluding --> + <Match> + <Class name="~.*\.*Helper"/> + </Match> + <Match> + <Class name="~.*\.*Screenshots"/> + </Match> + <Match> + <Bug pattern="NP_NULL_PARAM_DEREF_NONVIRTUAL"/> + </Match> +</FindBugsFilter> |