View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0014911||Scribus||Internal||public||2017-07-14 18:37||2017-07-14 18:37|
|Reporter||Roland Illig||Assigned To|
|Target Version||Fixed in Version|
|Summary||0014911: Establish code formatting style|
|Description||In order to see how easy 0006918 would be to fix, I had a look at the source code (scribusview.cpp), and it looks very inconsistent to me.|
* When declaring local pointer variables, sometimes the * is written with spaces on both sides. This looks like a multiplication and should therefore be avoided.
* When initializing local variables, there are spaces around the =. In assignments, they are usually but not always missing. This is confusing since assignment has much lower precedence than other operators. It looks equally wrong as writing 3+5 * 7.
* Some local variables start with an uppercase letter, others with a lowercase letter. When to use which style?
* Inside parentheses, in some cases there is a space and most often it is not.
* Sometimes there is a space after a comma, sometimes not.
* There are French comments in scribuscore.cpp. Are they intentional, or should they be in English?
There should be some rules for formatting source code consistently. For example, http://uncrustify.sourceforge.net/ can do these and keep the source code as-is in all places that should stay like they are now.
|Tags||No tags attached.|