File: T013.tcl

package info (click to toggle)
vera%2B%2B 1.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,184 kB
  • sloc: cpp: 10,361; tcl: 921; python: 32; makefile: 5
file content (16 lines) | stat: -rwxr-xr-x 454 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/tclsh
# 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"
    }
}