1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/dist/tools/vera++/scripts/rules/T012.tcl
2020-02-14 14:17:16 +01:00

13 lines
382 B
Tcl
Executable File

#!/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"
}
}
}