({isopack, isopackCache, sourceArch})
| 289 | } |
| 290 | |
| 291 | var 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 |
no test coverage detected
searching dependent graphs…