objectscriptQuality 3.1.0

SonarQube compatibility

8.2, 8.1, 8.0, 7.9 (LTS), 7.8, 7.7, 7.6, 7.5, 7.4, 7.3, 7.2, 7.1, 7.0, 6.7 (LTS), 6.6, 6.5, 6.4, 6.3, 6.2, 6.1, 6.0

IRIS compatibility

2020.1, 2019.1, 2018.1

Ensemble compatibility

2018.1, 2017.2, 2017.1, 2016.2, 2016.1, 2015.2, 2015.1, 2014.1

Caché compatibility

2018.1, 2017.2, 2017.1, 2016.2, 2016.1, 2015.2, 2015.1, 2014.1

Java compatibility

Oracle JDK 11, Oracle JDK 8

Release notes

Since version 3.0.0 we have renamed our product to fit better the target language analyzed: ObjectScript. We have also renamed all the related products like objectscriptQuality for Caché Studio, objectscriptQuality for Aterlier and objectscriptQuality for VSCode.

What's new

  • Java 9 compatibility
  • Java 10 compatibility
  • Java 11 compatibility
  • Set of default profile adjusted to the most important rules
  • Accept readonly attribute on &html statement
  • Improvements on Class not found rule to avoid false positives:
    • Recognize usage of system classes if declared in a set command
      set xxx = %SYS%
  • Improvements on Variable not found rule to avoid false positives:
    • Consider $ListBuild function as a way for setting variables
    • Consider $ListNext function as a way for setting variables
    • Consider $Data ($D) function as as way for setting variables on its second argument
    • Consider READ command as as way for setting variables on its second argument
    • Consider $Order function as as way for setting variables on its second argument
    • Consider $Piece function as as way for setting variables in a set command
  • Improvements on Method not found rule to avoid false positives:
    • Consider autogenerated ExtentFunc (non-documented) when extending from %Persistent
    • Class autogenerated methods are taken in consideration
    • Recognize usage of system classes if declared in a set comamand
      set xxx = %SYS%
  • Improvements on Incompatible argument type in a method rule to avoid false positives:
    • Analize return type on functions when used as argument
    • Recognition of some system libraries
  • Incompatible argument type in a method now has an option to ignore the rule when it is unable to determine an argument type

Fixes

  • Event attributes on &html were not accepting ";" as valid javascript
  • Method not found rule was not considering parent class in some cases
  • Incompatible argument type in a method was not considering a {type} equivalent to LIBRARY.{type}
  • Variable not found was analyzing JSON strings
  • Error on read type of property on self class
  • Property not found was not recognizing properties in self class in some cases
  • Review on rule Quit whitout arguments to avoid false positive in some cases
  • Class not found was resolving wrong namespace in some cases
  • DependsOn modifier assignment can be empty
    Class Example [ DependsOn = , ProcedureBlock ]
  • System roles were not allowed as class Owner
    Class MyApp.Person Extends %Persistent [ Owner = {%Developer} ]  { //class members }
  • Allow usage of ellipsis for undetermined number of arguments in a label
    ZPM(pArgs...) Do ##class(%ZPM.PackageManager).Shell(pArgs...) Quit
  • Quote marks are optionals for %%INSERT and %%UPDATE on SqlComputeOnChange
  • Accept Deprecated as class modifier
  • Accept Language class modifier with value "objectscript"
    Method name(formal_spec) As returnclass [ Language = objectscript ] 
    {    //implementation }
  • Parameters starting with % on parameter list of Property definition where not allowed
    Property Payload As Patient(%JSONFIELDNAME = "package");
  • Accept the (ELEMENTS) or (KEYS) optional expression on INDEX
  • Minor review on parsing parameter list on Property definition
    Property Manifest As %Stream.GlobalCharacterSearchable(%SIMILARITYINDEX = "ManifestSearchIndex");
  • Manage optional spacing properly for macros