From 30ffb06c781ef20330f14ad7e067bfac819d2941 Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Mon, 14 Aug 2023 21:11:33 -0400 Subject: [PATCH] Update detekt to version 1.23.1 and synchronize config with firefox-android --- buildSrc/src/main/java/Config.kt | 8 ++++---- buildSrc/src/main/java/Dependencies.kt | 2 +- config/detekt.yml | 4 +--- config/license.template | 3 +++ 4 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 config/license.template diff --git a/buildSrc/src/main/java/Config.kt b/buildSrc/src/main/java/Config.kt index 15e22f1fc..ebf053143 100644 --- a/buildSrc/src/main/java/Config.kt +++ b/buildSrc/src/main/java/Config.kt @@ -1,12 +1,12 @@ +/* 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/. */ + import org.gradle.api.Project import java.text.SimpleDateFormat import java.util.Date import java.util.Locale -/* 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/. */ - object Config { // Synchronized build configuration for all modules const val compileSdkVersion = 33 diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt index 98d052f56..0129f4abe 100644 --- a/buildSrc/src/main/java/Dependencies.kt +++ b/buildSrc/src/main/java/Dependencies.kt @@ -41,7 +41,7 @@ object Versions { const val androidx_orchestrator = "1.4.2" const val androidx_runner = "1.5.2" const val androidx_uiautomator = "2.2.0" - const val detekt = "1.23.0" + const val detekt = "1.23.1" const val jacoco = "0.8.10" const val ktlint = "0.50.0" const val mockwebserver = "4.11.0" diff --git a/config/detekt.yml b/config/detekt.yml index 5c47040c1..2ad24811f 100644 --- a/config/detekt.yml +++ b/config/detekt.yml @@ -56,7 +56,7 @@ output-reports: comments: active: true AbsentOrWrongFileLicense: - active: false + active: true # Enabled in https://bugzilla.mozilla.org/show_bug.cgi?id=1795140 licenseTemplateFile: 'license.template' licenseTemplateIsRegex: false CommentOverPrivateFunction: @@ -666,8 +666,6 @@ style: active: true OptionalUnit: active: false - OptionalWhenBraces: - active: false PreferToOverPairSyntax: active: false ProtectedMemberInFinalClass: diff --git a/config/license.template b/config/license.template new file mode 100644 index 000000000..e0032240a --- /dev/null +++ b/config/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/. */