diff --git a/CHANGELOG.md b/CHANGELOG.md index 71ee0fe8c..ce597f09f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,12 +11,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Exclude types annotated with attributes in `UnusedType`. +### Deprecated + +- **API:** `SwitchDirective.SwitchKind.TYPEADDRESS` enum member, use `TYPEDADDRESS` instead. + ### Fixed - Exceptions from empty structures (e.g., `if`) in `LoopExecutingAtMostOnce` and `RedundantJump`. - False positives from case statements in `LoopExecutingAtMostOnce`. - False positives from nested finally-except blocks in `RedundantJump`. - False positives around wrapped type declarations in `VisibilityKeywordIndentation`. +- Several compiler directives were not being recognized: + - `E` + - `F` + - `K` + - `N` + - `S` + - `ALLOWBIND` + - `ALLOWISOLATION` + - `HIGHENTROPYVA` + - `HIGHCHARUNICODE` + - `LARGEADDRESSAWARE` + - `MAXPAGESIZE` + - `NXCOMPAT` + - `SONAME` + - `SOPREFIX` + - `SOSUFFIX` + - `SOVERSION` + - `STACKCHECKS` + - `STRINGCHECKS` + - `TSAWARE` + - `TYPEDADDRESS` ## [1.14.1] - 2025-03-05 diff --git a/delphi-frontend/src/main/java/org/sonar/plugins/communitydelphi/api/directive/ParameterDirective.java b/delphi-frontend/src/main/java/org/sonar/plugins/communitydelphi/api/directive/ParameterDirective.java index 9f54d646c..cf6187247 100644 --- a/delphi-frontend/src/main/java/org/sonar/plugins/communitydelphi/api/directive/ParameterDirective.java +++ b/delphi-frontend/src/main/java/org/sonar/plugins/communitydelphi/api/directive/ParameterDirective.java @@ -36,8 +36,13 @@ enum ParameterKind { LIBSUFFIX("libsuffix"), LIBVERSION("libversion"), LINK("link", 'l'), + SONAME("soname"), + SOPREFIX("soprefix"), + SOSUFFIX("sosuffix"), + SOVERSION("soversion"), STACKSIZE(null, 'm', Platform.WINDOWS), MINSTACKSIZE("minstacksize"), + MAXPAGESIZE("maxpagesize"), MAXSTACKSIZE("maxstacksize"), MESSAGE("message"), MINENUMSIZE("minenumsize"), diff --git a/delphi-frontend/src/main/java/org/sonar/plugins/communitydelphi/api/directive/SwitchDirective.java b/delphi-frontend/src/main/java/org/sonar/plugins/communitydelphi/api/directive/SwitchDirective.java index 2db6a57b2..2f8d52500 100644 --- a/delphi-frontend/src/main/java/org/sonar/plugins/communitydelphi/api/directive/SwitchDirective.java +++ b/delphi-frontend/src/main/java/org/sonar/plugins/communitydelphi/api/directive/SwitchDirective.java @@ -23,39 +23,57 @@ public interface SwitchDirective extends CompilerDirective { enum SwitchKind { ALIGN("align", 'a'), + ALLOWBIND("allowbind"), + ALLOWISOLATION("allowisolation"), ASSERTIONS("assertions", 'c'), BOOLEVAL("booleval", 'b'), DEBUGINFO("debuginfo", 'd'), DENYPACKAGEUNIT("denypackageunit"), DESIGNONLY("designonly"), OBJEXPORTALL("objexportall"), + EMULATECOPROCESSOR(null, 'e'), EXTENDEDSYNTAX("extendedsyntax", 'x'), EXTENDEDCOMPATIBILITY("extendedcompatibility"), EXCESSPRECISION("excessprecision"), + FAR(null, 'f'), + HIGHENTROPYVA("highentropyva"), + HIGHCHARUNICODE("highcharunicode"), HINTS("hints"), IMPLICITBUILD("implicitbuild"), IMPORTEDDATA("importeddata", 'g'), IOCHECKS("iochecks", 'i'), + LARGEADDRESSAWARE("largeaddressaware"), LEGACYIFEND("legacyifend"), LOCALSYMBOLS("localsymbols", 'l'), LONGSTRINGS("longstrings", 'h'), METHODINFO("methodinfo"), + NUMERICPROCESSING(null, 'n'), + NXCOMPAT("nxcompat"), OLDTYPELAYOUT("oldtypelayout"), OPENSTRINGS("openstrings", 'p'), OPTIMIZATION("optimization", 'o'), OVERFLOWCHECKS("overflowchecks", 'q'), SAFEDIVIDE("safedivide", 'u'), + SMARTCALLBACKS(null, 'k'), + STACKCHECKS("stackchecks", 's'), + STRINGCHECKS("stringchecks"), POINTERMATH("pointermath"), RANGECHECKS("rangechecks", 'r'), REALCOMPATIBILITY("realcompatibility"), RUNONLY("runonly"), + TSAWARE("tsaware"), TYPEINFO("typeinfo", 'm'), SCOPEDENUMS("scopedenums"), STACKFRAMES("stackframes", 'w'), STRONGLINKTYPES("stronglinktypes"), DEFINITIONINFO("definitioninfo"), REFERENCEINFO("referenceinfo", 'y'), - TYPEADDRESS("typeaddress", 't'), + /** + * @deprecated Use {@link SwitchKind#TYPEDADDRESS} instead. + */ + @Deprecated(forRemoval = true) + TYPEADDRESS(null, null), + TYPEDADDRESS("typedaddress", 't'), VARSTRINGCHECKS("varstringchecks", 'v'), WARNINGS("warnings"), WEAKPACKAGEUNIT("weakpackageunit"),