~widelands-dev/widelands/bug-1803602-reveal-frisian-campaign

« back to all changes in this revision

Viewing changes to cmake/codecheck/rules/missing_newline_at_eof

  • 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/python -tt
 
2
 
 
3
class EvalMatches( object ):
 
4
    def __call__(self, lines,fn):
 
5
        errors = []
 
6
        if not len(lines) or not len(lines[-1]) or lines[-1][-1] != '\n':
 
7
                errors.append( (fn, len(lines), "Missing newline at eof!"))
 
8
        return errors
 
9
 
 
10
 
 
11
evaluate_matches = EvalMatches()
 
12
 
 
13
forbidden = [
 
14
    "jlhsdfjh",
 
15
    "ksdhdsf\nkjshfkjhdsf",
 
16
    "",
 
17
]
 
18
 
 
19
allowed = [
 
20
    "jlhsdfjh\n",
 
21
    "ksdhdsf\nkjshfkjhdsf\n",
 
22
]