~widelands-dev/widelands/bug-1654989-fuzzy-terrain-images

« back to all changes in this revision

Viewing changes to cmake/codecheck/rules/assert0

  • Committer: qcs
  • Date: 2010-02-05 01:13:20 UTC
  • Revision ID: git-v1:136d6c48811c97ec1f98301726134b0de66f868c
Manual merge of cmake-migration branch to trunk

git-svn-id: https://widelands.svn.sourceforge.net/svnroot/widelands/trunk@5030 37b2a8de-5219-0410-9f54-a31bc463ab9c

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python -tt
 
2
# encoding: utf-8
 
3
#
 
4
 
 
5
"""
 
6
The purpouse of this is simply to encourage the use "assert(false)" everywhere
 
7
when an unconditional assert is desired, for consistency, instead of
 
8
intermixing it with assert(0) here and there.
 
9
"""
 
10
 
 
11
error_msg="Use assert(false) here."
 
12
 
 
13
regexp = r"""assert *\( *0 *\)"""
 
14
 
 
15
forbidden = [
 
16
    "assert(0)",
 
17
]
 
18
 
 
19
allowed = [
 
20
    "assert(false)",
 
21
]