Repository: detekt/detekt (kotlin)

Issue:
UnusedUnaryOperator>aliases' is misspelled or does not exist
Version of detekt used: da8b164c5da3a2c8017452355c1754df7344c8a7

It seems that if a rule does not have the `@Alias` annotation (like `UnusedUnaryOperator`) then putting the `alias` property in the configuration file for it leads to an error:

```log
Property 'potential-bugs>UnusedUnaryOperator>aliases' is misspelled or does not exist. This error may also indicate a detekt plugin is necessary to handle the 'potential-bugs>UnusedUnaryOperator>aliases' key.
```

Pull request description:
This issues was added with #7312. Well, in that issue we added the option to customize `aliases` but I forgot to allow that configuration in all the rules.

Fixes #7816

Patch:
diff --git a/detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/config/validation/ConfigValidation.kt b/detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/config/validation/ConfigValidation.kt
index fe8058287b82..6f78e570259e 100644
--- a/detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/config/validation/ConfigValidation.kt
+++ b/detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/config/validation/ConfigValidation.kt
@@ -28,6 +28,7 @@ internal val DEFAULT_PROPERTY_EXCLUDES = setOf(
     ".*>.*>active",
     ".*>.*>autoCorrect",
     ".*>severity",
+    ".*>.*>aliases",
     ".*>.*>severity",
     ".*>.*>ignoreAnnotated",
     ".*>.*>ignoreFunction",


Test patch:
diff --git a/detekt-core/src/test/resources/common_known_sections.yml b/detekt-core/src/test/resources/common_known_sections.yml
index b8cb3aeea60b..27ab64d2a498 100644
--- a/detekt-core/src/test/resources/common_known_sections.yml
+++ b/detekt-core/src/test/resources/common_known_sections.yml
@@ -11,3 +11,7 @@ console-reports:
   active: true
   exclude:
     - 'FileBasedFindingsReport'
+
+potential-bugs:
+  UnusedUnaryOperator:
+    aliases: ['an-alias']