Skip to content

Conversation

dolmen
Copy link
Collaborator

@dolmen dolmen commented Jun 5, 2025

Summary

Refactor handling of stats in suite.Run with the goal of reducing indented blocks to improve readability.

Changes

The SuiteInformation methods now handle being called with a nil receiver to work as no-op. This allows to call them from suite.Run without nil checks blocks, so with improved readability thanks to the removal of indented blocks.

Motivation

Improve readability of suite.Run.

Related issues

N/A

@dolmen dolmen added pkg-suite Change related to package testify/suite internal/refactor Refactor internals with no external visible changes internal/cleanup Internal change to ease maintenance without external impact labels Jun 5, 2025
@dolmen dolmen self-assigned this Jun 16, 2025
@dolmen
Copy link
Collaborator Author

dolmen commented Jun 16, 2025

@renzoarreaza Could you review this change? I'm asking you as you recently had a look at suite internals.

@dolmen dolmen force-pushed the dolmen/suite-refactor-stats-for-readability branch from 888850d to fc6b3ea Compare June 16, 2025 14:37
@renzoarreaza
Copy link
Contributor

@renzoarreaza Could you review this change? I'm asking you as you recently had a look at suite internals.

Looks good!

Refactor handling of stats in suite.Run with the goal of reducing
indented blocks to improve readability.

To achieve this, the SuiteInformation methods now handle being called
with a nil receiver to work as noop. This allows to call them from
suite.Run without nil checks blocks, so with improved readability.
@dolmen dolmen force-pushed the dolmen/suite-refactor-stats-for-readability branch from fc6b3ea to 87101a6 Compare June 30, 2025 16:06
@dolmen dolmen merged commit c58bc90 into master Jun 30, 2025
16 checks passed
@dolmen dolmen deleted the dolmen/suite-refactor-stats-for-readability branch June 30, 2025 16:08
apricote pushed a commit to hetznercloud/fleeting-plugin-hetzner that referenced this pull request Aug 27, 2025