"use strict";

var Vow = require( "vow" );

module.exports = function( grunt ) {

    var filter = Array.prototype.filter,
        JSCS = require( "./lib/jscs" ).init( grunt );

    grunt.registerMultiTask( "jscs", "JavaScript Code Style checker", function() {
        var done = this.async(),
            options = this.options(),
            jscs = new JSCS( options ),
            checks = this.filesSrc.map(function( path ) {
                return jscs.check( path );
            });

        grunt.option( "force", options.force );

        Vow.allResolved( checks ).spread(function() {

            // Filter unsuccessful promises
            var results = filter.call( arguments, function( promise ) {
                return promise.isFulfilled();

            // Make array of errors
            }).map(function( promise ) {
                return promise.valueOf()[ 0 ];
            });

            jscs.setErrors( results ).report().notify();

            done( !jscs.count() );
        });
    });
};

@@ -324,16 +324,169 @@
 tions(),
+%0A%0A            // either if it was configured with that option or passed through cli command%0A            force = grunt.option( %22force%22 ) %7C%7C options.force,
 %0A       
@@ -667,24 +667,16 @@
 force%22, 
-options.
 force );

Correct force execution