Skip to content

Commit

Permalink
tests: updated the program's configuration
Browse files Browse the repository at this point in the history
FossilOrigin-Name: 572480de395c1b01b63cfb3647c689b61e71bd5cb6a2d53d9a8689c5703bbd90
  • Loading branch information
thindil committed Apr 5, 2024
1 parent cec12d3 commit 0909cdb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions config/nimalyzer.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +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.
#
# ::
check hasPragma procedures contractual "raises: [*" "tags: [*"
Expand Down Expand Up @@ -248,6 +249,9 @@ 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
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
# ------------
# Search rules are similar to the check rules. The main difference is that they
Expand Down Expand Up @@ -370,3 +374,6 @@ 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
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 0909cdb

Please sign in to comment.