-
Notifications
You must be signed in to change notification settings - Fork 65
PSMDB-1786: fix formatting (v7.0) #1640
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
base: v7.0
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR applies automated code formatting fixes across the MongoDB codebase using clang_format, pylinters, and eslint tools to ensure consistent code style.
Key Changes:
- Formatting adjustments to C++ source and header files (spacing, indentation, line breaks)
- SCons build script formatting improvements (parameter alignment, line breaks)
- JavaScript formatting fixes (array formatting, spacing)
Reviewed changes
Copilot reviewed 173 out of 207 changed files in this pull request and generated 47 comments.
| File | Description |
|---|---|
| Various C++ files (.cpp/.h) | Applied clang_format for consistent spacing, indentation, and brace placement |
| SCons files (SConscript) | Reformatted function calls, parameter alignment, and removed trailing whitespace |
| JavaScript files (.js) | Fixed array formatting and spacing using eslint |
| Multiple source files | Reordered includes alphabetically and added proper namespace comments |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
igorsol
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems some files (http_client.h, exit_code.h) have formatting changes in parts which we didn't touch.
Not quite so. It was me who initially added the two functions to the $ git switch v7.0
$ git blame src/mongo/util/net/http_client.h
...
eeae160f3ae6 src/mongo/util/net/http_client.h (Konstantin Trushin 2025-06-17 16:36:09 +0400 173) static void enableLocalhostException() noexcept { _localhostExceptionEnabled = true; }
eeae160f3ae6 src/mongo/util/net/http_client.h (Konstantin Trushin 2025-06-17 16:36:09 +0400 174)
eeae160f3ae6 src/mongo/util/net/http_client.h (Konstantin Trushin 2025-06-17 16:36:09 +0400 175) static bool localhostExceptionEnabled() noexcept { return _localhostExceptionEnabled; }
...In $ git blame src/mongo/util/exit_code.h
...
c44db4ac9d0c (Matt Kneiser 2022-07-05 17:09:20 +0000 64) reservedBegin = 64, // FreeBSD uses this range. Avoiding to prevent confusion.
beb74254af99 (Igor Solodovnikov 2023-04-21 10:24:13 +0100 65) perconaAuditError = 70,
c44db4ac9d0c (Matt Kneiser 2022-07-05 17:09:20 +0000 66) reservedEnd = 78, // FreeBSD uses this range. Avoiding to prevent confusion.
...Line 65 broke the previously uninterrupted "flow" of end-of-the-line comments, which confuses the formatter. |
Fix formatting using: - `buildscripts/clang_format.py format` - `buildscripts/pylinters.py fix` - `buildscripts/pylinters.py fix-scons` - `buildscripts/eslint.py fix`
db75344 to
f8f9acb
Compare
|
All review comments addressed. |
Fix formatting using:
buildscripts/clang_format.py formatbuildscripts/pylinters.py fixbuildscripts/pylinters.py fix-sconsbuildscripts/eslint.py fix