eclipse-embed-cdt / eclipse-plugins

The Eclipse Embedded CDT plug-ins for Arm & RISC-V C/C++ developers (formerly known as the GNU MCU Eclipse plug-ins). Includes the archive of previous plug-ins versions, as Releases.
http://eclipse-embed-cdt.github.io/
Eclipse Public License 2.0
555 stars 130 forks source link

Reformat code to CDT style #457

Closed ilg-ul closed 3 years ago

ilg-ul commented 3 years ago

At a certain moment the CDT code was reformatted to a given style.

Can we do the same for the Embed CDT code?

jonahgraham commented 3 years ago

Yes - I can do that. CDT is very strict now and will reject a PR that breaks the code formatting and whitespace. We can adapt that here is desired too.

One change means that the .settings for each project should be checked in and the project will store the formatting settings.

Big problem is I don't know if I can do this before 6.0.0 (Tuesday). I will try though and give an update later.

ilg-ul commented 3 years ago

Please merge everything to develop and create a new branch from there.

ilg-ul commented 3 years ago

CDT is very strict now and will reject a PR that breaks the code formatting and whitespace. We can adapt that here is desired too

Yes, that would be nice, but I guess we can do it in a second step, for now simply reformatting everything would be enough.

ilg-ul commented 3 years ago

At a second thought I guess we can do this after Tuesday, better to keep the code ready in case we need to patch something else before Tuesday.

ilg-ul commented 3 years ago

My simplistic view of the subject was that we take the formatsettings.xml from CDT, select everything and with Source -> Format fix all files.

If this is not realistic, we'll definitely leave it for after Tuesday.

ilg-ul commented 3 years ago

Jonah, I think we're ready with all changes, and we can proceed with code reformatting.

jonahgraham commented 3 years ago

My simplistic view of the subject was that we take the formatsettings.xml from CDT, select everything and with Source -> Format fix all files.

That is one option - I provided in #469 what we do for CDT which is more heavy weight, but helps to keep the code formatted by other contributors in sync with embedcdt because the settings are stored with projects instead of the workspace.