cachéQuality Release Notes

2.0.3

(20 February, 2019)

What's new

  • Exclusion list of rules that requires project context while analyzing just a file in SonarLint

2.0.2

(1 February, 2019)

Fixes

  • Fixed inheritance recognition for rules evaluation

2.0.1

(28 January, 2019)

What's new

Full compatibility with SonarQube 7.3

2.0.0

(27 September, 2018)

Since this version, minimal SonarQube version required is 6.0

What's new

  • Ready for InterSystems IRIS platform
  • Compatibility with Sonarlint 2
  • Code Coverage support

1.3.7

(17 August, 2018)

What's new

  • Recognize more keywords on @Relationship annotation: Calculated, SqlComputeCode, SqlComputed, Transient
  • Recognize specifications on class Query: CONTAINID, ROWSPEC, COMPILEMODE and SELECTMODE
  • Recognize the delimiters #classcontext and #endclasscontext
  • Accept instructions without quotation marks on &html statement
  • Recognize inheritance for rules evaluation
  • Recognize resulSet.Data("...") as %String type
  • Recognize a relationship accessor in a class
  • Recognize empty string as false when evaluting a boolean type
  • Support for ObjectScript function $MVOCONV
  • New "Best Practice" option for rule Variable not found to allow strict or flexible evaluation (previous versions were strict evaluation). Next are additional validations when Best Practice mode is enabled:
    • ByRef variables must be initialized
    • Exception variable in catch clause must be initialized
    • SQLCODE is considered declared and intialized after a &sql statement
    • Assignment to :variable in a &sql statement must be initialized

Fixes

  • Recognize property SqlViewName
  • Allow optional postconditional on TSTART
  • RFC metric was accounting references to any Method/ClassMethod more than once
  • Method not found rule reviewed for a better exclusion of %ShortPackageNames
  • Class not declared abstract rule has been reviewed accordingly to abstract definition discussed with different COS developer teams: A class should be abstract if all methods are empty or declared as abstract, then class should be abstract
  • Properly distinguish a variable that starts with sql in a logic sentence from &sql function
  • Recognize multiline comments after commands and method calls were without a space separator
  • Don't trigger Class not found rule for system classes. Now will recognize system classes if declared zn %SYS%
  • Don't trigger Method not found rule for system classes. Now will recognize system classes if declared zn %SYS%
  • Dont' trigger Missing argument(s) in method call rule when using ByRef and/or Output parameters
  • Dont' trigger Method not found rule for system classes
  • Review of accepted system variables on Variable not found rule to avoid false positives
  • Recognize comments inside a &html

1.3.6

(27 March, 2018)

What's new

Fixes

  • Resolved null pointer parsing in Class not found rule
  • Method not found rule now excludes checks for %Classes, %Methods and %ShortPackageNames
  • Incompatible argument type in a method rule was requiring initialization for variables passed by reference
  • Incompatible argument type in a method rule now considers %String as the default type for the parameters with no type
  • Method with unexpected arguments rule was not treating arguments with default value as arguments
  • Property not found rule now skips validation for properties of instancies of %Classes
  • Improvements on Variable not found rule to avoid false positives:
    • Now does not require to define a variable when calling $I(variable), as it is initiated automatically
    • Now does not require to define a variable when passed by reference
    • Now an argument used in a macro is considered to be initialized by the macro if not done before
    • Now does not require to initialize a variable used as argument in a macro
    • Was not recognizing #dim directive properly
    • Now recognizes variable declaration and initialization in a FOR

1.3.5

(4 February, 2018)

What's new

Updated for compatibility with SonarQube 6.7

1.3.4

(29 November, 2017)

Fixes

  • Control division by zero on RFC Average metric
  • Avoid type check of indirection in SET command  for rule "Property not found"
  • Avoid type check of indirection in SET command  for rule "Incompatible argument type in a method"

1.3.3

(30 October, 2017)

What's new

  • Parsing improvements for &js, &html

Fixes

  • Allow empty items in the include statement of a class
    Include (%syLDAP, %syLDAPFunc, , %sySite)
  • Allow variant with only indirection without assign for SET command
    s @("vrowcount="_vmc)
  • Correction on the Halstead Volume calculation, when it's zero
  • Allow null type on optional arguments

1.3.2

(16 October, 2017)

Fixes

  • Query As class with parameters

1.3.1

(11 October, 2017)

What's new

  • Added optional "as" in a #dim variables
  • Added optional property in SystemVars
  • Added comment (type ;comment) in #dim
  • Added parameter_list for a property
  • Accept comments for XML in XData
  • Support for legacy $ZSYNC command
  • Support for legacy $ZPREVIOUS command
  • Support for preprocessor directives:
    • #Undef
    • #elseif

Fixes

  • $ZP is a short for $ZPrevious
  • $ZPosition does not have a short
  • XData namespaces for tag
  • Corrected way to parse comments just after block
  • Allow null value for arguments
  • Pseudofields in Data modifier for Index
  • Empty statements line after dot
  • Custom Index with As class
  • Correction of spaces recognition between arguments

1.3.0

(26 September, 2017)

Fixes

  • Adoption of Complexity/Class and Complexity/Functions for newer versions of SonarQube
  • SqlFieldName modifier for Relationship
  • Sql in Query can contain braces {}
  • Indirection can be with almost everything which can return a string
  • Routines may even not have header
  • $[zobj][class]method().prop
  • {Property*N} or {Property*n} ignore case
  • $MVV on left side of SET command
  • PatternMatching also can be used with indirections
  • NEW command can be used with indirection
  • ZKill fixed parsing different types of arguments
  • Fixed parsing XData

1.2.0

(17 August, 2017)

This version ends support for SonarQube 5.1 or previous one. You need to upgrade to a newer SonarQube version if you have not done it already.

What's new

  • Compatibility with SonarQube 5.2 or higher
  • Added support for MAC/INT/INC in UDL (appeared in 2016.2) or RO format
  • Added ##safeexpression directive support
  • Added #include preprocessor directive
  • #def1arg preprocessor directive
  • support for ##sql directive
  • $zobj(var/mode/ref) functions added
  • Support for private/public procedures

Fixes

  • Macro in #Define can start with %
  • Fixes errors in parsing XData body
  • Ignore case for ##continue directive
  • Only '%' it is also valid identifier for methods or for variables.
  • SqlName modifier for classes and methods can be in quotes
  • comments in flowctl before code block
  • Fixed grammar for BREAK command
  • CodeMode = generator for Trigger
  • WHILE command can have multiple comma delimited conditions
  • @indirection with global variable
  • BREAK command with an argument (extend or flag)
  • CLOSE command with multiple arguments
  • comment just after DO command dots line in the same line with label
  • legacy if command without any arguments
  • ZT is a short for ZTRAP command
  • in block with curly braces, first statement can be without space
  • fixed error with macro comments
  • #dim with "class" in double-quotes
  • Trigger code syntax access to property
  • Triple slash comment for documentation
  • Some fixes in Pattern Matching
  • $[zobj][class]method().prop
  • {Property*N} or {Property*n} ignore case
  • $MVV on left side of SET command
  • PatternMatching also can be used with indirections
  • NEW command can be used with indirection
  • ZKill fixed parsing different types of arguments
  • Fixed parsing XData

1.1.3

(8 August, 2017)

What's new

Fixes

  • Allow a postcondition in Job command
  • Allow a postcondition in Throw command
  • Minimal macrodefinition arguments count set to zero
  • Accept a counter reference property as argument for KILL command
    k ..Context.Data
  • Accept a local variable as argument for ZKILL command
  • Accept Language=cache in a Trigger definition
    Trigger Tr1 [ Event = INSERT, Language=cache ]
  • Accept row/object in a Foreach Trigger definition
    Trigger Tr2 [ Event = INSERT, Foreach = row/object ]
  • Allow spaces around expression in &html
  • Indirection with direct self property
    @i%Global@(\"subscript\")
  • Add field at hash reference class
    ##class({%%CLASSNAME}).%ClassName(1)
  • Allow self pointer grammar in $ZOBJ* functions
    $ZOBJPROPERTY(obj,name).%Id()

1.1.2

(4 July, 2017)

Fixes

  • $LOCK command is not managed properly
  • Class Index does not support Collation
  • Pattern Matching Expressions with Alternating Patterns not recognized

1.1.1

(31 May, 2017)

What's new

Fixes

    • Recognize #dim as valid between a try and catch statement
    • Review allowed DO command arguments
    • The first argument to $PROPERTY is optional

    1.1.0

    (29 August, 2016)

    Commercial release of cachéQuality, based on license model.

    What's new

    • Add $QUERY as a valid indirection target

    Fixes

    • The Rule "Unused method argument" fails when the argument is used inside tags belonging to another language
    • Fix regular expression for HTML statics

    1.0.2

    (12 May, 2016)

    What's new

    1.0.1

    (2 May, 2016)

    What's new

    • Small refactor of namespaces for better understanding

    Fixes

    • Spelling mistake

    1.0.0

    (20 April, 2016)

    What's new

    This is the first version of the cachéQuality plugin, so everything is new!

    New rules