~ubuntu-branches/ubuntu/wily/telepathy-glib/wily

« back to all changes in this revision

Viewing changes to tools/check-c-style.sh

  • Committer: Bazaar Package Importer
  • Author(s): Simon McVittie
  • Date: 2009-03-24 22:06:52 UTC
  • mfrom: (1.3.1 upstream) (17.1.10 sid)
  • Revision ID: james.westby@ubuntu.com-20090324220652-c8dvom0nsqomp23d
Tags: 0.7.28-1
* New upstream version (ABI, API added)
* Put the -dbg package in section debug, as per recent archive changes
* Remove obsolete Conflicts/Replaces with libtelepathy-glib-static-dev, which
  was never in a stable release (and probably never in Debian at all)

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
  fail=1
25
25
fi
26
26
 
 
27
if grep -En '[(][[:alnum:]_]+ ?\*[)][(]?[[:alpha:]_]' "$@"; then
 
28
  echo "^^^ Our coding style is to have a space between a cast and the "
 
29
  echo "    thing being cast"
 
30
  fail=1
 
31
fi
 
32
 
 
33
# this only spots casts
 
34
if grep -En '[(][[:alnum:]_]+\*+[)]' "$@"; then
 
35
  echo "^^^ Our coding style is to have a space before the * of pointer types"
 
36
  echo "    (regex 1)"
 
37
  fail=1
 
38
fi
 
39
# ... and this only spots variable declarations and function return types
 
40
if grep -En '^ *(static |const |)* *[[:alnum:]_]+\*+([[:alnum:]_]|;|$)' \
 
41
    "$@"; then
 
42
  echo "^^^ Our coding style is to have a space before the * of pointer types"
 
43
  echo "    (regex 2)"
 
44
  fail=1
 
45
fi
 
46
 
27
47
if test -n "$CHECK_FOR_LONG_LINES"
28
48
then
29
49
  if egrep -n '.{80,}' "$@"