Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Conversation

N-Dekker
Copy link
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
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"
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.

None yet

2 participants