summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2012-10-15 02:04:15 -0400
committerEliot Horowitz <eliot@10gen.com>2012-10-15 18:07:07 -0400
commita8d20647d7f1a03b56ab422cda4169d9a1c59929 (patch)
tree171c4795e60d15bc244249d25b22a411a9478324 /SConstruct
parentdcbef4a3e5367c09182e05455e3cca4b70b8a37a (diff)
downloadmongo-a8d20647d7f1a03b56ab422cda4169d9a1c59929.tar.gz
hook up our own IsTestFilename for cpplint
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct10
1 files changed, 9 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct
index 927c3ba2189..a89196dfdf4 100644
--- a/SConstruct
+++ b/SConstruct
@@ -964,10 +964,18 @@ def doLint( env , target , source ):
filters.append( '-whitespace/tab' ) # errors found: 233
sourceFiles = utils.getAllSourceFiles( prefix="src/mongo/" )
- sourceFiles.
args = [ "--filter=" + ",".join( filters ) , "--counting=detailed" ] + sourceFiles
filenames = buildscripts.cpplint.ParseArguments( args )
+
+ def _ourIsTestFilename(fn):
+ if fn.find( "dbtests" ) >= 0:
+ return True
+ if fn.endswith( "_test.cpp" ):
+ return True
+ return False
+ buildscripts.cpplint._IsTestFilename = _ourIsTestFilename
+
# Change stderr to write with replacement characters so we don't die
# if we try to print something containing non-ASCII characters.
sys.stderr = codecs.StreamReaderWriter(sys.stderr,