CAM: Make conditional debug code uniform throughout the CAM WB code
#6,835 创建于 2022年5月5日
仓库指标
- 星标
- (30,913 个星标)
- PR 合并指标
- (平均合并 24天 7小时) (30 天内合并 217 个 PR)
描述
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
Falsenever will evaluate asTrue. 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