Skip to content

Releases: integrated-application-development/sonar-delphi

1.15.0

03 Apr 03:00
Compare
Choose a tag to compare

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, 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.
  • False negatives around inline var and const in PlatformDependentTruncation.
  • 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

05 Mar 03:49
Compare
Choose a tag to compare

Fixed

  • File pointer errors around >= and <= tokens.

1.14.0

03 Mar 03:52
Compare
Choose a tag to compare

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 the MixedNames 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

05 Feb 00:54
Compare
Choose a tag to compare

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)
  • Empty anonymous methods are now ignored in EmptyBlock.
  • Empty anonymous methods are now flagged in EmptyRoutine.

1.12.2

05 Jan 23:50
Compare
Choose a tag to compare

Fixed

  • Incorrect case-sensitive treatment of file names in coverage reports.

1.12.1

06 Dec 07:29
Compare
Choose a tag to compare

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

02 Dec 02:55
Compare
Choose a tag to compare

Added

  • API: DelphiCheckContext::getUri method.

Fixed

  • Parsing errors on semicolon-delimited generic type parameters in routine implementation headers.
  • Incorrect return types for Length, High, and Low 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

04 Nov 02:39
Compare
Choose a tag to compare

Added

  • MissingRaise analysis rule, which flags exception constructions for which raise 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 with varargs in VariableInitialization.

1.10.0

01 Oct 02:22
Compare
Choose a tag to compare

Added

  • FullyQualifiedImport analysis rule, which flags non-fully qualified imports.
  • API: UnitImportNameDeclaration::isAlias method.

Changed

  • Non-trivial inherited expressions are excluded in RedundantParentheses.

Fixed

  • False positives around const array literals in RedundantParentheses.

1.9.0

03 Sep 06:19
Compare
Choose a tag to compare

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 in VariableInitialization.

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.