Releases: integrated-application-development/sonar-delphi
Releases Β· integrated-application-development/sonar-delphi
1.15.0
Added
ParsingError
analysis rule, which flags files where parsing failures occurred.- Support for the
WEAK_NATIVEINT
symbol, which is defined from Delphi 12 onward. - Support for undocumented intrinsics usable within
varargs
routines:VarArgStart
VarArgGetValue
VarArgCopy
VarArgEnd
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.TYPEADDRESS
enum member, useTYPEDADDRESS
instead.
Fixed
- Exceptions from empty structures (e.g.,
if
) inLoopExecutingAtMostOnce
andRedundantJump
. - 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
var
andconst
inPlatformDependentTruncation
. - Trailing whitespace within comments not recognized in
TrailingWhitespace
. - Overload resolution failures on the variant overload of the
Copy
intrinsic. - 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
Fixed
- File pointer errors around
>=
and<=
tokens.
1.14.0
Added
RedundantJump
analysis rule, which flags redundant jump statements, e.g.,Continue
,Exit
.LoopExecutingAtMostOnce
analysis rule, which flags loop statements that can execute at most once.excludedNames
rule property to theMixedNames
rule.- API:
RepeatStatementNode::getGuardExpression
method. - API:
RepeatStatementNode::getStatementList
method. - API:
CaseStatementNode::getSelectorExpression
method. - API:
CaseItemStatementNode::getStatement
method.
Fixed
- Parsing errors where adjacent
>
and=
tokens were wrongly interpreted as the>=
operator. - False-positives within assignment statements in
IndexLastListElement
.
1.13.0
Added
- API:
AnonymousMethodNode::getDeclarationSection
method. - API:
AnonymousMethodNode::getStatementBlock
method. - API:
AnonymousMethodNode::isEmpty
method.
Changed
- 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
Fixed
- Incorrect case-sensitive treatment of file names in coverage reports.
1.12.1
Fixed
- 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
Added
- API:
DelphiCheckContext::getUri
method.
Fixed
- Parsing errors on semicolon-delimited generic type parameters in routine implementation headers.
- Incorrect return types for
Length
,High
, andLow
on 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
Added
MissingRaise
analysis rule, which flags exception constructions for whichraise
has been omitted.- API:
ProceduralType::directives
method. - API:
ProceduralTypeNode::getDirectives
method. - API:
ProceduralTypeNode::hasDirective
method. - API:
ProceduralTypeHeadingNode::getDirectives
method. - API:
AnonymousMethodNode::getAnonymousMethodHeading
method. - API:
AnonymousMethodNode::getDirectives
method. - API:
AnonymousMethodNode::hasDirective
method. - API:
AnonymousMethodHeadingNode
node type. - API:
DelphiTokenType.ANONYMOUS_METHOD
token type. - API:
DelphiTokenType.ANONYMOUS_METHOD_HEADING
token type.
Fixed
- Parsing errors on
implementation
keywords nested in conditional branches. - Parsing errors on anonymous methods with routine directives (like calling conventions).
IndexOutOfBoundsException
errors around procedural types declared withvarargs
inVariableInitialization
.
1.10.0
Added
FullyQualifiedImport
analysis rule, which flags non-fully qualified imports.- API:
UnitImportNameDeclaration::isAlias
method.
Changed
- Non-trivial
inherited
expressions are excluded inRedundantParentheses
.
Fixed
- False positives around const array literals in
RedundantParentheses
.
1.9.0
Added
- API:
CaseItemStatementNode::getExpressions
method.
Changed
- 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
. out
parameters are treated as uninitialized at the start of a routine inVariableInitialization
.
Fixed
- Name resolution errors around alias ancestor types.
- Parsing errors around partial
asm
blocks blocks in conditional branches. - False positives around case items with multiple values in
CaseStatementSize
.