From a92ec5c6bbf4fa98b66486bc200e2de5e89b9548 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Fri, 26 Jun 2015 10:56:19 -0700 Subject: [PATCH] Remove wipeLinterCache logic --- packages/jshint/plugin/lint-jshint.js | 5 ----- tools/compiler.js | 14 ++------------ tools/isopack-cache.js | 10 ---------- 3 files changed, 2 insertions(+), 27 deletions(-) diff --git a/packages/jshint/plugin/lint-jshint.js b/packages/jshint/plugin/lint-jshint.js index 9606596f6e..b6889a5a6c 100644 --- a/packages/jshint/plugin/lint-jshint.js +++ b/packages/jshint/plugin/lint-jshint.js @@ -88,8 +88,3 @@ JsHintLinter.prototype.processFilesForTarget = function (files, globals) { } }; -JsHintLinter.prototype.wipeCache = function () { - // XXX if we had on-disk cache, we would wipe it here -}; - - diff --git a/tools/compiler.js b/tools/compiler.js index 5027e15cdd..5b16a1e306 100644 --- a/tools/compiler.js +++ b/tools/compiler.js @@ -174,8 +174,7 @@ compiler.lint = function (packageSource, options) { lintUnibuild({ isopack: options.isopack, isopackCache: options.isopackCache, - sourceArch: architecture, - wipeLinterCache: true + sourceArch: architecture }); }); }; @@ -217,7 +216,6 @@ var lintUnibuild = function (options) { var isopack = options.isopack; var isopackCache = options.isopackCache; var inputSourceArch = options.sourceArch; - var wipeLinterCache = options.wipeLinterCache; var activePluginPackages = getActivePluginPackages( isopack, // pass sourceArch and isopackCache @@ -260,8 +258,7 @@ var lintUnibuild = function (options) { inputSourceArch: inputSourceArch, isopackCache: isopackCache, wrappedSourceItems: wrappedSourceItems, - linters: allLinters, - wipeLinterCache: wipeLinterCache + linters: allLinters }); }; @@ -581,7 +578,6 @@ var runLinters = function (options) { var isopackCache = options.isopackCache; var wrappedSourceItems = options.wrappedSourceItems; var linters = options.linters; - var wipeLinterCache = options.wipeLinterCache; if (_.isEmpty(linters)) return; @@ -673,12 +669,6 @@ var runLinters = function (options) { if (! sourcesToLint.length) return; - if (wipeLinterCache) { - // XXX BBP make `wipeCache` part of the interface for other types of - // plugins too? - linterDef.userPlugin.wipeCache(); - } - var linter = linterDef.userPlugin.processFilesForTarget; var archToString = function (arch) { diff --git a/tools/isopack-cache.js b/tools/isopack-cache.js index 9f69ea6c72..ad1c72df39 100644 --- a/tools/isopack-cache.js +++ b/tools/isopack-cache.js @@ -285,22 +285,12 @@ _.extend(exports.IsopackCache.prototype, { self.allLoadedLocalPackagesWatchSet.merge(isopack.getMergedWatchSet()); self._isopacks[name] = isopack; - // Isopack is built and loaded. Run linters and save the result in the - // Isopack object. - var wipeLinterCache = false; - if (! previousIsopack) { - // We don't have previous Isopack-cache which probably means we are - // running the build for the first time in this process. Let's lint the - // isopack from scratch and collect all errors. - wipeLinterCache = true; - } var lintingMessages = buildmessage.capture({ title: "linting isopack " + name }, function () { compiler.lint(packageInfo.packageSource, { isopackCache: self, isopack: isopack, - wipeLinterCache: wipeLinterCache, includeCordovaUnibuild: self._includeCordovaUnibuild }); });