mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
21 lines
532 B
Tcl
Executable File
21 lines
532 B
Tcl
Executable File
#!/usr/bin/tclsh
|
|
# No trailing whitespace
|
|
|
|
set strictMode [getParameter "strict-trailing-space" 0]
|
|
|
|
foreach f [getSourceFileNames] {
|
|
set lineNumber 1
|
|
set previousIndent ""
|
|
foreach line [getAllLines $f] {
|
|
|
|
if [regexp {^.*[[:space:]]+$} $line] {
|
|
if {$strictMode || [string trim $line] != "" || $line != $previousIndent} {
|
|
report $f $lineNumber "trailing whitespace"
|
|
}
|
|
}
|
|
|
|
regexp {^([[:space:]]*).*$} $line dummy previousIndent
|
|
incr lineNumber
|
|
}
|
|
}
|