adobe/brackets

View on GitHub
src/search/SearchResultsView.js

Summary

Maintainability
D
2 days
Test Coverage

Function _addPanelListeners has 156 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    SearchResultsView.prototype._addPanelListeners = function () {
        var self = this;
        this._panel.$panel
            .off(".searchResults")  // Remove the old events
            .on("dblclick.searchResults", ".toolbar", function() {
Severity: Major
Found in src/search/SearchResultsView.js - About 6 hrs to fix

    File SearchResultsView.js has 388 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     * Copyright (c) 2014 - 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/search/SearchResultsView.js - About 5 hrs to fix

      Function _render has 80 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          SearchResultsView.prototype._render = function () {
              var searchItems, match, i, item, multiLine,
                  count            = this._model.countFilesMatches(),
                  searchFiles      = this._model.prioritizeOpenFile(this._initialFilePath),
                  lastIndex        = this._getLastIndex(count.matches),
      Severity: Major
      Found in src/search/SearchResultsView.js - About 3 hrs to fix

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

            SearchResultsView.prototype._showSummary = function () {
                var count     = this._model.countFilesMatches(),
                    lastIndex = this._getLastIndex(count.matches),
                    typeStr = (count.matches > 1) ? Strings.FIND_IN_FILES_MATCHES : Strings.FIND_IN_FILES_MATCH,
                    filesStr,
        Severity: Minor
        Found in src/search/SearchResultsView.js - About 1 hr to fix

          Function updateFileAndHeaderCheckboxes has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  function updateFileAndHeaderCheckboxes($clickedRow, isChecked) {
                      var $firstMatch = ($clickedRow.data("item-index") === 0) ? $clickedRow :
                              $clickedRow.prevUntil(".file-section").last(),
                          $fileRow = $firstMatch.prev(),
                          $siblingRows = $fileRow.nextUntil(".file-section"),
          Severity: Minor
          Found in src/search/SearchResultsView.js - About 1 hr to fix

            There are no issues that match your filters.

            Category
            Status