properties {
property "sonar.projectName", "${projectTitle} :: Web"
property "sonar.sources", "src/main/js"
- property "sonar.exclusions", "src/main/js/**/__tests__/**,src/main/js/**/__mocks__/**,src/main/js/@types/**,src/main/js/helpers/mocks/**,src/main/js/api/mocks/**,src/main/js/helpers/testUtils.ts,src/main/js/helpers/testMocks.ts,src/main/js/helpers/testReactTestingUtils.tsx,src/main/js/helpers/testSelector.ts"
+ property "sonar.exclusions", "src/main/js/**/__tests__/**,src/main/js/**/__mocks__/**,src/main/js/@types/**,src/main/js/helpers/mocks/**,src/main/js/sonar-aligned/helpers/mocks/**,src/main/js/api/mocks/**,src/main/js/helpers/testUtils.ts,src/main/js/helpers/testMocks.ts,src/main/js/helpers/testReactTestingUtils.tsx,src/main/js/helpers/testSelector.ts"
property "sonar.tests", "src/main/js"
property "sonar.test.inclusions", "src/main/js/**/__tests__/**"
property "sonar.coverage.exclusions", "src/main/js/api/**,src/main/js/**/routes.ts,src/main/js/app/index.ts,src/main/js/app/utils/startReactApp.tsx,src/main/js/components/icons/**"
*/
import { throwGlobalError } from '~sonar-aligned/helpers/error';
import { getJSON } from '~sonar-aligned/helpers/request';
+import { Visibility } from '~sonar-aligned/types/component';
import { post, postJSON } from '../helpers/request';
import { Application, ApplicationPeriod } from '../types/application';
-import { Visibility } from '../types/component';
export function getApplicationLeak(
application: string,
import { throwGlobalError } from '~sonar-aligned/helpers/error';
import { getJSON } from '~sonar-aligned/helpers/request';
import { BranchParameters } from '~sonar-aligned/types/branch-like';
-import { ComponentQualifier } from '~sonar-aligned/types/component';
-import { post, RequestData } from '../helpers/request';
-import { TreeComponent, TreeComponentWithPath, Visibility } from '../types/component';
+import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component';
+import { RequestData, post } from '../helpers/request';
+import { TreeComponent, TreeComponentWithPath } from '../types/component';
import {
ComponentMeasure,
Dict,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { cloneDeep, uniqueId } from 'lodash';
+import { Visibility } from '~sonar-aligned/types/component';
import {
mockAzureProject,
mockAzureRepository,
GithubRepository,
GitlabProject,
} from '../../types/alm-integration';
-import { Visibility } from '../../types/component';
import { Paging } from '../../types/types';
import {
checkPersonalAccessTokenIsValid,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { cloneDeep } from 'lodash';
-import { Visibility } from '../../types/component';
+import { Visibility } from '~sonar-aligned/types/component';
import { getApplicationDetails, getApplicationLeak } from '../application';
jest.mock('../application');
*/
import { HttpStatusCode } from 'axios';
import { cloneDeep, countBy, pick, trim } from 'lodash';
-import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component';
import { RuleDescriptionSections } from '../../apps/coding-rules/rule';
import { mapRestRuleToRule } from '../../apps/coding-rules/utils';
import { getStandards } from '../../helpers/security-standard';
mockRuleRepository,
} from '../../helpers/testMocks';
import { RuleRepository, SearchRulesResponse } from '../../types/coding-rules';
-import { Visibility } from '../../types/component';
import { RawIssuesResponse } from '../../types/issues';
import { RuleStatus, SearchRulesQuery } from '../../types/rules';
import { SecurityStandard } from '../../types/security';
*/
import { cloneDeep, pick } from 'lodash';
import { BranchParameters } from '~sonar-aligned/types/branch-like';
+import { Visibility } from '~sonar-aligned/types/component';
import { DEFAULT_METRICS } from '../../helpers/mocks/metrics';
import { HttpStatus, RequestData } from '../../helpers/request';
import { mockMetric } from '../../helpers/testMocks';
import { isDefined } from '../../helpers/types';
-import { TreeComponent, Visibility } from '../../types/component';
+import { TreeComponent } from '../../types/component';
import {
Component,
ComponentMeasure,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { chunk, cloneDeep, remove, uniq } from 'lodash';
-import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component';
import {
mockPermission,
mockPermissionGroup,
mockPermissionUser,
} from '../../helpers/mocks/permissions';
import { PERMISSIONS_ORDER_FOR_PROJECT_TEMPLATE } from '../../helpers/permissions';
-import { Visibility } from '../../types/component';
import { Permissions } from '../../types/permissions';
import { Permission, PermissionGroup, PermissionTemplate, PermissionUser } from '../../types/types';
import { BaseSearchProjectsParameters } from '../components';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { cloneDeep } from 'lodash';
-import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component';
import { mockProject } from '../../helpers/mocks/projects';
-import { Visibility } from '../../types/component';
import { SettingsKey } from '../../types/settings';
import {
Project,
/* eslint-disable local-rules/use-metrickey-enum */
-import { ComponentQualifier } from '~sonar-aligned/types/component';
-import { Visibility } from '../../../types/component';
+import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component';
import { ComponentRaw } from '../../components';
export function mockProjects(): ComponentRaw[] {
*/
import { throwGlobalError } from '~sonar-aligned/helpers/error';
import { getJSON } from '~sonar-aligned/helpers/request';
+import { Visibility } from '~sonar-aligned/types/component';
import { post, postJSON, RequestData } from '../helpers/request';
-import { Visibility } from '../types/component';
import {
Paging,
Permission,
*/
import { throwGlobalError } from '~sonar-aligned/helpers/error';
import { getJSON } from '~sonar-aligned/helpers/request';
-import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component';
import { post, postJSON } from '../helpers/request';
-import { Visibility } from '../types/component';
import { Paging } from '../types/types';
export interface BaseSearchProjectsParameters {
import React, { useContext } from 'react';
import { Route } from 'react-router-dom';
import * as withRouter from '~sonar-aligned/components/hoc/withRouter';
-import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component';
import { validateProjectAlmBinding } from '../../../api/alm-settings';
import { getTasksForComponent } from '../../../api/ce';
import { getComponentData } from '../../../api/components';
import { renderAppRoutes, renderComponent } from '../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../helpers/testSelector';
import { getProjectUrl, getPullRequestUrl } from '../../../helpers/urls';
-import { Visibility } from '../../../types/component';
import { TaskStatuses, TaskTypes } from '../../../types/tasks';
import handleRequiredAuthorization from '../../utils/handleRequiredAuthorization';
import ComponentContainer, { isSameBranch } from '../ComponentContainer';
RadioButton,
} from 'design-system';
import * as React from 'react';
-import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component';
import { createApplication } from '../../../api/application';
import MandatoryFieldsExplanation from '../../../components/ui/MandatoryFieldsExplanation';
import { translate } from '../../../helpers/l10n';
-import { Visibility } from '../../../types/component';
interface Props {
onClose: () => void;
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { Breadcrumb, ComponentMeasure, Dict } from '../../types/types';
+import { Breadcrumb } from '~sonar-aligned/types/component';
+import { ComponentMeasure, Dict } from '../../types/types';
let bucket: Dict<ComponentMeasure> = {};
let childrenBucket: Dict<{
import * as React from 'react';
import { withRouter } from '~sonar-aligned/components/hoc/withRouter';
import { isPortfolioLike } from '~sonar-aligned/helpers/component';
-import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { Breadcrumb, ComponentQualifier } from '~sonar-aligned/types/component';
import { Location, Router } from '~sonar-aligned/types/router';
import withComponentContext from '../../../app/components/componentContext/withComponentContext';
import withMetricsContext from '../../../app/components/metrics/withMetricsContext';
import { CodeScope, getCodeUrl, getProjectUrl } from '../../../helpers/urls';
import { WithBranchLikesProps, useBranchesQuery } from '../../../queries/branch';
-import { Breadcrumb, Component, ComponentMeasure, Dict, Metric } from '../../../types/types';
+import { Component, ComponentMeasure, Dict, Metric } from '../../../types/types';
import { addComponent, addComponentBreadcrumbs, clearBucket } from '../bucket';
import { loadMoreChildren, retrieveComponent, retrieveComponentChildren } from '../utils';
import CodeAppRenderer from './CodeAppRenderer';
import A11ySkipTarget from '~sonar-aligned/components/a11y/A11ySkipTarget';
import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip';
import { isPortfolioLike } from '~sonar-aligned/helpers/component';
+import { Breadcrumb } from '~sonar-aligned/types/component';
import { Location } from '~sonar-aligned/types/router';
import ListFooter from '../../../components/controls/ListFooter';
import Suggestions from '../../../components/embed-docs-modal/Suggestions';
import { areCCTMeasuresComputed } from '../../../helpers/measures';
import { BranchLike } from '../../../types/branch-like';
import { isApplication } from '../../../types/component';
-import { Breadcrumb, Component, ComponentMeasure, Dict, Metric } from '../../../types/types';
+import { Component, ComponentMeasure, Dict, Metric } from '../../../types/types';
import { getCodeMetrics } from '../utils';
import CodeBreadcrumbs from './CodeBreadcrumbs';
import Components from './Components';
*/
import { Breadcrumbs } from 'design-system';
import * as React from 'react';
+import { Breadcrumb } from '~sonar-aligned/types/component';
import { BranchLike } from '../../../types/branch-like';
-import { Breadcrumb, ComponentMeasure } from '../../../types/types';
+import { ComponentMeasure } from '../../../types/types';
import ComponentName from './ComponentName';
interface Props {
*/
import { getBranchLikeQuery, isPullRequest } from '~sonar-aligned/helpers/branch-like';
import { isPortfolioLike } from '~sonar-aligned/helpers/component';
-import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { Breadcrumb, ComponentQualifier } from '~sonar-aligned/types/component';
import { MetricKey } from '~sonar-aligned/types/metrics';
import { getBreadcrumbs, getChildren, getComponent, getComponentData } from '../../api/components';
import { CCT_SOFTWARE_QUALITY_METRICS, OLD_TAXONOMY_METRICS } from '../../helpers/constants';
import { BranchLike } from '../../types/branch-like';
-import { Breadcrumb, ComponentMeasure } from '../../types/types';
+import { ComponentMeasure } from '../../types/types';
import {
addComponent,
addComponentBreadcrumbs,
const { data: branchData, isLoading: isLoadingBranches } = useBranchesQuery(
component ?? {
key: project,
+ name: projectName,
qualifier: ComponentQualifier.Project,
},
);
import { noop, without } from 'lodash';
import * as React from 'react';
import { Helmet } from 'react-helmet-async';
+import { Visibility } from '~sonar-aligned/types/component';
import * as api from '../../../../api/permissions';
import withComponentContext from '../../../../app/components/componentContext/withComponentContext';
import VisibilitySelector from '../../../../components/common/VisibilitySelector';
} from '../../../../helpers/permissions';
import { useIsGitHubProjectQuery } from '../../../../queries/devops-integration';
import { useGithubProvisioningEnabledQuery } from '../../../../queries/identity-provider/github';
-import { ComponentContextShape, Visibility } from '../../../../types/component';
+import { ComponentContextShape } from '../../../../types/component';
import { Permissions } from '../../../../types/permissions';
import { Component, Paging, PermissionGroup, PermissionUser } from '../../../../types/types';
import '../../styles.css';
*/
import { screen, waitFor } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
-import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component';
import AlmSettingsServiceMock from '../../../../../api/mocks/AlmSettingsServiceMock';
import GithubProvisioningServiceMock from '../../../../../api/mocks/GithubProvisioningServiceMock';
import PermissionsServiceMock from '../../../../../api/mocks/PermissionsServiceMock';
renderAppWithComponentContext,
} from '../../../../../helpers/testReactTestingUtils';
import { AlmKeys } from '../../../../../types/alm-settings';
-import { ComponentContextShape, Visibility } from '../../../../../types/component';
+import { ComponentContextShape } from '../../../../../types/component';
import { Feature } from '../../../../../types/features';
import { Permissions } from '../../../../../types/permissions';
import { Component, PermissionGroup, PermissionUser, Provider } from '../../../../../types/types';
import { waitFor } from '@testing-library/react';
import { UserEvent } from '@testing-library/user-event/dist/types/setup/setup';
import selectEvent from 'react-select-event';
+import { Visibility } from '~sonar-aligned/types/component';
import { byRole, byText } from '../../helpers/testSelector';
-import { Visibility } from '../../types/component';
import { Permissions } from '../../types/permissions';
export function getPageObject(user: UserEvent) {
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { screen } from '@testing-library/react';
-import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component';
import { MetricKey } from '~sonar-aligned/types/metrics';
import BranchesServiceMock from '../../../api/mocks/BranchesServiceMock';
import CodingRulesServiceMock from '../../../api/mocks/CodingRulesServiceMock';
import { mockCurrentUser, mockLoggedInUser, mockMeasure } from '../../../helpers/testMocks';
import { renderAppWithComponentContext } from '../../../helpers/testReactTestingUtils';
import { byRole } from '../../../helpers/testSelector';
-import { Visibility } from '../../../types/component';
import { Component } from '../../../types/types';
import { CurrentUser } from '../../../types/users';
import routes from '../routes';
import classNames from 'classnames';
import { BasicSeparator, SubTitle } from 'design-system';
import React, { PropsWithChildren, useEffect, useState } from 'react';
-import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component';
import { getProjectLinks } from '../../../api/projectLinks';
import { translate } from '../../../helpers/l10n';
-import { Visibility } from '../../../types/component';
import { Component, Measure, ProjectLink } from '../../../types/types';
import MetaDescription from './components/MetaDescription';
import MetaKey from './components/MetaKey';
*/
import { Badge, Link, SubHeading } from 'design-system';
import React, { useContext, useEffect } from 'react';
+import { ComponentQualityProfile } from '~sonar-aligned/types/component';
import { searchRules } from '../../../../api/rules';
import { LanguagesContext } from '../../../../app/components/languages/LanguagesContext';
import Tooltip from '../../../../components/controls/Tooltip';
import { translate, translateWithParameters } from '../../../../helpers/l10n';
import { getQualityProfileUrl } from '../../../../helpers/urls';
import { Languages } from '../../../../types/languages';
-import { ComponentQualityProfile, Dict } from '../../../../types/types';
+import { Dict } from '../../../../types/types';
interface Props {
profiles: ComponentQualityProfile[];
*/
import { SubHeading } from 'design-system';
import * as React from 'react';
+import { Visibility } from '~sonar-aligned/types/component';
import PrivacyBadgeContainer from '../../../../components/common/PrivacyBadgeContainer';
import { translate } from '../../../../helpers/l10n';
-import { Visibility } from '../../../../types/component';
interface Props {
qualifier: string;
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import { queryToSearchString } from '~sonar-aligned/helpers/urls';
-import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component';
import { createApplication } from '../../../../api/application';
import { getComponentNavigation } from '../../../../api/navigation';
import { mockAppState, mockLoggedInUser, mockRouter } from '../../../../helpers/testMocks';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../../helpers/testSelector';
-import { Visibility } from '../../../../types/component';
import { FCProps } from '../../../../types/misc';
import { LoggedInUser } from '../../../../types/users';
import { ApplicationCreation } from '../ApplicationCreation';
*/
import { screen } from '@testing-library/react';
import React from 'react';
-import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component';
import { MetricKey } from '~sonar-aligned/types/metrics';
import { mockCurrentUser, mockLoggedInUser } from '../../../../../helpers/testMocks';
import { renderComponent } from '../../../../../helpers/testReactTestingUtils';
-import { Visibility } from '../../../../../types/component';
import { CurrentUser } from '../../../../../types/users';
import { Project } from '../../../types';
import ProjectCard from '../ProjectCard';
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ComponentQualifier } from '~sonar-aligned/types/component';
-import { Visibility } from '../../types/component';
+import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component';
import { Dict } from '../../types/types';
export interface Project {
import { RadioButtonGroup } from '@sonarsource/echoes-react';
import { ButtonPrimary, FlagMessage, Modal } from 'design-system';
import React, { useState } from 'react';
+import { Visibility } from '~sonar-aligned/types/component';
import { translate } from '../../helpers/l10n';
import { useGithubProvisioningEnabledQuery } from '../../queries/identity-provider/github';
-import { Visibility } from '../../types/component';
export interface Props {
defaultVisibility: Visibility;
import * as React from 'react';
import { useState } from 'react';
import { useLocation, useNavigate } from 'react-router-dom';
+import { Visibility } from '~sonar-aligned/types/component';
import { translate } from '../../helpers/l10n';
-import { Visibility } from '../../types/component';
import ChangeDefaultVisibilityForm from './ChangeDefaultVisibilityForm';
export interface Props {
import * as React from 'react';
import { Helmet } from 'react-helmet-async';
import { throwGlobalError } from '~sonar-aligned/helpers/error';
+import { Visibility } from '~sonar-aligned/types/component';
import {
Project,
changeProjectDefaultVisibility,
import { toShortISO8601String } from '../../helpers/dates';
import { translate } from '../../helpers/l10n';
import { hasGlobalPermission } from '../../helpers/users';
-import { Visibility } from '../../types/component';
import { Permissions } from '../../types/permissions';
import { SettingsKey } from '../../types/settings';
import { LoggedInUser } from '../../types/users';
import * as React from 'react';
import { OptionProps, SingleValueProps, components } from 'react-select';
import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip';
+import { Visibility } from '~sonar-aligned/types/component';
import { Project } from '../../api/project-management';
import withAppStateContext from '../../app/components/app-state/withAppStateContext';
import { translate } from '../../helpers/l10n';
import { LabelValueSelectOption } from '../../helpers/search';
import { AppState } from '../../types/appstate';
-import { Visibility } from '../../types/component';
import BulkApplyTemplateModal from './BulkApplyTemplateModal';
import DeleteModal from './DeleteModal';
*/
import classNames from 'classnames';
import * as React from 'react';
+import { Visibility } from '~sonar-aligned/types/component';
import Tooltip from '../../components/controls/Tooltip';
import { translate } from '../../helpers/l10n';
-import { Visibility } from '../../types/component';
interface PrivacyBadgeContainerProps {
className?: string;
import { RadioButtonGroup } from '@sonarsource/echoes-react';
import classNames from 'classnames';
import * as React from 'react';
+import { Visibility } from '~sonar-aligned/types/component';
import { translate } from '../../helpers/l10n';
-import { Visibility } from '../../types/component';
export interface VisibilitySelectorProps {
canTurnToPrivate?: boolean;
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component';
import { MetricKey } from '~sonar-aligned/types/metrics';
-import { TreeComponent, Visibility } from '../../types/component';
+import { TreeComponent } from '../../types/component';
import { Component, ComponentMeasure, ComponentMeasureEnhanced } from '../../types/types';
import { mockMeasureEnhanced } from '../testMocks';
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { ComponentQualifier, Visibility } from '~sonar-aligned/types/component';
import { Project } from '../../api/project-management';
-import { Visibility } from '../../types/component';
export function mockProject(overrides: Partial<Project> = {}): Project {
return {
import { isBranch, isPullRequest } from '~sonar-aligned/helpers/branch-like';
import { isPortfolioLike } from '~sonar-aligned/helpers/component';
import { searchParamsToQuery } from '~sonar-aligned/helpers/router';
+import { LightComponent } from '~sonar-aligned/types/component';
import {
deleteBranch,
deletePullRequest,
import { Branch, BranchLike } from '../types/branch-like';
import { isApplication, isProject } from '../types/component';
import { Feature } from '../types/features';
-import { Component, LightComponent } from '../types/types';
+import { Component } from '../types/types';
// This will prevent refresh when navigating from page to page.
const BRANCHES_STALE_TIME = 30_000;
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2024 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+import { ComponentBase, ComponentQualifier } from '../../types/component';
+
+export function mockComponentBase(overrides: Partial<ComponentBase> = {}): ComponentBase {
+ return {
+ breadcrumbs: [],
+ key: 'my-project',
+ name: 'MyProject',
+ qualifier: ComponentQualifier.Project,
+ qualityGate: { isDefault: true, key: '30', name: 'Sonar way' },
+ qualityProfiles: [
+ {
+ deleted: false,
+ key: 'my-qp',
+ language: 'ts',
+ name: 'Sonar way',
+ },
+ ],
+ tags: [],
+ ...overrides,
+ };
+}
analysisDate?: string;
base: string;
branch: string;
- key: string;
isOrphan?: true;
+ key: string;
status?: { qualityGateStatus: Status };
target: string;
title: string;
SubProject = 'BRC',
TestFile = 'UTS',
}
+export interface Breadcrumb {
+ key: string;
+ name: string;
+ qualifier: string;
+}
+export interface LightComponent {
+ key: string;
+ name: string;
+ qualifier: string;
+}
+export enum Visibility {
+ Public = 'public',
+ Private = 'private',
+}
+export interface ComponentBase extends LightComponent {
+ alm?: { key: string; url: string };
+ analysisDate?: string;
+ breadcrumbs: Breadcrumb[];
+ description?: string;
+ isFavorite?: boolean;
+ leakPeriodDate?: string;
+ path?: string;
+ qualityGate?: { isDefault?: boolean; key: string | number; name: string };
+ qualityProfiles?: ComponentQualityProfile[];
+ refKey?: string;
+ tags?: string[];
+ version?: string;
+ visibility?: Visibility;
+}
+export interface ComponentQualityProfile {
+ deleted?: boolean;
+ key: string;
+ language: string;
+ name: string;
+}
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import { Visibility } from '~sonar-aligned/types/component';
import { Branch } from './branch-like';
-import { Visibility } from './component';
export interface ApplicationPeriod {
date: string;
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { isPortfolioLike } from '~sonar-aligned/helpers/component';
-import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { ComponentQualifier, LightComponent, Visibility } from '~sonar-aligned/types/component';
import { Task } from './tasks';
-import { Component, LightComponent } from './types';
-
-export enum Visibility {
- Public = 'public',
- Private = 'private',
-}
+import { Component } from './types';
export enum ProjectKeyValidationResult {
Valid = 'valid',
export interface TreeComponent extends LightComponent {
id?: string;
- name: string;
path?: string;
refId?: string;
refKey?: string;
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { ComponentBase, ComponentQualifier } from '~sonar-aligned/types/component';
import { RuleDescriptionSection } from '../apps/coding-rules/rule';
import {
CleanCodeAttribute,
CleanCodeAttributeCategory,
SoftwareImpact,
} from './clean-code-taxonomy';
-import { Visibility } from './component';
import { IssueStatus, IssueTransition, MessageFormatting } from './issues';
import { NewCodeDefinitionType } from './new-code-definition';
import { UserActive, UserBase } from './users';
name: string;
}
-export interface Breadcrumb {
- key: string;
- name: string;
- qualifier: string;
-}
-
export namespace Chart {
export interface Point {
x: Date;
}
}
-export interface Component extends LightComponent {
- alm?: { key: string; url: string };
- analysisDate?: string;
- breadcrumbs: Breadcrumb[];
+export interface Component extends ComponentBase {
branch?: string;
canBrowseAllChildProjects?: boolean;
configuration?: ComponentConfiguration;
- description?: string;
extensions?: Extension[];
- isFavorite?: boolean;
- leakPeriodDate?: string;
- name: string;
needIssueSync?: boolean;
- path?: string;
- refKey?: string;
- qualityProfiles?: ComponentQualityProfile[];
- qualityGate?: { isDefault?: boolean; key: string; name: string };
- tags?: string[];
- version?: string;
- visibility?: Visibility;
}
export interface NavigationComponent
showUpdateKey?: boolean;
}
-export interface ComponentQualityProfile {
- deleted?: boolean;
- key: string;
- language: string;
- name: string;
-}
-
export interface ComponentMeasureIntern {
analysisDate?: string;
branch?: string;
export type Languages = Dict<Language>;
-export interface LightComponent {
- key: string;
- qualifier: string;
-}
-
export interface LinearIssueLocation {
from: number;
index?: number;