All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.19.0 - 2026-06-09
- Support for
noreturnroutines, introduced in Delphi 13. - Support for
unmanagedgeneric constraint, introduced in Delphi 13. - Support for
interfacegeneric constraint, introduced in Delphi 13. - Support for
NameOfintrinsic, introduced in Delphi 13. - Support for implicit
SelfinInitializeandFinalizeoperators, introduced in Delphi 13. - Support for
DCCARM64ECtoolchain, introduced in Delphi 13.1. NoreturnContractanalysis rule, which flagsnoreturnroutines that return normally.- Full support for the
HIGHCHARUNICODEcompiler directive. - Support for the
DCC_CodePageproperty in dproj files. sonar.delphi.codePageproperty to specify the code page that will be used to interpret ANSI data.
- The ANSI encoding configured by
sonar.delphi.codePageor inferred fromDCC_CodePageis now preferred over the system encoding when parsing source files. - Metrics are no longer reported on test sources.
- Duplications are no longer reported on test sources.
- Coverage data is no longer reported on test sources.
- The configured
sonar.sourceEncodingwas never used for search path units. - Quick fixes removing too much surrounding code in
RedundantInherited.
1.18.3 - 2025-11-11
- Stack overflow on alias types that reference their containing type.
1.18.2 - 2025-10-01
- Parsing errors on qualified name references within
exportssections.
1.18.1 - 2025-08-07
excludedTypesrule property to theObjectPassedAsInterfacerule.
- Exclude common non-ref-counted interface implementations by default in
ObjectPassedAsInterface. - Handle property references in
ObjectPassedAsInterface(in addition to variables/fields).
- Inaccurate type comparisons between class and interface types, where class-to-class upcasts were not always preferred over class-to-interface upcasts.
- False-positives around qualified name references in
ObjectPassedAsInterface.
1.18.0 - 2025-08-05
ObjectPassedAsInterfaceanalysis rule, which detects object references that are passed directly as an interface to a routine.TooManyDefaultParametersanalysis rule, which flags routines with an excessive number of default parameters.
EmptyBlocknow ignores all empty blocks containing an explanatory comment.TooManyParametersnow flags routine declarations instead of implementations, improving support for methods that are virtual, abstract, or on an interface.
1.17.2 - 2025-07-03
- Ambiguous type comparisons from variants to real types.
1.17.1 - 2025-06-10
- Inaccurate handling of variant conversions, which resulted in overload resolution failures.
1.17.0 - 2025-05-15
- Support for the
AtomicCmpExchange128intrinsic routine. - Support for the
GetTypeKindintrinsic routine. - Support for the
OpenStringintrinsic type. - API:
TypeParameterNode::getTypeParametersmethod. - API:
InterfaceTypeNode::getGuidExpressionmethod. - API:
AttributeNode::getExpressionmethod. - API:
IntrinsicType.OPENSTRINGenum value.
- Issue locations no longer span the entire routine declaration in
RoutineName. - Improve type modeling around the
VarArg*intrinsic routines.
- API:
InterfaceGuidNodenode type. - API:
InterfaceTypeNode::getGuidmethod, usegetGuidExpressioninstead. - API:
DelphiTokenType.GUID, as the associatedInterfaceGuidNodeis no longer parsed.
- Name resolution failures on generic routine invocations where later type parameters are constrained by earlier type parameters.
- Type resolution failures on property attribute lists.
- Type resolution failures on implementation-local routine attribute lists.
- Type resolution failures on
ascasts where the type is returned from a routine invocation. - Inaccurate type resolution when calling a constructor on a class reference type.
- Grammar ambiguity causing attributes to be misinterpreted as interface GUIDs.
- Failure to resolve invocations of
System.IsManagedTypewhere a value is passed.
1.16.0 - 2025-05-09
- Support for MSBuild item and item metadata expressions in project files.
- Debug logging for name resolution failures (enabled with
sonar-scanner -X). ExhaustiveEnumCaseanalysis rule, which flagscasestatements that do not handle all values in an enumeration.IterationPastHighBoundanalysis rule, which flagsforloops that iterate past the end of the collection.ExplicitBitwiseNotanalysis rule, which flags potentially incorrect bitwisenotoperations.- API:
EnumeratorOccurrencetype. - API:
ForInStatementNode::getEnumeratorOccurrencemethod. - API:
TypeOfTypeNode::getTypeReferenceNodemethod. - API:
NameReferenceNode::getFirstNamemethod. - API:
DelphiTokenType.TYPE_CONSTRAINTtoken type. - API:
ConstraintNodenode type. - API:
ClassConstraintNodenode type. - API:
ConstructorConstraintNodenode type. - API:
RecordConstraintNodenode type. - API:
TypeConstraintNodenode type. - API:
TypeParameterNode::getConstraintNodesmethod. - API:
TypeParameterType::constraintItemsmethod. - API:
Constrainttype. - API:
Constraint.ClassConstrainttype. - API:
Constraint.ConstructorConstrainttype. - API:
Constraint.RecordConstrainttype. - API:
Constraint.TypeConstrainttype.
- Detect tab-indented multiline strings in
TabulationCharacter. - Improve support for evaluating name references in compiler directive expressions.
- Improve overload resolution in cases involving generic type parameter constraints.
- Improve handling for MSBuild properties, items, and conditional evaluation.
- Perform best-effort name resolution of arguments to unresolved routines or array properties, which improves analysis quality in cases where symbol information is incomplete.
- API:
ForInStatementNode::getGetEnumeratorDeclarationmethod, get the declaration throughgetEnumeratorOccurrenceinstead. - API:
ForInStatementNode::getMoveNextDeclarationmethod, get the declaration throughgetEnumeratorOccurrenceinstead. - API:
ForInStatementNode::getCurrentDeclarationmethod, get the declaration throughgetEnumeratorOccurrenceinstead. - API:
TypeParameterNode::getTypeConstraintNodesmethod, usegetConstraintNodesinstead. - API:
TypeParameterType::constraintsmethod, useconstraintItemsinstead.
- False positives on enumerable method
GetEnumeratorinUnusedRoutine. - False positives on enumerator method
MoveNextinUnusedRoutine. - False positives on enumerator property
CurrentinUnusedProperty. - False positives on enums that are never referenced by name (but have used values) in
UnusedType. - Name resolution failures in legacy initialization sections referencing the implementation section.
- Name resolution failures when accessing ancestors of enclosing types from nested type methods.
- Name resolution failures on invocations of methods with generic open array parameters.
- Name resolution failures around
Createcalls on types withconstructorconstraints. - Name resolution failures on
read,write, andstoredspecifiers of indexed properties. - Name resolution failures on routine references assigned to a
var/constdeclaration. - Name resolution failures on routine references in constant arrays.
- Type resolution failures on array expressions nested within multidimensional constant arrays.
- Incorrect file position calculation for multiline string tokens.
- Analysis errors around
type oftype declarations.
1.15.0 - 2025-04-03
ParsingErroranalysis rule, which flags files where parsing failures occurred.- Support for the
WEAK_NATIVEINTsymbol, which is defined from Delphi 12 onward. - Support for undocumented intrinsics usable within
varargsroutines:VarArgStartVarArgGetValueVarArgCopyVarArgEnd
- Exclude types annotated with attributes in
UnusedType. - Improve reporting of parsing failures occurring within include files.
- Improve reporting of parsing failures occurring within compiler directives.
- API:
SwitchDirective.SwitchKind.TYPEADDRESSenum member, useTYPEDADDRESSinstead.
- Exceptions from empty structures (e.g.,
if) inLoopExecutingAtMostOnceandRedundantJump. - False positives from case statements in
LoopExecutingAtMostOnce. - False positives from nested finally-except blocks in
RedundantJump. - False positives around wrapped type declarations in
VisibilityKeywordIndentation. - False negatives around inline
varandconstinPlatformDependentTruncation. - Trailing whitespace within comments not recognized in
TrailingWhitespace. - Overload resolution failures on the variant overload of the
Copyintrinsic. - Several compiler directives were not being recognized:
EFKNSALLOWBINDALLOWISOLATIONHIGHENTROPYVAHIGHCHARUNICODELARGEADDRESSAWAREMAXPAGESIZENXCOMPATSONAMESOPREFIXSOSUFFIXSOVERSIONSTACKCHECKSSTRINGCHECKSTSAWARETYPEDADDRESS
1.14.1 - 2025-03-05
- File pointer errors around
>=and<=tokens.
1.14.0 - 2025-03-03
RedundantJumpanalysis rule, which flags redundant jump statements, e.g.,Continue,Exit.LoopExecutingAtMostOnceanalysis rule, which flags loop statements that can execute at most once.excludedNamesrule property to theMixedNamesrule.- API:
RepeatStatementNode::getGuardExpressionmethod. - API:
RepeatStatementNode::getStatementListmethod. - API:
CaseStatementNode::getSelectorExpressionmethod. - API:
CaseItemStatementNode::getStatementmethod.
- Parsing errors where adjacent
>and=tokens were wrongly interpreted as the>=operator. - False-positives within assignment statements in
IndexLastListElement.
1.13.0 - 2025-02-05
- API:
AnonymousMethodNode::getDeclarationSectionmethod. - API:
AnonymousMethodNode::getStatementBlockmethod. - API:
AnonymousMethodNode::isEmptymethod.
- Include the global browsing path in unit import resolution.
- Reprioritize the analysis search path in the following order (highest to lowest):
- Referenced project files (
DCCReference) - Search path (
DCC_UnitSearchPath) - Debugger source path (
Debugger_DebugSourcePath) - Library path (
DelphiLibraryPath/DelphiTranslatedLibraryPath) - Browsing path (
DelphiBrowsingPath) - Standard library
- Analysis source files (
sonar.sources)
- Referenced project files (
- Empty anonymous methods are now ignored in
EmptyBlock. - Empty anonymous methods are now flagged in
EmptyRoutine.
1.12.2 - 2025-01-06
- Incorrect case-sensitive treatment of file names in coverage reports.
1.12.1 - 2024-12-06
- Various intrinsic routines had incorrect signatures around dynamic and open arrays.
- False positives around platform-dependent binary expressions in
PlatformDependentTruncation. - Incorrect type resolution around array property accesses.
1.12.0 - 2024-12-02
- API:
DelphiCheckContext::getUrimethod.
- Parsing errors on semicolon-delimited generic type parameters in routine implementation headers.
- Incorrect return types for
Length,High, andLowon open/dynamic arrays depending on the compiler version and toolchain. - Name resolution failures on explicit references to default array properties with overloads on ancestor types.
1.11.0 - 2024-11-04
MissingRaiseanalysis rule, which flags exception constructions for whichraisehas been omitted.- API:
ProceduralType::directivesmethod. - API:
ProceduralTypeNode::getDirectivesmethod. - API:
ProceduralTypeNode::hasDirectivemethod. - API:
ProceduralTypeHeadingNode::getDirectivesmethod. - API:
AnonymousMethodNode::getAnonymousMethodHeadingmethod. - API:
AnonymousMethodNode::getDirectivesmethod. - API:
AnonymousMethodNode::hasDirectivemethod. - API:
AnonymousMethodHeadingNodenode type. - API:
DelphiTokenType.ANONYMOUS_METHODtoken type. - API:
DelphiTokenType.ANONYMOUS_METHOD_HEADINGtoken type.
- Parsing errors on
implementationkeywords nested in conditional branches. - Parsing errors on anonymous methods with routine directives (like calling conventions).
IndexOutOfBoundsExceptionerrors around procedural types declared withvarargsinVariableInitialization.
1.10.0 - 2024-10-01
FullyQualifiedImportanalysis rule, which flags non-fully qualified imports.- API:
UnitImportNameDeclaration::isAliasmethod.
- Non-trivial
inheritedexpressions are excluded inRedundantParentheses.
- False positives around const array literals in
RedundantParentheses.
1.9.0 - 2024-09-03
- API:
CaseItemStatementNode::getExpressionsmethod.
- Improve type inference around unsigned integer literals.
- Improve type inference around array constructors containing integer literals.
- Improve type inference around real expressions.
- Parentheses enclosing a primary expression are considered redundant in
RedundantParentheses. outparameters are treated as uninitialized at the start of a routine inVariableInitialization.
- Name resolution errors around alias ancestor types.
- Parsing errors around partial
asmblocks blocks in conditional branches. - False positives around case items with multiple values in
CaseStatementSize.
1.8.0 - 2024-08-02
- "Correct to (correct case)" quick fix for
LowercaseKeyword. - API:
PropertyNameDeclaration::getImplementedTypesmethod. - API:
PropertyNode::getDefaultSpecifiermethod. - API:
PropertyNode::getImplementsSpecifiermethod. - API:
PropertyNode::getIndexSpecifiermethod. - API:
PropertyNode::getStoredSpecifiermethod. - API:
PropertyDefaultSpecifierNodenode type. - API:
PropertyImplementsSpecifierNodenode type. - API:
PropertyIndexSpecifierNodenode type. - API:
PropertyStoredSpecifierNodenode type.
- Include the global library path in unit import resolution.
- Improve AST modeling around property specifiers.
- Improve semantic analysis around property specifiers.
- Exclude properties with
implementsspecifiers inUnusedProperty.
- Overly permissive parsing rules around
stringandfiletypes. - Quick fixes removing comments and compiler directives in
RedundantInherited. - False positives around
messagehandler methods inRedundantInherited. - False positives when parameter names were mismatched to the inherited method in
RedundantInheritedandInheritedMethodWithNoCode. - API:
ArrayConstructorNode::getImagereturned an incorrect image containing[as an element.
1.7.0 - 2024-07-02
RedundantInheritedanalysis rule, which flags redundantinheritedstatements that can be safely removed.
- Include "found" and "expected" values for issue messages in
LowercaseKeyword. - Exclude
JandKby default inShortIdentifier. - Improve compiler directive parsing in cases where the directive name is not followed by whitespace.
- The
resultattribute in NUnit test reports was not being treated as case-insensitive. - Scan failures on nested compiler directives.
1.6.0 - 2024-05-31
- "Move to implementation section" quick fix for
ImportSpecificity. - "Remove unused import" quick fix for
UnusedImport. - API:
UsesClauseNode::getImportsmethod. - API:
InterfaceSectionNode::getUsesClausemethod. - API:
ImplementationSectionNode::getUsesClausemethod. - API:
LabelNameDeclarationsymbol declaration type. - API:
DelphiScope::getLabelDeclarationsmethod. - API:
LabelDeclarationNodenode type. - API:
LabelStatementNode::getNameReferencemethod. - API:
LabelStatementNode::getStatementmethod. - API:
GotoStatementNode::getNameReferencemethod.
- Improve semantic analysis around
labelandgotostatements. - Improve handling for dereferenced types starting with
EandIinPointerName. - Improve handling for dereferenced types that don't comply with naming conventions in
PointerName.
- File pointer errors when an issue is raised on the first line of a file with a byte order mark.
- Symbol table construction errors for program files omitting the
programheader. - Parsing errors on parenthesised anonymous methods.
- Parsing errors on identifiers named
Label, which was allowed in Delphi.NET. - Scan failures on invalid paths in dproj files.
- Incorrect ordering of edits in the "Separate grouped parameters" quick fix for
GroupedParameterDeclaration. - SonarLint registration of rules that don't support execution in a SonarLint context.
1.5.0 - 2024-05-02
- Support for the
winapicalling convention. - Support for quick fixes.
- "Remove the superflous semicolon" quick fix for
SuperfluousSemicolon. - "Correct to (correct case)" quick fix for
MixedNames. - "Remove redundant parentheses" quick fix for
RedundantParentheses. - "Convert to initialization section" quick fix for
LegacyInitializationSection. - "Replace Pascal-style result with Result" quick fix for
PascalStyleResult. - "Replace with TList.Last" quick fix for
IndexLastListElement. - "Remove empty argument list" quick fix for
EmptyArgumentList. - "Remove redundant assignment check" quick fix for
AssignedAndFree. - "Separate grouped parameters" quick fix for
GroupedParameterDeclaration. - "Remove (n) unused formatting arguments" quick fix for
FormatArgumentCount. - "Use string value directly" quick fix for
FormatArgumentCount. - API:
TryStatementNode::getExceptBlockmethod. - API:
WhileStatementNode::getGuardExpressionmethod. - API:
WhileStatementNode::getStatementmethod. - API:
DelphiTokenType.WINAPItoken type. - API:
DelphiIssueBuildertype, which is returned byDelphiCheckContext::newIssue. - API:
QuickFixtype, which is accepted byDelphiIssueBuilder::withQuickFixes. - API:
QuickFixEdittype, which is accepted byQuickFix::addEdits.
- API:
TryStatementNode::getExpectBlockmethod, usegetExceptBlockinstead.
- False positive
FormatStringValidissues on strings containing uppercase format specifiers. - Exception when parsing fully qualified attribute references.
DuplicatedDeclarationExceptionerrors caused by some local scopes being modeled incorrectly.- Name resolution issues around
if,else,for, andwithconstructs when the body contains a single statement.
1.4.0 - 2024-04-02
- Support for multiline string literals within compiler directives.
- Support for the
TEXTBLOCKdirective. - Support for named arguments.
- Support for
assemblyattributes. - API:
CompilerDirectiveParsercan now return a newTextBlockDirectivetype. - API:
CheckVerifier::withCompilerVersionmethod. - API:
CheckVerifier::withToolchainmethod. - API:
DelphiTokenType.ARGUMENTtoken type. - API:
DelphiTokenType.ASSEMBLYtoken type. - API:
ArgumentNodenode type. - API:
ArgumentListNode::getArgumentNodesmethod. - API:
AttributeNode::isAssemblymethod.
NativeIntandNativeUIntare now treated as weak aliases in Delphi 12+.- The length of open arrays is now modeled as
NativeIntin Delphi 12+. - Performance improvements.
- API:
ArgumentListNode::getArgumentsmethod, usegetArgumentNodesinstead.
- Type resolution inaccuracies around subtract expressions.
- Name resolution did not occur for the magic
WidthandDecimalsarguments. (See: System.Write) - The wrong inherited method could be found in
InheritedMethodWithNoCode, causing false negatives. - Exception when scanning UNC paths.
1.3.0 - 2024-03-01
- Support for multiline string literals.
- Support for numeric literals prefixed by ampersands.
- Support for identifiers prefixed by more than 2 ampersands.
- API:
TextLiteralNode::isMultilinemethod. - API:
TextLiteralNode::getValuemethod, which returns the effective contents of a text literal.
TextLiteralNode::getImagenow returns the text literal exactly as it appears in source code.TextLiteralNode::getImageWithoutQuotesnow simply calls the newgetValuemethod.
TextLiteralNode::getImageWithoutQuotes, usegetValueinstead.DelphiTokenType.AMPERSAND, as&is now lexed directly into numeric literals and identifiers.
- Static char arrays weren't accepted for
'%s'inFormatArgumentType. - Imaginary tokens could be erroneously matched by the lexer in valid source code.
1.2.0 - 2024-02-02
- Support for on-demand plugin downloading, which is being introduced in SonarQube 10.4.
- Support for the
LLVMsymbol, which is defined on LLVM-based toolchains from Delphi 12 onward. - Support for the
IOSSIMULATORsymbol, which is defined on theDCCIOSSIMARM64toolchain. FormDfmanalysis rule, which flags VCL forms/frames that lack a.dfmresource.FormFmxanalysis rule, which flags FireMonkey forms/frames that lack a.fmxresource.FormatArgumentCountanalysis rule, which flagsFormatcalls where the number of format arguments does not match the number of format specifiers.FormatArgumentTypeanalysis rule, which flagsFormatarguments with types that are incompatible with their corresponding format specifiers.FormatStringValidanalysis rule, which flagsFormatcalls with invalid format strings.- API:
CompilerDirectiveParsernow returns a newResourceDirectivetype when parsing resource directives.
- Alternative casings
WritelnandReadlnare now allowed inMixedNames. - Improve clarity of the rule description for
EmptyRoutine.
- Parsing errors on
.dprfiles without a top-levelbegin. - Symbol table errors on declarations that shared a name with a unit import.
- Symbol table executor failures on include directives that include multiple symbol declarations or references.
- The
Copyintrinsic inferred an incorrect return type forPChar,PAnsiChar, and variants. - The
Concatintrinsic inferred an incorrect return type for single-character string literals. - The
ReadLnintrinsic was missing the standard input overload. - Ideographic space (U+3000) was erroneously accepted as a valid identifier character.
- Duplicate imports in a
requiresclause now log a warning instead of throwing an exception. - NPE on anonymous records in
PublicField.
1.1.0 - 2024-01-02
- Support for unicode characters in identifiers.
- Support for the NUnit 2.0 test results format (in addition to existing 3.0 support).
ConsecutiveVarSectionanalysis rule, which flags consecutivevarsections that can be merged.ConsecutiveConstSectionanalysis rule, which flags consecutiveconstsections that can be merged.ConsecutiveTypeSectionanalysis rule, which flags consecutivetypesections that can be merged.ConsecutiveVisibilitySectionanalysis rule, which flags consecutive visibility sections that can be merged.excludeApirule property to most of theUnused*rules:- Available for
UnusedConstant,UnusedField,UnusedGlobalVariable,UnusedProperty,UnusedRoutine, andUnusedType. - Excludes public API (declared with public visibility in the interface section).
- Available for
- API:
VarSectionNode::isThreadVarSectionmethod. - API:
ConstSectionNode::isResourceStringSectionmethod. - API:
AttributeListNode::getAttributeTypesmethod. - API:
RoutineNameDeclaration::getAttributeTypesmethod. - API:
PropertyNameDeclaration::getAttributeTypesmethod.
- Improve type resolution on binary and unary expressions.
- Improve type comparisons between signed and unsigned integer types.
- Improve type comparisons between text types.
- Improve type conversions from character pointers to strings.
- Exclude routines annotated with attributes in
UnusedRoutine. - Exclude properties annotated with attributes in
UnusedProperty. - Exclude fields annotated with attributes in
UnusedField. - Improve type modeling around integer subranges.
- Issues raised on a hard cast expression now span the entire expression in
UnicodeToAnsiCast,CharacterToCharacterPointerCast,NonLinearCast,RedundantCast, andPlatformDependentCast. - Parsing errors now consistently surface the file and line where they occurred.
- Parsing errors now consistently skip the offending unit instead of crashing the scan.
- API:
TypeSectionNodenow implementsVisibility. - API:
TypeDeclarationNodenow implementsVisibility.
- The
sonar.sourceEncodingoption was used blindly in all cases, even when the correct encoding could be detected. - Test sources were erroneously excluded from analysis.
- Key information was missing from "ambiguous declarations" warnings.
- Stack overflow on class reference types that reference their containing type.
- Scan failures on redundant unit aliases in .dproj files.
- Incorrect file position calculation for multiline compiler directives.
- Incorrect detection of method calls as hard casts in
CastAndFree. - Name resolution failures around helpers extending weak alias types.
- Various intrinsic routine signatures had incorrect return types.
- Various intrinsic routine signatures had incorrect or overly-restrictive parameter types.
1.0.0 - 2023-11-14
- Custom rules plugin API:
- Rule metadata for the new Clean Code Taxonomy.
sonar.delphi.file.suffixesproperty to specify the file extensions that should be analyzed.sonar.delphi.exclusionsproperty to specify file path patterns to exclude from analysis of Delphi files.sonar.delphi.test.attributeproperty to specify an attribute that will cause annotated types to be treated as test code.- Support for the
DCCOSXARM64toolchain. - Support for the
DCCIOSSIMARM64toolchain. - Support for attributes in semantic analysis.
- Support for identifiers prefixed with 2 ampersands (
&&). OleVariantoverloads forVarArrayRedimandVarClearintrinsics.InlineAssemblyanalysis rule, which flags inline assembly usage.DigitSeparatoranalysis rule, which flags numeric literals that should use digit separators to improve readability.DigitGroupinganalysis rule, which flags numeric literals that use non-standard digit groupings.AddressOfCharacterDataanalysis rule, which flags attempts to manually get the address of the first character in a string.NonLinearCastanalysis rule, which flags unsafe object and pointer casts.IndexLastListElementanalysis rule, which flags places whereTList.Lastshould be used instead of manually indexing into the list.
- Rename all rule keys. (For example,
ClassNameRuleis nowClassName) - Rewrite all rule descriptions.
- Rename plugin key from
delphitocommunitydelphi. - Rename language key from
delphtodelphi. - Rename repository key from
delphtocommunity-delphi. - Rename repository from
DelphitoCommunity Delphi. - Rename
sonar.delphi.bds.pathproperty tosonar.delphi.installationPath. - Rename
sonar.delphi.compiler.toolchainproperty tosonar.delphi.toolchain. - Rename
sonar.delphi.compiler.versionproperty tosonar.delphi.compilerVersion.' - Rename
sonar.delphi.sources.searchPathproperty tosonar.delphi.searchPath.' - Rename
sonar.delphi.testSuiteTypeproperty tosonar.delphi.testType. - Clean up descriptions of all plugin properties.
- Exclude dpr and dpk files in
UnusedImport. - Exclude dpr and dpk files in
ImportSpecificity. - Exclude uses clauses of dpr and dpk files in
LineTooLong. - Include routines in
UnitLevelKeywordIndentation. - Include implicit attribute constructor calls in
ForbiddenRoutine. - Always enforce the
Attributesuffix inAttributeName. - Allow the
Attributesuffix to be omitted for attribute references inMixedNames. - Allow the extended type name to be anywhere in the helper name (rather than requiring it at the
start) in
HelperName. - Take a fully-qualified type name for the parent type in
InheritedTypeName, instead of a regular expression. - Improve name resolution for declarations within types.
- Improve type resolution for array accesses into variants.
- Improve type resolution around constructor calls following array accesses in primary expressions.
- Improve parsing and type modeling around
AnsiStringtypes with specified code pages. - Improve type modeling around type aliases.
XPathTemplateRuleanalysis rule template.MemoryManagementRuleanalysis rule.EmptyTypeSectionanalysis rule.sonar.delphi.coverage.toolproperty. (Delphi Code Coverage is the only supported coverage tool.)
OSX(64)symbols weren't treated as defined on macOS.MACOS(32|64)symbols weren't treated as defined on iOS.- Name collisions between generic and non-generic forward declarations.
- Incorrect type conversions from pointers to arrays.
- Fixed arrays were overly-eager to convert to dynamic arrays.
- Parsing errors around
Inoperator overloads. - Parsing errors around anonymous methods in array constructor expressions.
Selfwas not consistently shadowed by method parameters.- Incorrect token range calculation for binary expression nodes.
- Units referenced via
DCCReferencetags were not indexed in the symbol table. - NPE on empty argument lists in
TrailingCommaArgumentList. addis no longer colorized as a keyword in the SonarQube web interface.removeis no longer colorized as a keyword in the SonarQube web interface.variantis no longer colorized as a keyword in the SonarQube web interface.- Parsing errors on unusual whitespace characters.
- Parsing errors on unusual escaped character, hex integer, and binary integer literals.
0.40.0 - 2023-01-10
- Support for
NCLOC_DATAmetric to record which lines contain code. HelperNameRuleanalysis rule, which flags helper types that don't match an expected naming convention.MemberDeclarationOrderRuleanalysis rule, which flags visibility sections that violate the style guide's instructions on Class Body Organization.VisibilitySectionOrderRuleanalysis rule, which flags visibility sections that aren't in ascending order of accessibility.UnitLevelKeywordIndentationRuleanalysis rule, which flags unit-level keywords that aren't flush with the margin.VisibilityKeywordIndentationRuleanalysis rule, which flags visibility specifier directives that don't use the same indentation as the type they're declared under.
- Compare unit references to original name in
MixedNamesRule. - Only raise issues on variables in
AssignedNilCheckRule. - Handle cases where the visibility of a method changes in
InheritedMethodWithNoCodeRule. - Handle
reintroduce/virtualinInheritedMethodWithNoCodeRule. - Update description for
EnumNameRule. - Improve type comparisons between class references and pointers.
- Improve type comparisons between records and pointers.
- Clean up some internal assumptions about windows paths.
- Import name-collision issues, by ensuring search paths are traversed in order of declaration.
- Type identity issues around implicit forwarded types.
- Parsing errors on
record helper for file. - Type resolution issues around
set of AnsiCharliterals. - NPE in
VariableInitializationRule. - Exception when no dproj or groupproj files are supplied.
0.39.1 - 2022-11-22
- Exclude record class variables in
VariableInitializationRule.
0.39.0 - 2022-11-11
AttributeNameRuleanalysis rule, which flags custom attribute types that don't match an expected naming convention.
- Include unit imports in
MixedNamesRule. - Exclude parameters on methods implementing interfaces in
VariableNameRule. - Exclude custom attribute types in
ClassNameRule.
- Allow const expressions in record alignment syntax.
0.38.0 - 2022-11-07
- Support for
Roundoperator overloads. - Support for
Truncoperator overloads. GroupedFieldDeclarationRuleanalysis rule, which flags places where fields aren't declared individually.GroupedParameterDeclarationRuleanalysis rule, which flags places where parameters aren't declared individually.GroupedVariableDeclarationRuleanalysis rule, which flags places where variables aren't declared individually.
- Detect user-created
IfThenfunctions more effectively inIfThenShortCircuitRule. - Update various rule descriptions with references to the Embarcadero style guide.
- Include
Debugger_DebugSourcePathin the analysis search path.
MultipleVariableDeclarationRuleanalysis rule.
- Include
stringinLowerCaseReservedWordsRule. - Add
excludedKeywordsproperty toLowerCaseReservedWordsRule.
- The
stringkeyword wasn't colorized in the SonarQube web interface.
0.37.1 - 2022-10-11
- Improve overload resolution around implicit conversions.
0.37.0 - 2022-09-07
- Support for Delphi 11 language features
- Binary literals
- Digit separators
0.36.0 - 2022-08-19
CharacterToCharacterPointerCastRuleanalysis rule, which flagsChar->PCharcasts.UnicodeToAnsiCastRuleanalysis rule, which flags explicit casts to Ansi types.
0.35.0 - 2022-08-05
- Support for merging coverage reports.
- Rewrite project file parsing from scratch:
- Support for property interpolation
- Support for MSBuild conditionals
- Exclude the
Toolsfolder from standard library indexation. - Exclude case statements in
BeginEndRequiredRule. - Exclude
.dpkfiles inEmptyUnitRule.
0.34.2 - 2022-03-03
AnsiStringoverload for theSetLengthintrinsic.
- Improve name resolution around pointers to procedural variables.
- Improve overload resolution around overloaded method references.
- Assignment to a field or property of a variable would not be recognized as usage of that variable
in
UnusedLocalVariablesRule.
0.34.1 - 2022-02-22
- Include assigned variables in
UnusedLocalVariablesRule. - Count usage of redeclared properties in
UnusedPropertiesRule. - Improve type specialization for generics with generic type parameters.
- Improve overload resolution around pointers to methods.
0.34.0 - 2022-02-03
UnusedLocalVariablesRuleanalysis rule, which flags unused local variables.UnusedFieldsRuleanalysis rule, which flags unused fields.UnusedConstantsRuleanalysis rule, which flags unused constants.UnusedGlobalVariablesRuleanalysis rule, which flags unused global variables.UnusedTypesRuleanalysis rule, which flags unused types.UnusedPropertiesRuleanalysis rule, which flags unused properties.UnusedMethodsRuleanalysis rule, which flags unused methods.
- Improve name resolution around array index types.
UnusedArgumentsRuleanalysis rule.
- Type resolution bugs around "address of procedural value" expressions.
- Usages of default array properties would not be properly reflected in the symbol table.
0.33.0 - 2022-01-10
- Support for NUnit report format.
- Support for surefire report format.
sonar.delphi.codecoverage.excludedproperty.
0.32.0 - 2021-09-03
MathFunctionSingleOverloadRuleanalysis rule, which flags calls to theSingleoverloads of the standard math functions.AddressOfNestedMethodRuleanalysis rule, which flags instances where subroutines are treated as procedural values via the address-of@operator.FreeAndNilTObjectRuleanalysis rule, which flagsFreeAndNilarguments that aren'tTObjectinstances.VariableInitializationRuleanalysis rule, which flags places where variables are used without being initialized first.TextFileintrinsic type, which is an alias toText.
- Improve type comparisons from integer to floating point types.
- Improve type comparisons from
Currencyto integer types. - Improve type comparisons betweeen floating point types.
- Improve name and overload resolution around "address of procedural value" expressions.
- Improve overload resolution around numeric type mismatches. (integer vs floating point)
- Improve modeling of intrinsic methods to include parameter specifiers. (
out,var,const) - Improve handling of
typetypes inPlatformDependentCastRule. - Improve handling of
typetypes inPlatformDependentTruncationRule. - Clean up property names and descriptions.
- Overload resolution could get confused by similar generic specializations.
- Treat 8-byte
Extendedas a unique type:Extendedis 8 bytes onDCC64and several other toolchains.- Contrary to the Embarcadero
documentation,
8-byte
Extendedis not an alias to Double.
0.31.1 - 2021-06-30
- Handle casts involving strings and arrays in
PlatformDependentCastRule. - Update rule description for
EmptyMethodRule.
- Parsing errors on label statements without any corresponding "marked statement".
0.31.0 - 2021-05-12
PlatformDependentTruncationRuleanalysis rule, which flags places where an integer type may or may not be truncated depending on the platform.EmptyUnitRuleanalysis rule, which flags units that don't contain any meaningful code.LegacyInitializationSectionRuleanalysis rule, which flags legacy initialization sections (begin..endinstead ofinitialization).FormatSettingsInitializationRuleanalysis rule, which flagsTFormatSettingsvariables that aren't initialized before use.DateFormatSettingsRuleanalysis rule, which flags places where the defaultTFormatSettingsis implicitly used.ForbiddenFieldRuleanalysis rule template, which flags fields from a specified list of names on a type with a specified fully-qualified name.ForbiddenConstantRuleanalysis rule template, which flags constants from a specified list of names from a unit with a specified fully-qualified name.ForbiddenEnumValueRuleanalysis rule template, which flags enum values from a specified list of names on an enum type with a specified fully-qualified name.
- Improve type inference around procedural types.
- Handle casts involving classes and interfaces in
PlatformDependentCastRule. - Exclude test code in
TooManyArgumentsRule. - Exclude test code in
TooManyVariablesRule. - Update rule description for
SwallowedExceptionsRule. - Update rule description for
DuplicatesRule.
0.30.1 - 2021-04-06
- Improve type inference around array constant expressions.
- Fix overload resolution regressions caused by the new bounds checking.
0.30.0 - 2021-04-06
- Support for inline vars:
- Support for XE7 dynamic array operations:
- Support for
SizeOfintrinsic in preprocessor expressions. - Support for obscure
(.and.)tokens:- These are now interpreted correctly by the lexer as square brackets.
- See: The Future of the Delphi Compiler
InlineVarExplicitTypeRuleanalysis rule, which flags inlinevardeclarations that don't specify a type.InlineConstExplicitTypeRuleanalysis rule, which flags inlineconstdeclarations that don't specify a type.InlineLoopVarExplicitTypeRuleanalysis rule, which flags inline loopvardeclarations that don't specify a type.InlineDeclarationCapturedByAnonymousMethodRuleanalysis rule, which flags places where inline declarations are captured by anonymous methods.
- Improve handling of cast expressions in
MemoryManagementRule. - Improve overload resolution in cases with subrange bounds violations.
- Improve primary expression type resolution around constructors.
- Update various rule descriptions.
- Treat the
Exitintrinsic's parameter as optional. - Make preprocessor defines case-insensitive.
- FPs around casts from class reference to class in
RedundantCastRule.
0.29.0 - 2021-03-23
NoSonarRuleanalysis rule, which flags usages of theNOSONARmarker.PlatformDependentCastRuleanalysis rule, which flags casts between platform-dependent and platform-independent types.
- Improve handling of cast expressions in
MemoryManagementRule. - Change
memoryFunctionsparameter to fully-qualified names inMemoryManagementRule. - Remove
MemoryManagementRulefrom the Sonar Way quality profile. - Improve handling of constructor calls in
RedundantCastRule. - Improve handling of multi-variable declarations in
TooManyVariablesRule. - Improve handling of
elseblocks (withincasestatements andexceptblocks) inBeginEndRequiredRule.
0.28.0 - 2021-02-02
- Support for toolchain-aware-analysis.
- Support for the
SizeOfintrinsic in constant expressions. sonar.delphi.compiler.toolchainproperty to specify the compiler toolchain used by the project.sonar.delphi.compiler.versionproperty to specify the compiler version used by the project.
- Improve handling of files with differing encodings:
- If a file is not being analyzed, but is simply in the search path or standard library, the encoding will be detected by the BOM (or lack thereof).
- This encoding detection behavior matches the Delphi compiler.
- Encoding detection will not be used for files being analyzed by Sonar, which must continue to
match the
sonar.sourceEncodingproperty. The Sonar API does not support analysis of projects with mixed encodings.
- Improve type comparisons between
AnsiStringtypes with different code pages.
- Allow custom attributes after parameter specifiers.
- Fix type comparison issues between
PCharand array ofChar. - Fix type comparison issues between
PCharandString. - Remove
FixedIntandFixedUIntintrinsic type definitions, as they're actually real type aliases defined inSystem. - Remove
Flushintrinsic method definition, as it's actually a real method defined inSystem.
0.27.0 - 2020-11-26
- Configurable
prefixesparameter for the various naming convention rules.
- Exclude
System.Assignedarguments inEmptyBracketsRule.
- Preprocessor includes referenced via absolute paths would not resolve correctly.
- Obscure
ClassCastExceptionduring name resolution.
0.26.0 - 2020-10-15
- Support for variant record tags in semantic analysis.
RedundantAssignmentRuleanalysis rule, which flags assignments where the left and right side are the same.ForbiddenImportFilePatternRuleanalysis rule template, which flags imports matching a specified file pattern.
- Improve dependency analysis around
inheritedexpressions. - Exclude methods implementing interfaces in
EmptyMethodRule. - Exclude cast expressions where both operands have unknown types in
RedundantCastRule. - Exclude record variant sections in
NoSemiAfterFieldDeclarationRule. - Allow
Sorted := Trueto be anywhere in the same block (instead of only on adjacent lines) inDuplicatesRule. - Improve detection of "unsupported operation" methods in
MethodResultAssignedRule.
- Ambiguous type comparisons from array constructors to sets.
- Subranges were not always considered convertible to their host type.
- Name resolution wasn't occurring for arguments in explicit array constructor invocations.
- The
AtomicCmpExchangeintrinsic signature was missing theTargetparameter. - Token indices would be get out of sync in files with preprocessor includes.
0.25.0 - 2020-09-01
ForbiddenPropertyRuleanalysis rule template, which flags properties with a specified fully-qualified name.
- Improve the symbol table's memory efficiency.
0.24.0 - 2020-08-27
scopeproperty for all rule templates.
0.23.1 - 2020-08-25
- Support for
ReturnAddressintrinsic. - Support for
AddressOfReturnAddressintrinsic.
- Update issue message and rule description for
UnusedImportsRule.
0.23.0 - 2020-08-07
- Support for pascal-style result assignments in semantic analysis.
ObjectInvokedConstructorRuleanalysis rule, which flags constructor calls on object instances.MethodResultAssignedRuleanalysis rule, which flags methods whereResultoroutparameters have not been assigned.PascalStyleResultRuleanalysis rule, which flags cases where a function result is assigned to the function name instead ofResult.NoSemiAfterFieldDeclarationRuleanalysis rule, which flags field declarations without trailing semicolons.TrailingWhitespaceRuleanalysis rule, which flags source code lines with trailing whitespace.IfThenShortCircuitRuleanalysis rule, which flags erroneousIfThenusages that may cause access violations.GotoStatementRuleanalysis rule, which flagsgotostatements.CompilerHintsRuleanalysis rule, which flags places where hints are disabled.
- Improve support for the
SetStringintrinsic. - Exclude class declarations with no members in
ClassPerFileRule. - Exclude constructor invocations on instance variables in
MemoryManagementRule.
0.22.1 - 2020-08-03
- Improve dependency analysis around implicit invocations by
for..inloops. - Update default
severityofRedundantCastRuletoMINOR. - Update default
severityofExplicitDefaultPropertyReferenceRuletoMINOR.
- Loop variables were being skipped during name resolution.
0.22.0 - 2020-07-29
ExplicitDefaultPropertyReferenceRuleanalysis rule, which flags direct references todefaultproperties.RedundantCastRuleanalysis rule, which flags casts that can be removed.
- Type-modeling bugs around single-dimensional fixed array types.
- The
SetLengthwouldn't accept variadic length parameters for multi-dimensional arrays. Selfin class methods is now treated as a class-reference instead of an instance variable.Selfis no longer created in class methods with thestaticdirective.
0.21.0 - 2020-06-10
- Support for operator overloads.
- Support for pointer math expressions.
- Support inline methods expanded via property invocations in dependency analysis.
- Support for
withstatements. - Support for
System.MaxIntcompiler constant. - Support for
System.MaxLongIntcompiler constant. - Support for
System.CompilerVersioncompiler constant. - Support for
Defaultintrinsic. - Support for
HasWeakRefintrinsic. - Support for
IsConstValueintrinsic. - Support for
IsManagedTypeintrinsic. - Support for implicit import of the
SysInitunit - Support for implicit conversion from interface references to
System.TGUID.
- Rewrite type resolution for binary and unary expressions.
- Support the
Resultvariable in anonymous functions. - Improve type resolution for array constructors with procedural elements.
- Improve type comparisons between ordinals and subranges with comparable base types.
- Improve type comparisons between variants and enumerations.
- Improve type comparisons between variants and dynamic arrays.
- Improve type comparisons between character pointers and strings.
- Improve type comparisons between character arrays and strings.
- Improve type comparisons between open arrays of
AnsiCharandWideChar. - Improve type comparisons between text-literal arguments and character pointer parameters.
- Improve type comparisons involving
nilliterals. - Improve support for the
HighandLowintrinsics. - Improve primary expression type resolution around constructor invocations.
- Improve primary expression type resolution around hard casts.
- Improve primary expression type resolution around array properties.
- Types nested within the
testSuiteTypewill now be treated as test code. Charis now treated as an alias toWideChar.
- Name resolution bug where names in interface supertypes could not be resolved.
- Incorrect operator precedence for
as. - A caught exception's type was unresolved within the
excepthandler. - Exclude implementation symbols during cross-unit name resolution.
- Type signature mismatches arising from forward-declared pointer/class reference types.
- Anonymous methods were erroneously treated like method references during overload resolution.
- Nested types could not access declarations in top-level type(s) via unqualified references.
- A method implementation with no parameter list would not resolve to the interface method if the parameter list was omitted. (The compiler allows this as long as there is only one method declaration with the same name in the interface section)
- The
Resultvariable's type would be unknown if the return type was omitted on the method implementation. - References to
SetStringintrinsic wouldn't resolve properly. - References to
Copyintrinsic wouldn't resolve properly if optional parameters were omitted. - The
Hiintrinsic's return type was treated asInteger, when it should have beenByte. - The
Lengthintrinsic would only accept dynamic arrays, when it should accept any array. - The
IncludeandExcludeintrinsics wouldn't accept array constructors as set literals. - Many intrinsics wouldn't treat subranges or
typetypes as ordinals. - In some cases, the current type could not be found during name resolution. This would cause an otherwise-correct declaration to be considered inaccessible.
nilwas treated as a valid record value.- Record helpers would not be resolved properly on array types.
- Record helpers would not be resolved properly on intrinsic type references.
- Type resolution failures caused by mixing hard typecasts with types referred to via a keyword
(ie.
stringorfile). - Ambiguous conversions from integer types to nil pointer.
- Valid conversions to variant parameters would not always succeed, or would be given a lower priority than expected during overload resolution.
- Array arguments could not convert to a pointer parameter with its element type.
- Generic declarations could be shadowed by non-generic declarations of the same name, erroneously ignoring type arguments.
- Overload resolution ambiguity issues between types with similar inheritance depths.
- Various generic specialization issues.
0.20.0 - 2020-06-05
- Dependency analysis step that occurs during Symbol Table construction.
ImportSpecificityRuleanalysis rule, which flags imports that could be moved to the implementation section.AssertMessageRuleanalysis rule, which flagsAssertcalls without error messages in main code.
- Use dependency analysis in
UnusedImportsRule. - Improve distance-calculation between floating-point types during overload resolution.
- Penalize signed vs unsigned type mismatches during overload resolution.
- Treat
Realas a type alias toDouble. - Treat
Cardinalas a type alias toLongWord. - Treat the result of binary expressions including floating-point types as
Extended. - Improve type comparisons between dynamic arrays.
- Increase the penalty when converting from pointer to array types.
- Ambiguities in the intrinsic method signatures.
- Ambiguous type comparisons from
AnsiStringto other string types. - String types were implicitly convertible to char types.
- Objects weren't implicitly convertible to untyped pointers.
- Methods without the
overloaddirective were being collected from imported units as potential overloads during name resolution. - A constructor/destructor implementation could fail to find its declaration in the interface section if a class constructor/destructor existed in a supertype defined in the same unit with the same name.
- Name resolution ambiguities in cases where comparable method overloads exist in supertypes or other units.
- Name resolution ambiguities when an overridden (and overloaded) method had a different set of default parameters than its overrides.
- Various parsing bugs.
0.19.0 - 2020-05-21
- Improve description of
UnusedImportsRule.
- Overload resolution failures around overloads imported from multiple units.
- Non-deterministic imports when multiple units have the same name.
0.18.0 - 2020-05-19
- Exclude most IDE-generated imports from
UnusedImportsRule.
- Name resolution bugs around nested unscoped enums.
- Type comparison bugs around types of the form
type TFoo.
0.17.0 - 2020-04-27
UnusedImportsRuleanalysis rule, which flags imports that aren't used in the file.
- Streamline symbol table construction into a single-pass implementation for better performance.
- Exclude records in
PublicFieldsRule.
- Preprocessor bug where included tokens could be unexpectedly deleted.
- Name resolution bug where method overload searches would stop prematurely if a class constructor or class destructor was found with the same name.
0.16.2 - 2020-04-22
- Exclude overrides and interface implementations in
MethodNameRule. - Treat class helper types as inheriting from
System.TClassHelperBase.
- Recursion bug in import resolution.
0.16.1 - 2020-03-26
- Various name resolution bugs.
0.16.0 - 2020-03-17
- Support Option Set (
.optset) references in.dprojfiles.
0.15.0 - 2020-03-12
- Support for
cweandowaspsecurity standards in rule metadata.
- Improve semantic analysis around generic types.
0.14.0 - 2020-03-05
- Support for generic types and methods in semantic analysis.
0.13.0 - 2020-02-25
- Support for
classandrecordhelpers in semantic analysis. - Support for explicit array constructor invocations (
TArray<Integer>.Create(1, 2, 3)). - Support for unit aliases.
sonar.delphi.unitAliasesproperty to specify unit aliases, which are used for unit import resolution.
- General improvements around analysis of types represented by keywords (
string,file). - Exclude array constructors in
EmptyBracketsRule. - Exclude procedural variables in
EmptyBracketsRule.
0.12.1 - 2020-02-18
- The current type could not be resolved from within a subroutine.
- Files with multiple implementation sections (due to conditional compilation) would be preprocessed in unexpected ways.
0.12.0 - 2020-02-13
sonar.delphi.pmd.testSuiteTypeproperty to specify an ancestor type for types that will be treated as test code.sonar.delphi.conditionalUndefinesproperty to exclude specified defines that were aggregated from the project files.typeIsXPath function.typeIsExactlyXPath function.typeInheritsFromXPath function.- Log the conditional defines used for analyzing the project.
sonar.delphi.pmd.testTypeRegexproperty.
- The name of the
Test Type Regexproperty was displaying asGenerate XML Report. - Imports could be traversed transitively during name resolution.
0.11.2 - 2020-02-10
- Bug where analysis would sometimes skip the implementation section.
0.11.1 - 2020-02-05
- Improve description of
TypeAliasRule.
0.11.0 - 2020-02-05
ExtraneousArgumentListCommasRuleanalysis rule, which flags trailing commas in argument lists.
- Exclude interface parameters in
MemoryManagementRule. - Reclassify
Break,Continue, andExitas compiler intrinsics. - Update default
severityof allBUGrules.
SpecialKeywordCapitalizationRuleanalysis rule.
- FPs around variant conversions in
RedundantBooleanRule. - Bug where the base type of an enum subrange would not be resolved.
0.10.0 - 2020-01-17
- Improve progress reporting.
- Improve type resolution around implicit forward declarations.
- Pointer names are now expected to take the dereferenced type name and replace a leading
Twith aPinPointerNameRule. - Improve description of
EmptyBeginStatementRule. - Improve description of
CommentedOutCodeRule.
sonar.delphi.sources.projectproperty.sonar.delphi.sources.workgroupproperty.
- FPs around names ending with the word
DuplicatesinDuplicatesRule. - FPs around things that look like
ifstatements inCommentedOutCodeRule.
0.9.0 - 2020-01-07
- Semantic analysis:
- Symbol table
- Type resolution
- Overload resolution
- Search path indexation.
- Symbol information is now provided to the Sonar API for use in the web interface.
MemoryManagementRuleanalysis rule, which flags object allocations without memory management.ShortIdentifiersRuleanalysis rule, which flags identifiers below a certain length.AssignedNilCheckRuleanalysis rule, which flags comparisons tonilwhereAssignedshould be used instead.CaseStatementSizeRuleanalysis rule, which flags case statements with less than 2 cases.DestructorDestroyRuleanalysis rule, which flags destructors that aren't namedDestroy.ExplicitTObjectRuleanalysis rule, which flagsclassdeclarations that don't explicitly declare their parent type.MethodNestingDepthRuleanalysis rule, which flags subroutines that are nested too deeply.SpecialKeywordCapitalizationRuleanalysis rule, which flags special keywords that are not capitalized.MultipleVariableDeclarationRuleanalysis rule, which flags places where multiple variables are declared in a single declaration list.TabulationCharactersRuleanalysis rule, which flags files containing tabs.EmptyTypeSectionRuleanalysis rule, which flags emptytypesections.EmptyVisibilitySectionRuleanalysis rule, which flags empty visibility sections.EmptyFieldSectionRuleanalysis rule, which flags empty field sections.RedundantParenthesesRuleanalysis rule, which flags redundant parentheses in expressions.SuperfluousSemicolonsRuleanalysis rule, which flags stray semicolons.CommentedOutCodeRuleanalysis rule, which flags comments containing source code.ObjectTypeRuleanalysis rule, which flagsobjecttype declarations.ForbiddenIdentifierRuleanalysis rule template, which flags identifiers with a specified name.ForbiddenMethodRuleanalysis rule template, which flags methods with a specified fully-qualified name.ForbiddenTypeRuleanalysis rule template, which flags types with a specified fully-qualified name.sonar.delphi.sources.searchPathproperty to specify directories to search for include files and unit imports.sonar.delphi.unitScopeNamesproperty to specify unit scope names, which are used for unit import resolution.sonar.delphi.sources.standardLibrarySourceproperty to specify a path to the standard library source code. This is a required property.
- Rewrite preprocessor from scratch:
- Support for complex branching conditionals
- Support for constant expressions in conditional directives
- Support for
SCOPEDENUMSswitch - Preservation of the original token file positions
- Enhance
MixedNamesRulewith symbol table information. - Exclude class constructors in
ConstructorCreateRule. - Exclude untyped expression casts in
CastAndFreeRule. - Handle
elseexception handler inSwallowedExceptionsRule. - Handle global variables separately in
VariableNameRule. - Allow empty case branches in
EmptyBeginStatementRuleif they have comments.
sonar.delphi.sources.excludedproperty.
- FPs around forward declarations in
ClassPerFileRule. - Various parsing bugs.
- Typo in
ClassNameRuleissue message.
0.8.0 - 2019-08-26
- Cognitive Complexity metric.
BeginEndRequiredRuleanalysis rule, which flags any place wherebegin..endcan be used.MethodCognitiveComplexityRuleanalysis rule, which flags methods that are too complex.EnumNameRuleanalysis rule, which flags enums that don't match an expected naming convention.RedundantBooleanRuleanalysis rule, which flags redundant boolean expressions.XPathTemplateRuleanalysis rule template, which flags AST structures matching an XPath.
- Refactor the whole AST.
- Reimplement all analysis rules.
- Rewrite metrics calculation from scratch.
IfNotFalseRuleanalysis rule.IfTrueRuleanalysis rule.NoBeginAfterDoRuleanalysis rule.ThenTryRuleanalysis rule.
- Various parsing bugs.
0.7.0 - 2019-08-23
- Proper support for rule templates.
StringLiteralRegexRuleanalysis rule template, which flags string literals matching a regular expression.
- Fix FPs around qualified identifiers in
MixedNamesRule.
0.6.0 - 2019-08-20
CommentRegexRuleanalysis rule template, which flags comments matching a regular expression.InheritedTypeNameRuleanalysis rule template, which enforces a naming convention based on the parent type.
- Exclude empty
virtualandoverridemethods inEmptyMethodRuleif they have comments. - Include constructors and destructors in
NoSemiAfterMethodDeclarationRule. - Allow
TFrameprefix inClassNameRule. - Update various rule descriptions and issue types.
0.5.0 - 2019-08-09
TooLargeMethodRuleanalysis rule, which flags methods with too many statements.
- Update rule description for
ReRaiseExceptionRule. - Support constructors and destructors in
TooManySubproceduresRule.
TooLongMethodRuleanalysis rule.
- FPs and various edge-cases in
ReRaiseExceptionRule. - FPs around forward declarations in
EmptyInterfaceRule.
0.4.0 - 2019-08-05
sonar.delphi.pmd.testTypeRegexproperty to specify types that will be treated as test code.
- Ignore test code in
TooLongLineRule. - Ignore test code in
SwallowedExceptionsRule.
0.3.0 - 2019-08-01
- Include comments in the line length in
TooLongLineRule. - Allow a digit to be the first character in a name (after the prefix) in the name convention rules.
- Update severity metadata for all rules.
- FPs around class constructors in
ConstructorWithoutInheritedStatementRule. - FPs around class destructors in
DestructorWithoutInheritedStatementRule. - FPs and various edge-cases in
DuplicatesRule. - Interface declarations weren't recognized properly in
InterfaceNameRule. - Parsing ambiguities between identifiers and keywords.
0.2.0 - 2019-08-01
- Copy/paste detection. (CPD)
- Syntax highlighting.
- Support for Sonar API 7.9.1.
- Support for Java 11.
- Support for configurable conditional defines.
SwallowedExceptionsRuleanalysis rule, which flags empty exception handlers and emptyexceptblocks.
- Exclude generated auto-create form variables in
VariableNameRule. - Allow
EandTFormprefixes inClassNameRule. - Prevent empty methods from being flagged by
EmptyBeginStatementRule. - Better issue detection in
AssignedAndFreeRule. - Better issue detection in
TooManyArgumentsRule. - Better issue detection in
TooManyVariablesRule.
UppercaseReservedWordsRuleanalysis rule.WithAfterDoThenRuleanalysis rule.EmptyExceptBlockRuleanalysis rule.
- File-position calculation for issues.
- Parsing issues.
- Lexing issues.
- Conditional define resolution.
- False-positives in 13 rules.
- Logic errors in existing "semantic analysis" that caused scan failures.