Releases: integrated-application-development/sonar-delphi
Releases · integrated-application-development/sonar-delphi
1.18.2
1.18.1
Added
excludedTypesrule property to theObjectPassedAsInterfacerule.
Changed
- Exclude common non-ref-counted interface implementations by default in
ObjectPassedAsInterface. - Handle property references in
ObjectPassedAsInterface(in addition to variables/fields).
Fixed
- 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
Added
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.
Changed
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
Fixed
- Ambiguous type comparisons from variants to real types.
1.17.1
Fixed
- Inaccurate handling of variant conversions, which resulted in overload resolution failures.
1.17.0
Added
- 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.
Changed
- Issue locations no longer span the entire routine declaration in
RoutineName. - Improve type modeling around the
VarArg*intrinsic routines.
Deprecated
- API:
InterfaceGuidNodenode type. - API:
InterfaceTypeNode::getGuidmethod, usegetGuidExpressioninstead. - API:
DelphiTokenType.GUID, as the associatedInterfaceGuidNodeis no longer parsed.
Fixed
- 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
Added
- 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.
Changed
- 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.
Deprecated
- 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.
Fixed
- 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
Added
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
Changed
- 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.
Deprecated
- API:
SwitchDirective.SwitchKind.TYPEADDRESSenum member, useTYPEDADDRESSinstead.
Fixed
- 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
Fixed
- File pointer errors around
>=and<=tokens.
1.14.0
Added
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.
Fixed
- Parsing errors where adjacent
>and=tokens were wrongly interpreted as the>=operator. - False-positives within assignment statements in
IndexLastListElement.