Skip to content

Commit

Permalink
tests: added checking object's fields' types to configuration
Browse files Browse the repository at this point in the history
FossilOrigin-Name: c4f3b3018c33f144912dc99040422bb39465948bc7f883a5200af559f01e50ea
  • Loading branch information
thindil committed Apr 12, 2024
1 parent 99882fd commit 36070cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions config/nimalyzer.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ message Checking the program, tools and the program's unit tests
# 15. If any `if` statement can be replaced with `case` statement due to large amount of branches.
# 16. If any code block doesn't exceed limit of cyclomatic complexity.
# 17. If any `try` statement doesn't have empty `except` branch
# 18. If all object's type's declarations contains only private fields.
# 18. If all object's type's declarations contains only private fields and don't use `string` or `int` for their fields' types.
#
# ::
check hasPragma procedures contractual "raises: [*" "tags: [*"
Expand Down Expand Up @@ -249,7 +249,7 @@ explanation A code with high cyclomatic complexity is hard to understand and mai
check not trystatements empty
explanation Except branches with names of exceptions made code more readable. It also prevents problems when the checked code will start propagating new exceptions.
check not objects publicfields
check not objects all
explanation Each object's declaration should define also getters and setters for its fields. It made maintaining the code easier, when the type will be upgraded or required to use in multithread environment.

# Search rules
Expand Down Expand Up @@ -375,5 +375,5 @@ explanation A code with high cyclomatic complexity is hard to understand and mai
check not trystatements empty
explanation Except branches with names of exceptions made code more readable. It also prevents problems when the checked code will start propagating new exceptions.

check not objects publicfields
check not objects all
explanation Each object's declaration should define also getters and setters for its fields. It made maintaining the code easier, when the type will be upgraded or required to use in multithread environment.

0 comments on commit 36070cb

Please sign in to comment.