From a94b3eb53f6ff23d80215d36ea02ef31fc9742bc Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 22 Sep 2025 06:50:02 +0000
Subject: [PATCH 1/5] Initial plan
From e9ed59cd1448acddb1914b374b70d1f83f3316d1 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 22 Sep 2025 07:04:53 +0000
Subject: [PATCH 2/5] Improve code quality across multiple Java classes
- Add toString(), equals(), and hashCode() methods to Token class for better debugging
- Enhance MetricsVisitor with documentation and extracted complexity calculation logic
- Improve RuleTemplateAnnotationReader with input validation and better method names
- Add comprehensive documentation to DelphiFileUtils with better error messages
- Fix placeholder content in RoutineDeclaration.html example rule
- Enhance CyclomaticComplexityRoutine.html with detailed examples and explanations
Co-authored-by: michaelkrisper <733482+michaelkrisper@users.noreply.github.com>
---
.../checks/verifier/IssueExpectation.class | Bin 0 -> 2385 bytes
.../checks/verifier/TextEditExpectation.class | Bin 0 -> 938 bytes
.../format/DelphiFormatStringException.class | Bin 0 -> 299 bytes
.../utils/format/FormatSpecifierType.class | Bin 0 -> 1752 bytes
.../utils/format/NumberOrWildcard.class | Bin 0 -> 1367 bytes
.../CyclomaticComplexityRoutine.html | 55 +++++++++++++++++-
.../antlr/ast/visitors/MetricsVisitor.java | 25 +++++++-
.../delphi/cfg/block/TerminatorKind.class | Bin 0 -> 1345 bytes
.../delphi/compiler/Architecture.class | Bin 0 -> 1059 bytes
.../integradev/delphi/compiler/Platform.class | Bin 0 -> 1193 bytes
.../delphi/msbuild/DelphiProject.class | Bin 0 -> 668 bytes
.../condition/ConditionEvaluationError.class | Bin 0 -> 499 bytes
.../InvalidExpressionException.class | Bin 0 -> 302 bytes
.../msbuild/condition/Token$TokenType.class | Bin 0 -> 2096 bytes
.../delphi/msbuild/condition/Token.class | Bin 0 -> 1046 bytes
.../delphi/nunit/NUnitParseException.class | Bin 0 -> 269 bytes
.../delphi/nunit/TestResult$Status.class | Bin 0 -> 1235 bytes
.../integradev/delphi/nunit/TestResult.class | Bin 0 -> 708 bytes
.../directive/expression/Token.java | 22 +++++++
.../delphi/utils/LocatableException.class | Bin 0 -> 172 bytes
.../check/RuleTemplateAnnotationReader.java | 49 ++++++++++++----
.../delphi/utils/files/DelphiFileUtils.java | 34 ++++++++++-
.../mycompany-delphi/RoutineDeclaration.html | 12 +++-
23 files changed, 179 insertions(+), 18 deletions(-)
create mode 100644 delphi-checks-testkit/src/main/java/au/com/integradev/delphi/checks/verifier/IssueExpectation.class
create mode 100644 delphi-checks-testkit/src/main/java/au/com/integradev/delphi/checks/verifier/TextEditExpectation.class
create mode 100644 delphi-checks/src/main/java/au/com/integradev/delphi/utils/format/DelphiFormatStringException.class
create mode 100644 delphi-checks/src/main/java/au/com/integradev/delphi/utils/format/FormatSpecifierType.class
create mode 100644 delphi-checks/src/main/java/au/com/integradev/delphi/utils/format/NumberOrWildcard.class
create mode 100644 delphi-frontend/src/main/java/au/com/integradev/delphi/cfg/block/TerminatorKind.class
create mode 100644 delphi-frontend/src/main/java/au/com/integradev/delphi/compiler/Architecture.class
create mode 100644 delphi-frontend/src/main/java/au/com/integradev/delphi/compiler/Platform.class
create mode 100644 delphi-frontend/src/main/java/au/com/integradev/delphi/msbuild/DelphiProject.class
create mode 100644 delphi-frontend/src/main/java/au/com/integradev/delphi/msbuild/condition/ConditionEvaluationError.class
create mode 100644 delphi-frontend/src/main/java/au/com/integradev/delphi/msbuild/condition/InvalidExpressionException.class
create mode 100644 delphi-frontend/src/main/java/au/com/integradev/delphi/msbuild/condition/Token$TokenType.class
create mode 100644 delphi-frontend/src/main/java/au/com/integradev/delphi/msbuild/condition/Token.class
create mode 100644 delphi-frontend/src/main/java/au/com/integradev/delphi/nunit/NUnitParseException.class
create mode 100644 delphi-frontend/src/main/java/au/com/integradev/delphi/nunit/TestResult$Status.class
create mode 100644 delphi-frontend/src/main/java/au/com/integradev/delphi/nunit/TestResult.class
create mode 100644 delphi-frontend/src/main/java/au/com/integradev/delphi/utils/LocatableException.class
diff --git a/delphi-checks-testkit/src/main/java/au/com/integradev/delphi/checks/verifier/IssueExpectation.class b/delphi-checks-testkit/src/main/java/au/com/integradev/delphi/checks/verifier/IssueExpectation.class
new file mode 100644
index 0000000000000000000000000000000000000000..c3dd397e58fd0a0569b1babf7ce871832a969be7
GIT binary patch
literal 2385
zcmcIlTXWk~5dMyxM2@4xuIZIDX>i@tc0<$~z2FdNOx+sX7V3}!<#ucz+lpn$NOGXV
z@IUwwJirVcNFF*oGyEooJ(7&&*zM$n@mNRNv-|DtcXrSI_0Pcz0Pmn1M+8v?Q!1u0
z!;swNdt5WP+0q`>c17J~nAy-x-Q8q}W^+5Uh+$SiT*VwzhTFWa)vd0ko33ctydn0q
zhA?_@}w345E@43ZSa^pEOG
z!m2IdZVelTda>*aOT%7Cja0DLE!3i8!lSxnh`E-}qs%sZ+yT1`#|+-BHF##An7Pc5
z30I95#YEG1)#}@IQPL$jCl22a>$2XdmbNU*bzGbG9tgK>HJro@Dseo(Lj{jie1wk~
z(q3zLC#0KuR!3+RFDSC$O)fixx_ho0{`xyyDuI#j;667ShHx?!%j)!dh4G3ENk$B}
zpY=po{pg#%%U9cm84Qq%+%T%TD+)
c)GW6}Ld#Yln
zW=$z>?P?X9A-JfUy1mTcPo+1)2q7#&l5q(#!<^byDpp<5O
Why is this an issue?
The cyclomatic complexity of routines should not be excessive, as complex code will be difficult
to understand and maintain.
+ High cyclomatic complexity can lead to: +
++function ProcessValue(Value: Integer; Mode: String): Integer; +begin + if Value > 0 then // +1 + begin + if Mode = 'ADD' then // +1 + Result := Value + 10 + else if Mode = 'MUL' then // +1 + Result := Value * 2 + else if Mode = 'DIV' then // +1 + Result := Value div 2 + else + Result := Value; + end + else if Value < 0 then // +1 + Result := -Value + else + Result := 0; +end; +// Cyclomatic Complexity = 6 +
Refactor this routine so it runs more linearly, for example by reducing the number of times - the control flow splits. + the control flow splits. Consider using polymorphism, strategy pattern, or breaking the routine + into smaller, more focused methods.
++function ProcessValue(Value: Integer; Mode: String): Integer; +begin + if Value <= 0 then + Exit(Abs(Value)); + + Result := ApplyMode(Value, Mode); +end; + +function ApplyMode(Value: Integer; Mode: String): Integer; +begin + case Mode of + 'ADD': Result := Value + 10; + 'MUL': Result := Value * 2; + 'DIV': Result := Value div 2; + else + Result := Value; + end; +end; +
This visitor traverses the AST and collects metrics including: + * + *
fgc5PcgbapF4t2%%6QKp{ZlR&_xF2}mnY1rkyyf<`^$=ESSulB^@!smg!i z01{Cp4*URq6ymKL(W>PFSz%=pL8Z{GoIpl%@p!$j6b4tat3J#XK02cGJ? zZ@PQ3mk8vWfeMmM0i)j7Euw&;3CqR|Y=L!e?DoQ;8>mF~BhQ!nt}h3p_klZ%yW?Qs z^H%vm5`@ZahaaR8$R;00QlQ!T+tgZ0&}Q~iUB#@8Im~N5dB7^mt>emfk| L5Ce?74k(EXT+ bE24;2!79Ivx1~x_p;jF~6ME#t^ymWonisaOSlFa-(Mg}&U z%)HDJJ4Oak4IhMp;F6-uymV{LFm?tGMh2tAQvKxoT>Z?vlGOB~#FW%B{gl+4f{aZ4 zyi%ZMeZNp38IV|1oQh;Hi*tTTDkB5GPi9`KUukYqYEejHQVvjrD>%QjC^^+F6U33g zqE`>(4hBUAcA)z~fDs6RJ^+%OK%Np%6eP~3rM;bjaU)os3rK=|%fKKGR4D;e$qi&P HG4KEYCR9Jr literal 0 HcmV?d00001 diff --git a/delphi-frontend/src/main/java/au/com/integradev/delphi/nunit/TestResult$Status.class b/delphi-frontend/src/main/java/au/com/integradev/delphi/nunit/TestResult$Status.class new file mode 100644 index 0000000000000000000000000000000000000000..b0686e4f84a6e6cb80313e35412c2d79a6895bbb GIT binary patch literal 1235 zcmbVMT~8BH5IwhF+pb%v6-{4Ont z5RHasf0S|VrAiZgu(nC3b9Uy;+;eC4$Ima{0ldTu1tErID=^yK6T^0W-sxFK{M0z& z&WHE5;Rdel8wcF;_qi81e!=uDKkyP@h-io+#t>_4nr3yIVYNOgO-b;?H6$d@&StG% z-4@U-4Vr)y^L4G!xWdLXj3Y%@p}ARqQ#BdZ-i}^SMH+V$q%=(6E2KbY0FcQPk_l z)~RJUmfJD*4v%@;FR934QbA5b9`_i=t^=xWa6+A&T28?C-Z88fhqAXE%kxS@fa&*a zw^JIfAP6M?w1)ebArZ?q3BAFP8KxR!*7Rl^QI&+5jw2C=CjLIw@C0*057~w%y3qea z5vu*0AhOjxA~DA6w##>elSAG+unrwUcK*_oKDzh}3DfSlG(bHf4Hxw$-F~_44354% zq?r(?JbHzV5`$`XgI=5O*rN0C>(N~j_eTYHX_#MiJzv2y2K}E$mO-nzF7L_f k> vj(UN@8IsqHrDc8=NlenYbJSFZkgGNgEX#IRuqy2u*2#)Rpcet2S8~4qIA0m$ literal 0 HcmV?d00001 diff --git a/delphi-frontend/src/main/java/au/com/integradev/delphi/nunit/TestResult.class b/delphi-frontend/src/main/java/au/com/integradev/delphi/nunit/TestResult.class new file mode 100644 index 0000000000000000000000000000000000000000..d592a860025c06d5bb6a4aefbae096ee34ad881a GIT binary patch literal 708 zcmb7B+e!ja6kXffco{F*)yk|Wa15HL=%ovR5(H+D;`>n#HZqPe7k{gQBH> z7PV#!QN$F)RV1JiG~wy(L0>m4S9WdDkwd*B&4+tKw>$>v4e7Xd((z26$8m-0IfTRN zzfn8&G3L}Cn^KWRh7j#|ws4JsMW71dq&PcWMQaj5 8OWz~VPSo-=V@xby<$X$p&si@O|`u*}h)m1i|St;xqftr`ni X;aUJWta1)<>l#CV`1lmX#%1mc7_y@> literal 0 HcmV?d00001 diff --git a/delphi-frontend/src/main/java/au/com/integradev/delphi/preprocessor/directive/expression/Token.java b/delphi-frontend/src/main/java/au/com/integradev/delphi/preprocessor/directive/expression/Token.java index 7014ec829..559495f68 100644 --- a/delphi-frontend/src/main/java/au/com/integradev/delphi/preprocessor/directive/expression/Token.java +++ b/delphi-frontend/src/main/java/au/com/integradev/delphi/preprocessor/directive/expression/Token.java @@ -70,4 +70,26 @@ public TokenType getType() { public String getText() { return text; } + + @Override + public String toString() { + return "Token{type=" + type + ", text='" + text + "'}"; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null || getClass() != obj.getClass()) { + return false; + } + Token token = (Token) obj; + return type == token.type && java.util.Objects.equals(text, token.text); + } + + @Override + public int hashCode() { + return java.util.Objects.hash(type, text); + } } diff --git a/delphi-frontend/src/main/java/au/com/integradev/delphi/utils/LocatableException.class b/delphi-frontend/src/main/java/au/com/integradev/delphi/utils/LocatableException.class new file mode 100644 index 0000000000000000000000000000000000000000..f50811205ead11c22aebad6698c4e9f46b6a4e2f GIT binary patch literal 172 zcmZXOK?=e!6h!A&ZPb-Jub>-)2XLt%6kK?M-}F;cVp3{aJevy-;Gx8H?PeH;$74R< z*BihA3x$lZ=U$s|*Vad=JFaBVmALk1bsw#J=pq=7Tsk>EjkM7QuP`O78Xj0X_O-s0 vjhIMKwZy`DAxt*gGhulReP`rkU7FVap53U(35idC07}{!^07gs%rO4}07@;B literal 0 HcmV?d00001 diff --git a/delphi-frontend/src/main/java/org/sonar/plugins/communitydelphi/api/check/RuleTemplateAnnotationReader.java b/delphi-frontend/src/main/java/org/sonar/plugins/communitydelphi/api/check/RuleTemplateAnnotationReader.java index e3a06e7af..24ae8a7b4 100644 --- a/delphi-frontend/src/main/java/org/sonar/plugins/communitydelphi/api/check/RuleTemplateAnnotationReader.java +++ b/delphi-frontend/src/main/java/org/sonar/plugins/communitydelphi/api/check/RuleTemplateAnnotationReader.java @@ -26,26 +26,55 @@ import org.sonar.api.utils.AnnotationUtils; import org.sonar.check.Rule; +/** + * Utility class for reading and processing rule template annotations. + * + * This class handles the configuration of SonarQube rules based on annotations found on rule + * classes, particularly {@link RuleTemplate} annotations. + */ public final class RuleTemplateAnnotationReader { + + /** + * Updates rule definitions in the repository based on rule template annotations. + * + * @param repository the rules repository to update + * @param ruleClasses the list of rule classes to process + * @throws IllegalArgumentException if repository or ruleClasses is null + */ public void updateRulesByAnnotatedClass( RulesDefinition.NewRepository repository, List
> ruleClasses) { - ruleClasses.forEach(ruleClass -> handleTemplateRule(repository, ruleClass)); - } + if (repository == null) { + throw new IllegalArgumentException("Repository cannot be null"); + } + if (ruleClasses == null) { + throw new IllegalArgumentException("Rule classes cannot be null"); + } - private static String ruleKey(Class> ruleClass) { - return AnnotationUtils.getAnnotation(ruleClass, Rule.class).key(); + ruleClasses.forEach(ruleClass -> processTemplateRule(repository, ruleClass)); } - private static boolean isTemplateRule(Class> ruleClass) { - return AnnotationUtils.getAnnotation(ruleClass, RuleTemplate.class) != null; - } + private static void processTemplateRule(NewRepository repository, Class> ruleClass) { + String key = extractRuleKey(ruleClass); + NewRule rule = Objects.requireNonNull(repository.rule(key), "Rule not found for key: " + key); - private static void handleTemplateRule(NewRepository repository, Class> ruleClass) { - NewRule rule = Objects.requireNonNull(repository.rule(ruleKey(ruleClass))); if (isTemplateRule(ruleClass)) { rule.setTemplate(true); } else { - rule.params().removeIf(param -> param.key().equals("scope")); + // Remove scope parameter for non-template rules + rule.params().removeIf(param -> "scope".equals(param.key())); + } + } + + private static String extractRuleKey(Class> ruleClass) { + Rule ruleAnnotation = AnnotationUtils.getAnnotation(ruleClass, Rule.class); + if (ruleAnnotation == null) { + throw new IllegalArgumentException( + "Rule class must have @Rule annotation: " + ruleClass.getName()); } + return ruleAnnotation.key(); + } + + private static boolean isTemplateRule(Class> ruleClass) { + return AnnotationUtils.getAnnotation(ruleClass, RuleTemplate.class) != null; } } diff --git a/delphi-frontend/src/test/java/au/com/integradev/delphi/utils/files/DelphiFileUtils.java b/delphi-frontend/src/test/java/au/com/integradev/delphi/utils/files/DelphiFileUtils.java index 139032118..e7774e1a5 100644 --- a/delphi-frontend/src/test/java/au/com/integradev/delphi/utils/files/DelphiFileUtils.java +++ b/delphi-frontend/src/test/java/au/com/integradev/delphi/utils/files/DelphiFileUtils.java @@ -36,22 +36,52 @@ import java.util.Collections; import org.apache.commons.lang3.StringUtils; +/** + * Utility class for creating and configuring Delphi files for testing purposes. + * + * This class provides convenient methods for parsing Delphi source code and creating mock + * configurations commonly used in unit tests. + */ public final class DelphiFileUtils { private DelphiFileUtils() { // Utility class } + /** + * Parses the given lines of Delphi source code into a DelphiFile. + * + *
This method creates a temporary file with the provided content and parses it using a mock + * configuration. The temporary file is automatically deleted when the JVM exits. + * + * @param lines the lines of Delphi source code to parse + * @return a parsed DelphiFile instance + * @throws UncheckedIOException if an I/O error occurs during file creation or writing + */ public static DelphiFile parse(String... lines) { try { - Path path = Files.createTempFile(null, ".pas"); + Path path = Files.createTempFile("delphi-test-", ".pas"); Files.writeString(path, "\uFEFF" + StringUtils.join(lines, '\n'), StandardCharsets.UTF_8); path.toFile().deleteOnExit(); return DelphiFile.from(path.toFile(), mockConfig()); } catch (IOException e) { - throw new UncheckedIOException(e); + throw new UncheckedIOException("Failed to create temporary Delphi file for parsing", e); } } + /** + * Creates a mock DelphiFileConfig with default settings suitable for testing. + * + *
The mock configuration includes: + * + *
+ *
+ * + * @return a mock DelphiFileConfig instance + */ public static DelphiFileConfig mockConfig() { DelphiFileConfig mock = mock(DelphiFileConfig.class); when(mock.getEncoding()).thenReturn(StandardCharsets.UTF_8.name()); diff --git a/docs/delphi-custom-rules-example/src/main/resources/org/sonar/l10n/delphi/rules/mycompany-delphi/RoutineDeclaration.html b/docs/delphi-custom-rules-example/src/main/resources/org/sonar/l10n/delphi/rules/mycompany-delphi/RoutineDeclaration.html index 9d4c81b1a..73559848f 100644 --- a/docs/delphi-custom-rules-example/src/main/resources/org/sonar/l10n/delphi/rules/mycompany-delphi/RoutineDeclaration.html +++ b/docs/delphi-custom-rules-example/src/main/resources/org/sonar/l10n/delphi/rules/mycompany-delphi/RoutineDeclaration.html @@ -1,10 +1,16 @@- UTF-8 encoding + *
- Default compiler version and Windows platform + *
- Default type factory + *
- Empty search path and definitions + *
Why is this an issue?
-My stupid rule to avoid routine declaration
+This rule detects routine declarations that should be avoided according to coding standards. +Routine declarations in certain contexts can lead to maintenance issues and reduced code readability.
Noncompliant Code Example
-TO DO +procedure MyProcedure(); forward; // Noncompliant - forward declaration usage + +function Calculate(X: Integer): Integer; external; // Noncompliant - external routineCompliant Solution
-TO DO +function Calculate(X: Integer): Integer; // Compliant - proper implementation +begin + Result := X * 2; +end;From e0a3000f086c318446ce74790e54b145dde62f1d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 22 Sep 2025 07:06:41 +0000 Subject: [PATCH 3/5] Clean up accidentally committed build artifacts - Remove .class files that were accidentally committed - Update .gitignore to explicitly exclude *.class files Co-authored-by: michaelkrisper <733482+michaelkrisper@users.noreply.github.com> --- .gitignore | 1 + .../checks/verifier/IssueExpectation.class | Bin 2385 -> 0 bytes .../checks/verifier/TextEditExpectation.class | Bin 938 -> 0 bytes .../format/DelphiFormatStringException.class | Bin 299 -> 0 bytes .../utils/format/FormatSpecifierType.class | Bin 1752 -> 0 bytes .../delphi/utils/format/NumberOrWildcard.class | Bin 1367 -> 0 bytes .../delphi/cfg/block/TerminatorKind.class | Bin 1345 -> 0 bytes .../delphi/compiler/Architecture.class | Bin 1059 -> 0 bytes .../integradev/delphi/compiler/Platform.class | Bin 1193 -> 0 bytes .../delphi/msbuild/DelphiProject.class | Bin 668 -> 0 bytes .../condition/ConditionEvaluationError.class | Bin 499 -> 0 bytes .../condition/InvalidExpressionException.class | Bin 302 -> 0 bytes .../msbuild/condition/Token$TokenType.class | Bin 2096 -> 0 bytes .../delphi/msbuild/condition/Token.class | Bin 1046 -> 0 bytes .../delphi/nunit/NUnitParseException.class | Bin 269 -> 0 bytes .../delphi/nunit/TestResult$Status.class | Bin 1235 -> 0 bytes .../com/integradev/delphi/nunit/TestResult.class | Bin 708 -> 0 bytes .../delphi/utils/LocatableException.class | Bin 172 -> 0 bytes 18 files changed, 1 insertion(+) delete mode 100644 delphi-checks-testkit/src/main/java/au/com/integradev/delphi/checks/verifier/IssueExpectation.class delete mode 100644 delphi-checks-testkit/src/main/java/au/com/integradev/delphi/checks/verifier/TextEditExpectation.class delete mode 100644 delphi-checks/src/main/java/au/com/integradev/delphi/utils/format/DelphiFormatStringException.class delete mode 100644 delphi-checks/src/main/java/au/com/integradev/delphi/utils/format/FormatSpecifierType.class delete mode 100644 delphi-checks/src/main/java/au/com/integradev/delphi/utils/format/NumberOrWildcard.class delete mode 100644 delphi-frontend/src/main/java/au/com/integradev/delphi/cfg/block/TerminatorKind.class delete mode 100644 delphi-frontend/src/main/java/au/com/integradev/delphi/compiler/Architecture.class delete mode 100644 delphi-frontend/src/main/java/au/com/integradev/delphi/compiler/Platform.class delete mode 100644 delphi-frontend/src/main/java/au/com/integradev/delphi/msbuild/DelphiProject.class delete mode 100644 delphi-frontend/src/main/java/au/com/integradev/delphi/msbuild/condition/ConditionEvaluationError.class delete mode 100644 delphi-frontend/src/main/java/au/com/integradev/delphi/msbuild/condition/InvalidExpressionException.class delete mode 100644 delphi-frontend/src/main/java/au/com/integradev/delphi/msbuild/condition/Token$TokenType.class delete mode 100644 delphi-frontend/src/main/java/au/com/integradev/delphi/msbuild/condition/Token.class delete mode 100644 delphi-frontend/src/main/java/au/com/integradev/delphi/nunit/NUnitParseException.class delete mode 100644 delphi-frontend/src/main/java/au/com/integradev/delphi/nunit/TestResult$Status.class delete mode 100644 delphi-frontend/src/main/java/au/com/integradev/delphi/nunit/TestResult.class delete mode 100644 delphi-frontend/src/main/java/au/com/integradev/delphi/utils/LocatableException.class diff --git a/.gitignore b/.gitignore index e271ac907..c0ad07982 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # ---- Maven target/ +*.class # ---- IntelliJ IDEA *.iws diff --git a/delphi-checks-testkit/src/main/java/au/com/integradev/delphi/checks/verifier/IssueExpectation.class b/delphi-checks-testkit/src/main/java/au/com/integradev/delphi/checks/verifier/IssueExpectation.class deleted file mode 100644 index c3dd397e58fd0a0569b1babf7ce871832a969be7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2385 zcmcIlTXWk~5dMyxM2@4xuIZIDX>i@tc0<$~z2FdNOx+sX7V3}!<#ucz+lpn$NOGXV z@IUwwJirVcNFF*oGyEooJ(7&&*zM$n@mNRNv-|DtcXrSI_0Pcz0Pmn1M+8v?Q!1u0 z!;swNdt5WP+0q`>c17J~nAy-x-Q8q}W^+5Uh+$SiT*VwzhTFWa)vd0ko33ctydn0q zhA?_MLkh1cIIiLZPBJWvZd169YYX0GSj^@^w!T!WdYgq5C4XAQ z8NALg&3irL8N;~|{bt{+%Q&@C@IsEyVoAZWigQ?DI5l)Uf=xVid5_^%HspOA?d7q> zkS0P_;>h5Ff>jk4k)>?L+!ZauAT}+VSW @}w345E@43ZSa^pEOG z!m2IdZVelTda>*aOT%7Cja0DLE!3i8!lSxnh`E-}qs%sZ+yT1`#|+-BHF##An7Pc5 z30I95#YEG1)#}@IQPL$jCl22a>$2XdmbNU*bzGbG9tgK>HJro@Dseo(Lj{jie1wk~ z(q3zLC#0KuR!3+RFDSC$O)fixx_ho0{`xyyDuI#j;667ShHx?!%j)!dh4G3ENk$B} zpY=po{pg#%%U9cm84Qq%+%T%TD+)zDPGe}wk;ih>W@Xb9cG2LDBOC=f!-X-5CRLAu4#V=RRcT=PrG^zc zmI%$I2n{$IuJo3YtSO z8lV@+gxIF1M1M>{O7y%$r~mvujxikI6tIs)O7@LEaDE@T2>!&I2he~a?nz1)G?Zdk zr))Hu*VmE5rDR+dZ-8H<&?Nr(d;olH0DOG}_(m9b!DH?U8D2%2sy>SQ1Q9_QAJCd6 h%0497V{GFIJ|(TMg70ro_r3*Mq!*{1Hg;j)%)h~-e%k;5 diff --git a/delphi-checks-testkit/src/main/java/au/com/integradev/delphi/checks/verifier/TextEditExpectation.class b/delphi-checks-testkit/src/main/java/au/com/integradev/delphi/checks/verifier/TextEditExpectation.class deleted file mode 100644 index 25aabe05105cd20c11787912a5a7af15337f2873..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 938 zcmZvZPj3=Y6vfY@z!aF$7Qt4uinXmUHJ!wTi?(*rh9)G9CbsFq-7xb?UmXTA4ulWo zLK7z@F8ly~DC2oEsThF8yUe-2cmJIC`_Io`0N%nXB7-FZSra+r1=jAIv19vA(6irn z@1z?E 9akS zp}J8rw6EkOYI`bbPll}OL~0NS 9>8uI#DcLIqMl zbabX-;(^W>GVrvnwVH{CS}P^=*}xz51FdhGc$8EjJ5?W>c%nBbg>vXSuI$TzyY4sV zCz)3|{I#wHvS$O2BdzKQ-i`WQ8D2SEpUQGiM(62j)n;qHfPhKjbh;I-?FbYpw$p_K z%J)P%b9#l@`%j(!@c-<^%fTpg<+;)mY%cKoK%0yPEy?ih^Qh=I s+?4+v{NhGA{RSg~r^80%Io7o%#`@-a57S260}ND4gT zxy}Ayl`N|isFXQT70*#;rhymO#SX~^m9&rUCwL=geTVV&UzvO&9`M}erFnGa%MALO q(9S}1eHMK~bax?Iokb6c?kz+&X3-O(FBh&=pIz&eXp{42(E1DOQ>DWI diff --git a/delphi-checks/src/main/java/au/com/integradev/delphi/utils/format/DelphiFormatStringException.class b/delphi-checks/src/main/java/au/com/integradev/delphi/utils/format/DelphiFormatStringException.class deleted file mode 100644 index be8094b884972e8f702247b87b4ddadca20ce1be..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 299 zcmaJ-%Sr=55Uh!DSJ#LqiFi^^KEU|^H6X^Ef(IksC%f(1vO5#Tnc#1E5 =U7v?G*OqX)ocUR-c+>I6*Y@T)-iDNtRI|jP0-_xn{?o(!Jj$( zD_4=i)|4&X#CA^p&deKOikXYPqzNam_fL=0v>x`6%XP_=xZEdkUC@EBiO-Ht-k@H) TdLc3W0vL*NN0b|q_b~VdF0M=` diff --git a/delphi-checks/src/main/java/au/com/integradev/delphi/utils/format/FormatSpecifierType.class b/delphi-checks/src/main/java/au/com/integradev/delphi/utils/format/FormatSpecifierType.class deleted file mode 100644 index 07fdef9cdcac8c3326c6578c10da03f306b09499..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1752 zcmbtU+in|G6kX%%*g0(uE=hB3XxdWSO*0e-Q0#`dlW{s=k4wf0HAtX|GcgnS68RDV zpTH;Z#ybz-0y{X3se2bX#8EC^EQ5emyt{{BHHzBR>HR5rHUT8seLl zX_pHn4Y|_)4wzFBb%BJ6D0dv!-g2zXuSTKO;e>!the_A8EvIT1ZBxk?1tygoE!vN) zO{Kghkm9 c{onLTSfxHRQiIM?;dhiF6z{1Tx6d{p!t5 z+ozkPGo?fC*fW}5yJ1xJ4*hyRm&6Kg$FVA4;4SLOO9QJtXi-VWUUT4A4m7N#$Gpv^ z*X!lR1h?M}+Kt?J1{Hwgzb)_%-lZ1igLcqg*DyUEYUF8Wc2$es6L=pVP|-olYf#ae zsUw=CgPaPIr{ jjL8I;U2VIIDNz=9I={NkoebTIO zI%ATMuQx}HCV?! K2B39)5D^-B)1 z{5#%!hMPYV(@>)S7@tj%y@B$neTda$O3OaQt!L0)wGXMshY-hKK^PH=C9<~`p5RV) z@i(mfa+={HokFcS)iHr qN c)GW6}Ld#Yln zW=$z>?P?X9A-JfUy1mTcPo+1)2q7#&l5q(#!<^byDpp<5O@qz_ z70T%i2?-2{xGG~1Lkw|8Ef1v>8@6tlszFGt-mu>=45ZR)|K8^%j36muRK_)oG4!7$ zT;NG)O$N~sSKQ_t1&_qB#6u8A0ykug<0ga8B3vrvhUzjd|DWi$F(Kj(kDmG~`XkFS zG}YuW%iS@(bBdWkR>Y)?yO=t8>89=!s>LAesI47N@S=yB0^L8hs^ocWO*b{SB+t|> zgHD2`Qy_*s&-Y?A%`=2vpVoJQ%)dBKO|v)L{)m)pweoUZZFow T9y_QKFb#Iw6)n2t#gS<-gsu%%6+(XwVdO@a1C9B=6Xis!*RN{OmPx1D_G&QP^ z{*w=J{x4`1=M7D>NN3c)U{Gi`!#^9%vCJ`8X5 =A-M`IiUjY%3u5vCT2 zVvOc#-1i8^>4p(P`hw8ru>TnSA5Px}ottsO&mh-@CxDCh3q9}?gq+0?3F88nXvg^n zGoKK7i*N^54iKS@*uiiI*LgIbqtuO-!5p1Xl97T)f8v32{g5bPn5U6bj(U^ =0DcUU{??G+Po?IsT9s%Jn`vakU1pJ5D?+C5ClB7wZ*+-OXqNVr_qHqAg&zW6i z!wAxPhHTG~vRU$Qj!H34@)jJmQ3S=%FT_QJB>yVUchSk4i_LldCIesL+w^;hmo^0+ Tyn|b%4$|jySRsaGC;G}C(#0TU diff --git a/delphi-frontend/src/main/java/au/com/integradev/delphi/cfg/block/TerminatorKind.class b/delphi-frontend/src/main/java/au/com/integradev/delphi/cfg/block/TerminatorKind.class deleted file mode 100644 index 1b81c6d46e5349d0ce38490a9f893b561220ebde..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1345 zcmbVMYflqF6g|_|Zr4R>fkF{M0igwDt-REhN5P5>O`EWV*yxw-cBzZottl;k#lN8? z5u(xX*&k)RGgPU;FLs;k?Kykr%$+-D=Eu)3-vO*)OM-_XVYD=}Uej#1X;m9W#X8X{ zmh=9tt(k{at?bmzcUsYE)NI#i)*HLFTM2@}r^1f_gMVu;lip=m%>B1alIzGSf?P-5 zF64{Z{C `$Th$8X zBgH&oR(EMWLS=Mjox;Q rA!g?v6~=qm3WlI=SIL*H2B~^u@dGka%5*x7 z$aHm(w=31d6zfR_MX$FSruD++wGaG#78dxHZYHRMQ*@@}%_u(>07bI3h~#7u$-p9# zZ$%`#ibyU6LZjT9q~ND X%pI(yM2 -9wja{m_v$zmjP9f%gm#PvI3{ z!6$$ufaVuK5#UikfIa~dk^mtA9?Jp@2(TEs%!{03=@ikcbxuO2l|;~oVT{s+F^edc Z=wF()BTpOhhHe!PF1xUSP0IBk{R@r-ACmw8 diff --git a/delphi-frontend/src/main/java/au/com/integradev/delphi/compiler/Architecture.class b/delphi-frontend/src/main/java/au/com/integradev/delphi/compiler/Architecture.class deleted file mode 100644 index 9a56d697148cbc72fa3f66da330c9c1d5ca584be..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1059 zcmb7CZEw<06n-uR3bo@+UK~#6UR27Ix~R(%a2akhF(K|lmALq+lq>5}%2Fu5OIhL; zjb@+yQD*0M=$hac+N3w<^ql8B_c_n+Ki_`=c!ipb2t&>Eb!*VqZFj_bp4sJNy~~}` zV_RfTZHIe$)3c845w}LZ$CF@)s)!-ZAbs54VtCe?51}p~5-O6{5L+)qd`pFj1qOM& z-E4h0Fc>yJ&5Nrbjf{*16 2aQ!~<7@LmI4?i=!tc1Gv9CJ9VhZ4rfv)x`jJV5{i_+=G$vBVH>*seX=VJL>7 zrk!uKb^ ?(y)83Da=8ZsAz54Zo_h>cYYlbODNNr7k{VDpcn(+v-lfwBSSW9$C_B& z?k35WCr?Yei^7=zon$W{Qx>+OKQW5eu|{ 56+{z4JMBl^aJe+8;9 z;qkxvNRU->ta^dlmteE?5wUDU0{mr2^a65qW9b}=UuVE8l!-vgC}P#qAsV8T1+uZ9 zU`Nsfl5rHBKsIJ)B~XPnZEH^3R(?=d?w)jx`)81XU^yBD@&z88LAha(3dj{nm=ek; O5R+>@8+a1%dU^%L#_yB> diff --git a/delphi-frontend/src/main/java/au/com/integradev/delphi/compiler/Platform.class b/delphi-frontend/src/main/java/au/com/integradev/delphi/compiler/Platform.class deleted file mode 100644 index 4c0f802f40bcd87723ce3d68f9cecfc9364d5fcc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1193 zcmb7DZEw |GT51tw@3^_SO$Y3yPKR&IWn|1qf?%xMBz`K;VV6>tQue!)C2rAZ z_Sqk0yw4+ZB=dumq__9<-g9rybNKn|>kj}g@LWcKA!By+db_3Du5UFxvtga+4a+(H zXmj+~b}UbS Ui zBypS8sXJ}gVi--OOGoC3sXM0I)GM_ktM2Di%;1iUSq*czOY2<~?7H0+?Qmi`U8{1) zkWCGA?>J_slN$gG-?QCjZg2u85c~@o7IBXuylK0(zr`> 8Ld<`A;|kEPPX$j%Tk z?51n_U61IbRC=E*u~~QeAH6l87MEso81AhcgKD(9Ufp_0)@6uZdUuVV*!DWfG(+YO zZ%=U>0~E=NB9a3|B;SchUIXGu?lI~JQQZUR)W1&IJVkz~J&b(8#04flQO59)?qTt6 zjOyp`=x=>MplX6;&M|!fcD+8pPagrnKMRR|fSg&LKEwRyYvdb*1dxrZ{K)%5atIO% zGRAkXs?>vIRD(UpMm5wURjT10qDEEjA#PlsuHZ4UeImb4^y(Y&B<@RRSUQCyl2lM6 zvPjY)k*Ffcghdh+$+9ex_&HWiF> K@K}A3?(Ypy=*rNy3L~T5wk~IE+ZM&2qWtVKX82_3Fe}F&AI9m*+ zt+#z|X5O2R{rdj+1b`bjZ9t8|NMt 7sj3C)^-Z%W<=WTX3+A bA5#8N3Aao5xP&_;+=bp&?}T3c+ >B#PkjI-8jbyWoQ06kPR zo00}K1K-T|cMj)#e7?Q|I720e6v19oihye_h2zUO3>+b~<1vSgX&6(@f)l5@JE~g9 z5EKV=Ox=)*o_pmDn6GVQVOhxKu?YKDzoQiwJ%a4LR1wt#$NTNs_N3dmn=4HK8@0L8 zbjn5^%NADhD4 +JPb^C>XZB9SZm^uVQwiU6+xyc14dA2bHOg-$YZLT zkPz4%87rS%@Fdy(58x<~h8?UL#mOP&8qFq_P39W2)8;MLOCQQU~Ge1Q1?bv9B#7+g5wK5at1lBOk1%KVlq!G#~-M~OFX zbmN8lI`?p2pI`4E0IsoJV1l(A(;3#02^_qrQAw*@BOjs*)S7Ztn?6wI1hOk~6y^fE zCyQU+GI(;$<>^z74S`ZcS$C}@7fj=oHlx(W_Rl2Sp^9WRSDmKRP~N#wS<>aI_huLv z`7>*J(`h5Hvmj^gV_O;js4B}yvFxI+%`K(m@c$MUX+s<#=L3@nRz8vaCP&ANCOkVk Xe}j1asTXY1JAgfA?lW_X;|XTponTF< diff --git a/delphi-frontend/src/main/java/au/com/integradev/delphi/msbuild/condition/Token$TokenType.class b/delphi-frontend/src/main/java/au/com/integradev/delphi/msbuild/condition/Token$TokenType.class deleted file mode 100644 index be85a411fa16881f686c4bd657adde49e634c2e8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2096 zcmbtV-BMat6#fnf9B?ZqBr(yLm>5k!8_~ujt*DXWQAzMXIABYYmLi;(WAKpS$F?uf z+urmE`UL68Op|G+nOt}J1bu?u^$j{*dts3od(#Rte0<+tYwfjv*4n@R_0wAbD`*7Z zQLt3$#H)>ixb3v9y=J9m9mZ=`{lzmoe$d+O*!3EXIyJj(H=KB(@!WEz__y%&3o8f( z0|Gwy75Gxw?d_z3<;?$&myiKffuIcN&*YMM-H_6tfM6-#lZFMtQVM2t(<~RZl5BWJ zAR<+ MHRCvaX4gnQ;?{ZTQQk -ls_YVQl&X5WpXkt(FKy!JZ+ccmzFW4)Z+D5s5Fk!Siq;6p4?gsGim zrl^|=Rvw?`kV06-N&rg&tGG`KuhtumrQlpNmf5cyR^s)Fvlq|q?pxJ%B7`J93Lqu0 z4qd_Uv4QS%4k)L?O1)!cpDMT$?ek96E3H &maSE{7r!^q-oQZZO3k} zDj4Yxb>x|j?WpjDX!ABz1XTzXVHFV-=T%%(aY@A$71vZusko_PM#U`^^D1tuxGSAL z6Zjluxrdx^OTqnU>{Po*`Ti4XAl0bR28J`XV;P-;U8`BB?AA%i{mVjPr#U*hl%~Ds zRN9>;h4)5dJ9Gh;tM#LeGx~O1ZttmTc{QORWHvg@s >bz13*7 z1E?#Q|F1oRu6f#VtR`O+i;g4MYf5VibY4knaFMl9*_r@C>L`rVMi{AgFjBW*q~^d# zjewCVo{=h@kxHDA3Y(EinUPAEk*b!FN|lkylaVSC(8go|Qbs;|r82zY4KQLiq`~ zxc4Ix@38!mn1WsU_4C*W*{`G8v-hwXiYPO0u=WnhNqdhh1$a3A1ibVG0yDGYud(sN ziQqL-Jg~HoyxT{Ue2W26fiJZ)zd$K@U3ksXfQx`x^0{=LCBKUyvlMWlnI+Z5S+k^( zG(teyC;^G%1VI-Q1hlwGf V93QR!LW-tg0PDP0?oyud2&T6p2F%Tr#w7L z?$4howa5eSYdm}fFO$pwlK_)#ACnLh!_Q=hNjAVlW0F&uoMrMz>)MSl%WGZ3QD&yr zwH#+w(1PqY!K|o-m`yU<(FU1KGy7N*%%aRb(T14KGNa`)n`8E=7G}16IaXTYQ5j zuW;}9 fgc5PcgbapF4t2%%6QKp{ZlR&_xF2}mnY1rkyyf<`^$=ESSulB^@!smg!i z01{Cp4*URq6ymKL(W>PFSz%=pL8Z{GoIpl%@p!$j6b4tat3J#XK02cGJ? zZ@PQ3mk8vWfeMmM0i)j7Euw&;3CqR|Y=L!e?DoQ;8>mF~BhQ!nt}h3p_klZ%yW?Qs z^H%vm5`@ZahaaR8$R;00QlQ!T+tgZ0&}Q~iUB#@8Im~N5dB7^mt>emfk| L5Ce?74k(EXT+ bE24;2!79Ivx1~x_p;jF~6ME#t^ymWonisaOSlFa-(Mg}&U z%)HDJJ4Oak4IhMp;F6-uymV{LFm?tGMh2tAQvKxoT>Z?vlGOB~#FW%B{gl+4f{aZ4 zyi%ZMeZNp38IV|1oQh;Hi*tTTDkB5GPi9`KUukYqYEejHQVvjrD>%QjC^^+F6U33g zqE`>(4hBUAcA)z~fDs6RJ^+%OK%Np%6eP~3rM;bjaU)os3rK=|%fKKGR4D;e$qi&P HG4KEYCR9Jr diff --git a/delphi-frontend/src/main/java/au/com/integradev/delphi/nunit/TestResult$Status.class b/delphi-frontend/src/main/java/au/com/integradev/delphi/nunit/TestResult$Status.class deleted file mode 100644 index b0686e4f84a6e6cb80313e35412c2d79a6895bbb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1235 zcmbVMT~8BH5IwhF+pb%v6-{4Ont z5RHasf0S|VrAiZgu(nC3b9Uy;+;eC4$Ima{0ldTu1tErID=^yK6T^0W-sxFK{M0z& z&WHE5;Rdel8wcF;_qi81e!=uDKkyP@h-io+#t>_4nr3yIVYNOgO-b;?H6$d@&StG% z-4@U-4Vr)y^L4G!xWdLXj3Y%@p}ARqQ#BdZ-i}^SMH+V$q%=(6E2KbY0FcQPk_l z)~RJUmfJD*4v%@;FR934QbA5b9`_i=t^=xWa6+A&T28?C-Z88fhqAXE%kxS@fa&*a zw^JIfAP6M?w1)ebArZ?q3BAFP8KxR!*7Rl^QI&+5jw2C=CjLIw@C0*057~w%y3qea z5vu*0AhOjxA~DA6w##>elSAG+unrwUcK*_oKDzh}3DfSlG(bHf4Hxw$-F~_44354% zq?r(?JbHzV5`$`XgI=5O*rN0C>(N~j_eTYHX_#MiJzv2y2K}E$mO-nzF7L_f k> vj(UN@8IsqHrDc8=NlenYbJSFZkgGNgEX#IRuqy2u*2#)Rpcet2S8~4qIA0m$ diff --git a/delphi-frontend/src/main/java/au/com/integradev/delphi/nunit/TestResult.class b/delphi-frontend/src/main/java/au/com/integradev/delphi/nunit/TestResult.class deleted file mode 100644 index d592a860025c06d5bb6a4aefbae096ee34ad881a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 708 zcmb7B+e!ja6kXffco{F*)yk|Wa15HL=%ovR5(H+D;`>n#HZqPe7k{gQBH> z7PV#!QN$F)RV1JiG~wy(L0>m4S9WdDkwd*B&4+tKw>$>v4e7Xd((z26$8m-0IfTRN zzfn8&G3L}Cn^KWRh7j#|ws4JsMW71dq&PcWMQaj5 8OWz~VPSo-=V@xby<$X$p&si@O|`u*}h)m1i|St;xqftr`ni X;aUJWta1)<>l#CV`1lmX#%1mc7_y@> diff --git a/delphi-frontend/src/main/java/au/com/integradev/delphi/utils/LocatableException.class b/delphi-frontend/src/main/java/au/com/integradev/delphi/utils/LocatableException.class deleted file mode 100644 index f50811205ead11c22aebad6698c4e9f46b6a4e2f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 172 zcmZXOK?=e!6h!A&ZPb-Jub>-)2XLt%6kK?M-}F;cVp3{aJevy-;Gx8H?PeH;$74R< z*BihA3x$lZ=U$s|*Vad=JFaBVmALk1bsw#J=pq=7Tsk>EjkM7QuP`O78Xj0X_O-s0 vjhIMKwZy`DAxt*gGhulReP`rkU7FVap53U(35idC07}{!^07gs%rO4}07@;B From 6c604dccfb46851660bf29861d84ebaa860fd35d Mon Sep 17 00:00:00 2001 From: Michael Krisper Date: Mon, 22 Sep 2025 09:20:44 +0200 Subject: [PATCH 4/5] Update delphi-frontend/src/main/java/org/sonar/plugins/communitydelphi/api/check/RuleTemplateAnnotationReader.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../api/check/RuleTemplateAnnotationReader.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/delphi-frontend/src/main/java/org/sonar/plugins/communitydelphi/api/check/RuleTemplateAnnotationReader.java b/delphi-frontend/src/main/java/org/sonar/plugins/communitydelphi/api/check/RuleTemplateAnnotationReader.java index 24ae8a7b4..6238e5997 100644 --- a/delphi-frontend/src/main/java/org/sonar/plugins/communitydelphi/api/check/RuleTemplateAnnotationReader.java +++ b/delphi-frontend/src/main/java/org/sonar/plugins/communitydelphi/api/check/RuleTemplateAnnotationReader.java @@ -60,7 +60,11 @@ private static void processTemplateRule(NewRepository repository, Class> ruleC if (isTemplateRule(ruleClass)) { rule.setTemplate(true); } else { - // Remove scope parameter for non-template rules + // Remove scope parameter for non-template rules. + // The "scope" parameter is only relevant for template rules, as it allows users to configure + // the scope when instantiating a rule from a template. For non-template rules, the scope + // parameter is not applicable and should be removed to prevent confusion and ensure correct + // rule configuration in SonarQube. rule.params().removeIf(param -> "scope".equals(param.key())); } } From fe5c63891c4a681e1b996d697f2a37d3a84f34ee Mon Sep 17 00:00:00 2001 From: Michael Krisper Date: Mon, 22 Sep 2025 09:20:59 +0200 Subject: [PATCH 5/5] Update delphi-frontend/src/main/java/au/com/integradev/delphi/antlr/ast/visitors/MetricsVisitor.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../antlr/ast/visitors/MetricsVisitor.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/delphi-frontend/src/main/java/au/com/integradev/delphi/antlr/ast/visitors/MetricsVisitor.java b/delphi-frontend/src/main/java/au/com/integradev/delphi/antlr/ast/visitors/MetricsVisitor.java index 9b3fc8839..7277d889c 100644 --- a/delphi-frontend/src/main/java/au/com/integradev/delphi/antlr/ast/visitors/MetricsVisitor.java +++ b/delphi-frontend/src/main/java/au/com/integradev/delphi/antlr/ast/visitors/MetricsVisitor.java @@ -44,7 +44,21 @@ public class MetricsVisitor implements DelphiParserVisitor { private static final Pattern NEW_LINE_PATTERN = Pattern.compile("\r\n|\n|\r"); - /** Data container for collected metrics. */ + /** + * Container class for metrics collected from Delphi source code. + * + * This class holds various metrics gathered during AST traversal, including: + *
+ *
+ *- Number of classes ({@code classes})
+ *- Number of routines ({@code routines})
+ *- Cyclomatic complexity ({@code complexity})
+ *- Cognitive complexity ({@code cognitiveComplexity})
+ *- Set of code line numbers ({@code codeLines})
+ *- Set of comment line numbers ({@code commentLines})
+ *- Number of statements ({@code statements})
+ *These metrics are used to assess code quality and complexity. + */ public static class Data { private int classes; private int routines;