adobe/brackets

View on GitHub
src/search/FileFilters.js

Summary

Maintainability
C
1 day
Test Coverage

File FileFilters.js has 323 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/FileFilters.js - About 3 hrs to fix

    Function editFilter has 71 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function editFilter(filter, index) {
            var lastFocus = window.document.activeElement;
    
            var templateVars = {
                    instruction: StringUtils.format(Strings.FILE_FILTER_INSTRUCTIONS, brackets.config.glob_help_url),
    Severity: Major
    Found in src/search/FileFilters.js - About 2 hrs to fix

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

          function compile(userFilter) {
              // Automatically apply ** prefix/suffix to make writing simple substring-match filters more intuitive
              var wrappedGlobs = userFilter.map(function (glob) {
                  // Automatic "**" prefix if not explicitly present
                  if (glob.substr(0, 2) !== "**") {
      Severity: Minor
      Found in src/search/FileFilters.js - About 1 hr to fix

        Function createFilterPicker has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function createFilterPicker(context) {
        
                function itemRenderer(item, index) {
                    if (index < FIRST_FILTER_INDEX) {
                        // Prefix the two filter commands with 'recent-filter-name' so that
        Severity: Minor
        Found in src/search/FileFilters.js - About 1 hr to fix

          There are no issues that match your filters.

          Category
          Status