File: create_cppcheck_report

package info (click to toggle)
widelands 1%3A15-3squeeze2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 206,508 kB
  • ctags: 12,956
  • sloc: cpp: 96,550; python: 2,636; ada: 849; sh: 269; objc: 254; makefile: 180
file content (12 lines) | stat: -rwxr-xr-x 1,440 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash
FILE=cppcheck_report.xhtml
echo "<?xml version=\"1.0\" encoding=\"us-ascii\"?>"                                                                     >  $FILE
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">" >> $FILE
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">"                                                                     >> $FILE
echo "<head><title>cppcheck error report for Widelands C++ source code</title></head>"                                   >> $FILE
echo "<body>"                                                                                                            >> $FILE
echo "<div>"                                                                                                             >> $FILE
cppcheck --all --quiet --style --unused-functions src 2>&1 | sed "s@^\[\(.*\):\([[:digit:]]\+\)\]: \(.*\)\$@<a href=\"http://widelands.svn.sourceforge.net/viewvc/widelands/trunk/\1\?view=markup#l_\2\">\1:\2</a>: \3<br/>@" >> $FILE
echo "</div>"                                                                                                            >> $FILE
echo "</body>"                                                                                                           >> $FILE
echo "</html>"                                                                                                           >> $FILE