From e1d5a44d89a728a4adf6152a15e80d9c6aabc2e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rolv=20R=C3=A5en?= Date: Wed, 21 Oct 2026 13:42:23 +0200 Subject: [PATCH] Adjust detekt defaults regarding magic numbers --- ci-cd/run-detekt/detekt-default.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ci-cd/run-detekt/detekt-default.yml b/ci-cd/run-detekt/detekt-default.yml index 8d1d27f..e01747f 100644 --- a/ci-cd/run-detekt/detekt-default.yml +++ b/ci-cd/run-detekt/detekt-default.yml @@ -44,9 +44,15 @@ style: # IntelliJ's default Kotlin code style uses wildcard imports. active: false MagicNumber: - # Configuration defaults and annotation arguments (@Size(max = 255), @Scheduled(...)). + # Configuration defaults and annotation arguments (@Size(max = 255), @Scheduled(...)), + # plus the places where a literal is already named or self-explanatory. ignorePropertyDeclaration: true ignoreAnnotation: true + ignoreLocalVariableDeclaration: true + ignoreEnums: true + ignoreRanges: true + # Replaces detekt's default list (-1, 0, 1, 2), so those are repeated here. + ignoreNumbers: ['-1', '0', '1', '2', '10', '24', '60', '100', '1000'] ReturnCount: max: 3 excludeGuardClauses: true