Skip to content

Commit 65b638e

Browse files
Update number-executable-statements.md
1 parent ce00522 commit 65b638e

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

docs/checks/number-executable-statements.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,24 @@
1-
# code pal for ABAP
2-
31
[code pal for ABAP](../../README.md) > [Documentation](../check_documentation.md) > [Number of Executable Statements Check](number-executable-statements.md)
42

53
## Number of Executable Statements Check
64

75
### What is the Intent of the Check?
86

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.
108

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.
1210

1311
### How does the check work?
1412

1513
The check counts the number of non-declarative ABAP Statements, that is ABAP Statements without data declarations, program introduction statements, etc.
1614

17-
### Which attributes can be maintained?
18-
19-
![Attributes](./imgs/number_of_executable_statements.png)
20-
2115
### How to solve the issue?
2216

2317
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).
2418

2519
### What to do in case of exception?
2620

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:
2922

3023
```abap
3124
METHOD method_name.

0 commit comments

Comments
 (0)