MCPcopy
hub / github.com/meteor/meteor / lintUnibuild

Function lintUnibuild

tools/isobuild/compiler.js:291–333  ·  view source on GitHub ↗
({isopack, isopackCache, sourceArch})

Source from the content-addressed store, hash-verified

289}
290
291var lintUnibuild = function ({isopack, isopackCache, sourceArch}) {
292 // Note: the buildmessage context of compiler.lint and lintUnibuild is a
293 // normal error message context (eg, there might be errors from initializing
294 // plugins in getLinterSourceProcessorSet). We return the linter warnings as
295 // our return value.
296 buildmessage.assertInJob();
297
298 var activePluginPackages = getActivePluginPackages(
299 isopack, {
300 isopackCache,
301 uses: sourceArch.uses
302 });
303
304 const sourceProcessorSet =
305 getLinterSourceProcessorSet({isopack, activePluginPackages});
306 // bail out early if we had trouble loading plugins or if we're not
307 // going to lint anything
308 if (buildmessage.jobHasMessages() || sourceProcessorSet.isEmpty()) {
309 return null;
310 }
311
312 const unibuild = _.find(
313 isopack.unibuilds,
314 unibuild => archinfo.matches(unibuild.arch, sourceArch.arch)
315 );
316
317 if (! unibuild) {
318 throw Error(`No ${ sourceArch.arch } unibuild for ${ isopack.name }!`);
319 }
320
321 const {sources} = sourceArch.getFiles(sourceProcessorSet, unibuild.watchSet);
322
323 const linterMessages = buildmessage.capture(() => {
324 runLinters({
325 isopackCache,
326 sources,
327 sourceProcessorSet,
328 inputSourceArch: sourceArch,
329 watchSet: unibuild.watchSet
330 });
331 });
332 return linterMessages;
333};
334
335// options.sourceArch is a SourceArch to compile. Process all source files
336// through the appropriate legacy handlers. Create a new Unibuild and add it to

Callers 1

compiler.jsFile · 0.85

Calls 6

getActivePluginPackagesFunction · 0.85
runLintersFunction · 0.85
isEmptyMethod · 0.80
matchesMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…