[Widelands-cvs] SF.net SVN: widelands:[3949] trunk/build/scons-tools/codecheck/rules/ garbage_after
Status: Beta
Brought to you by:
sirver
From: <si...@us...> - 2009-04-29 20:39:54
|
Revision: 3949 http://widelands.svn.sourceforge.net/widelands/?rev=3949&view=rev Author: sirver Date: 2009-04-29 20:39:49 +0000 (Wed, 29 Apr 2009) Log Message: ----------- Added a check for garbage tokens after include. I introduce them from time to time Added Paths: ----------- trunk/build/scons-tools/codecheck/rules/garbage_after_include Added: trunk/build/scons-tools/codecheck/rules/garbage_after_include =================================================================== --- trunk/build/scons-tools/codecheck/rules/garbage_after_include (rev 0) +++ trunk/build/scons-tools/codecheck/rules/garbage_after_include 2009-04-29 20:39:49 UTC (rev 3949) @@ -0,0 +1,28 @@ +#!/usr/bin/env python -tt +# encoding: utf-8 +# + +""" +SCons CPPChecker broke down because of this wrong line. +I add a style fix for it now, so it won't bother us +again. +""" + +error_msg="Garbage tokens after include." + +regexp = r"""(?x) +^\#include\s* +((".*?")|(<.*?>)) +[^\s]*$""" + +allowed = [ + "assert(false)", + r"""#include <file.h> \t""", # Trailing whitespaces are not of interest for this rule + r"""#include "file.h" \t """, +] +forbidden = [ + r"""#include "io/filesystem/layered_filesystem.h"io/filesystem/""", + r"""#include <file.h>io/filesystem/""", +] + + Property changes on: trunk/build/scons-tools/codecheck/rules/garbage_after_include ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |