Yes, this is a norm.  KiCad's code style is not 100% representable in
clang-format, and we also have a policy of not doing bulk-reformatting of
files.

Make sure to configure your editor to not reformat lines that you didn't
edit, and you should be OK.
Personally I turn off auto-reformatting, and only use the "manually
reformat selected block" function when I need it.

-Jon

On Tue, Feb 13, 2024 at 8:44 AM achary <[email protected]> wrote:

> Hi,
> Few days ago I've cloned KiCcad source code and wanted to experiment with
> small improvements to the PDF plotting in pcbnew.
>
> After setting the development environment (Ubuntu 22.04, clang-format-14)
> I've discovered even a simple re-formating of an unmodified
> `pcbnew/dialogs/dialog_plot.cpp` with clang-format, using the project's
> `_clang-format` spec file leads to a massive diff. Line wraps, indenting,
> white spaces, alignments for comment etc. Pretty large, to be honest. Much
> above the small cosmetic preferences mentioned in the code style policy. Tu
> put it into perspective: git diff --stat for that single file alone
> reported 185 insertions, 197 deletions.
>
> So my question goes: Is my setup somehow non-conforming (like maybe
> clang-format-14 is perhaps too old or so), or is it the KiCad code base
> that in places like that does not adhere to what the `_clang-format` spec
> actually does define at present? Is this a norm?
>
> regards,
> Adam
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "KiCad Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/a/kicad.org/d/msgid/devlist/66a89028-7e38-49c7-be66-52d15ebd16fdn%40kicad.org
> <https://groups.google.com/a/kicad.org/d/msgid/devlist/66a89028-7e38-49c7-be66-52d15ebd16fdn%40kicad.org?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"KiCad Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/kicad.org/d/msgid/devlist/CA%2BqGbCBboncpE1mq_OFQBtNgu322YDsKVYyMMPtjCun37zCWcw%40mail.gmail.com.

Reply via email to