Barr Group TwitterBarr Group Vimeo

Rules:

3.5.a. The tab character (ASCII 0x09) shall never appear within any source code file.

Example:

// When tabs are needed inside a string, use the ‘\t’ character.
#define COPYRIGHT  “Copyright (c) 2018 Barr Group.\tAll rights reserved.”

// When indents are needed in the source code, align via spaces instead.
void
main (void)
{
          // If not, you can encounter
    // all sorts
        // of weird and
              // uneven
                // alignment of code and comments... across tools.
}

Reasoning: The width of the tab character varies by text editor and programmer preference, making consistent visual layout a continual source of headaches during code reviews and maintenance.

Enforcement: Each programmer should configure his or her code editing tools to insert spaces when the keyboard’s TAB key is pressed. The presence of a tab character in new or modified code shall be flagged via an automated scan at each build or code check-in.

 

What’s happening and how it’s done. Get in the know.

Sign Up for Our Newsletter

Receive free how-to articles, industry news, and the latest info on Barr Group webinars and training courses via email. 

To prevent automated spam submissions leave this field empty.