Skip to main content

Module copyright

Module copyright 

Source
Expand description

Checks that source files have the correct copyright and license header.

The expected header for most file types is:

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

Files may start with a shebang (#!) or <!DOCTYPE html> before the header. A blank line is expected between the shebang and the header.

Files with a non-Microsoft copyright are left alone.

Structsยง

Copyright

Constantsยง

CHECKED_EXTENSIONS ๐Ÿ”’
HEADER_MIT_FIRST ๐Ÿ”’
HEADER_MIT_SECOND ๐Ÿ”’

Functionsยง

comment_delimiters ๐Ÿ”’
Returns the comment prefix and suffix for a given file extension.