From c222c46146e2c81ff8ff2bd9dc45e2b9454ff656 Mon Sep 17 00:00:00 2001 From: Thomas Aylott Date: Tue, 3 Dec 2013 16:01:06 -0500 Subject: [PATCH] filter out tests from complexity report --- grunt/config/complexity.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/grunt/config/complexity.js b/grunt/config/complexity.js index dd5978b7e7..865c365373 100644 --- a/grunt/config/complexity.js +++ b/grunt/config/complexity.js @@ -1,5 +1,11 @@ +var grunt = require('grunt'); + module.exports.generic = { - src: ['./build/modules/**/*.js'], + src: grunt.file.expand({ + filter: function(path){ + return !(/__\w+__|\btest\b/).test(path); + } + }, ['./build/modules/**/*.js']), options: { errorsOnly: false, // show only maintainability errors cyclomatic: 3,