lib/autocomplete-manager.js
// Returns {Boolean} that defines whether the current file is blacklisted
Returns {Boolean} that defines whether the current file is blacklisted
Returns { Boolean } that defines whether the current file is blacklisted
isCurrentFileBlackListed () {
    let left
    if (this.isCurrentFileBlackListedCache != null) { return this.isCurrentFileBlackListedCache }
    if ((this.fileBlacklist == null) || this.fileBlacklist.length === 0) {
      this.isCurrentFileBlackListedCache = false
      return this.isCurrentFileBlackListedCache
    }
    if (typeof minimatch === 'undefined' || minimatch === null) { minimatch = require('minimatch') }
    const fileName = path.basename((left = this.buffer.getPath()) != null ? left : '')
    for (let i = 0; i < this.fileBlacklist.length; i++) {
      const blacklistGlob = this.fileBlacklist[i]
      if (minimatch(fileName, blacklistGlob)) {
        this.isCurrentFileBlackListedCache = true
        return this.isCurrentFileBlackListedCache
      }
    }
    this.isCurrentFileBlackListedCache = false
    return this.isCurrentFileBlackListedCache
  }
isCurrentFileBlackListed ( ) { let left if ( this . isCurrentFileBlackListedCache != null ) { return this . isCurrentFileBlackListedCache } if ( ( this . fileBlacklist == null ) || this . fileBlacklist . length === 0 ) { this . isCurrentFileBlackListedCache = false return this . isCurrentFileBlackListedCache } if ( typeof minimatch === 'undefined' || minimatch === null ) { minimatch = require ( 'minimatch' ) } const fileName = path . basename ( ( left = this . buffer . getPath ( ) ) != null ? left : '' ) for ( let i = 0 ; i < this . fileBlacklist . length ; i ++ ) { const blacklistGlob = this . fileBlacklist [ i ] if ( minimatch ( fileName , blacklistGlob ) ) { this . isCurrentFileBlackListedCache = true return this . isCurrentFileBlackListedCache } } this . isCurrentFileBlackListedCache = false return this . isCurrentFileBlackListedCache }
Returns {Boolean} that defines whether the current file is blacklisted
Returns { Boolean } that defines whether the current file is blacklisted
// minimatch is slow. Not necessary to do this computation on every request for suggestions