thinkingmedia/grunt-readme-plus

View on GitHub

Showing 48 of 48 total issues

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

function Module(Markdown) {

    /**
     * Sections are used to pre-define the structure of the Markdown document. These objects define both the
     * tree hierarchy and creation order for each section.
Severity: Minor
Found in src/Plus/Engine/Section.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 Module has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function Module(module, path, fs, _, Similarity, Logger, Strings, LicenseTypes) {

    /**
     * @memberof Plus.Services
     * @constructor
Severity: Minor
Found in src/Plus/Services/Licenses.js - About 1 hr to fix

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

function Module(Q, _, Arrays) {

    /**
     * An instance of this class is created for each filter that is loaded. The responsibility of this class is to
     * manage the values that will be injected into the filter hook function. These are passed as extra pamaters to
Severity: Minor
Found in src/Plus/Engine/Filter.js - About 1 hr to fix

Function Module has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function Module(module, path, fs) {

    /**
     * @memberof Plus.Services
     * @param {string} fileName
Severity: Minor
Found in src/Plus/Services/PackageJSON.js - About 1 hr to fix

Function Module has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function Module(_, chalk, print) {

    /**
     * An injectable logging class that allows the code to write output using the logging method of the parent
     * application.
Severity: Minor
Found in src/Plus/Files/Logger.js - About 1 hr to fix

Function Module has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function Module() {
    /**
     * @memberof Plus.Collections
    *
     * @template T
Severity: Minor
Found in src/Plus/Collections/LinkedList.js - About 1 hr to fix

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

function Module(Q, _, Licenses, PackageJSON, Logger, Print) {

    /**
     * @readme plugins.License
     *
Severity: Minor
Found in src/Plus/Writers/License.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 Module has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function Module(_) {

    /**
     * @memberof Plus.Collections
     * @constructor
Severity: Minor
Found in src/Plus/Collections/Arrays.js - About 1 hr to fix

Function Module has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function Module() {

    /**
     * @memberof Plus.Services
     * @param {Date=} when The date/time when this instance was created.
Severity: Minor
Found in src/Plus/Services/Cache.js - About 1 hr to fix

Function Module has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function Module(Q, GitHubApi, Git) {

    /**
     * @memberof Plus.Services
     * @constructor
Severity: Minor
Found in src/Plus/Services/GitHub.js - About 1 hr to fix

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

function Module(Markdown) {

    /**
     * Sections are used to pre-define the structure of the Markdown document. These objects define both the
     * tree hierarchy and creation order for each section.
Severity: Minor
Found in src/Plus/Engine/Section.js - About 1 hr to fix

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

function Module(_, fs, Print, /**Plus.Files.Logger*/Logger) {

    /**
     * @readme plugins.Image
     *
Severity: Minor
Found in src/Plus/Writers/Image.js - About 1 hr to fix

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

function Module(grunt) {

    Logger.config({
        info: function (str) {
            grunt.log.ok(str);
Severity: Minor
Found in tasks/task.js - About 1 hr to fix

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

    var Image = function (engine, section, options) {
        Logger.debug('Plugin %s: %s', 'Image', section);

        options = _.merge({}, {image: true}, options);

Severity: Minor
Found in src/Plus/Writers/Image.js - About 1 hr to fix

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

function Module(Q, _, Sections) {

    /**
     * Engine takes take of rendering the final Markdown.
     *
Severity: Minor
Found in src/Plus/Engine/Engine.js - About 1 hr to fix

Function Module has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

function Module(module, path, fs, _, Similarity, Logger, Strings, LicenseTypes) {
Severity: Major
Found in src/Plus/Services/Licenses.js - About 1 hr to fix

Function Module has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

function Module(Q, _, Logger, Filter, MultiMap, Section, Arrays) {
Severity: Major
Found in src/Plus/Engine/Filters.js - About 50 mins to fix

Function Module has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

function Module(_, fs, os, LinkedList, Logger, Arrays) {
Severity: Minor
Found in src/Plus/Files/Markdown.js - About 45 mins to fix

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

function Module(module, path, fs, _, Similarity, Logger, Strings, LicenseTypes) {

    /**
     * @memberof Plus.Services
     * @constructor
Severity: Minor
Found in src/Plus/Services/Licenses.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 Module has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

function Module(module, _, fs, /** Plus.Engine */Engine, /**Plus.Files.Markdown*/Markdown, /**Plus.Collections.Arrays*/Arrays) {
Severity: Minor
Found in src/Plus/ReadMe.js - About 45 mins to fix
Severity
Category
Status
Source
Language