Trivadis PL/SQL & SQL Coding Guidelines v4.3
Version 4.3
https://trivadis.github.io/plsql-and-sql-coding-guidelines/v4.3/
PLSQL-and-SQL-Coding-Guidelines.pdf
Items marked with a 👮 require a change in the Linter tool suite db* CODECOP (besides including the changed guideline texts).
New
- #124 Mention "PL/SQL & SQL Formatter Settings" in the "Tool Support" chapter
- #169 Automatically check Markdown files with SonarCloud
- all SQL text blocks should follow these guidelines
- as a side effect syntax errors in SQL text blocks were detected and fixed
- due to the bad examples in the guidelines, it's expected that the project on SonarCloud will not meet the quality gate goals
- #197 New rule G-3182: Always specify column names instead of positional references in GROUP BY clauses. 👮
- #202 New rule G-3183: Always specify column aliases instead of expressions in GROUP BY clauses. 👮
Changed / Improved
- #159 Use
create or replace
in G-9010/G-9020/G-9030 to avoid violation of G-7125 - #160 Avoid violation of G-2340 in G-2330
- #161 Do not violate G-7160 in G-5080
- #162 Do not violate G-4320 in G-3310/G-3320
- #163 Do not violate G-1020 in the bad example of G-4325
- #164 Do not violate G-2135 in the good and bad example of G-2120/G-2130
- #165 Do not violate G-2135 in the good and bad example of G-2145
- #166 Do not violate G-7510 in the good example of G-5080
- #167 Do not use the keyword
upsert
in the good and bad example of G-7160 - #171 Do not violate naming conventions in the good and bad example of G-2610
- #172 Do not violate naming conventions in the good example of G-5030
- #173 Do not violate naming conventions in the good example of G-5070
- #174 Do not violate naming conventions in the good example of G-3320
- #175 Fix issues reported by SonarCloud regarding HTML and CSS
- #176 Do not violate G-7510 in chapter of complexity analysis
- #180 Make G-1050 less strict by using a threshold parameter 👮
- #182 Make G-8310 less strict by limiting the scope of data types 👮
- #200 Fix categorization of guideline severities 👮
- #205 Use 3 identical literals in the bad example of G-1050
- #206 Simplify G-1050 and related examples