code: function isDirectoryExcluded(path) {
          var excludes = preferences.getExcludedDirectories();
  
          if (!excludes) {
              return false;
          }
  
          var testPath = ProjectManager.makeProjectRelativeIfPossible(path);
          testPath = FileUtils.stripTrailingSlash(testPath);
  
          return excludes.test(testPath);
      }
docs: Test if the directory should be excluded from analysis.
  
  @param {!string} path - full directory path.
  @return {boolean} true if excluded, false otherwise.