FLTK logo

[fltk.coredev] Re: New Coding Standard (spaces and NO tabs)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.coredev  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: New Coding Standard (spaces and NO tabs) "markj... Sep 09, 2020  
  What would be real exiciting is to run it through a source formatter like astyle

On Monday, July 6, 2020 at 4:00:06 PM UTC-5 Albrecht Schlosser wrote:
All devs,

as discussed recently, we decided to replace tabs in our source code
with spaces and to remove trailing whitespace.

The CMP has been updated but is still being worked on.
https://www.fltk.org/cmp.php


I committed the source code changes today in commit f09e17c3c564.

*Please configure your editors* accordingly to keep this new standard
alive, i.e.:

- use 2 column indents
- use space for indenting
- do not use tabs for indenting
- do not use tabs for "trailing comments"
- etc. etc.
- avoid adding trailing whitespace
- remove trailing whitespace on exit if possible [1]


Note: A common issue is when adding an "empty line" in indented code
like the following. Some editors "indent" the "empty" line with spaces
up to the current indent level (column) - which would effectively add
trailing whitespace:

function a(int b) {
static int i;
i++;
<<< empty line: this is where whitespace gets added!
return b+1;
}

[1] Take care to do this only for source and other text files that don't
have significant trailing whitespace. Some shell scripts may have such
significant trailing whitespace!

Thanks in advance.

--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/a09c9d4f-6e4b-443d-80ef-ed5304daccffn%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.