Skip to content

PL/SQL Cop for SonarQube v2.0.0

Compare
Choose a tag to compare
@PhilippSalvisberg PhilippSalvisberg released this 20 Dec 13:57
  • Released on 2017-02-03

  • New:

    • Supporting Trivadis PL/SQL & SQL Coding Guidelines Version 3.2
      • New rule numbering scheme
      • 13 new rules
        • G-5010: Try to use a error/logging framework for your application.
        • G-8410: Always use application locks to ensure a program unit only running once at a given time.
        • G-8420: Always use dbms_application_info to track program process transiently
        • G-3160: Avoid virtual columns to be visible.
        • G–3170: Always use DEFAULT ON NULL declarations to assign default values to table columns if you refuse to store NULL values.
        • G–2230: Try to use SIMPLE_INTEGER datatype when appropriate.
        • G-3150: Try to use identity columns for surrogate keys.
        • G-3180: Always specify column names instead of positional references in ORDER BY clauses.
        • G-3190: Avoid using NATURAL JOIN.
        • G-7460: Try to define your packaged/standalone function to be deterministic if appropriate.
        • G-7810: Do not use SQL inside PL/SQL to read sequence numbers (or SYSDATE)
        • G-8120: Never check existence of a row to decide whether to create it or not.
        • G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit.
      • PL/SQL Cop errors included as rules
        • E-0001: Timeout occurred (after n seconds) during load/parse/validation of resource.
        • E-0002: Syntax error. Please contact the author if the code compiles successfully in your environment.
        • E-0003: License limit reached.
      • Rules and quality profiles for non-default validators are loaded from PL/SQL Cop genmodel directory when starting SonarQube
      • Severity and SQALE characteristics are included in HTML and Excel outputs, issues are ordered by severity (Blocker, Critical, Major, Minor, Info)
    • New Preferences
      • Generate SonarQube model – Generate SonarQube XML model files for non-default validator
      • Validator class – Decendent of PLSQLJavaValidator, default is com.trivadis.tvdcc.validators.TrivadisGuidelines3
  • Fixed:

    • Analysis stops when PL/SQL Cop throws an error or when reported rule is unknown
  • Prerequisites:

    • PL/SQL Cop 2.0
    • SonarQube version 4.5.7 up to 5.1.2