Introduce a .clang-format configuration file to enforce consistent code formatting across the project. This configuration is based on the wxWidgets coding style and will enable automatic code formatting with clang-format.
The configuration enforces the following key formatting rules:
This will help maintain consistent code style across contributors and reduce manual formatting effort during code reviews. Developers can now use clang-format to automatically format their code according to project standards.
https://github.com/wxWidgets/wxWidgets/pull/25942
(1 file)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Sorry, I'm against it. We may discuss this more on wx-dev, but I have 2 problems:
We could probably live with (2), but (1) is just a too high price to pay IMO.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Do you have an alternative tool? it's hard to follow wxWidgets coding style :), I saw .editorconfig in the root folder but it seems no relevant. What tool do you use? (if you use one at all...)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
I would like to contribute more, but I don't like iterating PRs because of coding style ...
For example in the recent wxStyledTextCtrlMinMap - I want to add a constructor that allows the caller to control the "mini-map" size, i.e. I would like to add another constructor (or modify the current one) so I can pass: pos, size, style etc). Adding such a long constructor got me thinking: do I need to place each param on a line of its own, or?
So having a tool (does not have to be clang-format) - would be great...
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
I use directory-specific autocommands in Vim, but this doesn't take care of everything, just the basics. Mostly I just don't find it hard to write the code in the ambient style at all.
But I realize the value of the formatters. It's just that to really use them we need to set up a check that all new code follows the rules. And this requires reformatting all the existing code. And that, in turn, just seems a too high price to pay. FWIW all my new projects do use clang-format, for better or (mostly) worse. But the only time I've tried to switch an existing project (smaller and much younger) to it, it was a catastrophe — not because of clang-format itself but because of all the later problems it caused.
Weird idea of the day: any LLM should probably be able to "reformat the code in wxWidgets style" for you without any problems.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Weird idea of the day: any LLM should probably be able to "reformat the code in wxWidgets style" for you without any problems.
How do you think I created that .clang-format ? 🤣Claude did that for me ...
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
I would like to contribute more, but I don't like iterating PRs because of coding style ...
Certainly nothing prevents you from having this file in your fork, and setting up clang-format to run it on just the new code.
I want to add a constructor that allows the caller to control the "mini-map" size, i.e. I would like to add another constructor (or modify the current one) so I can pass: pos, size, style etc). Adding such a long constructor got me thinking: do I need to place each param on a line of its own, or?
Basically just looking at any existing wxWindow-derived class ctor shows that the answer is "yes".
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
--
You received this message because you are subscribed to the Google Groups "wx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wx-dev+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/wx-dev/wxWidgets/wxWidgets/pull/25942/c3473593504%40github.com.
Closed #25942.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
I don't think we're going to merge this, so closing, but it could be still nice to make this available somewhere if anybody else finds it useful.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()