Skip to content

Releases: integrated-application-development/sonar-delphi

1.14.0

03 Mar 03:52

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

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

Choose a tag to compare

Fixed

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

1.12.1

06 Dec 07:29

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

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

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

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

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.

1.8.0

02 Aug 02:39

Choose a tag to compare

Added

  • "Correct to (correct case)" quick fix for LowercaseKeyword.
  • API: PropertyNameDeclaration::getImplementedTypes method.
  • API: PropertyNode::getDefaultSpecifier method.
  • API: PropertyNode::getImplementsSpecifier method.
  • API: PropertyNode::getIndexSpecifier method.
  • API: PropertyNode::getStoredSpecifier method.
  • API: PropertyDefaultSpecifierNode node type.
  • API: PropertyImplementsSpecifierNode node type.
  • API: PropertyIndexSpecifierNode node type.
  • API: PropertyStoredSpecifierNode node type.

Changed

  • Include the global library path in unit import resolution.
  • Improve AST modeling around property specifiers.
  • Improve semantic analysis around property specifiers.
  • Exclude properties with implements specifiers in UnusedProperty.

Fixed

  • Overly permissive parsing rules around string and file types.
  • Quick fixes removing comments and compiler directives in RedundantInherited.
  • False positives around message handler methods in RedundantInherited.
  • False positives when parameter names were mismatched to the inherited method in RedundantInherited and InheritedMethodWithNoCode.
  • API: ArrayConstructorNode::getImage returned an incorrect image containing [ as an element.

1.7.0

02 Jul 00:36

Choose a tag to compare

Added

  • RedundantInherited analysis rule, which flags redundant inherited statements that can be safely removed.

Changed

  • Include "found" and "expected" values for issue messages in LowercaseKeyword.
  • Exclude J and K by default in ShortIdentifier.
  • Improve compiler directive parsing in cases where the directive name is not followed by whitespace.

Fixed

  • The result attribute in NUnit test reports was not being treated as case-insensitive.
  • Scan failures on nested compiler directives.