Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [incubation] Project Release Coding Style

Hi Christopher

I am not in favour of smart/corrupting CM tools, so configuring GIT is something that I would almost certainly disable.

You can configure the Java Editor to perform auto-actions on save, potentially on a per-project basis. I have never enabled it on my code because I have never adjusted formatting styles to match my longer line wrapping preferences.

Some projects, notably EMF, have very esoteric code styles which I find that I always need to emulate by hand.

It would certainly be good to have something better; 20 years ago my editors at least auto-trimmed trailing whitespace and normalized spaces/tabs and newlines. Now my files are a mess when I show control characters as is often necessary to understand Unix/Windows new-line anomalies.

But I suspect that the bottom line is that there are too many things to do and pretty code formatting is way down the stack.

    Regards

        Ed Willink



On 17/06/2016 17:53, Christopher Brooks wrote:
Over on triquetrum-dev, we were discussing coding style.

My impression, which might be wrong, was that code to be released should follow the Eclipse coding style as defined in the preferences by Java -> Code Style -> Formatter -> "Eclipse [built-in]" and Java -> Code Style -> Clean up -> "Eclipse [build-in]"

I imagined that part of the Eclipse release process was to clean the code and reformat it with the Eclipse coding style.

I work in academia and we see software as a form of publication, so a consistent coding style as being very important. OTOH, coding style can be a religious issue. Personally, I don't care what the style is, as long as there is a tool that will do the cleanup.

Is there a guideline about coding style for Eclipse projects, or is each project able to choose there own?

I went through the Eclipse Development Process at https://www.eclipse.org/projects/dev_process/development_process.php#6_3_Reviews

and Development Resources/HOWTO/Release Reviews at https://wiki.eclipse.org/Development_Resources/HOWTO/Release_Reviews

but did not see anything.

https://wiki.eclipse.org/Coding_Conventions has a little bit of information, such as 4 spaces for indents. However, this page seems incomplete.

A second question is that if the code should be using the "Eclipse [built-in]" style, then has there been any thought to having Git at least reformat the code automatically?

_Christopher




Back to the top