A coding standard is a set of rules and agreements used when writing a source code in a particular programming language [1]. Other variants of the name are: code formatting standard, coding convention, programming style, code style guide.
The code formatting standard is usually accepted and used by a group of software developers with the purpose of uniform formatting of the code they are using. This standard depends greatly on the programming language being used. For example, the code formatting standard for C++ differs greatly from that for PHP.
The coding standard defines various aspects of creating and maintaining source codes of programs. For example, among such aspects we can name the rules of variable naming, indent style, bracket arranging methods, using spaces when formatting arithmetic expressions, comment style, etc.
There are many sources devoted to recommendations on code formatting and creating coding standards. But first of all I would like to mention two books: "Code Complete" [2] and "Enough Rope to Shoot Yourself in the Foot" [3].
Thanks to flexible settings, most static code analyzers allow you to control adherence to the coding standard accepted in the company. In this case, the warnings received from the static code analyzer can be considered not only as diagnosis but as a breach of the accepted coding standard as well.
0