timbeadle/grunt-tv4

View on GitHub

Showing 5 of 17 total issues

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

module.exports = function (grunt) {
    // Load all npm grunt tasks
    require('load-grunt-tasks')(grunt);

    grunt.loadTasks('tasks');
Severity: Major
Found in Gruntfile.js - About 1 day to fix

    File Gruntfile.js has 385 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     * Grunt wrapper for tv4 - grunt-tv4
     * https://github.com/timbeadle/grunt-tv4
     *
     * Copyright (c) 2013 Bart van der Schoor
    Severity: Minor
    Found in Gruntfile.js - About 5 hrs to fix

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

      module.exports = (grunt) => {
          const out = miniwrite.grunt(grunt);
          const style = ministyle.grunt();
          const report = reporter.getReporter(out, style);
          const runner = runnerModule.getRunner(
      Severity: Major
      Found in tasks/tv4.js - About 3 hrs to fix

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

        module.exports = function (grunt) {
            // Load all npm grunt tasks
            require('load-grunt-tasks')(grunt);
        
            grunt.loadTasks('tasks');
        Severity: Minor
        Found in Gruntfile.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 loadHTTP has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const loadHTTP = (uri, options, callback) => {
            const options_ = {
                timeout: options ? options.timeout : 5000,
            };
        
        
        Severity: Minor
        Found in lib/loader.js - About 1 hr to fix
          Severity
          Category
          Status
          Source
          Language