utils/OptionUtils.js
function getOptions(grunt, task) {
    var globalOpts = grunt.config(task.name).options;
    var localOpts = grunt.config([task.name, task.target]).options;
    var opts = _.merge({}, DEFAULT_OPTIONS, globalOpts, localOpts);

    // Set logging options
    log4js.setGlobalLogLevel(log4js.levels[opts.logLevel]);
    log4js.configure(LOG_OPTIONS);

    opts.code = expandFiles(opts.code, opts.basePath);
    opts.specs = expandFiles(opts.specs, opts.basePath);
    opts.mutate = expandFiles(opts.mutate, opts.basePath);

    if (opts.karma) {
        opts.karma.notIncluded = expandFiles(opts.karma.notIncluded, opts.basePath);
    }

    var requiredOptionsSetErr = areRequiredOptionsSet(opts);
    if(requiredOptionsSetErr !== null) {
        grunt.warn('Not all required options have been set properly. ' + requiredOptionsSetErr);
        return null;
    }

    ensureReportersConfig(opts);
    ensureIgnoreConfig(opts);

    return opts;
}
function getOptions(grunt, task) {
    var globalOpts = grunt.config(task.name).options;
    var localOpts = grunt.config([task.name, task.target]).options;
    var opts = _.merge({}, DEFAULT_OPTIONS, globalOpts, localOpts);

    // Set logging options
    log4js.setGlobalLogLevel(log4js.levels[opts.logLevel]);
    log4js.configure(LOG_OPTIONS);

    opts.code = expandFiles(opts.code, opts.basePath);
    opts.specs = expandFiles(opts.specs, opts.basePath);
    opts.mutate = expandFiles(opts.mutate, opts.basePath);

    if (opts.karma) {
        opts.karma.notIncluded = expandFiles(opts.karma.notIncluded, opts.basePath);
    }

    var requiredOptionsSetErr = areRequiredOptionsSet(opts);
    if(requiredOptionsSetErr !== null) {
        grunt.warn('Not all required options have been set properly. ' + requiredOptionsSetErr);
        return null;
    }

    ensureReportersConfig(opts);
    ensureIgnoreConfig(opts);

    return opts;
}
function getOptions ( grunt , task ) { var globalOpts = grunt . config ( task . name ) . options ; var localOpts = grunt . config ( [ task . name , task . target ] ) . options ; var opts = _ . merge ( { } , DEFAULT_OPTIONS , globalOpts , localOpts ) ; // Set logging options log4js . setGlobalLogLevel ( log4js . levels [ opts . logLevel ] ) ; log4js . configure ( LOG_OPTIONS ) ; opts . code = expandFiles ( opts . code , opts . basePath ) ; opts . specs = expandFiles ( opts . specs , opts . basePath ) ; opts . mutate = expandFiles ( opts . mutate , opts . basePath ) ; if ( opts . karma ) { opts . karma . notIncluded = expandFiles ( opts . karma . notIncluded , opts . basePath ) ; } var requiredOptionsSetErr = areRequiredOptionsSet ( opts ) ; if ( requiredOptionsSetErr !== null ) { grunt . warn ( 'Not all required options have been set properly. ' + requiredOptionsSetErr ) ; return null ; } ensureReportersConfig ( opts ) ; ensureIgnoreConfig ( opts ) ; return opts ; }
Get the options for a given mutationTest grunt task
@param grunt
@param task the grunt task
@returns {*} the found options, or [null] when not all required options have been set
Get the options for a given mutationTest grunt task