File: T012.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 (12 lines) | stat: -rwxr-xr-x 382 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/tclsh
# Negation operator should not be used in its short form

foreach file [getSourceFileNames] {
    foreach negation [getTokens $file 1 0 -1 -1 {not}] {
        set value [lindex $negation 0]
        if {$value == "!"} {
            set lineNumber [lindex $negation 1]
            report $file $lineNumber "negation operator used in its short form"
        }
    }
}