Skip to content

STYLE: Add missing braces to the substatements of if statements#3875

Merged
dzenanz merged 1 commit intoInsightSoftwareConsortium:masterfrom
N-Dekker:Add-missing-braces-to-substatements
Jan 20, 2023
Merged

STYLE: Add missing braces to the substatements of if statements#3875
dzenanz merged 1 commit intoInsightSoftwareConsortium:masterfrom
N-Dekker:Add-missing-braces-to-substatements

Conversation

@N-Dekker
Copy link
Copy Markdown
Contributor

Ran Notepad++ v8.4.8, Replace in Files (Filter: itk*.h;itk*.hxx;itk*.cxx), using Regular expression:

Find what: ^  ([ ]*)(if \(.+\)\r\n)\1    ([^ {].*;)\r\n
Find what: ^  ([ ]*)(else\r\n)\1    ([^ {].*;)\r\n
Replace with: $1  $2$1  {\r\n$1    $3\r\n$1  }\r\n

Suggested by Jon Haitz Legarreta Gorroño (@jhlegarreta).

Aims to supersede pull request #3868 "STYLE: Use braces for single line conditional loop body statements"

Ran Notepad++ v8.4.8, Replace in Files (Filter: itk*.h;itk*.hxx;itk*.cxx),
using Regular expression:

    Find what: ^  ([ ]*)(if \(.+\)\r\n)\1    ([^ {].*;)\r\n
    Find what: ^  ([ ]*)(else\r\n)\1    ([^ {].*;)\r\n
    Replace with: $1  $2$1  {\r\n$1    $3\r\n$1  }\r\n

Suggested by Jon Haitz Legarreta Gorroño.
@github-actions github-actions Bot added area:Core Issues affecting the Core module area:Filtering Issues affecting the Filtering module area:IO Issues affecting the IO module area:Numerics Issues affecting the Numerics module area:Python wrapping Python bindings for a class area:Registration Issues affecting the Registration module area:Segmentation Issues affecting the Segmentation 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 labels Jan 19, 2023
Copy link
Copy Markdown
Member

@dzenanz dzenanz left a comment

Choose a reason for hiding this comment

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

Supersede it did 😄

@N-Dekker N-Dekker marked this pull request as ready for review January 19, 2023 22:48
@dzenanz dzenanz merged commit 8d12282 into InsightSoftwareConsortium:master Jan 20, 2023
N-Dekker added a commit to N-Dekker/ITK that referenced this pull request Jan 20, 2023
Ran Notepad++ v8.4.8, Replace in Files, using Regular expression:

    Find what: ^  ([ ]*)(for \(.+\)\r\n)\1    ([^ {].*;)\r\n
    Replace with: $1  $2$1  {\r\n$1    $3\r\n$1  }\r\n

Follow-up to pull request InsightSoftwareConsortium#3875
commit 8d12282
"STYLE: Add missing braces to the substatements of `if` statements"
dzenanz pushed a commit that referenced this pull request Jan 23, 2023
Ran Notepad++ v8.4.8, Replace in Files, using Regular expression:

    Find what: ^  ([ ]*)(for \(.+\)\r\n)\1    ([^ {].*;)\r\n
    Replace with: $1  $2$1  {\r\n$1    $3\r\n$1  }\r\n

Follow-up to pull request #3875
commit 8d12282
"STYLE: Add missing braces to the substatements of `if` statements"
hjmjohnson pushed a commit to hjmjohnson/ITK that referenced this pull request May 6, 2026
Ran Notepad++ v8.4.8, Replace in Files, using Regular expression:

    Find what: ^  ([ ]*)(for \(.+\)\r\n)\1    ([^ {].*;)\r\n
    Replace with: $1  $2$1  {\r\n$1    $3\r\n$1  }\r\n

Follow-up to pull request InsightSoftwareConsortium#3875
commit ff18ded
"STYLE: Add missing braces to the substatements of `if` statements"
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:Numerics Issues affecting the Numerics module area:Python wrapping Python bindings for a class area:Registration Issues affecting the Registration module area:Segmentation Issues affecting the Segmentation 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.

2 participants