index.js
function loadReporter(reporterPath) {
    var reporter;
    reporterPath = reporterPath || 'checkstyle';
    if (!fs.existsSync(path.resolve(reporterPath))) {
        try {
            reporter = require('./lib/reporters/' + reporterPath);
        } catch (e) {
            try {
                reporter = require('jscs/lib/reporters/' + reporterPath);
            }
            catch (e) {
                reporter = null;
            }
        }
    } else {
        try {
            reporter = require(path.resolve(reporterPath));
        } catch (e) {
            reporter = null;
        }
    }
    return reporter;
}
function loadReporter(reporterPath) {
    var reporter;
    reporterPath = reporterPath || 'checkstyle';
    if (!fs.existsSync(path.resolve(reporterPath))) {
        try {
            reporter = require('./lib/reporters/' + reporterPath);
        } catch (e) {
            try {
                reporter = require('jscs/lib/reporters/' + reporterPath);
            }
            catch (e) {
                reporter = null;
            }
        }
    } else {
        try {
            reporter = require(path.resolve(reporterPath));
        } catch (e) {
            reporter = null;
        }
    }
    return reporter;
}
function loadReporter ( reporterPath ) { var reporter ; reporterPath = reporterPath || 'checkstyle' ; if ( ! fs . existsSync ( path . resolve ( reporterPath ) ) ) { try { reporter = require ( './lib/reporters/' + reporterPath ) ; } catch ( e ) { try { reporter = require ( 'jscs/lib/reporters/' + reporterPath ) ; } catch ( e ) { reporter = null ; } } } else { try { reporter = require ( path . resolve ( reporterPath ) ) ; } catch ( e ) { reporter = null ; } } return reporter ; }
load a proper Reporter
@todo Throw error when no reporter was found
@return {Function} the selected report
load a proper Reporter