diff --git a/docs/_checks/41.md b/docs/_checks/41.md index 3b37a481..34362acf 100644 --- a/docs/_checks/41.md +++ b/docs/_checks/41.md @@ -4,7 +4,22 @@ cNumber: CHECK_41 rfc: true --- -todo +Checks for empty lines and comment lines inside of statements. + +Examples: + +```abap +READ TABLE lt_table + +INDEX 1 INTO ls_table. +``` + +```abap +READ TABLE lt_table +" read index 1 +INDEX 1 INTO ls_table. +``` + ### Configuration ![Configuration](/img/41_conf.png) \ No newline at end of file diff --git a/docs/_checks/42.md b/docs/_checks/42.md index 3d5c0cda..e6d2d227 100644 --- a/docs/_checks/42.md +++ b/docs/_checks/42.md @@ -4,7 +4,18 @@ cNumber: CHECK_42 rfc: true --- -todo +Checks for identical WHEN-Blocks. + +Example: + +```abap +CASE lv_foo. + WHEN 1. + WRITE lv_bar. + WHEN 2. + WRITE lv_bar. " <- identical to WHEN 1 +ENDCASE. +``` ### Configuration ![Configuration](/img/default_conf.png) \ No newline at end of file diff --git a/docs/_checks/78.md b/docs/_checks/78.md index a5ec0147..7ba8f042 100644 --- a/docs/_checks/78.md +++ b/docs/_checks/78.md @@ -5,4 +5,17 @@ rfc: true --- ### EC CI_SUBRC can be removed -todo + +If the SUBRC is checked, the pseudo comment 'EC CI_SUBRC' can be removed. + +Example: + +```abap +SELECT * FROM TADIR. "#EC CI_SUBRC <- can be removed, since SUBRC is checked afterwards +IF sy-subrc = 0. + .. +ENDIF. +``` + +## Configuration +![Configuration](/img/default_conf.png) diff --git a/docs/_checks/79.md b/docs/_checks/79.md index ad0d130f..63ef4a64 100644 --- a/docs/_checks/79.md +++ b/docs/_checks/79.md @@ -5,6 +5,24 @@ rfc: true --- ### CLEAR as first use of variable -todo -Only works for local variables in global classes. +Checks if a variable is cleared in it's first usage after it has been defined. + +Note: Only works for local variables in global classes. + +Example: + +```abap +.. +METHOD foobar. + + DATA lv_index TYPE i. + CLEAR lv_index. + .. + +ENDMETHOD. +.. +``` + +## Configuration +![Configuration](/img/default_conf.png) \ No newline at end of file diff --git a/docs/_checks/80.md b/docs/_checks/80.md index b17618b3..c00ded06 100644 --- a/docs/_checks/80.md +++ b/docs/_checks/80.md @@ -4,7 +4,12 @@ cNumber: CHECK_80 rfc: true --- -### Space before colon -todo +### Spaces before colon -[https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#condense-your-code](https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#condense-your-code) +Checks for spaces before colons. + +See also +[https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#condense-your-code](https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#condense-your-code) for reference. + +## Configuration +![Configuration](/img/default_conf.png) \ No newline at end of file