FreeCAD/FreeCAD

CAM: Make conditional debug code uniform throughout the CAM WB code

オープン

#6,835 opened on 2022/05/05

 (4 件のコメント) (0 件のリアクション) (0 人の担当者)C++ (5,550 件のフォーク)batch import
Good first issueMod: CAMType: Feature

Repository metrics

Stars
 (30,913 個のスター)
PR merge metrics
 (平均マージ 24d 7h) (30d で 217 merged PRs)

説明

Is there an existing request for this?

  • I have searched the existing requests

Forums discussion

gitter

Subproject(s) affected?

Path

Idea description

Per LGTM, many PathWB conditional DEBUG rules are "unreachable".

"Unreachable code makes the code more difficult to understand and may slow down loading of modules."

See https://lgtm.com/projects/g/FreeCAD/FreeCAD?mode=tree&ruleFocus=3980095

When I spoke to @Russ4262 on gitter (i'm not sure if that is accurate) we understood that not all the DEBUG methodology is uniform in the Path code base. This ticket is therefore opened in order to track this issue so we can get it resolved eventually.

Update: Found Russ's response verbatim on gitter:

Logic is unreachable because False never will evaluate as True. Hence that code block is not accessible. It is intended to be set to True manually to enable debugging. There is another style used in Path that might be preferred to the style of which you speak here that does not upset LGTM.

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

コントリビューターガイド