walkDirectory = function(dir) {
    var p = fs.readdir(dir);
    var errors = [];
    return p.then(function(list) {
        var promises = [];
        list.forEach(function(file) {
            var filePath = path.join(dir,file);

            if (!/@node-red\/(editor-client|nodes)/.test(filePath) && !/node-red\/settings\.js/.test(filePath) && !/\/docs\//.test(filePath)) {
                promises.push(fs.stat(filePath).then(function(stat){
                    if (stat.isDirectory()) {
                        return walkDirectory(filePath).then(function(results) {
                            if (results) {
                                errors = errors.concat(results);
                            }
                        });
                    } else if (/\.js$/.test(filePath)) {
                        var testFile = filePath.replace(jsdir, testdir).replace(".js", "_spec.js");
                        return fs.exists(testFile).then(function(exists) {
                            if (!exists) {
                                errors.push(testFile.substring(rootdir.length+1));
                            } else {
                                return fs.stat(testFile).then(function(stat) {
                                    if (stat.size === 0) {
                                        errors.push("[empty] "+testFile.substring(rootdir.length+1));
                                    }
                                })
                            }
                        });
                    }
                }));
            }
        });
        return Promise.all(promises).then(function() {
            return errors;
        })
    });
}
Currently we're only checking the core components under ./red
TODO: Increase the scope of this check