Skip to content

formatting#237

Open
0dm wants to merge 4 commits into
mainfrom
formatting
Open

formatting#237
0dm wants to merge 4 commits into
mainfrom
formatting

Conversation

@0dm
Copy link
Copy Markdown
Collaborator

@0dm 0dm commented Mar 18, 2026

image

Copilot AI review requested due to automatic review settings March 18, 2026 16:52
@0dm 0dm changed the title format, clang formatting Mar 18, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 standardizes C/C++ formatting across the codebase via clang-format and applies widespread reformatting/cleanup (includes ordering, brace/indent style, line wrapping), plus adds a build target to run formatting over tracked sources.

Changes:

  • Added a repository-wide .clang-format configuration and a CMake format target.
  • Reflowed/normalized formatting across many .cpp/.hpp files (indentation, line breaks, namespace closing comments, include ordering).
  • Minor readability refactors (expanded one-line methods/conditionals, wrapped long calls/initializers).

Reviewed changes

Copilot reviewed 164 out of 168 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/physics/SphereCollider.cpp Formatting/wrapping of method signature.
src/modelviewer.cpp Include order + formatting of ctor and long call sites.
src/modeltest.cpp Formatting of switches and output streaming.
src/main.cpp Include order formatting.
src/launcher/optionParser.cpp Reflow of Boost program_options configuration.
src/editor/panels/ViewportPanel.cpp Formatting and line wrapping for ImGui calls.
src/editor/panels/SceneHierarchyPanel.cpp Formatting for ImGui menu/popup logic and wrapping.
src/editor/panels/AssetBrowserPanel.cpp Formatting, wrapping, and minor layout changes.
src/editor/gizmos/TranslateGizmo.cpp Formatting/wrapping of method signatures and early returns.
src/editor/gizmos/ScaleGizmo.cpp Formatting + reflow of static arrays and signatures.
src/editor/gizmos/RotateGizmo.cpp Formatting + wrapping of math-heavy loops and conditionals.
src/editor/gizmos/GizmoRenderer.cpp Formatting (ctor, render path, early returns).
src/editor/SelectionManager.cpp Include order formatting.
src/editor/EditorCamera.cpp Include order + wrapping of long method signature.
src/app/ui/Window.cpp Formatting; adds namespace closing comment.
src/app/ui/TreeNode.cpp Formatting; adds namespace closing comment.
src/app/ui/Tooltip.cpp Formatting + namespace style normalization.
src/app/ui/TextWrapped.cpp Formatting + namespace closing comment.
src/app/ui/TextColored.cpp Formatting + namespace closing comment.
src/app/ui/Text.cpp Include order + formatting.
src/app/ui/Spacing.cpp Formatting + namespace closing comment.
src/app/ui/SliderAngle.cpp Formatting + wrapped ImGui call.
src/app/ui/Separator.cpp Formatting + namespace closing comment.
src/app/ui/SameLine.cpp Formatting + namespace closing comment.
src/app/ui/RadioButton.cpp Include order + formatting + namespace closing comment.
src/app/ui/ProgressBar.cpp Formatting + namespace style normalization.
src/app/ui/PlotLines.cpp Formatting + namespace style normalization.
src/app/ui/PlotHistogram.cpp Formatting + namespace style normalization.
src/app/ui/LabelText.cpp Include order + formatting + namespace closing comment.
src/app/ui/ImageButton.cpp Include order + formatting + namespace closing comment.
src/app/ui/Image.cpp Include order + formatting + namespace closing comment.
src/app/ui/ImGuiComponentManager.cpp Include order + namespace closing comment.
src/app/ui/Group.cpp Formatting + namespace closing comment.
src/app/ui/CustomTooltip.cpp Formatting + namespace style normalization.
src/app/ui/Columns.cpp Formatting + namespace closing comment.
src/app/ui/CollapsingHeader.cpp Formatting + early-return wrapping + namespace closing comment.
src/app/ui/ChildWindow.cpp Formatting + namespace closing comment.
src/app/ui/Checkbox.cpp Include order + formatting + namespace closing comment.
src/app/ui/Button.cpp Include order + formatting + namespace closing comment.
src/app/ui/BulletText.cpp Include order + formatting + namespace closing comment.
src/app/physics/constraints/StretchConstraint.cpp Formatting + early-return wrapping.
src/app/physics/constraints/BendConstraint.cpp Formatting + early-return wrapping + wrapped expression.
src/app/modeling/Transform.cpp Formatting of initializer lists and signatures.
src/app/modeling/TextureCache.cpp Include order + formatting/wrapping.
src/app/modeling/Texture.cpp Include order + formatting/wrapping + error message line wrap.
src/app/modeling/ModelNode.cpp Formatting + wrapped method signature.
src/app/modeling/Model.cpp Formatting + wrapped method signature.
src/app/modeling/Mesh.cpp Include order + formatting + wrapped Vulkan upload code.
src/app/modeling/Material.cpp Include order + formatting + wrapped Vulkan descriptor writes.
src/app/components/TransformComponent.cpp Formatting only.
src/app/components/RigidBodyComponent.cpp Formatting/wrapping of long expression.
src/app/components/PointLightComponent.cpp Formatting of ctors and initializer lists.
src/app/components/MeshRendererComponent.cpp Formatting of ctors/initializer lists.
src/app/components/DirectionalLightComponent.cpp Formatting + wrapped assignment.
src/app/Settings.cpp Include order + formatting of JSON key parsing.
src/app/Scene.cpp Include order + formatting/wrapping of GLTF load routines.
src/app/Log.cpp Formatting of early-return checks.
src/app/ImGuiRenderer.cpp Formatting of pool sizes and submit/begin structs.
include/physics/constraints/StretchConstraint.hpp Formatting + namespace closing comment.
include/physics/constraints/Constraint.hpp Formatting + expanded resetLambda + namespace closing comment.
include/physics/constraints/CollisionConstraint.hpp Formatting + wrapped quaternion/orientation updates + namespace closing comment.
include/physics/constraints/BendConstraint.hpp Formatting + namespace closing comment.
include/physics/XPBD.hpp Formatting + wrapped function signatures.
include/physics/Vertex.hpp Formatting + namespace closing comment.
include/physics/SphereCollider.hpp Formatting/wrapping + namespace closing comment.
include/physics/SphereBVH.hpp Include order + formatting + namespace closing comment.
include/physics/ContactInfo.hpp Formatting of ctor signature/initializer list + namespace closing comment.
include/physics/Collider.hpp Formatting/wrapping + namespace closing comment.
include/physics/BVH.hpp Formatting/wrapping + namespace closing comment.
include/launcher/optionParser.hpp Include order + formatting of default ctor.
include/editor/panels/ViewportPanel.hpp Expanded inline getters/setters formatting.
include/editor/panels/InspectorPanel.hpp Include order + namespace close comment + wrapped signature.
include/editor/panels/EditorPanel.hpp Expanded inline methods formatting.
include/editor/gizmos/TranslateGizmo.hpp Expanded inline method formatting + wrapped signatures.
include/editor/gizmos/ScaleGizmo.hpp Expanded inline method formatting + wrapped signatures.
include/editor/gizmos/RotateGizmo.hpp Expanded inline method formatting + wrapped signatures.
include/editor/gizmos/GizmoRenderer.hpp Include order + expanded getters + wrapped render signature.
include/editor/gizmos/Gizmo.hpp Enum formatting + wrapped pure virtuals + wrapped helpers.
include/editor/SelectionManager.hpp Expanded inline methods formatting.
include/editor/OffscreenFramebuffer.hpp Include order + expanded inline methods + wrapped calls.
include/editor/EditorCamera.hpp Expanded inline methods + enum formatting + namespace close comment.
include/editor/EditorApp.hpp Include order + expanded inline methods + enum formatting + wrapped signatures.
include/editor/AABB.hpp Include order + formatting/wrapping in helpers.
include/app/ui/components/Window.hpp Include order + expanded inline methods + namespace close comment.
include/app/ui/components/TreeNode.hpp Include order + expanded inline methods + namespace close comment.
include/app/ui/components/Tooltip.hpp Namespace/style normalization + include order + namespace close comment.
include/app/ui/components/TextWrapped.hpp Formatting + namespace close comment.
include/app/ui/components/TextColored.hpp Formatting + namespace close comment.
include/app/ui/components/Text.hpp Formatting + namespace close comment.
include/app/ui/components/Spacing.hpp Expanded inline methods + namespace close comment.
include/app/ui/components/SliderInt.hpp Formatting for template + expanded setters + namespace close comment.
include/app/ui/components/SliderFloat.hpp Formatting for template + expanded setters + namespace close comment.
include/app/ui/components/SliderAngle.hpp Include order + expanded setter + namespace close comment.
include/app/ui/components/SettingsWindow.hpp Include order + early return formatting.
include/app/ui/components/Separator.hpp Namespace close comment.
include/app/ui/components/SameLine.hpp Wrapped ctor + expanded setters + namespace close comment.
include/app/ui/components/RadioButton.hpp Wrapped ctor signature + namespace close comment.
include/app/ui/components/ProgressBar.hpp Namespace/style normalization + namespace close comment.
include/app/ui/components/PlotLines.hpp Namespace/style normalization + include order + namespace close comment.
include/app/ui/components/PlotHistogram.hpp Namespace/style normalization + include order + namespace close comment.
include/app/ui/components/LabelText.hpp Formatting + namespace close comment.
include/app/ui/components/Input.hpp Formatting + concepts wrapped + namespace close comment.
include/app/ui/components/ImageButton.hpp Wrapped ctor + expanded setter + namespace close comment.
include/app/ui/components/Image.hpp Expanded setters + namespace close comment.
include/app/ui/components/HelloWorldWindow.hpp Formatting + namespace close comment.
include/app/ui/components/Group.hpp Expanded setter + namespace close comment.
include/app/ui/components/DragInt.hpp Formatting for template + expanded setters + namespace close comment.
include/app/ui/components/DragFloat.hpp Formatting for template + expanded setters + namespace close comment.
include/app/ui/components/DebugStatsWindow.hpp Formatting + namespace close comment.
include/app/ui/components/CustomTooltip.hpp Namespace/style normalization + include order + namespace close comment.
include/app/ui/components/Columns.hpp Expanded inline methods + namespace close comment.
include/app/ui/components/CollapsingHeader.hpp Expanded inline methods + namespace close comment.
include/app/ui/components/ChildWindow.hpp Expanded setters + namespace close comment.
include/app/ui/components/Checkbox.hpp Wrapped ctor signature + namespace close comment.
include/app/ui/components/Button.hpp Include order + namespace close comment.
include/app/ui/components/BulletText.hpp Formatting + namespace close comment.
include/app/ui/ImGuiComponentManager.hpp Include order + namespace close comment.
include/app/ui/ImGuiComponent.hpp Expanded inline methods + namespace close comment.
include/app/modeling/Transform.hpp Wrapped ctor + expanded getters.
include/app/modeling/TextureCache.hpp Wrapped method signature + expanded getter.
include/app/modeling/Texture.hpp Include order + expanded getters + wrapped Vulkan init signature.
include/app/modeling/PropertyValue.hpp Include order formatting.
include/app/modeling/ModelNode.hpp Include order + expanded getters/setters + enum formatting.
include/app/modeling/Model.hpp Include order + expanded getters/setters + wrapped Vulkan init/draw signatures.
include/app/modeling/Mesh.hpp Include order + expanded getters + wrapped Vulkan init signature.
include/app/modeling/Material.hpp Include order + expanded getters + wrapped Vulkan init signature.
include/app/modeling/GLTFLoader.hpp Include order + expanded getters/setters + wrapped signatures + namespace close comments.
include/app/modeling/GLTFExporter.hpp Expanded getters/setters + wrapped helper signature.
include/app/components/TransformComponent.hpp Expanded getters/setters + expanded convenience methods.
include/app/components/RigidBodyComponent.hpp Formatting + expanded getters/setters + namespace close comment.
include/app/components/PointLightComponent.hpp Wrapped static_assert + expanded getters/setters + formatted setAttenuation.
include/app/components/MeshRendererComponent.hpp Expanded getters/setters.
include/app/components/LightComponent.hpp Wrapped static_assert + expanded getters/setters.
include/app/components/DirectionalLightComponent.hpp Expanded getters/setters.
include/app/Vertex.hpp Formatting of attribute descriptions + namespace close comment.
include/app/SwapChain.hpp Formatting/wrapping of Vulkan setup and helpers + namespace close comment.
include/app/Settings.hpp Expanded getters/setter + include order.
include/app/Scene.hpp Include order + expanded getters + wrapped helper signature + namespace close comment.
include/app/SauceEngineApp.hpp Include order + expanded getters/setters + namespace close comment.
include/app/RenderSurface.hpp Formatting + wrapped error construction + namespace close comment.
include/app/PhysicalDevice.hpp Formatting/wrapping in device selection + namespace close comment.
include/app/ModelViewerRenderer.hpp Expanded inline getters + wrapped signatures + namespace close comment.
include/app/LogicalDevice.hpp Formatting/wrapping of device creation + namespace close comment.
include/app/Log.hpp Include order + wrapped template methods + macro formatting.
include/app/Instance.hpp Formatting/wrapping + validation checks readability + namespace close comment.
include/app/ImageUtils.hpp Formatting/wrapping of helpers + namespace close comment.
include/app/ImGuiRenderer.hpp Include order formatting.
include/app/IBLGenerator.hpp Wrapped signatures for generator steps.
include/app/Entity.hpp Include order + expanded methods + template formatting + namespace close comment.
include/app/Component.hpp Namespace/style normalization + expanded methods + namespace close comment.
include/app/Camera.hpp Formatting of ctor + expanded getters/setters + wrapped clamp call + namespace close comment.
include/app/BufferUtils.hpp Formatting/wrapping of Vulkan helpers + namespace close comment.
CMakeLists.txt Adds format target that runs clang-format over tracked C/C++ files.
.clang-format New clang-format configuration file.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread include/app/Component.hpp
Comment thread include/app/Component.hpp
Comment thread include/physics/XPBD.hpp
Comment thread include/physics/constraints/BendConstraint.hpp
Comment thread include/app/PhysicalDevice.hpp
Comment thread src/editor/panels/AssetBrowserPanel.cpp
Comment thread CMakeLists.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants