Skip to content

Commit e4385b5

Browse files
author
Shane Wall
committed
Format validation system for CI
Apply gdformat to addons/hammerforge/systems/hf_validation_system.gd so the GitHub Actions formatting check matches the repository's enforced style without changing validation behavior.
1 parent e9430a1 commit e4385b5

1 file changed

Lines changed: 25 additions & 21 deletions

File tree

addons/hammerforge/systems/hf_validation_system.gd

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -370,15 +370,18 @@ func _check_non_planar_faces(brush: DraftBrush, issues: Array) -> void:
370370
if dev > max_deviation:
371371
max_deviation = dev
372372
if max_deviation > planarity_tolerance:
373-
issues.append({
374-
"type": "non_planar",
375-
"severity": 1,
376-
"message": (
377-
"Brush '%s' face %d has %.4f unit vertex drift (tolerance %.4f)"
378-
% [brush.name, face_idx, max_deviation, planarity_tolerance]
379-
),
380-
"node": brush
381-
})
373+
issues.append(
374+
{
375+
"type": "non_planar",
376+
"severity": 1,
377+
"message":
378+
(
379+
"Brush '%s' face %d has %.4f unit vertex drift (tolerance %.4f)"
380+
% [brush.name, face_idx, max_deviation, planarity_tolerance]
381+
),
382+
"node": brush
383+
}
384+
)
382385

383386

384387
# ---------------------------------------------------------------------------
@@ -428,15 +431,18 @@ func _check_micro_gaps(all_brushes: Array, issues: Array) -> void:
428431
flagged_pairs[pair_key] = flagged_pairs.get(pair_key, 0) + 1
429432
for pair_key: String in flagged_pairs:
430433
var count: int = flagged_pairs[pair_key]
431-
issues.append({
432-
"type": "micro_gap",
433-
"severity": 1,
434-
"message": (
435-
"Micro-gap: %d near-coincident vertex pair(s) between %s (weld tolerance %.4f)"
436-
% [count, pair_key, weld_tolerance]
437-
),
438-
"node": null
439-
})
434+
issues.append(
435+
{
436+
"type": "micro_gap",
437+
"severity": 1,
438+
"message":
439+
(
440+
"Micro-gap: %d near-coincident vertex pair(s) between %s (weld tolerance %.4f)"
441+
% [count, pair_key, weld_tolerance]
442+
),
443+
"node": null
444+
}
445+
)
440446

441447

442448
func _brush_pair_key(a: DraftBrush, b: DraftBrush) -> String:
@@ -568,7 +574,5 @@ func _cell_keys(v: Vector3, cell_size: float) -> Array:
568574
for dx in [-cell_size, 0.0, cell_size]:
569575
for dy in [-cell_size, 0.0, cell_size]:
570576
for dz in [-cell_size, 0.0, cell_size]:
571-
keys.append(
572-
"%s,%s,%s" % [cx + dx, cy + dy, cz + dz]
573-
)
577+
keys.append("%s,%s,%s" % [cx + dx, cy + dy, cz + dz])
574578
return keys

0 commit comments

Comments
 (0)