Skip to content

Commit ec1e692

Browse files
committed
Revert "chore(fossid): Inline a few properties for simplicity and compactness"
This reverts commit 82e4628. Signed-off-by: Nicolas Nobelis <[email protected]>
1 parent b1a1450 commit ec1e692

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

plugins/scanners/fossid/src/main/kotlin/events/CloneRepositoryHandler.kt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,10 @@ class CloneRepositoryHandler(val config: FossIdConfig, val service: FossIdServic
149149
logger.warn { "${legacyRules.size} legacy rules have been found." }
150150
}
151151

152-
deduplicateAndNormalizeIgnoreRules(excludesRules + legacyRules).forEach {
152+
val allRules = excludesRules + legacyRules
153+
154+
val normalizedRules = deduplicateAndNormalizeIgnoreRules(allRules)
155+
normalizedRules.forEach {
153156
service.createIgnoreRule(
154157
config.user.value,
155158
config.apiKey.value,
@@ -226,5 +229,7 @@ internal fun deduplicateAndNormalizeIgnoreRules(allRules: List<IgnoreRule>): Lis
226229
.filter { it.type == RuleType.EXTENSION }
227230
.distinctBy { it.value }
228231

229-
return normalizedIgnoredDirs + normalizedIgnoredFiles + normalizedIgnoredExtensions
232+
val normalizedRules = normalizedIgnoredDirs + normalizedIgnoredFiles + normalizedIgnoredExtensions
233+
234+
return normalizedRules
230235
}

0 commit comments

Comments
 (0)