taskConfiguration.ts ×9

Frontier kind: Code frontier

unlabeled · c_030462d9b705

36 tests · 20866 LOC · 80 files · introduces 0 tests · 25 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
9 ranges25 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
2324 ranges20866 lines · 80 files · Browse complete extent
All tests (intent)
36 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 25 introduced LOC across 9 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/workbench/contrib/tasks/common/taskConfiguration.ts 25 introduced LOC · 9 ranges

Open complete file

1735
1736 function isCustomTask(value: ICustomTask | IConfiguringTask): value is ICustomTask {
1737 > const type = value.type; taskConfiguration.ts
1738 > const customize = (value as unknown as Record<string, unknown>).customize;
1739 > return customize === undefined && (type === undefined || type === null || type === Tasks.CUSTOMIZED_TASK_TYPE || type === 'shell' || type === 'process');
1740 > }
1741
1742 const builtinTypeContextMap: IStringDictionary<RawContextKey<boolean>> = {
1750 return result;
1751 }
1752 > const defaultBuildTask: { task: Tasks.Task | undefined; rank: number } = { task: undefined, rank: -1 }; taskConfiguration.ts
1753 > const defaultTestTask: { task: Tasks.Task | undefined; rank: number } = { task: undefined, rank: -1 };
1754 > const schema2_0_0: boolean = context.schemaVersion === Tasks.JsonSchemaVersion.V2_0_0;
1755 > const baseLoadIssues = Objects.deepClone(context.taskLoadIssues);
1756 > for (let index = 0; index < externals.length; index++) {
1757 > const external = externals[index];
1758 > const definition = external.type ? registry?.get?.(external.type) || TaskDefinitionRegistry.get(external.type) : undefined;
1759 > let typeNotSupported: boolean = false;
1760 > if (definition && definition.when && !context.contextKeyService.contextMatchesRules(definition.when)) {
1761 typeNotSupported = true;
1762 > } else if (!definition && external.type) { taskConfiguration.ts
1763 for (const key of Object.keys(builtinTypeContextMap)) {
1764 if (external.type === key) {
1768 }
1769 }
1771 > if (typeNotSupported) {
1772 context.problemReporter.info(nls.localize(
1773 'taskConfiguration.providerUnavailable', 'Warning: {0} tasks are unavailable in the current environment.\n',
1776 continue;
1777 }
1779 > if (isCustomTask(external)) {
1780 const customTask = CustomTask.from(external, context, index, source);
1781 if (customTask) {
1815 result.custom.push(customTask);
1816 }
1817 > } else { taskConfiguration.ts
1818 const configuredTask = ConfiguringTask.from(external, context, index, source, registry);
1819 if (configuredTask) {
1824 context.taskLoadIssues = Objects.deepClone(baseLoadIssues);
1825 }
1826 > // There is some special logic for tasks with the labels "build" and "test". taskConfiguration.ts
1827 > // Even if they are not marked as a task group Build or Test, we automagically group them as such.
1828 > // However, if they are already grouped as Build or Test, we don't need to add this grouping.
1829 const defaultBuildGroupName = Types.isString(defaultBuildTask.task?.configurationProperties.group) ? defaultBuildTask.task?.configurationProperties.group : defaultBuildTask.task?.configurationProperties.group?._id;
1830 const defaultTestTaskGroupName = Types.isString(defaultTestTask.task?.configurationProperties.group) ? defaultTestTask.task?.configurationProperties.group : defaultTestTask.task?.configurationProperties.group?._id;
1831 if ((defaultBuildGroupName !== Tasks.TaskGroup.Build._id) && (defaultBuildTask.rank > -1) && (defaultBuildTask.rank < 2) && defaultBuildTask.task) {
1832 defaultBuildTask.task.configurationProperties.group = Tasks.TaskGroup.Build;
1833 > } else if ((defaultTestTaskGroupName !== Tasks.TaskGroup.Test._id) && (defaultTestTask.rank > -1) && (defaultTestTask.rank < 2) && defaultTestTask.task) { taskConfiguration.ts
1834 defaultTestTask.task.configurationProperties.group = Tasks.TaskGroup.Test;
1835 }
1837 > return result;
1838 }
1839