AlexRogalskiy/java-patterns

View on GitHub
packages/github-client/docs/js/search/search.js

Summary

Maintainability
B
5 hrs
Test Coverage

Function displayResults has 66 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function displayResults(res) {
        var noResults = res.count == 0;
        var groups = {};
        $searchResults.toggleClass('no-results', noResults);

Severity: Major
Found in packages/github-client/docs/js/search/search.js - About 2 hrs to fix

    Function bindSearch has 41 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function bindSearch() {
            // Bind DOM
            $searchInputs        = $('#book-search-input input');
    
            $searchResults = $('.search-results');
    Severity: Minor
    Found in packages/github-client/docs/js/search/search.js - About 1 hr to fix

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

          function updateQueryString(key, value) {
              value = encodeURIComponent(value);
      
              var url = window.location.href;
              var re = new RegExp('([?&])' + key + '=.*?(&|#|$)(.*)', 'gi'),
      Severity: Minor
      Found in packages/github-client/docs/js/search/search.js - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status