mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
implement getArch for LintingFile type
Fixes the overcaching of files for different arches in jshint
This commit is contained in:
@@ -56,7 +56,9 @@ JsHintLinter.prototype.processFilesForTarget = function (files, globals) {
|
||||
return;
|
||||
|
||||
// skip files we already linted
|
||||
var hashKey = file.getPackageName() + '/' + file.getPathInPackage();
|
||||
var hashKey = JSON.stringify([
|
||||
file.getPackageName(), file.getPathInPackage(), file.getArch()]);
|
||||
|
||||
if (self.hashDict[hashKey] === file.getSourceHash())
|
||||
return;
|
||||
self.hashDict[hashKey] = file.getSourceHash();
|
||||
|
||||
@@ -79,6 +79,16 @@ _.extend(exports.InputFile.prototype, {
|
||||
getSourceHash: function () {
|
||||
throw new Error("Not Implemented");
|
||||
},
|
||||
/**
|
||||
* @summary Returns a string symbol representing the architecture that is
|
||||
* targetted by processing this file. Can be used to implement caching.
|
||||
* XXX BBP is this doc string good?
|
||||
* @memberof InputFile
|
||||
* @returns {String}
|
||||
*/
|
||||
getArch: function () {
|
||||
throw new Error("Not Implemented");
|
||||
},
|
||||
|
||||
/**
|
||||
* @summary Returns the full contents of the file as a string.
|
||||
|
||||
@@ -251,7 +251,8 @@ var lintUnibuild = function (options) {
|
||||
relPath: relPath,
|
||||
contents: contents,
|
||||
'package': isopack.name,
|
||||
hash: hash
|
||||
hash: hash,
|
||||
arch: inputSourceArch.arch
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
@@ -29,6 +29,9 @@ _.extend(LintingFile.prototype, {
|
||||
},
|
||||
getSourceHash: function () {
|
||||
return this._source.hash;
|
||||
},
|
||||
getArch: function () {
|
||||
return this._source.arch;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user