squarewolf/node-neuter

View on GitHub
lib/scanner.js

Summary

Maintainability
C
1 day
Test Coverage

NodeTypes has 31 functions (exceeds 20 allowed). Consider refactoring.
Open

var NodeTypes = {
    AssignmentExpression: function (node) {
        return [
            node.left,
            node.right,
Severity: Minor
Found in lib/scanner.js - About 3 hrs to fix

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

    module.exports = function(source, functionName, done) {
    
        var program;
    
        try {
    Severity: Major
    Found in lib/scanner.js - About 3 hrs to fix

      Function scanNode has 53 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function scanNode(node, done) {
              setImmediate(function () {
                  if (NodeTypes[node.type] === undefined) {
                      return done(null, []);
                  }
      Severity: Major
      Found in lib/scanner.js - About 2 hrs to fix

        Avoid deeply nested control flow statements.
        Open

                                for (var i = 0; i < childNode.arguments.length; i++) {
                                    var argument = childNode.arguments[i];
                                    if (argument.type !== 'Literal') {
                                        return done(new Error('Unsupported require argument type: ' + argument.type));
                                    }
        Severity: Major
        Found in lib/scanner.js - About 45 mins to fix

          There are no issues that match your filters.

          Category
          Status