I have a c++ builder project.
In this project I need to verifiy code formatting using clang-format-12.
When I run format on save in windows part (clang-format version 12.0.1 (git@ngnu:llvm-project e904e87151344c417b7cb6da3e125febfc395e53)) __published
access modifier is indented as I want (using AccessModifierOffset: -4
).
In a jenkins server I have construct a linux docker with clang-fromat-12 (Debian clang-format version 12.0.1-++20211216045758+fed41342a82f-1~exp1~20211216170241.12).
When I run clang-format-12 in this linux docker to verify code formatting it say me that the code is not well formatted.
To see difference I auto-fromat the code with my docker, after windows clang-format the code is :
class TFormFilesAsk : public TForm
{
__published: // Composants gérés par l'EDI
TPanel *Panel1;
TLabel *LabelFile1;
TPanel *PanelFileNameEdition1;
and at the end of linux docker clang format the code became :
class TFormFilesAsk : public TForm
{
__published : // Composants gérés par l'EDI
TPanel *Panel1;
TLabel *LabelFile1;
TPanel *PanelFileNameEdition1;
I think it is because the __published
access modifier is not recognized but only in linux part. Any one as an idea of any setting in clang-format
I have tried to change my linux docker to a windows docker with clang-format but without sucess…