|
1 |
| -# code pal for ABAP |
2 |
| - |
3 | 1 | [code pal for ABAP](../../README.md) > [Documentation](../check_documentation.md) > [Number of Executable Statements Check](number-executable-statements.md)
|
4 | 2 |
|
5 | 3 | ## Number of Executable Statements Check
|
6 | 4 |
|
7 | 5 | ### What is the Intent of the Check?
|
8 | 6 |
|
9 |
| -The "Number of Executable Statements" Check counts the number of non-declarative ABAP Statements per modularization unit up to a maximum. If there are too many statements in a code block, it is probable that the [Single Responsibility Principle](https://en.wikipedia.org/wiki/Single_responsibility_principle) is violated. |
| 7 | +This check counts the number of non-declarative ABAP Statements per modularization unit up to a maximum. If there are too many statements in a code block, it is an indicator that the [Single Responsibility Principle](https://en.wikipedia.org/wiki/Single_responsibility_principle) is violated. |
10 | 8 |
|
11 |
| -A high number of executable statements is an indicator that the source code is not readable anymore in a way that maintaining and extending the code can be done efficiently. In addition, the risk of introducing bugs is higher with a high number of executable statements in the code. |
| 9 | +A high number of executable statements is an indicator that the source code might be not readable. In addition, the risk of introducing bugs is higher with a high number of executable statements in the code. |
12 | 10 |
|
13 | 11 | ### How does the check work?
|
14 | 12 |
|
15 | 13 | The check counts the number of non-declarative ABAP Statements, that is ABAP Statements without data declarations, program introduction statements, etc.
|
16 | 14 |
|
17 |
| -### Which attributes can be maintained? |
18 |
| - |
19 |
| - |
20 |
| - |
21 | 15 | ### How to solve the issue?
|
22 | 16 |
|
23 | 17 | Modularize your code. Follow the [Single Responsibility Principle](https://en.wikipedia.org/wiki/Single_responsibility_principle). Split the method into other smaller methods (create service classes whenever possible).
|
24 | 18 |
|
25 | 19 | ### What to do in case of exception?
|
26 | 20 |
|
27 |
| -You can suppress Code Inspector findings generated by this check using the pseudo comment `"#EC CI_NOES`. |
28 |
| -The pseudo comment must be placed right after the `ENDMETHOD` statement. |
| 21 | +In exceptional cases, you can suppress this finding by using the pseudo comment `"#EC CI_NOES` which should be placed right after the `ENDMETHOD` statement: |
29 | 22 |
|
30 | 23 | ```abap
|
31 | 24 | METHOD method_name.
|
|
0 commit comments