Barr Group FacebookBarr Group TwitterBarr Group LinkedInBarr Group Vimeo

Rules

The following C coding rules relate to the use of tabs:

Rule 3.5.a.) The tab character shall never appear within any module.

Reasoning

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

Exceptions

Existing tabs in legacy code modules shall not be eliminated unless it is anticipated that a significant amount of the code will be modified. In that case, the tabs shall be eliminated from the entire module in a distinct version control step. This is because a side effect of eliminating tabs is the loss of difference tracking capability in the version control system. It is thus valuable to separate the code changes from the white space changes.

Enforcement

The absence of the tab character in new or modified code shall be confirmed via an automated scan at each build.

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

Sign up for our newsletter today!

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.