Skip to content

Release 3.5.0

Compare
Choose a tag to compare
@github-actions github-actions released this 27 Jun 00:10
· 123 commits to main since this release
f3b6efc

SonarQube compatibility

This release is compatible with SonarQube 9.9 LTA Community Edition and newer. However, comprehensive testing and validation have been conducted only on SonarQube 9.9 CE, 10.5 CE, and 10.6 CE. While compatibility is expected for other versions within this range, the full extent of functionality has been assured only for the tested versions.

Additionally, please note that while this version may work with SonarQube’s commercial editions, the compatibility was not tested and simultaneous analysis using ZPA and SonarSource’s embedded PL/SQL plugin is not supported. If you require this scenario, consider using zpa-cli instead.

Highlights

First-class support for test and coverage reports generated by utPLSQL

Two new properties specifically designed for consuming test and coverage reports generated by utPLSQL were added:

  • sonar.zpa.tests.reportPaths: Use this property to specify the path to the test report(s) (generated using the ut_sonar_test_reporter).
  • sonar.zpa.coverage.reportPaths: Similarly, this property allows you to specify the path to the coverage report(s) (generated using the ut_coverage_sonar_reporter).

Previously, importing test and coverage reports into SonarQube required generic properties. However, with the introduction of these new properties, the ZPA plugin can now automatically associate the test and coverage results with the corresponding PL/SQL files. The best part? You won’t need to define any complex object-file mapping rules in the utPLSQL-cli.

By leveraging these properties, is much easier to integrate the utPLSQL reports into your SonarQube analysis pipeline. More information is available in the documentation.

Install/update instructions

  • Download the sonar-zpa-plugin-3.5.0.jar and copy it to the SONARQUBE_HOME/extensions/plugins.
  • Remove the older plugin from that directory.
  • Restart the SonarQube instance.

For custom plugin developers

Binary compatibility is not guaranteed either in between any version number change. Custom plugins should be recompiled against the same version of sonar-zpa-plugin.

Download the zpa-toolkit-3.5.0.jar (requires Java 11+) to test the parser and view the AST.

Full changelog

🚀 Features

  • a2b45d2 grammar: Add remaining XML(...) functions
  • 267001e grammar: Update the COLUMNS clause for JSON_TABLE to not require parenthesis
  • 0c9dc89 grammar: Support JSON_DATAGUIDE (#182), closes #182
  • be2753a grammar: Support JSON_TEXTCONTAINS condition (#182), closes #182
  • d45f0a1 grammar: Support JSON_EXISTS condition (#182), closes #182
  • e7df8bb grammar: Support JSON_EQUAL condition (#182), closes #182
  • 04243e8 grammar: Support IS JSON condition (#182), closes #182
  • 995e570 grammar: Support JSON_TRANSFORM (#182), closes #182
  • 2f72915 grammar: Accept "?" as a binding expression
  • c3d7f8d toolkit: Hide the stacktrace of RecognitionException
  • ec9b08d grammar: Support JSON_VALUE (#182), closes #182
  • 0ac0549 grammar: Support NESTED clause (short-hand syntax for JSON_TABLE) (#182), closes #182
  • 1cb8e99 grammar: Support JSON_TABLE (#182), closes #182
  • 0b72375 Add JsonDatatype (#182), closes #182
  • 708e999 grammar: Support JSON_SERIALIZE (#182), closes #182
  • db6f528 grammar: Support JSON_SCALAR (#182), closes #182
  • 6a97dcb grammar: Support JSON_OBJECTAGG (#182), closes #182
  • fdb40f5 grammar: Support JSON_OBJECT (#182), closes #182
  • 444993b grammar: Support JSON_MERGEPATCH (#182), closes #182
  • 5ef627a Update SemanticAstNode.toString to return value/line/column instead of tokenValue/tokenLine/tokenColumn for easier debugging
  • a518777 grammar: Support JSON_ARRAYAGG (#182), closes #182
  • be972b7 grammar: Support JSON_ARRAY (#182), closes #182
  • 460e813 grammar: Support JSON constructor (#182), closes #182
  • bd12517 Update rule descriptions to display the line differences between compliant and noncompliant code
  • 5cfcb8b grammar: Support JSON_QUERY (#182), closes #182
  • 3689350 grammar: Support COLLECT function
  • 319beef grammar: Support values clause in queries
  • d335949 grammar: Support recursive subquery factoring syntax
  • bc26d2b grammar: Support timestamp literals
  • 30f014f grammar: Support floating-point literals
  • 4ef718b Add debug logging on the test and coverage importers
  • 59f081f Add "debug" log level
  • 7199edc Add firstToken and lastToken to Scope because the "tree" is empty on the scopes added to the global scope
  • c7e952d Import coverage reports correctly when the tested file doesn't start with the executed code (#156), closes #156
  • b75eecf Import coverage reports from utPLSQL (#156), closes #156
  • 5eb4945 Import correctly utPLSQL test reports that contain the paths to the source files (#156), closes #156
  • 38b3e1f Introduce a sensor to import utPLSQL test reports (#156), closes #156
  • 99f7216 Add a FileLocator component to be used by the utPLSQL report sensor (#156), closes #156
  • fdbd43f Expose the global symbol scope to the consumers of AstScanner
  • 9579c04 Add a plSqlFile property to ScopeImpl
  • 09b8593 Include empty comment lines in the total count of lines of comments
  • a256b94 Remove method getSemanticNode and make the Parser build a SemanticAstNode directly

🐛 Fixes

  • 0159c3c grammar: Avoid ambiguity between "/" as the division operator and "/" as a SQL*Plus command, take 2
  • 2172558 grammar: Avoid ambiguity between "/" as the division operator and "/" as a SQL*Plus command
  • 6fc3fe1 grammar: SET isn't always a reserved keyword, it can be used as a object name
  • 02c327e grammar: Support the obsolete THE expression (closes #183), closes #183
  • 138ff5e grammar: Support the usage of the keyword AS in table aliases
  • 338b2ee Fix zpa-checks tests to use Jackson
  • 600b4ea Register all the trigger scopes with the type "CREATE_TRIGGER"
  • d6ab929 Wait for the thread to terminate before exiting ProgressReport.stop/cancel to ensure that the message 'xxx source files have been analyzed' doesn't appear after the 'Sensor Z PL/SQL Analyzer [plsqlopen] (done)' in SonarScanner.
  • 776c766 Ignore coverage for files with no covered lines
  • a2983d0 Store the trigger name on the scope correctly
  • b4d5a5e grammar: Skip XMLTABLE_OPTIONS node because all components are optional
  • b5918c0 Import test result correctly when the report contains the suite path
  • 57d5aad Fix comparison on MethodMatcher
  • 7114796 Fix broken test
  • 83e5d6a Add a subcategory for test and coverage properties instead of creating a new category
  • 4355716 Fix the xml mapping of utPLSQL test report

🔄️ Changes

  • efc977e Remove unused method
  • 0e8bde4 grammar: Move XMLAGG_EXPRESSION to AggregateSqlFunctionsGrammar
  • 9c990f2 grammar: Move TREAT_AS_EXPRESSION and SET_EXPRESSION to SingleRowSqlFunctionsGrammar
  • 7742599 Prefer raw strings for regexes in PlSqlLexer
  • 2ba31ad Abstract some logic from TestResultImporter that will be shared with the coverage importer
  • 734b300 Remove unnecessary parameter from UtPlSqlSensor
  • 765b2d1 Move the test report importing code to a separate class (#156), closes #156
  • c9212cc Rename class UtPlSqlTestSensor to UtPlSqlSensor
  • c6d6fd0 Rename property "sonar.zpa.utplsql.reportPaths" to "sonar.zpa.tests.reportPaths" (#156), closes #156
  • 6ec05fa Rename FileLocator to ObjectLocator and don't add the number disabled tests to the total of tests (#156), closes #156
  • aa7f0fa Reduce memory usage of MethodMatcher
  • 1f6af00 Convert NameCriteria to a functional interface
  • d9e0702 Remove unnecessary call to Char.lowercaseChar
  • 5a7dc47 Replace usages of org.hamcrest.MatcherAssert with com.felipebz.flr.tests.Assertions

🧪 Tests

  • a7a72ba its: Verify if the files are parsed correctly when the error recovery mode is enabled
  • 8d5e548 it: Add extracted code from the JSON Developer's Guide
  • 039af64 it: Add extracted code from the PL/SQL Language Reference
  • 473a8da it: Update CSS selector used by OracleDocsExtractor
  • 9bbeb5f it: Use the parser from SQLcl to filter valid statements from Oracle docs
  • f1ae98d it: Update the extraction of example from the Oracle docs to include a subfolder with the "book" name
  • f4d32bb it: Remove unused oracle-database_19 folder
  • 4e7970d Add test files from the antlr/grammars-v4 repository
  • b1c7a4b Update test files from Oracle 19c to Oracle 23ai
  • 7c8f200 Update integration test expectations

🧰 Tasks

  • d2103da it: Update sources and test expectations
  • 8f822c3 Add .kotlin to .gitignore
  • 88152d8 Regenerate .json files for the integration test expectations
  • bba9491 Fix license header

🛠 Build

  • f3b6efc Release 3.5.0
  • a67b1bf Use the official release SonarQube 10.6 for integration tests
  • 9584478 Update build workflow
  • 4e9ed91 Store the download SQLcl in the build-artifacts
  • 0a7c3b6 Update to Gradle 8.8
  • b7b6767 Change shadow plugin to io.github.goooler.shadow
  • 938c1ed Simplify the build workflow to avoid rebuilding the project multiple times
  • bbc36d6 Update build plugins
  • 211e894 deps: Update Kotlin to 2.0.0
  • 866854f Fix compilation warnings
  • 3389608 Add dependency-submission to GitHub workflow
  • 769f728 deps: Use FLR 1.4.0-SNAPSHOT
  • 323d9ce Bump project version

📝 Documentation

  • c32517c Update CODE_OF_CONDUCT.md
  • a9ee5db Update README to use "9.9 LTA" instead of "9.9 LTS"
  • c3879f5 Update wording in changelog
  • e23c550 Remove outdated info from README
  • 587ae08 Update changelog