Skip to content

Comments

Fix curly bracket formatting to follow project coding style#9

Merged
MatthijsBurgh merged 3 commits intobmm_ros_pkgfrom
copilot/fix-78e1f051-1fb5-4c22-be73-cd5a3d33ab13
Sep 18, 2025
Merged

Fix curly bracket formatting to follow project coding style#9
MatthijsBurgh merged 3 commits intobmm_ros_pkgfrom
copilot/fix-78e1f051-1fb5-4c22-be73-cd5a3d33ab13

Conversation

Copy link
Contributor

Copilot AI commented Sep 18, 2025

Updates all C++ files to use consistent curly bracket formatting where opening brackets appear on their own line for all functions, classes, structs, namespaces, loops, and conditionals.

Changes Made

Fixed bracket formatting in the following files:

  • include/bmm/bayesian_mixture_model.hpp
  • src/bayesian_mixture_model.cpp
  • src/variational_gmm.cpp
  • src/main.cpp
  • test/bmm_test.cpp

Before and After

Before (incorrect):

class MAPGMM {
public:
    void fit() {
        for (int i = 0; i < max_iter; i++) {
            if (condition) {
                // code
            }
        }
    }
};

After (correct):

class MAPGMM
{
public:
    void fit()
    {
        for (int i = 0; i < max_iter; i++)
        {
            if (condition)
            {
                // code
            }
        }
    }
};

Impact

  • No functional changes - only bracket placement was modified
  • Improved code consistency across the entire codebase
  • Better adherence to project coding standards

All existing logic, functionality, and behavior remains unchanged. This is purely a formatting improvement to ensure consistent style throughout the C++ codebase.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • esm.ubuntu.com
    • Triggering command: /usr/lib/apt/methods/https (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

This pull request was created as a result of the following prompt from Copilot chat.

Update all attached files so that every curly bracket opens and closes on its own line according to the following style:

Correct:
if (true)
{
// code
}
class X
{
// code
}

Incorrect:
if (true) {
// code
}
class X {
// code
}

This applies to all files referenced in the attached diff: test/bmm_test.cpp, src/variational_gmm.cpp, src/main.cpp, src/bayesian_mixture_model.cpp, and include/bmm/bayesian_mixture_model.hpp. Ensure this coding style is used consistently for all namespaces, functions, classes, loops, and conditionals. Do not change any logic or formatting other than bracket placement.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI changed the title [WIP] Enforce Allman-style bracket placement for all attached files Fix curly bracket formatting to follow project coding style Sep 18, 2025
Copilot AI requested a review from MatthijsBurgh September 18, 2025 06:23
@MatthijsBurgh MatthijsBurgh changed the base branch from master to bmm_ros_pkg September 18, 2025 06:33
Copilot AI and others added 3 commits September 18, 2025 08:35
Co-authored-by: MatthijsBurgh <18014833+MatthijsBurgh@users.noreply.github.com>
Co-authored-by: MatthijsBurgh <18014833+MatthijsBurgh@users.noreply.github.com>
@MatthijsBurgh MatthijsBurgh force-pushed the copilot/fix-78e1f051-1fb5-4c22-be73-cd5a3d33ab13 branch from 8940f2d to d0bf9d8 Compare September 18, 2025 06:36
@MatthijsBurgh MatthijsBurgh marked this pull request as ready for review September 18, 2025 06:37
@MatthijsBurgh MatthijsBurgh merged commit 87559fe into bmm_ros_pkg Sep 18, 2025
2 checks passed
@MatthijsBurgh MatthijsBurgh deleted the copilot/fix-78e1f051-1fb5-4c22-be73-cd5a3d33ab13 branch September 18, 2025 06:50
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