Nightly update

This commit is contained in:
sonartech 2021-02-11 04:10:51 +00:00
parent e288eaac59
commit c025607a1f
9 changed files with 22 additions and 27 deletions

View File

@ -58,7 +58,7 @@ No issue will be raised in the following cases:
----
OPEN DATASET my_dataset FOR INPUT IN TEXT MODE ENCODING DEFAULT. " Compliant
WRITE 'Test'. " WRITE is accepted before checking SY-SUBRC
IF SY-SUBRC <> 0.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.

View File

@ -2,7 +2,7 @@ include::../description.adoc[]
== Noncompliant Code Example
With default provided regular expression: ^([A-Z0-9_]*|[a-z0-9_]*)$
With default provided regular expression: ``++^([A-Z0-9_]*|[a-z0-9_]*)$++``
----
FUNCTION MyFunction.

View File

@ -2,7 +2,7 @@ include::../description.adoc[]
== Noncompliant Code Example
With default provided regular expression: ^([A-Z0-9_]*|[a-z0-9_]*)$
With default provided regular expression: ``++^([A-Z0-9_]*|[a-z0-9_]*)$++``
----
DEFINE MyMacro.

View File

@ -1,27 +1,25 @@
According to SQL-92:
According to SQL-92:
____
____
"X BETWEEN Y AND Z" is equivalent to "X>=Y AND X+<=+Z"
"X BETWEEN Y AND Z" is equivalent to "X>=Y AND X+<=+Z"
____
____
Even if the ``++BETWEEN++`` predicate is simply syntactic sugar, using it can improve the readability of a SQL WHERE clause, and is therefore preferred.
Even if the ``++BETWEEN++`` predicate is simply syntactic sugar, using it can improve the readability of a SQL WHERE clause, and is therefore preferred.
== Noncompliant Code Example
----
SELECT * FROM PERSONS
WHERE AGE >=18 and AGE <=60
SELECT * FROM PERSONS
WHERE AGE >=18 and AGE <=60
----
== Compliant Solution
----
SELECT * FROM PERSONS
WHERE AGE BETWEEN 18 and 60
SELECT * FROM PERSONS
WHERE AGE BETWEEN 18 and 60
----

View File

@ -1,7 +1,3 @@
{
"sqKey": "SizeofSizeof",
"defaultQualityProfiles": [
"Sonar way",
"MISRA C++ 2008 recommended"
]
}

View File

@ -27,6 +27,7 @@
],
"scope": "Main",
"defaultQualityProfiles": [
"Sonar way",
"MISRA C++ 2008 recommended"
]
}

View File

@ -5,8 +5,8 @@ Removing duplicate entries from driver tables enables ``++OPEN SQL++`` to genera
----
SELECT carrid , connid , seatsocc FROM flights
INTO TABLE seatsocc_tab
FOR ALL ENTRIES IN conn_tab
INTO TABLE seatsocc_tab
FOR ALL ENTRIES IN conn_tab
WHERE carrid = conn_tab-carrid
AND connid = conn_tab-connid.
----
@ -16,11 +16,11 @@ AND connid = conn_tab-connid.
----
SORT conn_tab BY carrid.
DELETE ADJACENT DUPLICATES FROM conn_tab COMPARING carrid.
DELETE ADJACENT DUPLICATES FROM conn_tab COMPARING carrid.
...
SELECT carrid , connid , seatsocc FROM flights
INTO TABLE seatsocc_tab
FOR ALL ENTRIES IN conn_tab
INTO TABLE seatsocc_tab
FOR ALL ENTRIES IN conn_tab
WHERE carrid = conn_tab-carrid
AND connid = conn_tab-connid.
----

View File

@ -2,7 +2,7 @@ This rule allows banning some modules.
== Noncompliant Code Example
With ``++moduleName++`` configured with [a-zA-z-]*UT123[a-zA-z]*:
With ``++moduleName++`` configured with ``++[a-zA-z-]*UT123[a-zA-z]*++``:
----

View File

@ -3,7 +3,7 @@ According to the W3C specifications:
____
A string cannot directly contain a newline. To include a newline in a string, use an escape representing the line feed character in ISO-10646 (U+000A), such as "\A" or "\00000a".
\[...]
{empty}[...]
It is possible to break strings over several lines, for aesthetic or other reasons, but in such a case the newline itself has to be escaped with a backslash (\).