From 213efa7d660f535c52a55215c2423efc1f33b3f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Meira?= Date: Mon, 14 Jul 2025 18:21:51 +0100 Subject: [PATCH] fix: Remove subcategory requirement for `Specification` [CF-1607] It's possible for categories other than 'Security' to have subcategories. --- .../main/scala/com/codacy/plugins/api/results/Pattern.scala | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/codacy-plugins-api/src/main/scala/com/codacy/plugins/api/results/Pattern.scala b/codacy-plugins-api/src/main/scala/com/codacy/plugins/api/results/Pattern.scala index ae83e19..c176f7f 100644 --- a/codacy-plugins-api/src/main/scala/com/codacy/plugins/api/results/Pattern.scala +++ b/codacy-plugins-api/src/main/scala/com/codacy/plugins/api/results/Pattern.scala @@ -35,9 +35,7 @@ object Pattern { scanType: Option[ScanType] = Option.empty, parameters: Set[Parameter.Specification] = Set.empty, languages: Set[Language] = Set.empty, - enabled: Boolean = false) { - require(subcategory.isEmpty || category == Category.Security, "Security is the only category having subcategories") - } + enabled: Boolean = false) {} type Category = Category.Value object Category extends Enumeration {