Last change
on this file since 617 was 146, checked in by bcornec, 19 years ago |
MONDO_LOGFILE used each time now
memory management on libmondo-devices.c
some splint improvements
|
-
Property svn:executable
set to
*
|
File size:
1.3 KB
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 | #
|
---|
3 | # $Id$
|
---|
4 | #
|
---|
5 | # Mesures quality improvement of mondorescue project
|
---|
6 | #
|
---|
7 |
|
---|
8 | # Adapt to your needs
|
---|
9 | dname=`dirname $0`
|
---|
10 | prem=`echo $dname |cut -c1`
|
---|
11 | if [ ${prem} == "/" ]; then
|
---|
12 | export TOOLHOME=$dname
|
---|
13 | else
|
---|
14 | export TOOLHOME=${PWD}/$dname
|
---|
15 | fi
|
---|
16 |
|
---|
17 | d=$TOOLHOME/..
|
---|
18 |
|
---|
19 | if [ $# -gt 0 ]; then
|
---|
20 | if [ -d $1 ]; then
|
---|
21 | d=$1
|
---|
22 | fi
|
---|
23 | fi
|
---|
24 |
|
---|
25 | echo "Working on $d"
|
---|
26 | echo " "
|
---|
27 | cd $d
|
---|
28 |
|
---|
29 | # How many sprintf/strcat/strcpy vs asprintf are they
|
---|
30 | for s in asprintf sprintf strcat strcpy fgets malloc_string MAX_STR_LEN goto; do
|
---|
31 | echo "monodrescue $s usage : "
|
---|
32 | for i in `find . -name '*.c' -o -name '*.h' | egrep -v '\.svn' | egrep -v '/\*' | xargs grep -r -c -w $s | egrep -v ":0$"`; do
|
---|
33 | echo " === $i"
|
---|
34 | done
|
---|
35 | done
|
---|
36 |
|
---|
37 | echo " "
|
---|
38 | echo "Qualimetry: "
|
---|
39 | find . -name '*.c' -o -name '*.h' | egrep -v '\.svn' | xargs grep -r asprintf | egrep -v '/\*' | egrep -v 'asprintf\(&' > /tmp/mondo.quality
|
---|
40 | cat /tmp/mondo.quality
|
---|
41 | echo "monodrescue uses : `cat /tmp/mondo.quality | wc -l` asprintf without &"
|
---|
42 | find . -name '*.c' -o -name '*.h' | egrep -v '\.svn' | xargs grep -r getline | egrep -v '/\*' | egrep -v 'getline\(&' > /tmp/mondo.quality
|
---|
43 | cat /tmp/mondo.quality
|
---|
44 | echo "monodrescue uses : `cat /tmp/mondo.quality | wc -l` getline without &"
|
---|
45 |
|
---|
46 | echo " "
|
---|
47 | echo "Splint: "
|
---|
48 | find . -name '*.c' -o -name '*.h' | xargs splint +posixlib -Dlinux
|
---|
49 |
|
---|
50 | rm -f /tmp/mondo.quality
|
---|
Note:
See
TracBrowser
for help on using the repository browser.