T013
Source files should contain the copyright notice
Description:
The copyright notice is required by man coding standards and guidelines. In some countries every written artwork has some copyright, even if implicit. Prefer explicit notice to avoid any later confusion.
This rule verifies that at least one comment in the source file contains the "copyright" word.
Compliance: Boost
Hide source code
# Source files should contain the copyright notice
foreach file [getSourceFileNames] {
set found false
foreach comment [getTokens $file 1 0 -1 -1 {ccomment cppcomment}] {
set value [lindex $comment 0]
if {[string first "copyright" [string tolower $value]] != -1} {
set found true
break
}
}
if {$found == false} {
report $file 1 "no copyright notice found"
}
}
Rule index