dmi3y/csslint-cli

View on GitHub

Showing 14 of 14 total issues

Function exports has 45 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function (grunt) {
  require('time-grunt')(grunt);
  require('load-grunt-tasks')(grunt);

  grunt.initConfig({
Severity: Minor
Found in Gruntfile.js - About 1 hr to fix

    Function serviceReporter has 40 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    mainReporter.serviceReporter = function(result, options, rules, csslintversion) {
        var
            unknown,
            unknownLen,
            i;
    Severity: Minor
    Found in reporter/reporter-console-default.js - About 1 hr to fix

      Function exports has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

      module.exports = function(result, file, options) {
          var
              formatter = csslint.getFormatter(options.format || 'text'),
              messages = result.messages || [],
              output,
      Severity: Minor
      Found in reporter/reporter-legacy.js - About 1 hr to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function shuffleToRulesets has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          shuffleToRulesets: function (rcs, files) {
              var
                  file,
                  _files,
                  base,
      Severity: Minor
      Found in lib/rc.js - About 1 hr to fix

        Function optionsToExplicitRulesets has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

            optionsToExplicitRulesets: function (obj) {
                var
                    optionsMap = helper.optionsMap(),
                    out = {},
                    option,
        Severity: Minor
        Found in lib/helper.js - About 1 hr to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function checkParameters has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

        function checkParameters(options, targets) {
            var
                unknownOptions,
                out = {},
                targetsLen =  targets.length;
        Severity: Minor
        Found in src/csslint-cli.js - About 1 hr to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function checkParameters has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function checkParameters(options, targets) {
            var
                unknownOptions,
                out = {},
                targetsLen =  targets.length;
        Severity: Minor
        Found in src/csslint-cli.js - About 1 hr to fix

          Function getRulesets has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function getRulesets(options, targets) {
              var
                  directOptionsFile,
                  scope,
                  workset,
          Severity: Minor
          Found in src/csslint-cli.js - About 1 hr to fix

            Function optionsToExplicitRulesets has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                optionsToExplicitRulesets: function (obj) {
                    var
                        optionsMap = helper.optionsMap(),
                        out = {},
                        option,
            Severity: Minor
            Found in lib/helper.js - About 1 hr to fix

              Function shuffleToRulesets has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

                  shuffleToRulesets: function (rcs, files) {
                      var
                          file,
                          _files,
                          base,
              Severity: Minor
              Found in lib/rc.js - About 45 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function serviceReporter has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

              mainReporter.serviceReporter = function(result, options, rules, csslintversion) {
                  var
                      unknown,
                      unknownLen,
                      i;
              Severity: Minor
              Found in reporter/reporter-console-default.js - About 45 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function sortTheRest has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  sortTheRest: function (files, rcname) {
                      var
                          i,
                          file,
                          base,
              Severity: Minor
              Found in lib/rc.js - About 25 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function getRulesets has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              function getRulesets(options, targets) {
                  var
                      directOptionsFile,
                      scope,
                      workset,
              Severity: Minor
              Found in src/csslint-cli.js - About 25 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function mainReporter has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              function mainReporter(result, file, options) {
                  var
                      color;
              
                  prepareMessages(result);
              Severity: Minor
              Found in reporter/reporter-console-default.js - About 25 mins to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Severity
              Category
              Status
              Source
              Language