TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
 
ASML C Coding Standard
Search

Rule:  5.1.1.bChecked automatically with code checker

Synopsis:Each source file shall start with a file header, for which the "file name", "description" and copyright notice are to be filled in.
Language:C
Severity Level:8
Category:Conceptual Models


Description:

Justification

Enough information should be provided in the header to be able to understand the functionality without reading the source code. A copyright notice describes the legal ownership of the file.

When editing a source file you can consider to update the copyright header:

  • For large changes, consider adding current year to the copyright year (see below)
  • Ensure the company name is correct

The year you state should be the year that the work is created. If a change is substantial enough to give right to a new copyright, then that year should be mentioned too. The most important year is the first year.

When a SW developer encounters copyright statements in existing source files that are old or wrong, then they should:

  • Leave as-is until the file is touched
  • Updated to the latest template
  • Keep the original copyright years, so you could end up with 1995-2003, 2021

Example

/*------------------------------------------------------------------------------
|
|                                   C Module
|
|-------------------------------------------------------------------------------
|
| Filename   : CC_module.c
| Description: 
|
|-------------------------------------------------------------------------------
|
|                  Copyright (c) 2013, 2022, My Company Name
|                             All rights reserved
|
|-----------------------------------------------------------------------------*/