From 207b41615c6c64913bac044c38da82954672ec28 Mon Sep 17 00:00:00 2001 From: Cas Date: Thu, 2 Nov 2023 09:08:18 +0100 Subject: [PATCH] Update baseline.xml Makes detekt more strict for existing code --- config/detekt/baseline.xml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/config/detekt/baseline.xml b/config/detekt/baseline.xml index 840deff8..65a43749 100644 --- a/config/detekt/baseline.xml +++ b/config/detekt/baseline.xml @@ -3,28 +3,13 @@ TooManyFunctions:A1cConverter.kt$A1cConverter$A1cConverter - ComplexCondition:NightscoutMigrator.kt$NightscoutMigrator$url == null && token == null && display.isEmpty() && public.isEmpty() TooManyFunctions:NightscoutDAO.kt$NightscoutDAO - NestedBlockDepth:Diacast.kt$Diacast$@Throws(NoSuchEpisodeException::class, IOException::class, FeedException::class) fun getEpisode(episode: Int): SyndEntry LongMethod:Main.kt$Main$@Throws(LoginException::class) @JvmStatic fun main(args: Array<String>) LongMethod:AboutCommand.kt$AboutCommand$override fun execute(event: CommandEvent) - ComplexMethod:NightscoutApplicationCommand.kt$NightscoutApplicationCommand$override fun execute(event: SlashCommandInteractionEvent) TooManyFunctions:NightscoutApplicationCommand.kt$NightscoutApplicationCommand : ApplicationCommand TooManyFunctions:NightscoutCommand.kt$NightscoutCommand : DiscordCommand - LongMethod:QuoteImportCommand.kt$QuoteImportCommand$private fun parse(event: CommandEvent, args: String = event.args, message: Message = event.message) - NestedBlockDepth:BgGraph.kt$BgGraph$fun addEntries(nightscout: NightscoutDTO) TooManyFunctions:NightscoutDTO.kt$NightscoutDTO$Builder - ComplexCondition:Nightscout.kt$Nightscout$newestBg != null && newestBg.delta == null || // Set delta if the original is zero and the pebble endpoint is providing non-zero delta newestBg?.delta?.original == 0.0 && bgDelta.toDouble() != 0.0 TooGenericExceptionThrown:Awyisser.kt$Awyisser$throw Exception("Could not find awyiss image link") - SwallowedException:Diacast.kt$Diacast$e: FileNotFoundException - SwallowedException:NightscoutAdminDeleteCommand.kt$NightscoutAdminDeleteCommand$ex: NullPointerException - SwallowedException:HelpListener.kt$HelpListener$ex: IllegalStateException - SwallowedException:NightscoutDTO.kt$NightscoutDTO$e: NoNightscoutDataException MemberNameEqualsClassName:Main.kt$Main$@Throws(LoginException::class) @JvmStatic fun main(args: Array<String>) - ReturnCount:QuoteImportCommand.kt$QuoteImportCommand$override fun execute(event: CommandEvent) - LoopWithTooManyJumpStatements:HelpListener.kt$HelpListener$for (command in commands) { if (command.isHidden) { continue } val requiredPermissions = command.userPermissions if (requiredPermissions.isEmpty()) { allowedCommands.add(command) continue } var userPermissions: EnumSet<Permission> = Permission.getPermissions(Permission.ALL_PERMISSIONS) if (event.member != null) { userPermissions = event.member.permissions } var userIsAllowedToUseCommand = true for (requiredPermission in requiredPermissions) { if (!userPermissions.contains(requiredPermission)) { userIsAllowedToUseCommand = false } } if (userIsAllowedToUseCommand) { allowedCommands.add(command) } } - ReturnCount:UsernameEnforcementListener.kt$UsernameEnforcementListener$private fun enforceRules(username: String, rules: NameRuleDTO, event: GenericGuildMemberEvent) - UnusedPrivateMember:PatternsTest.kt$PatternsTest.Companion$@JvmStatic private fun inlineBgProvider() - UnusedPrivateMember:PatternsTest.kt$PatternsTest.Companion$@JvmStatic private fun unitBgProvider()