adobe/brackets

View on GitHub
src/language/JSUtils.js

Summary

Maintainability
C
1 day
Test Coverage

File JSUtils.js has 305 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * Copyright (c) 2012 - present Adobe Systems Incorporated. All rights reserved.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
Severity: Minor
Found in src/language/JSUtils.js - About 3 hrs to fix

    Function _findAllFunctionsInText has 70 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function _findAllFunctionsInText(text) {
            var AST,
                results = {},
                functionName,
                resultNode,
    Severity: Major
    Found in src/language/JSUtils.js - About 2 hrs to fix

      Function _getFunctionEndOffset has 50 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function _getFunctionEndOffset(text, offsetStart) {
              var mode = CodeMirror.getMode({}, "javascript");
              var state = CodeMirror.startState(mode), stream, style, token;
              var curOffset = offsetStart, length = text.length, blockCount = 0, lineStart;
              var foundStartBrace = false;
      Severity: Minor
      Found in src/language/JSUtils.js - About 2 hrs to fix

        Function _getOffsetsForFunction has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function _getOffsetsForFunction(docEntries, functionName) {
                // Filter for documents that contain the named function
                var result              = new $.Deferred(),
                    matchedDocuments    = [],
                    rangeResults        = [];
        Severity: Minor
        Found in src/language/JSUtils.js - About 1 hr to fix

          There are no issues that match your filters.

          Category
          Status