objectscriptQuality 3.4.7

SonarQube compatibility

25.2, 25.1 (LTA), 10.8, 10.7, 10.6, 10.5, 10.4, 10.3, 10.2, 10.1, 10.0, 9.9 (LTS), 9.8, 9.7, 9.6, 9.5, 9.4, 9.3, 9.2, 9.1, 9.0, 8.9 (LTS), 8.8, 8.7, 8.6, 8.5, 8.4, 8.3, 8.2, 8.1, 8.0, 7.9 (LTS), 7.8, 7.7, 7.6, 7.5, 7.4, 7.3, 7.2

IRIS compatibility

2024.3, 2024.2, 2024.1, 2023.4, 2023.3, 2023.2, 2023.1, 2022.3, 2022.2, 2022.1, 2021.2, 2021.1, 2020.4, 2020.3, 2020.2, 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 17, 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.

Since version 3.3.0 we have removed support for SonarQube previous to version 7.0.

What's new

  • Compatibility with SonarQube 25.1
  • Metadata updated for IRIS 2024.2 
  • Metadata updated for IRIS 2024.3
  • Accept [LanguageMode=0...8] property in the header routine
  • Added ZAllocate and ZDeallocate commands
  • Accept indirection as argument in GOTO command
    // Define a global or variable containing a label name
    set destination = "Label1"
    
    // Use indirection in the GOTO command
    G @destination
    
    // Target labels
    Label1
        write "Jumped to Label1", !
        quit
    
    Label2
        write "Jumped to Label2", !
        quit
    

Fixes

  • Added support for accessing a property directly after a $SELECT function that returns an object
    set example = $SELECT($ISOBJECT(obj): obj, 1: fallback).propertyName
    
  • Added support for comments between property values in JSON objects
    set json = { 
               "key1": value1, // Example comment explaining key1 
               "key2": value2 // Another comment for key2 
               }
    
  • Recognize objects returned by functions in Property not found rule
    // Method returning an object 
    ClassMethod getInstance() As example.Class1
    { 
        Quit ##class(example.Class1).%New() 
    } 
    // Assigning the returned object 
    set obj = ##class(example.Class1).getInstance() 
    // 'obj' now holds an instance of 'example.Class1'
  • Improvements in Incompatible argument type in a method rule to avoid false positives:
    • Fix type recognition of ..%Id() as integer for %Persistent classes
    • Exclude $CASE function from argument type checking
    • Fix type checking to consider + prefix in argument validation
    • Allow 0 and 1 as valid values for %Library.Boolean
  • Exclude return statements in Test result of %Save rule to avoid false positives
  • Exclude getters and setters in Method never invoked rule, as they don't require a explicit call, to avoid false positives
  • Exclude methods decorated with CodeMode = objectgenerator in No quit (or return) found rule to avoid false positives
    ClassMethod example() As %String [ codemode = objectgenerator ]
    {
    ...
    }