Skip to content

STYLE: remove redundant control fllow#5835

Merged
hjmjohnson merged 1 commit intomainfrom
apply-clang-tidy-int-rules
Feb 26, 2026
Merged

STYLE: remove redundant control fllow#5835
hjmjohnson merged 1 commit intomainfrom
apply-clang-tidy-int-rules

Conversation

@hjmjohnson
Copy link
Copy Markdown
Member

The clang-tidy check readability-redundant-control-flow looks for procedures
(functions returning no value) with return statements at the end of the
function. Such return statements are redundant.

Loop statements (for, while, do while) are checked for redundant continue
statements at the end of the loop body.

PR Checklist

@github-actions github-actions Bot added type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct area:Core Issues affecting the Core module area:Filtering Issues affecting the Filtering module area:IO Issues affecting the IO module area:Registration Issues affecting the Registration module type:Style Style changes: no logic impact (indentation, comments, naming) labels Feb 25, 2026
Copy link
Copy Markdown
Contributor

@N-Dekker N-Dekker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Hans!

Just a nitpick: the subject of the commit message, "STYLE: remove redundant control fllow" has a redundant letter l in "fllow". The commit text suggests that continue might also be removed, but that's not the case. The commit only removes return statements. So I would prefer a commit subject line like:

STYLE: Remove redundant `return;` statements

Just a suggestion, not a show-stopper.

The clang-tidy check readability-redundant-control-flow looks for procedures
(functions returning no value) with return statements at the end of the
function. Such return statements are redundant.
@hjmjohnson hjmjohnson force-pushed the apply-clang-tidy-int-rules branch from b17a363 to 18d4d48 Compare February 26, 2026 13:46
@hjmjohnson hjmjohnson merged commit b109573 into main Feb 26, 2026
11 of 17 checks passed
@hjmjohnson hjmjohnson deleted the apply-clang-tidy-int-rules branch February 26, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Core Issues affecting the Core module area:Filtering Issues affecting the Filtering module area:IO Issues affecting the IO module area:Registration Issues affecting the Registration module type:Style Style changes: no logic impact (indentation, comments, naming) type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants