Add braces around single-line control flow statements (#5090)#5090
Open
Add braces around single-line control flow statements (#5090)#5090
Conversation
a9416d5 to
89e814e
Compare
89e814e to
29c5ac4
Compare
Contributor
|
@junjieqi has exported this pull request. If you are a Meta employee, you can view the originating Diff in D100580151. |
29c5ac4 to
b030b7a
Compare
meta-codesync bot
pushed a commit
that referenced
this pull request
Apr 13, 2026
Summary: Fix 136 `readability-braces-around-statements` lint warnings by adding braces to all single-line `if`, `else`, `for`, and `while` statements across 4 files: `IndexLSH.cpp` (14 issues), `IndexIVFPQ.cpp` (36 issues), `IndexPQ.cpp` (25 issues), and `VectorTransform.cpp` (61 issues). This improves code readability and prevents bugs from accidentally adding statements to unbraced blocks. Reviewed By: mnorris11 Differential Revision: D100580151
junjieqi
added a commit
that referenced
this pull request
Apr 13, 2026
Summary: Pull Request resolved: #5090 Fix 136 `readability-braces-around-statements` lint warnings by adding braces to all single-line `if`, `else`, `for`, and `while` statements across 4 files: `IndexLSH.cpp` (14 issues), `IndexIVFPQ.cpp` (36 issues), `IndexPQ.cpp` (25 issues), and `VectorTransform.cpp` (61 issues). This improves code readability and prevents bugs from accidentally adding statements to unbraced blocks. Reviewed By: mnorris11 Differential Revision: D100580151
b030b7a to
7a2ba97
Compare
junjieqi
added a commit
that referenced
this pull request
Apr 13, 2026
Summary: Pull Request resolved: #5090 Fix 136 `readability-braces-around-statements` lint warnings by adding braces to all single-line `if`, `else`, `for`, and `while` statements across 4 files: `IndexLSH.cpp` (14 issues), `IndexIVFPQ.cpp` (36 issues), `IndexPQ.cpp` (25 issues), and `VectorTransform.cpp` (61 issues). This improves code readability and prevents bugs from accidentally adding statements to unbraced blocks. Reviewed By: mnorris11 Differential Revision: D100580151
7a2ba97 to
ced71ce
Compare
meta-codesync bot
pushed a commit
that referenced
this pull request
Apr 13, 2026
Summary: Fix 136 `readability-braces-around-statements` lint warnings by adding braces to all single-line `if`, `else`, `for`, and `while` statements across 4 files: `IndexLSH.cpp` (14 issues), `IndexIVFPQ.cpp` (36 issues), `IndexPQ.cpp` (25 issues), and `VectorTransform.cpp` (61 issues). This improves code readability and prevents bugs from accidentally adding statements to unbraced blocks. Reviewed By: mnorris11 Differential Revision: D100580151
ced71ce to
1dd24f6
Compare
junjieqi
added a commit
that referenced
this pull request
Apr 13, 2026
Summary: Pull Request resolved: #5090 Fix 136 `readability-braces-around-statements` lint warnings by adding braces to all single-line `if`, `else`, `for`, and `while` statements across 4 files: `IndexLSH.cpp` (14 issues), `IndexIVFPQ.cpp` (36 issues), `IndexPQ.cpp` (25 issues), and `VectorTransform.cpp` (61 issues). This improves code readability and prevents bugs from accidentally adding statements to unbraced blocks. Reviewed By: mnorris11 Differential Revision: D100580151
1dd24f6 to
57e359a
Compare
meta-codesync bot
pushed a commit
that referenced
this pull request
Apr 13, 2026
Summary: Fix 136 `readability-braces-around-statements` lint warnings by adding braces to all single-line `if`, `else`, `for`, and `while` statements across 4 files: `IndexLSH.cpp` (14 issues), `IndexIVFPQ.cpp` (36 issues), `IndexPQ.cpp` (25 issues), and `VectorTransform.cpp` (61 issues). This improves code readability and prevents bugs from accidentally adding statements to unbraced blocks. Reviewed By: mnorris11 Differential Revision: D100580151
57e359a to
a7b25ce
Compare
meta-codesync bot
pushed a commit
that referenced
this pull request
Apr 13, 2026
Summary: Fix 136 `readability-braces-around-statements` lint warnings by adding braces to all single-line `if`, `else`, `for`, and `while` statements across 4 files: `IndexLSH.cpp` (14 issues), `IndexIVFPQ.cpp` (36 issues), `IndexPQ.cpp` (25 issues), and `VectorTransform.cpp` (61 issues). This improves code readability and prevents bugs from accidentally adding statements to unbraced blocks. Reviewed By: mnorris11 Differential Revision: D100580151
a7b25ce to
640fe8f
Compare
junjieqi
added a commit
that referenced
this pull request
Apr 13, 2026
Summary: Pull Request resolved: #5090 Fix 136 `readability-braces-around-statements` lint warnings by adding braces to all single-line `if`, `else`, `for`, and `while` statements across 4 files: `IndexLSH.cpp` (14 issues), `IndexIVFPQ.cpp` (36 issues), `IndexPQ.cpp` (25 issues), and `VectorTransform.cpp` (61 issues). This improves code readability and prevents bugs from accidentally adding statements to unbraced blocks. Reviewed By: mnorris11 Differential Revision: D100580151
640fe8f to
367fafb
Compare
junjieqi
added a commit
that referenced
this pull request
Apr 13, 2026
Summary: Pull Request resolved: #5090 Fix 136 `readability-braces-around-statements` lint warnings by adding braces to all single-line `if`, `else`, `for`, and `while` statements across 4 files: `IndexLSH.cpp` (14 issues), `IndexIVFPQ.cpp` (36 issues), `IndexPQ.cpp` (25 issues), and `VectorTransform.cpp` (61 issues). This improves code readability and prevents bugs from accidentally adding statements to unbraced blocks. Reviewed By: mnorris11 Differential Revision: D100580151
367fafb to
8f2f1e6
Compare
Summary:
Fix 59 `cppcoreguidelines-pro-type-member-init` lint warnings by adding `{}` value-initialization to uninitialized member fields across 17 files. This ensures all members are zero/null-initialized by default, preventing potential use of uninitialized values.
Affected files: Index.cpp, Index2Layer.cpp, IndexAdditiveQuantizer.cpp, IndexAdditiveQuantizerFastScan.h, IndexBinaryHash.h, IndexBinaryIVF.cpp, IndexFastScan.h, IndexHNSW.h, IndexIVF.h, IndexIVFAdditiveQuantizer.cpp, IndexIVFFastScan.h, IndexIVFFlat.h, IndexIVFPQ.cpp, IndexIVFPQ.h, IndexPQ.cpp, IndexPQ.h, IndexRowwiseMinMax.cpp.
Reviewed By: mnorris11
Differential Revision: D100577736
Summary: Fix 136 `readability-braces-around-statements` lint warnings by adding braces to all single-line `if`, `else`, `for`, and `while` statements across 4 files: `IndexLSH.cpp` (14 issues), `IndexIVFPQ.cpp` (36 issues), `IndexPQ.cpp` (25 issues), and `VectorTransform.cpp` (61 issues). This improves code readability and prevents bugs from accidentally adding statements to unbraced blocks. Reviewed By: mnorris11 Differential Revision: D100580151
8f2f1e6 to
abb3092
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Fix 136
readability-braces-around-statementslint warnings by adding braces to all single-lineif,else,for, andwhilestatements across 4 files:IndexLSH.cpp(14 issues),IndexIVFPQ.cpp(36 issues),IndexPQ.cpp(25 issues), andVectorTransform.cpp(61 issues). This improves code readability and prevents bugs from accidentally adding statements to unbraced blocks.Reviewed By: mnorris11
Differential Revision: D100580151