Skip to content

Conversation

@Danipiza
Copy link
Contributor

TODO

  • nl_func_def_start | nl_func_def_start_single
// Add or remove newline after '(' in a function definition.
//nl_func_def_start               = ignore      // original -> add
// Overrides nl_func_def_start when there is only one parameter.
//nl_func_def_start_single        = ignore      // original -> add

// -- CHANGES --

// DOES NOT CHANGE
RemoteInvalidArgumentError()
    : RemoteInvalidArgumentError("The value of a parameter passed has an illegal value")
{
}

// ALSO DOES NOT CHANGE
RemoteInvalidArgumentError(const char* msg)
    : RpcRemoteException(RemoteExceptionCode_t::REMOTE_EX_INVALID_ARGUMENT, msg)
{
}

// SHOULD BE
RemoteInvalidArgumentError(
        const char* msg)
    : RpcRemoteException(RemoteExceptionCode_t::REMOTE_EX_INVALID_ARGUMENT, msg)
{
}

CHECKED

  • sp_inside_angle
//sp_inside_angle                 = remove

// -- CHANGES --

// Original
template < typename  CommandEnum >

template <typename CommandEnum>
// Original
bool CommandReader< CommandEnum  >();
// Uncrustify
bool CommandReader<CommandEnum>();
  • sp_before_angle
//sp_before_angle                 = remove

// -- CHANGES --
// Original
template <typename CommandEnum>
// Uncrustify
template<typename CommandEnum>
// Original
bool CommandReader <CommandEnum>()
// Uncrustify
bool CommandReader<CommandEnum>()
  • sp_inside_angle_empty
//sp_inside_angle_empty           = remove

// -- CHANGES --
<  > -> <>
  • sp_before_dc | sp_after_dc
//sp_before_dc                    = remove
//sp_after_dc                     = remove

// -- CHANGES --
// Original
bool CommandReader<CommandEnum> :: read_next_command()
// Uncrustify
bool CommandReader<CommandEnum>::read_next_command()
  • nl_after_brace_close
//nl_after_brace_close            = true     // true/false


// -- CHANGES --

// DOES NOT CHANGE
#define MACRO_BAD_BLOCK(a) if (a){ std::puts("yes"); } else { std::puts("no"); }

// Original
#define MACRO_BAD_BLOCK(a) if (a){ std::puts("yes"); }
    else { std::puts("no"); }

// Uncrustify
#define MACRO_BAD_BLOCK(a) if (a){ std::puts("yes"); }
else
{
    std::puts("no");
}


// Originals
if()
{
    x=1;
} else if()
{
    x=10;
}

if(){ x = 1;}else if (){x = 10;}

// Uncrustify
if ()
{
    x = 1;
}
else if ()
{
    x = 10;
}
  • nl_after_brace_open
//nl_after_brace_open             = false     # true/false

// -- CHANGES --

// DOES NOT CHANGE
enum   class  Color:std::uint8_t { Red=1, Green=2, Blue=3 };

// Original
enum   class  Color:std::uint8_t {
    Red=1, Green=2, Blue=3 };

// Uncrustify
enum   class  Color:std::uint8_t
{
    Red=1, Green=2, Blue=3
};

// Original
if(){

}

// Uncrustify
if()
{

}

// Original
RemoteInvalidArgumentError()
    : RemoteInvalidArgumentError("The value of a parameter passed has an illegal value"){
}

// Uncrustify
RemoteInvalidArgumentError()
    : RemoteInvalidArgumentError("The value of a parameter passed has an illegal value")
{
}

…crustify.cfg'

Signed-off-by: danipiza <dpizarrogallego@gmail.com>
@Danipiza Danipiza changed the title [#24079] Added map for other c++ files and changed some values in 'un… [#24079] Update uncrustify.cfg to keep the same style in all repos Jan 23, 2026
@Danipiza Danipiza changed the title [#24079] Update uncrustify.cfg to keep the same style in all repos [#24079] Update 'uncrustify.cfg' to keep the same style in all repos Jan 23, 2026
@Danipiza Danipiza changed the title [#24079] Update 'uncrustify.cfg' to keep the same style in all repos [#24079] Update uncrustify.cfg to keep the same style in all repos Jan 23, 2026
@Danipiza Danipiza changed the title [#24079] Update uncrustify.cfg to keep the same style in all repos [#24079] Update uncrustify.cfg to keep the same style in all repos Jan 23, 2026
@Danipiza Danipiza changed the title [#24079] Update uncrustify.cfg to keep the same style in all repos [#24079] Update uncrustify.cfg to keep the same style in all repos Jan 23, 2026
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