*/
import { cloneDeep } from 'lodash';
import { BranchParameters } from '~sonar-aligned/types/branch-like';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { mockMetric, mockPeriod } from '../../helpers/testMocks';
-import { MetricKey } from '../../types/metrics';
import { Metric, Period } from '../../types/types';
import { getMeasures, getMeasuresWithPeriod, getMeasuresWithPeriodAndMetrics } from '../measures';
import { ComponentTree, mockFullComponentTree } from './data/components';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { cloneDeep, flatten, omit, remove } from 'lodash';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { Project } from '../../apps/quality-gates/components/Projects';
import {
mockQualityGate,
} from '../../helpers/mocks/quality-gates';
import { mockUserBase } from '../../helpers/mocks/users';
import { mockCondition, mockGroup } from '../../helpers/testMocks';
-import { MetricKey } from '../../types/metrics';
import {
QualityGateApplicationStatus,
QualityGateProjectStatus,
*/
import { chunk, cloneDeep, times } from 'lodash';
import { BranchParameters } from '~sonar-aligned/types/branch-like';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { parseDate } from '../../helpers/dates';
import { mockHistoryItem, mockMeasureHistory } from '../../helpers/mocks/project-activity';
-import { MetricKey } from '../../types/metrics';
import { MeasureHistory } from '../../types/project-activity';
import { TimeMachineResponse, getAllTimeMachineData, getTimeMachineData } from '../time-machine';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { keyBy } from 'lodash';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import { isDiffMetric } from '../../../helpers/measures';
import { mockMeasure } from '../../../helpers/testMocks';
import { SoftwareImpactSeverity } from '../../../types/clean-code-taxonomy';
import { IssueDeprecatedStatus, IssueType, RawIssue } from '../../../types/issues';
-import { MetricKey, MetricType } from '../../../types/metrics';
import { Measure } from '../../../types/types';
import { ComponentTree } from './components';
import { IssueData } from './issues';
import { throwGlobalError } from '~sonar-aligned/helpers/error';
import { getJSON } from '~sonar-aligned/helpers/request';
import { BranchParameters } from '~sonar-aligned/types/branch-like';
-import { MetricKey } from '../types/metrics';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { Paging } from '../types/types';
export interface TimeMachineResponse {
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { getAllMetrics } from '../../../../api/metrics';
import { mockMetric } from '../../../../helpers/testMocks';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byRole } from '../../../../helpers/testSelector';
-import { MetricKey } from '../../../../types/metrics';
import { MetricsContext } from '../MetricsContext';
import MetricsContextProvider from '../MetricsContextProvider';
import { QualityGateIndicator } from 'design-system';
import React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricType } from '~sonar-aligned/types/metrics';
import { translateWithParameters } from '../../../../../helpers/l10n';
import { BranchLike } from '../../../../../types/branch-like';
-import { MetricType } from '../../../../../types/metrics';
interface Props {
branchLike: BranchLike;
} from 'design-system';
import * as React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricType } from '~sonar-aligned/types/metrics';
import MetaLink from '../../../components/common/MetaLink';
import Tooltip from '../../../components/controls/Tooltip';
import DateFromNow from '../../../components/intl/DateFromNow';
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { orderLinks } from '../../../helpers/projectLinks';
import { getProjectUrl } from '../../../helpers/urls';
-import { MetricType } from '../../../types/metrics';
import { MyProject, ProjectLink, Status } from '../../../types/types';
interface Props {
import { UserEvent } from '@testing-library/user-event/dist/types/setup/setup';
import { keyBy, omit, times } from 'lodash';
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import BranchesServiceMock from '../../../api/mocks/BranchesServiceMock';
import ComponentsServiceMock from '../../../api/mocks/ComponentsServiceMock';
import IssuesServiceMock from '../../../api/mocks/IssuesServiceMock';
import { mockMeasure } from '../../../helpers/testMocks';
import { renderAppWithComponentContext } from '../../../helpers/testReactTestingUtils';
import { QuerySelector, byLabelText, byRole, byText } from '../../../helpers/testSelector';
-import { MetricKey } from '../../../types/metrics';
import { Component } from '../../../types/types';
import routes from '../routes';
} from 'design-system';
import * as React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import Measure from '../../../components/measure/Measure';
import { getLeakValue } from '../../../components/measure/utils';
import {
isDiffMetric,
} from '../../../helpers/measures';
import { isApplication, isProject } from '../../../types/component';
-import { MetricKey, MetricType } from '../../../types/metrics';
import { Metric, Status, ComponentMeasure as TypeComponentMeasure } from '../../../types/types';
interface Props {
*/
import { ContentCell, NumericalCell, RatingCell } from 'design-system';
import * as React from 'react';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import {
CCT_SOFTWARE_QUALITY_METRICS,
OLD_TO_NEW_TAXONOMY_METRICS_MAP,
} from '../../../helpers/constants';
import { translate } from '../../../helpers/l10n';
import { isPortfolioLike } from '../../../types/component';
-import { MetricKey } from '../../../types/metrics';
import { ComponentMeasure } from '../../../types/types';
interface ComponentsHeaderProps {
*/
import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like';
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { getBreadcrumbs, getChildren, getComponent, getComponentData } from '../../api/components';
import { isPullRequest } from '../../helpers/branch-like';
import { CCT_SOFTWARE_QUALITY_METRICS, OLD_TAXONOMY_METRICS } from '../../helpers/constants';
import { BranchLike } from '../../types/branch-like';
import { isPortfolioLike } from '../../types/component';
-import { MetricKey } from '../../types/metrics';
import { Breadcrumb, ComponentMeasure } from '../../types/types';
import {
addComponent,
import { ButtonPrimary, FlagMessage, FormField, Modal, Spinner } from 'design-system';
import * as React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricType } from '~sonar-aligned/types/metrics';
import { Profile, bulkActivateRules, bulkDeactivateRules } from '../../../api/quality-profiles';
import withLanguagesContext from '../../../app/components/languages/withLanguagesContext';
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { Languages } from '../../../types/languages';
-import { MetricType } from '../../../types/metrics';
import { Dict } from '../../../types/types';
import { Query, serializeQuery } from '../query';
import { QualityProfileSelector } from './QualityProfileSelector';
import { orderBy, sortBy, without } from 'lodash';
import * as React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricType } from '~sonar-aligned/types/metrics';
import Tooltip from '../../../components/controls/Tooltip';
import { translate } from '../../../helpers/l10n';
-import { MetricType } from '../../../types/metrics';
import { Dict } from '../../../types/types';
import { FacetItemsList } from '../../issues/sidebar/FacetItemsList';
import { MultipleSelectionHint } from '../../issues/sidebar/MultipleSelectionHint';
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricType } from '~sonar-aligned/types/metrics';
import { getComponentData } from '../../../api/components';
import { getFacet } from '../../../api/issues';
import withAvailableFeatures, {
import { getIssuesUrl } from '../../../helpers/urls';
import { Feature } from '../../../types/features';
import { FacetName } from '../../../types/issues';
-import { MetricType } from '../../../types/metrics';
import { Dict, RuleDetails } from '../../../types/types';
interface Props extends WithAvailableFeaturesProps {
import { times } from 'lodash';
import selectEvent from 'react-select-event';
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import BranchesServiceMock from '../../../api/mocks/BranchesServiceMock';
import ComponentsServiceMock from '../../../api/mocks/ComponentsServiceMock';
import IssuesServiceMock from '../../../api/mocks/IssuesServiceMock';
import { byLabelText, byRole, byTestId, byText } from '../../../helpers/testSelector';
import { ComponentContextShape } from '../../../types/component';
import { Feature } from '../../../types/features';
-import { MetricKey } from '../../../types/metrics';
import routes from '../routes';
jest.mock('lodash', () => ({
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import { MeasurePageView } from '../../../types/measures';
-import { MetricKey, MetricType } from '../../../types/metrics';
import { ComponentMeasure } from '../../../types/types';
import * as utils from '../utils';
import { withRouter } from '~sonar-aligned/components/hoc/withRouter';
import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like';
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { Location, Router } from '~sonar-aligned/types/router';
import { getMeasuresWithPeriod } from '../../../api/measures';
import { getAllMetrics } from '../../../api/metrics';
import { WithBranchLikesProps, useBranchesQuery } from '../../../queries/branch';
import { isPortfolioLike } from '../../../types/component';
import { MeasurePageView } from '../../../types/measures';
-import { MetricKey } from '../../../types/metrics';
import { ComponentMeasure, Dict, MeasureEnhanced, Metric, Period } from '../../../types/types';
import Sidebar from '../sidebar/Sidebar';
import {
import { Highlight, KeyboardHint } from 'design-system';
import * as React from 'react';
import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { Router } from '~sonar-aligned/types/router';
import { getComponentTree } from '../../../api/components';
import { getMeasures } from '../../../api/measures';
import { BranchLike } from '../../../types/branch-like';
import { isApplication, isFile, isView } from '../../../types/component';
import { MeasurePageView } from '../../../types/measures';
-import { MetricKey } from '../../../types/metrics';
import {
ComponentMeasure,
ComponentMeasureEnhanced,
import * as React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import LanguageDistribution from '../../../components/charts/LanguageDistribution';
import Tooltip from '../../../components/controls/Tooltip';
import Measure from '../../../components/measure/Measure';
import { isDiffMetric } from '../../../helpers/measures';
import { getMeasureHistoryUrl } from '../../../helpers/urls';
import { BranchLike } from '../../../types/branch-like';
-import { MetricKey, MetricType } from '../../../types/metrics';
import { ComponentMeasure, Metric, Period, Measure as TypeMeasure } from '../../../types/types';
import { getMetricSubnavigationName, hasFullMeasures } from '../utils';
import LeakPeriodLegend from './LeakPeriodLegend';
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { MetricKey } from '../../../types/metrics';
+import { MetricKey } from '~sonar-aligned/types/metrics';
export const bubbles: {
[domain: 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 { MetricKey } from '../../../types/metrics';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { Dict } from '../../../types/types';
export const complementary: Dict<MetricKey[]> = {
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { MetricKey } from '../../../types/metrics';
+import { MetricKey } from '~sonar-aligned/types/metrics';
interface Domains {
[domain: string]: { categories?: string[]; order: string[] };
import * as React from 'react';
import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import {
getLocalizedMetricDomain,
getLocalizedMetricName,
import { getComponentDrilldownUrl } from '../../../helpers/urls';
import { BranchLike } from '../../../types/branch-like';
import { isProject, isView } from '../../../types/component';
-import { MetricKey } from '../../../types/metrics';
import {
ComponentMeasureEnhanced,
ComponentMeasure as ComponentMeasureI,
import { ColorFilterOption, ColorsLegend } from 'design-system';
import * as React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricType } from '~sonar-aligned/types/metrics';
import { translateWithParameters } from '../../../helpers/l10n';
-import { MetricType } from '../../../types/metrics';
export interface ColorRatingsLegendProps {
className?: string;
import * as React from 'react';
import { To } from 'react-router-dom';
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { fillBranchLike } from '../../../helpers/branch-like';
import { limitComponentName, splitPath } from '../../../helpers/path';
import { getComponentDrilldownUrlWithSelection, getProjectUrl } from '../../../helpers/urls';
import { BranchLike } from '../../../types/branch-like';
import { isApplication, isProject } from '../../../types/component';
import { MeasurePageView } from '../../../types/measures';
-import { MetricKey } from '../../../types/metrics';
import { ComponentMeasure, ComponentMeasureEnhanced, Metric } from '../../../types/types';
export interface ComponentCellProps {
import { throttle } from 'lodash';
import * as React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricType } from '~sonar-aligned/types/metrics';
import ListFooter from '../../../components/controls/ListFooter';
import { isInput, isShortcut } from '../../../helpers/keyboardEventHelpers';
import { KeyboardKeys } from '../../../helpers/keycodes';
import { isDiffMetric, isPeriodBestValue } from '../../../helpers/measures';
import { BranchLike } from '../../../types/branch-like';
import { MeasurePageView } from '../../../types/measures';
-import { MetricType } from '../../../types/metrics';
import {
ComponentMeasure,
ComponentMeasureEnhanced,
import { MetricsRatingBadge, NumericalCell, RatingLabel } from 'design-system';
import * as React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricType } from '~sonar-aligned/types/metrics';
import Measure from '../../../components/measure/Measure';
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { getCCTMeasureValue, isDiffMetric } from '../../../helpers/measures';
-import { MetricType } from '../../../types/metrics';
import { ComponentMeasureEnhanced, MeasureEnhanced, Metric } from '../../../types/types';
interface Props {
import * as React from 'react';
import { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import ColorBoxLegend from '../../../components/charts/ColorBoxLegend';
import ColorGradientLegend from '../../../components/charts/ColorGradientLegend';
import { getComponentMeasureUniqueKey } from '../../../helpers/component';
import { getLocalizedMetricName, translate } from '../../../helpers/l10n';
import { isDiffMetric } from '../../../helpers/measures';
import { isDefined } from '../../../helpers/types';
-import { MetricKey, MetricType } from '../../../types/metrics';
import { ComponentMeasureEnhanced, ComponentMeasureIntern, Metric } from '../../../types/types';
import EmptyResult from './EmptyResult';
import { MetricsRatingBadge, Note, RatingLabel } from 'design-system';
import React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricType } from '~sonar-aligned/types/metrics';
import Measure from '../../../components/measure/Measure';
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { isDiffMetric } from '../../../helpers/measures';
-import { MetricType } from '../../../types/metrics';
import { MeasureEnhanced } from '../../../types/types';
interface Props {
import { groupBy, memoize, sortBy, toPairs } from 'lodash';
import { isBranch } from '~sonar-aligned/helpers/branch-like';
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import { RawQuery } from '~sonar-aligned/types/router';
import { enhanceMeasure } from '../../components/measure/utils';
import { isPullRequest } from '../../helpers/branch-like';
} from '../../helpers/query';
import { BranchLike } from '../../types/branch-like';
import { Domain, MeasurePageView } from '../../types/measures';
-import { MetricKey, MetricType } from '../../types/metrics';
import {
ComponentMeasure,
ComponentMeasureEnhanced,
import * as React from 'react';
import { WrappedComponentProps, injectIntl } from 'react-intl';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricType } from '~sonar-aligned/types/metrics';
import { longFormatterOption } from '../../../components/intl/DateFormatter';
import DateFromNow from '../../../components/intl/DateFromNow';
import DateTimeFormatter from '../../../components/intl/DateTimeFormatter';
import { parseDate } from '../../../helpers/dates';
import { translate, translateWithParameters } from '../../../helpers/l10n';
-import { MetricType } from '../../../types/metrics';
import { Component, Dict } from '../../../types/types';
import { Query } from '../utils';
import { omit } from 'lodash';
import * as React from 'react';
import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { getDirectories } from '../../../api/components';
import { translate } from '../../../helpers/l10n';
import { collapsePath } from '../../../helpers/path';
import { BranchLike } from '../../../types/branch-like';
import { TreeComponentWithPath } from '../../../types/component';
import { Facet } from '../../../types/issues';
-import { MetricKey } from '../../../types/metrics';
import { Query } from '../utils';
import { ListStyleFacet } from './ListStyleFacet';
import { omit } from 'lodash';
import * as React from 'react';
import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { getFiles } from '../../../api/components';
import { translate } from '../../../helpers/l10n';
import { collapsePath, splitPath } from '../../../helpers/path';
import { BranchLike } from '../../../types/branch-like';
import { TreeComponentWithPath } from '../../../types/component';
import { Facet } from '../../../types/issues';
-import { MetricKey } from '../../../types/metrics';
import { Query } from '../utils';
import { ListStyleFacet } from './ListStyleFacet';
import { max, sortBy, values, without } from 'lodash';
import * as React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricType } from '~sonar-aligned/types/metrics';
import { RawQuery } from '~sonar-aligned/types/router';
import ListFooter from '../../../components/controls/ListFooter';
import Tooltip from '../../../components/controls/Tooltip';
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { queriesEqual } from '../../../helpers/query';
import { isDefined } from '../../../helpers/types';
-import { MetricType } from '../../../types/metrics';
import { Dict, Paging } from '../../../types/types';
import { FacetItemsList } from './FacetItemsList';
import { ListStyleFacetFooter } from './ListStyleFacetFooter';
import { DiscreetLink, Theme, themeColor } from 'design-system';
import * as React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricType } from '~sonar-aligned/types/metrics';
import { translate, translateWithParameters } from '../../../helpers/l10n';
-import { MetricType } from '../../../types/metrics';
export interface Props {
nbShown: number;
import { omit } from 'lodash';
import * as React from 'react';
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { getTree, searchProjects } from '../../../api/components';
import { translate } from '../../../helpers/l10n';
import { highlightTerm } from '../../../helpers/search';
import { useProjectQuery } from '../../../queries/projects';
import { Facet, ReferencedComponent } from '../../../types/issues';
-import { MetricKey } from '../../../types/metrics';
import { Component, Dict, Paging } from '../../../types/types';
import { Query } from '../utils';
import { ListStyleFacet } from './ListStyleFacet';
*/
import { intersection, isArray, uniq } from 'lodash';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricType } from '~sonar-aligned/types/metrics';
import { RawQuery } from '~sonar-aligned/types/router';
import { getUsers } from '../../api/users';
import { DEFAULT_ISSUES_QUERY } from '../../components/shared/utils';
IssueStatus,
RawFacet,
} from '../../types/issues';
-import { MetricType } from '../../types/metrics';
import { SecurityStandard } from '../../types/security';
import { Dict, Flow, FlowType, Issue, Paging } from '../../types/types';
import { RestUser } from '../../types/users';
import styled from '@emotion/styled';
import { BasicSeparator, Card, Spinner, TextSubdued, themeColor } from 'design-system';
import * as React from 'react';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import GraphsHeader from '../../../components/activity-graph/GraphsHeader';
import GraphsHistory from '../../../components/activity-graph/GraphsHistory';
import {
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { localizeMetric } from '../../../helpers/measures';
import { BranchLike } from '../../../types/branch-like';
-import { MetricKey } from '../../../types/metrics';
import {
Analysis as AnalysisType,
GraphType,
import React from 'react';
import { FormattedMessage } from 'react-intl';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
-import { MetricType } from '../../../types/metrics';
+import { MetricType } from '~sonar-aligned/types/metrics';
import { AnalysisMeasuresVariations } from '../../../types/project-activity';
interface AnalysisVariationsProps {
import React from 'react';
import { useIntl } from 'react-intl';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import { getCurrentPage } from '../../../app/components/nav/component/utils';
import ComponentReportActions from '../../../components/controls/ComponentReportActions';
import HomePageSelect from '../../../components/controls/HomePageSelect';
import { findMeasure } from '../../../helpers/measures';
import { Branch } from '../../../types/branch-like';
-import { MetricKey, MetricType } from '../../../types/metrics';
import { Component, MeasureEnhanced } from '../../../types/types';
import { HomePage } from '../../../types/users';
import * as React from 'react';
import { getBranchLikeQuery, isMainBranch } from '~sonar-aligned/helpers/branch-like';
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { getApplicationDetails, getApplicationLeak } from '../../../api/application';
import { getMeasuresWithPeriodAndMetrics } from '../../../api/measures';
import { getProjectActivity } from '../../../api/projectActivity';
import { isDefined } from '../../../helpers/types';
import { ApplicationPeriod } from '../../../types/application';
import { Branch, BranchLike } from '../../../types/branch-like';
-import { MetricKey } from '../../../types/metrics';
import { Analysis, GraphType, MeasureHistory } from '../../../types/project-activity';
import { QualityGateStatus, QualityGateStatusCondition } from '../../../types/quality-gates';
import { Component, MeasureEnhanced, Metric, Period, QualityGate } from '../../../types/types';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { getComponentDrilldownUrl } from '../../../helpers/urls';
import { BranchLike } from '../../../types/branch-like';
import { isApplication } from '../../../types/component';
-import { MetricKey } from '../../../types/metrics';
import { QualityGateStatusConditionEnhanced } from '../../../types/quality-gates';
import { Component, MeasureEnhanced } from '../../../types/types';
import MeasuresCardPercent from '../components/MeasuresCardPercent';
getComponentIssuesUrl,
getComponentSecurityHotspotsUrl,
} from '~sonar-aligned/helpers/urls';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import { getLeakValue } from '../../../components/measure/utils';
import { DEFAULT_ISSUES_QUERY } from '../../../components/shared/utils';
import { findMeasure, formatRating } from '../../../helpers/measures';
import { Branch } from '../../../types/branch-like';
import { isApplication } from '../../../types/component';
import { IssueStatus } from '../../../types/issues';
-import { MetricKey, MetricType } from '../../../types/metrics';
import { QualityGateStatus } from '../../../types/quality-gates';
import { Component, MeasureEnhanced } from '../../../types/types';
import { IssueMeasuresCardInner } from '../components/IssueMeasuresCardInner';
import * as React from 'react';
import { isMainBranch } from '~sonar-aligned/helpers/branch-like';
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { getBranchLikeDisplayName } from '../../../helpers/branch-like';
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { BranchLike } from '../../../types/branch-like';
-import { MetricKey } from '../../../types/metrics';
import { Component, MeasureEnhanced } from '../../../types/types';
interface Props {
getComponentIssuesUrl,
getComponentSecurityHotspotsUrl,
} from '~sonar-aligned/helpers/urls';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import { findMeasure, formatRating } from '../../../helpers/measures';
import { CodeScope } from '../../../helpers/urls';
import { Branch } from '../../../types/branch-like';
import { SoftwareQuality } from '../../../types/clean-code-taxonomy';
import { isApplication } from '../../../types/component';
import { IssueStatus } from '../../../types/issues';
-import { MetricKey, MetricType } from '../../../types/metrics';
import { QualityGateStatus } from '../../../types/quality-gates';
import { Component, MeasureEnhanced } from '../../../types/types';
import MeasuresCard from '../components/MeasuresCard';
getComponentIssuesUrl,
getComponentSecurityHotspotsUrl,
} from '~sonar-aligned/helpers/urls';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import IssueTypeIcon from '../../../components/icon-mappers/IssueTypeIcon';
import MeasureIndicator from '../../../components/measure/MeasureIndicator';
import {
import { getComponentDrilldownUrl } from '../../../helpers/urls';
import { BranchLike } from '../../../types/branch-like';
import { IssueType } from '../../../types/issues';
-import { MetricKey, MetricType } from '../../../types/metrics';
import { QualityGateStatusConditionEnhanced } from '../../../types/quality-gates';
import { Component, Dict } from '../../../types/types';
import { RATING_TO_SEVERITIES_MAPPING } from '../utils';
import { BasicSeparator, Link } from 'design-system';
import { sortBy } from 'lodash';
import * as React from 'react';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { translate } from '../../../helpers/l10n';
import { BranchLike } from '../../../types/branch-like';
-import { MetricKey } from '../../../types/metrics';
import { QualityGateStatusConditionEnhanced } from '../../../types/quality-gates';
import { Component } from '../../../types/types';
import { CAYC_CONDITION_ORDER_PRIORITIES } from '../../quality-gates/utils';
import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
import { getComponentIssuesUrl } from '~sonar-aligned/helpers/urls';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import { propsToIssueParams } from '../../../components/shared/utils';
import { translate } from '../../../helpers/l10n';
import { isDiffMetric, localizeMetric } from '../../../helpers/measures';
import { BranchLike } from '../../../types/branch-like';
-import { MetricKey, MetricType } from '../../../types/metrics';
import { QualityGateStatusConditionEnhanced } from '../../../types/quality-gates';
import { Component } from '../../../types/types';
import { useIntl } from 'react-intl';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
import { getComponentIssuesUrl } from '~sonar-aligned/helpers/urls';
+import { MetricType } from '~sonar-aligned/types/metrics';
import { DEFAULT_ISSUES_QUERY } from '../../../components/shared/utils';
import { Branch } from '../../../types/branch-like';
import { SoftwareImpactSeverity, SoftwareQuality } from '../../../types/clean-code-taxonomy';
-import { MetricType } from '../../../types/metrics';
import { Component } from '../../../types/types';
export interface SoftwareImpactMeasureBreakdownCardProps {
import { FormattedMessage, useIntl } from 'react-intl';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
import { getComponentIssuesUrl } from '~sonar-aligned/helpers/urls';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import Tooltip from '../../../components/controls/Tooltip';
import { DEFAULT_ISSUES_QUERY } from '../../../components/shared/utils';
import {
SoftwareImpactSeverity,
SoftwareQuality,
} from '../../../types/clean-code-taxonomy';
-import { MetricKey, MetricType } from '../../../types/metrics';
import { QualityGateStatusConditionEnhanced } from '../../../types/quality-gates';
import { Component, MeasureEnhanced } from '../../../types/types';
import { Status, softwareQualityToMeasure } from '../utils';
import { Card, DiscreetLink } from 'design-system';
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import withCurrentUserContext from '../../../app/components/current-user/withCurrentUserContext';
import { SonarLintLogo } from '../../../components/logos/SonarLintLogo';
import { translate } from '../../../helpers/l10n';
-import { MetricKey } from '../../../types/metrics';
import { QualityGateStatusCondition } from '../../../types/quality-gates';
import { CurrentUser } from '../../../types/users';
import userEvent from '@testing-library/user-event';
import { Route, useSearchParams } from 'react-router-dom';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { parseDate } from '../../../../helpers/dates';
import { renderAppRoutes } from '../../../../helpers/testReactTestingUtils';
-import { MetricKey } from '../../../../types/metrics';
import {
ApplicationAnalysisEventCategory,
DefinitionChangeType,
import { screen, waitFor } from '@testing-library/react';
import * as React from 'react';
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import AlmSettingsServiceMock from '../../../../api/mocks/AlmSettingsServiceMock';
import ApplicationServiceMock from '../../../../api/mocks/ApplicationServiceMock';
import BranchesServiceMock from '../../../../api/mocks/BranchesServiceMock';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byRole, byText } from '../../../../helpers/testSelector';
import { SoftwareImpactSeverity, SoftwareQuality } from '../../../../types/clean-code-taxonomy';
-import { MetricKey } from '../../../../types/metrics';
import { ProjectAnalysisEventCategory } from '../../../../types/project-activity';
import { CaycStatus } from '../../../../types/types';
import BranchOverview, { NO_CI_DETECTED } from '../BranchOverview';
*/
import { screen } from '@testing-library/react';
import * as React from 'react';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import { mockBranch } from '../../../../helpers/mocks/branch-like';
import { mockQualityGateStatusConditionEnhanced } from '../../../../helpers/mocks/quality-gates';
import { mockMetric } from '../../../../helpers/testMocks';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
-import { MetricKey, MetricType } from '../../../../types/metrics';
import { QualityGateStatusConditionEnhanced } from '../../../../types/quality-gates';
import QualityGateCondition from '../QualityGateCondition';
*/
import { screen } from '@testing-library/react';
import * as React from 'react';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import CurrentUserContextProvider from '../../../../app/components/current-user/CurrentUserContextProvider';
import { mockQualityGate, mockQualityGateStatus } from '../../../../helpers/mocks/quality-gates';
import { mockLoggedInUser } from '../../../../helpers/testMocks';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byRole } from '../../../../helpers/testSelector';
-import { MetricKey } from '../../../../types/metrics';
import { CaycStatus, Status } from '../../../../types/types';
import { CurrentUser, NoticeType } from '../../../../types/users';
import QualityGatePanelSection, { QualityGatePanelSectionProps } from '../QualityGatePanelSection';
*/
import { screen } from '@testing-library/react';
import React from 'react';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import { mockQualityGateStatusConditionEnhanced } from '../../../../helpers/mocks/quality-gates';
import { mockMetric } from '../../../../helpers/testMocks';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
-import { MetricKey, MetricType } from '../../../../types/metrics';
import { QualityGateStatusConditionEnhanced } from '../../../../types/quality-gates';
import QualityGateCondition from '../QualityGateCondition';
import QualityGateSimplifiedCondition from '../QualityGateSimplifiedCondition';
*/
import { screen } from '@testing-library/react';
import * as React from 'react';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { mockQualityGateStatusCondition } from '../../../../helpers/mocks/quality-gates';
import { mockCurrentUser } from '../../../../helpers/testMocks';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
-import { MetricKey } from '../../../../types/metrics';
import { SonarLintPromotion, SonarLintPromotionProps } from '../SonarLintPromotion';
it('should render correctly', () => {
import { Badge, NoDataIcon, themeColor } from 'design-system';
import * as React from 'react';
import { Path } from 'react-router-dom';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { localizeMetric } from '../../../helpers/measures';
-import { MetricKey } from '../../../types/metrics';
interface IssueMeasuresCardInnerProps extends React.HTMLAttributes<HTMLDivElement> {
metric: MetricKey;
import { Badge, Card, themeBorder, themeColor } from 'design-system';
import * as React from 'react';
import { To } from 'react-router-dom';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { localizeMetric } from '../../../helpers/measures';
-import { MetricKey } from '../../../types/metrics';
export interface MeasuresCardProps {
url: To;
import { useIntl } from 'react-intl';
import { To } from 'react-router-dom';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
-import { MetricKey, MetricType } from '../../../types/metrics';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import { QualityGateStatusConditionEnhanced } from '../../../types/quality-gates';
import { Status, getConditionRequiredLabel } from '../utils';
import MeasuresCard, { MeasuresCardProps } from './MeasuresCard';
import { FormattedMessage, useIntl } from 'react-intl';
import { To } from 'react-router-dom';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import { duplicationRatingConverter, getLeakValue } from '../../../components/measure/utils';
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { findMeasure, localizeMetric } from '../../../helpers/measures';
import { getComponentDrilldownUrl } from '../../../helpers/urls';
import { BranchLike } from '../../../types/branch-like';
-import { MetricKey, MetricType } from '../../../types/metrics';
import { QualityGateStatusConditionEnhanced } from '../../../types/quality-gates';
import { MeasureEnhanced } from '../../../types/types';
import {
getComponentIssuesUrl,
getComponentSecurityHotspotsUrl,
} from '~sonar-aligned/helpers/urls';
+import { MetricType } from '~sonar-aligned/types/metrics';
import {
DEFAULT_ISSUES_QUERY,
isIssueMeasure,
import { getComponentDrilldownUrl } from '../../../helpers/urls';
import { BranchLike } from '../../../types/branch-like';
import { IssueType } from '../../../types/issues';
-import { MetricType } from '../../../types/metrics';
import { QualityGateStatusConditionEnhanced } from '../../../types/quality-gates';
import { Component } from '../../../types/types';
import {
import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
import { getComponentIssuesUrl } from '~sonar-aligned/helpers/urls';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import { getLeakValue } from '../../../components/measure/utils';
import { DEFAULT_ISSUES_QUERY } from '../../../components/shared/utils';
import { findMeasure } from '../../../helpers/measures';
import { PullRequest } from '../../../types/branch-like';
-import { MetricKey, MetricType } from '../../../types/metrics';
import { QualityGateStatusConditionEnhanced } from '../../../types/quality-gates';
import { Component, MeasureEnhanced } from '../../../types/types';
import { IssueMeasuresCardInner } from '../components/IssueMeasuresCardInner';
import classNames from 'classnames';
import * as React from 'react';
import { getComponentSecurityHotspotsUrl } from '~sonar-aligned/helpers/urls';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { getLeakValue } from '../../../components/measure/utils';
import { findMeasure } from '../../../helpers/measures';
import { getComponentDrilldownUrl } from '../../../helpers/urls';
import { PullRequest } from '../../../types/branch-like';
-import { MetricKey } from '../../../types/metrics';
import { QualityGateStatusConditionEnhanced } from '../../../types/quality-gates';
import { Component, MeasureEnhanced } from '../../../types/types';
import MeasuresCardNumber from '../components/MeasuresCardNumber';
import React from 'react';
import { useIntl } from 'react-intl';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import CurrentBranchLikeMergeInformation from '../../../app/components/nav/component/branch-like/CurrentBranchLikeMergeInformation';
import { getLeakValue } from '../../../components/measure/utils';
import { findMeasure } from '../../../helpers/measures';
import { PullRequest } from '../../../types/branch-like';
-import { MetricKey, MetricType } from '../../../types/metrics';
import { MeasureEnhanced } from '../../../types/types';
import LastAnalysisLabel from '../components/LastAnalysisLabel';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import { mockPullRequest } from '../../../../helpers/mocks/branch-like';
import { mockComponent } from '../../../../helpers/mocks/component';
import { mockQualityGateStatusConditionEnhanced } from '../../../../helpers/mocks/quality-gates';
import { mockMeasureEnhanced, mockMetric } from '../../../../helpers/testMocks';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byLabelText, byRole } from '../../../../helpers/testSelector';
-import { MetricKey, MetricType } from '../../../../types/metrics';
import { FCProps } from '../../../../types/misc';
import { Status } from '../../utils';
import BranchQualityGate from '../BranchQualityGate';
import userEvent from '@testing-library/user-event';
import * as React from 'react';
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import BranchesServiceMock from '../../../../api/mocks/BranchesServiceMock';
import { fetchQualityGate, getQualityGateProjectStatus } from '../../../../api/quality-gates';
import CurrentUserContextProvider from '../../../../app/components/current-user/CurrentUserContextProvider';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { byLabelText, byRole } from '../../../../helpers/testSelector';
import { ComponentPropsType } from '../../../../helpers/testUtils';
-import { MetricKey, MetricType } from '../../../../types/metrics';
import { CaycStatus } from '../../../../types/types';
import { NoticeType } from '../../../../types/users';
import PullRequestOverview from '../PullRequestOverview';
jest.mock('../../../../api/measures', () => {
return {
- ...jest.requireActual('../../../../types/metrics'),
+ ...jest.requireActual('../../../../sonar-aligned/types/metrics'),
getMeasuresWithMetrics: jest.fn().mockResolvedValue({
component: {
key: '',
jest.mock('../../../../api/quality-gates', () => {
const { mockQualityGateProjectStatus, mockQualityGateApplicationStatus, mockQualityGate } =
jest.requireActual('../../../../helpers/mocks/quality-gates');
- const { MetricKey } = jest.requireActual('../../../../types/metrics');
+ const { MetricKey } = jest.requireActual('../../../../sonar-aligned/types/metrics');
return {
getQualityGateProjectStatus: jest.fn().mockResolvedValue(
mockQualityGateProjectStatus({
import React from 'react';
import { IntlShape } from 'react-intl';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import { RawQuery } from '~sonar-aligned/types/router';
import { ISSUETYPE_METRIC_KEYS_MAP } from '../../helpers/issues';
import { translate } from '../../helpers/l10n';
import { parseAsString } from '../../helpers/query';
import { SoftwareQuality } from '../../types/clean-code-taxonomy';
import { IssueType } from '../../types/issues';
-import { MetricKey, MetricType } from '../../types/metrics';
import { AnalysisMeasuresVariations, MeasureHistory } from '../../types/project-activity';
import { QualityGateStatusConditionEnhanced } from '../../types/quality-gates';
import { Dict } from '../../types/types';
import React from 'react';
import { useLocation, useRouter } from '~sonar-aligned/components/hoc/withRouter';
import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import {
useComponent,
useTopLevelComponentKey,
import { useAllMeasuresHistoryQuery } from '../../../queries/measures';
import { useAllProjectAnalysesQuery } from '../../../queries/project-analyses';
import { isApplication, isPortfolioLike, isProject } from '../../../types/component';
-import { MetricKey } from '../../../types/metrics';
import { MeasureHistory, ParsedAnalysis } from '../../../types/project-activity';
import { Query, parseQuery, serializeUrlQuery } from '../utils';
import ProjectActivityAppRenderer from './ProjectActivityAppRenderer';
import React from 'react';
import { Route } from 'react-router-dom';
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import ApplicationServiceMock from '../../../../api/mocks/ApplicationServiceMock';
import { ProjectActivityServiceMock } from '../../../../api/mocks/ProjectActivityServiceMock';
import { TimeMachineServiceMock } from '../../../../api/mocks/TimeMachineServiceMock';
import { mockMetric } from '../../../../helpers/testMocks';
import { renderAppWithComponentContext } from '../../../../helpers/testReactTestingUtils';
import { byLabelText, byRole, byTestId, byText } from '../../../../helpers/testSelector';
-import { MetricKey, MetricType } from '../../../../types/metrics';
import {
ApplicationAnalysisEventCategory,
GraphType,
*/
import { startOfDay } from 'date-fns';
import { isEqual, uniq } from 'lodash';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { RawQuery } from '~sonar-aligned/types/router';
import { DEFAULT_GRAPH } from '../../components/activity-graph/utils';
import { parseDate } from '../../helpers/dates';
serializeString,
serializeStringArray,
} from '../../helpers/query';
-import { MetricKey } from '../../types/metrics';
import { GraphType, ParsedAnalysis } from '../../types/project-activity';
import { Dict } from '../../types/types';
*/
import { Card, LargeCenteredLayout, PageContentFontWrapper, Title } from 'design-system';
import React, { useEffect, useState } from 'react';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { getMeasures } from '../../api/measures';
import withAvailableFeatures, {
WithAvailableFeaturesProps,
import { BranchLike } from '../../types/branch-like';
import { isApplication, isProject } from '../../types/component';
import { Feature } from '../../types/features';
-import { MetricKey } from '../../types/metrics';
import { Component, Dict, Measure, Metric } from '../../types/types';
import { CurrentUser, isLoggedIn } from '../../types/users';
import AboutProject from './about/AboutProject';
*/
import { screen } from '@testing-library/react';
import { ComponentQualifier } 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 ComponentsServiceMock from '../../../api/mocks/ComponentsServiceMock';
import { renderAppWithComponentContext } from '../../../helpers/testReactTestingUtils';
import { byRole } from '../../../helpers/testSelector';
import { Visibility } from '../../../types/component';
-import { MetricKey } from '../../../types/metrics';
import { Component } from '../../../types/types';
import { CurrentUser } from '../../../types/users';
import routes from '../routes';
import * as React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import { translate, translateWithParameters } from '../../../../helpers/l10n';
import { localizeMetric } from '../../../../helpers/measures';
import { getComponentDrilldownUrl } from '../../../../helpers/urls';
-import { MetricKey, MetricType } from '../../../../types/metrics';
import { Component, Measure } from '../../../../types/types';
interface MetaSizeProps {
import * as React from 'react';
import { useState } from 'react';
import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { Image } from '../../../components/common/Image';
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { localizeMetric } from '../../../helpers/measures';
useRenewBagdeTokenMutation,
} from '../../../queries/badges';
import { BranchLike } from '../../../types/branch-like';
-import { MetricKey } from '../../../types/metrics';
import { Component } from '../../../types/types';
import { BadgeFormats, BadgeOptions, BadgeType, getBadgeSnippet, getBadgeUrl } from './utils';
import * as React from 'react';
import selectEvent from 'react-select-event';
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { getProjectBadgesToken } from '../../../../api/project-badges';
import { mockBranch } from '../../../../helpers/mocks/branch-like';
import { mockComponent } from '../../../../helpers/mocks/component';
import { renderComponent } from '../../../../helpers/testReactTestingUtils';
import { Location } from '../../../../helpers/urls';
-import { MetricKey } from '../../../../types/metrics';
import ProjectBadges, { ProjectBadgesProps } from '../ProjectBadges';
import { BadgeType } from '../utils';
import { useSearchParams } from 'react-router-dom';
import { withRouter } from '~sonar-aligned/components/hoc/withRouter';
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { Location, RawQuery, Router } from '~sonar-aligned/types/router';
import { searchProjects } from '../../../api/components';
import withAppStateContext from '../../../app/components/app-state/withAppStateContext';
import { get, save } from '../../../helpers/storage';
import { isDefined } from '../../../helpers/types';
import { AppState } from '../../../types/appstate';
-import { MetricKey } from '../../../types/metrics';
import { CurrentUser, isLoggedIn } from '../../../types/users';
import { Query, hasFilterParams, parseUrlQuery } from '../query';
import '../styles.css';
import * as React from 'react';
import { AutoSizerProps } from 'react-virtualized';
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { ProjectsServiceMock } from '../../../../api/mocks/ProjectsServiceMock';
import { save } from '../../../../helpers/storage';
import { mockAppState, mockLoggedInUser } from '../../../../helpers/testMocks';
import { renderAppRoutes } from '../../../../helpers/testReactTestingUtils';
import { byLabelText, byRole, byText } from '../../../../helpers/testSelector';
-import { MetricKey } from '../../../../types/metrics';
import { Dict } from '../../../../types/types';
import projectRoutes from '../../routes';
import { LS_PROJECTS_SORT, LS_PROJECTS_VIEW } from '../AllProjects';
import { FormattedMessage } from 'react-intl';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import Favorite from '../../../../components/controls/Favorite';
import Tooltip from '../../../../components/controls/Tooltip';
import DateFromNow from '../../../../components/intl/DateFromNow';
import { translate, translateWithParameters } from '../../../../helpers/l10n';
import { isDefined } from '../../../../helpers/types';
import { getProjectUrl } from '../../../../helpers/urls';
-import { MetricKey, MetricType } from '../../../../types/metrics';
import { Status } from '../../../../types/types';
import { CurrentUser, isLoggedIn } from '../../../../types/users';
import { Project } from '../../types';
} from 'design-system';
import * as React from 'react';
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import Measure from '../../../../components/measure/Measure';
import { duplicationRatingConverter } from '../../../../components/measure/utils';
import { translate } from '../../../../helpers/l10n';
import { formatRating } from '../../../../helpers/measures';
import { isDefined } from '../../../../helpers/types';
-import { MetricKey, MetricType } from '../../../../types/metrics';
import { Dict } from '../../../../types/types';
import ProjectCardMeasure from './ProjectCardMeasure';
import { screen } from '@testing-library/react';
import React from 'react';
import { ComponentQualifier } 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 { MetricKey } from '../../../../../types/metrics';
import { CurrentUser } from '../../../../../types/users';
import { Project } from '../../../types';
import ProjectCard from '../ProjectCard';
import * as React from 'react';
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { renderComponent } from '../../../../../helpers/testReactTestingUtils';
-import { MetricKey } from '../../../../../types/metrics';
import { Dict } from '../../../../../types/types';
import ProjectCardMeasures, { ProjectCardMeasuresProps } from '../ProjectCardMeasures';
*/
import { CoverageIndicator } from 'design-system';
import * as React from 'react';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { RawQuery } from '~sonar-aligned/types/router';
import { translate, translateWithParameters } from '../../../helpers/l10n';
import { getCoverageRatingAverageValue, getCoverageRatingLabel } from '../../../helpers/ratings';
-import { MetricKey } from '../../../types/metrics';
import { Facet } from '../types';
import RangeFacetBase from './RangeFacetBase';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { MetricKey } from '../../../types/metrics';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import CoverageFilter, { Props } from './CoverageFilter';
export default function NewCoverageFilter(props: Props) {
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { RawQuery } from '~sonar-aligned/types/router';
import { translate } from '../../../helpers/l10n';
import { getSizeRatingLabel } from '../../../helpers/ratings';
-import { MetricKey } from '../../../types/metrics';
import { Facet } from '../types';
import RangeFacetBase from './RangeFacetBase';
import { MetricsRatingBadge, RatingEnum } from 'design-system';
import * as React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricType } from '~sonar-aligned/types/metrics';
import { RawQuery } from '~sonar-aligned/types/router';
import { translate, translateWithParameters } from '../../../helpers/l10n';
-import { MetricType } from '../../../types/metrics';
import { Facet } from '../types';
import RangeFacetBase from './RangeFacetBase';
import { MetricsRatingBadge, RatingEnum } from 'design-system';
import * as React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricType } from '~sonar-aligned/types/metrics';
import { RawQuery } from '~sonar-aligned/types/router';
import { translate, translateWithParameters } from '../../../helpers/l10n';
-import { MetricType } from '../../../types/metrics';
import { Dict } from '../../../types/types';
import { Facet } from '../types';
import RangeFacetBase from './RangeFacetBase';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { invert } from 'lodash';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { Facet, getScannableProjects, searchProjects } from '../../api/components';
import { getMeasuresForProjects } from '../../api/measures';
import { translate, translateWithParameters } from '../../helpers/l10n';
import { isDiffMetric } from '../../helpers/measures';
import { RequestData } from '../../helpers/request';
-import { MetricKey } from '../../types/metrics';
import { Dict } from '../../types/types';
import { Query, convertToFilter } from './query';
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { mockCondition, mockMetric } from '../../../helpers/testMocks';
-import { MetricKey } from '../../../types/metrics';
import { Condition } from '../../../types/types';
import { getLocalizedMetricNameNoDiffMetric, groupAndSortByPriorityConditions } from '../utils';
import { FormattedMessage } from 'react-intl';
import DocHelpTooltip from '~sonar-aligned/components/controls/DocHelpTooltip';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import withMetricsContext from '../../../app/components/metrics/withMetricsContext';
import { translate } from '../../../helpers/l10n';
-import { MetricKey } from '../../../types/metrics';
import { Condition, Dict, Metric } from '../../../types/types';
import { getCaycConditionMetadata, getLocalizedMetricNameNoDiffMetric } from '../utils';
*/
import * as React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { translate } from '../../../helpers/l10n';
-import { MetricKey } from '../../../types/metrics';
import { Condition, Metric } from '../../../types/types';
import { GreenColorText } from './ConditionValue';
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
import DocHelpTooltip from '~sonar-aligned/components/controls/DocHelpTooltip';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { useAvailableFeatures } from '../../../app/components/available-features/withAvailableFeatures';
import { useMetrics } from '../../../app/components/metrics/withMetricsContext';
import DocumentationLink from '../../../components/common/DocumentationLink';
import { useDocUrl } from '../../../helpers/docs';
import { getLocalizedMetricName, translate } from '../../../helpers/l10n';
import { Feature } from '../../../types/features';
-import { MetricKey } from '../../../types/metrics';
import { CaycStatus, Condition as ConditionType, QualityGate } from '../../../types/types';
import { groupAndSortByPriorityConditions, isQualityGateOptimized } from '../utils';
import AddConditionModal from './AddConditionModal';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { sortBy } from 'lodash';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { getLocalizedMetricName } from '../../helpers/l10n';
import { isDiffMetric } from '../../helpers/measures';
-import { MetricKey } from '../../types/metrics';
import { CaycStatus, Condition, Dict, Metric, QualityGate } from '../../types/types';
interface GroupedByMetricConditions {
import { ContentCell, Link, Note, NumericalCell, TableRow } from 'design-system';
import * as React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricType } from '~sonar-aligned/types/metrics';
import { translateWithParameters } from '../../../helpers/l10n';
import { isDefined } from '../../../helpers/types';
import { getRulesUrl } from '../../../helpers/urls';
-import { MetricType } from '../../../types/metrics';
import { RulesFacetName } from '../../../types/rules';
interface Props {
import * as React from 'react';
import { useIntl } from 'react-intl';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricType } from '~sonar-aligned/types/metrics';
import { listRules } from '../../../api/rules';
import { toShortISO8601String } from '../../../helpers/dates';
import { translateWithParameters } from '../../../helpers/l10n';
import { getRulesUrl } from '../../../helpers/urls';
-import { MetricType } from '../../../types/metrics';
import { Rule, RuleActivation } from '../../../types/types';
const RULES_LIMIT = 10;
import { withRouter } from '~sonar-aligned/components/hoc/withRouter';
import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like';
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { Location, Router } from '~sonar-aligned/types/router';
import { getMeasures } from '../../api/measures';
import { getSecurityHotspotList, getSecurityHotspots } from '../../api/security-hotspots';
import { getStandards } from '../../helpers/security-standard';
import { withBranchLikes } from '../../queries/branch';
import { BranchLike } from '../../types/branch-like';
-import { MetricKey } from '../../types/metrics';
import { SecurityStandard, Standards } from '../../types/security';
import {
HotspotFilters,
import { Helmet } from 'react-helmet-async';
import { isBranch } from '~sonar-aligned/helpers/branch-like';
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import A11ySkipTarget from '../../components/a11y/A11ySkipTarget';
import Suggestions from '../../components/embed-docs-modal/Suggestions';
import { translate } from '../../helpers/l10n';
import useFollowScroll from '../../hooks/useFollowScroll';
import { BranchLike } from '../../types/branch-like';
-import { MetricKey } from '../../types/metrics';
import { SecurityStandard, Standards } from '../../types/security';
import { HotspotFilters, HotspotStatusFilter, RawHotspot } from '../../types/security-hotspots';
import { Component, StandardSecurityCategories } from '../../types/types';
import userEvent from '@testing-library/user-event';
import React from 'react';
import { Route } from 'react-router-dom';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import BranchesServiceMock from '../../../api/mocks/BranchesServiceMock';
import CodingRulesServiceMock from '../../../api/mocks/CodingRulesServiceMock';
import SecurityHotspotServiceMock from '../../../api/mocks/SecurityHotspotServiceMock';
import { renderAppWithComponentContext } from '../../../helpers/testReactTestingUtils';
import { byDisplayValue, byRole, byTestId, byText } from '../../../helpers/testSelector';
import { ComponentContextShape } from '../../../types/component';
-import { MetricKey } from '../../../types/metrics';
import SecurityHotspotsApp from '../SecurityHotspotsApp';
import useStickyDetection from '../hooks/useStickyDetection';
import * as React from 'react';
import HelpTooltip from '~sonar-aligned/components/controls/HelpTooltip';
import { isBranch } from '~sonar-aligned/helpers/branch-like';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import withComponentContext from '../../../app/components/componentContext/withComponentContext';
import withCurrentUserContext from '../../../app/components/current-user/withCurrentUserContext';
import Tooltip from '../../../components/controls/Tooltip';
import { translate } from '../../../helpers/l10n';
import { BranchLike } from '../../../types/branch-like';
import { ComponentContextShape } from '../../../types/component';
-import { MetricKey, MetricType } from '../../../types/metrics';
import { HotspotFilters } from '../../../types/security-hotspots';
import { CurrentUser, isLoggedIn } from '../../../types/users';
import { HotspotDisabledFilterTooltip } from './HotspotDisabledFilterTooltip';
*/
import { ButtonSecondary, LightLabel, SonarCodeColorizer, Spinner } from 'design-system';
import * as React from 'react';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { decorateWithUnderlineFlags } from '../../helpers/code-viewer';
import { translate } from '../../helpers/l10n';
import { BranchLike } from '../../types/branch-like';
-import { MetricKey } from '../../types/metrics';
import {
Duplication,
FlowLocation,
getComponentSecurityHotspotsUrl,
} from '~sonar-aligned/helpers/urls';
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import { SOFTWARE_QUALITIES } from '../../helpers/constants';
import {
ISSUETYPE_METRIC_KEYS_MAP,
import { getBranchLikeUrl, getCodeUrl } from '../../helpers/urls';
import type { BranchLike } from '../../types/branch-like';
import { IssueType } from '../../types/issues';
-import { MetricKey, MetricType } from '../../types/metrics';
import type { Measure, SourceViewerFile } from '../../types/types';
import { DEFAULT_ISSUES_QUERY } from '../shared/utils';
import type { WorkspaceContextShape } from '../workspace/context';
import { queryHelpers, screen, within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import * as React from 'react';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import ComponentsServiceMock from '../../../api/mocks/ComponentsServiceMock';
import IssuesServiceMock from '../../../api/mocks/IssuesServiceMock';
import UsersServiceMock from '../../../api/mocks/UsersServiceMock';
import { mockIssue, mockLoggedInUser, mockMeasure } from '../../../helpers/testMocks';
import { renderComponent } from '../../../helpers/testReactTestingUtils';
import { byLabelText } from '../../../helpers/testSelector';
-import { MetricKey } from '../../../types/metrics';
import { RestUserDetailed } from '../../../types/users';
import SourceViewer, { Props } from '../SourceViewer';
import loadIssues from '../helpers/loadIssues';
import { ButtonSecondary, ChevronDownIcon, Dropdown, TextMuted } from 'design-system';
import { sortBy } from 'lodash';
import * as React from 'react';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import { CCT_SOFTWARE_QUALITY_METRICS, HIDDEN_METRICS } from '../../helpers/constants';
import { getLocalizedMetricName, translate } from '../../helpers/l10n';
import { isDiffMetric } from '../../helpers/measures';
-import { MetricKey, MetricType } from '../../types/metrics';
import { Metric } from '../../types/types';
import AddGraphMetricPopup from './AddGraphMetricPopup';
import { Badge, FlagMessage, MultiSelectMenu } from 'design-system';
import * as React from 'react';
import { FormattedMessage, useIntl } from 'react-intl';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { DEPRECATED_ACTIVITY_METRICS } from '../../helpers/constants';
import { getLocalizedMetricName, translate, translateWithParameters } from '../../helpers/l10n';
-import { MetricKey } from '../../types/metrics';
import { getDeprecatedTranslationKeyForTooltip } from './utils';
export interface AddGraphMetricPopupProps {
} from 'design-system';
import * as React from 'react';
import { FormattedMessage, useIntl } from 'react-intl';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { DEPRECATED_ACTIVITY_METRICS } from '../../helpers/constants';
import { translateWithParameters } from '../../helpers/l10n';
-import { MetricKey } from '../../types/metrics';
import Tooltip from '../controls/Tooltip';
import { ChartLegend } from './ChartLegend';
import { getDeprecatedTranslationKeyForTooltip } from './utils';
import { TableSeparator } from 'design-system';
import * as React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import { translate } from '../../helpers/l10n';
-import { MetricKey, MetricType } from '../../types/metrics';
import { MeasureHistory } from '../../types/project-activity';
export interface GraphsTooltipsContentCoverageProps {
import { TableSeparator } from 'design-system';
import * as React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import { translate } from '../../helpers/l10n';
-import { MetricKey, MetricType } from '../../types/metrics';
import { MeasureHistory } from '../../types/project-activity';
export interface GraphsTooltipsContentDuplicationProps {
import userEvent from '@testing-library/user-event';
import { times } from 'lodash';
import * as React from 'react';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import { CCT_SOFTWARE_QUALITY_METRICS } from '../../../helpers/constants';
import { parseDate } from '../../../helpers/dates';
import { mockHistoryItem, mockMeasureHistory } from '../../../helpers/mocks/project-activity';
import { renderComponent } from '../../../helpers/testReactTestingUtils';
import { byLabelText, byPlaceholderText, byRole, byText } from '../../../helpers/testSelector';
import { ComponentPropsType } from '../../../helpers/testUtils';
-import { MetricKey, MetricType } from '../../../types/metrics';
import { GraphType, MeasureHistory } from '../../../types/project-activity';
import { Metric } from '../../../types/types';
import GraphsHeader from '../GraphsHeader';
import { screen } from '@testing-library/react';
import { times } from 'lodash';
import * as React from 'react';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { parseDate } from '../../../helpers/dates';
import {
mockAnalysisEvent,
} from '../../../helpers/mocks/project-activity';
import { mockMetric } from '../../../helpers/testMocks';
import { renderComponent } from '../../../helpers/testReactTestingUtils';
-import { MetricKey } from '../../../types/metrics';
import {
GraphType,
MeasureHistory,
*/
import { screen } from '@testing-library/react';
import * as React from 'react';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { parseDate } from '../../../helpers/dates';
import {
mockAnalysisEvent,
} from '../../../helpers/mocks/project-activity';
import { mockMetric } from '../../../helpers/testMocks';
import { renderComponent } from '../../../helpers/testReactTestingUtils';
-import { MetricKey } from '../../../types/metrics';
import { GraphType, MeasureHistory } from '../../../types/project-activity';
import { Metric } from '../../../types/types';
import { GraphsTooltips, Props } from '../GraphsTooltips';
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import * as dates from '../../../helpers/dates';
import { mockMeasureHistory, mockSerie } from '../../../helpers/mocks/project-activity';
import { get, save } from '../../../helpers/storage';
import { mockMetric } from '../../../helpers/testMocks';
-import { MetricKey, MetricType } from '../../../types/metrics';
import { GraphType } from '../../../types/project-activity';
import * as utils from '../utils';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { chunk, flatMap, groupBy, sortBy } from 'lodash';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import {
CCT_SOFTWARE_QUALITY_METRICS,
OLD_TO_NEW_TAXONOMY_METRICS_MAP,
import { getLocalizedMetricName, translate } from '../../helpers/l10n';
import { localizeMetric } from '../../helpers/measures';
import { get, save } from '../../helpers/storage';
-import { MetricKey, MetricType } from '../../types/metrics';
import { GraphType, MeasureHistory, ParsedAnalysis, Serie } from '../../types/project-activity';
import { Dict, Metric } from '../../types/types';
import { CSSColor, ThemeProp, themeColor, withTheme } from 'design-system';
import { flatten, isEqual, sortBy, throttle, uniq } from 'lodash';
import * as React from 'react';
+import { MetricType } from '~sonar-aligned/types/metrics';
import { isDefined } from '../../helpers/types';
-import { MetricType } from '../../types/metrics';
import { Chart } from '../../types/types';
import { LINE_CHART_DASHES } from '../activity-graph/utils';
import './AdvancedTimeline.css';
import { sortBy } from 'lodash';
import * as React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricType } from '~sonar-aligned/types/metrics';
import withLanguagesContext from '../../app/components/languages/withLanguagesContext';
import { translate } from '../../helpers/l10n';
import { Languages } from '../../types/languages';
-import { MetricType } from '../../types/metrics';
export interface LanguageDistributionProps {
distribution: string;
import { flatten, sortBy, throttle } from 'lodash';
import * as React from 'react';
import Draggable, { DraggableBounds, DraggableCore, DraggableData } from 'react-draggable';
-import { MetricType } from '../../types/metrics';
+import { MetricType } from '~sonar-aligned/types/metrics';
import { Chart } from '../../types/types';
import { LINE_CHART_DASHES } from '../activity-graph/utils';
*/
import { render } from '@testing-library/react';
import * as React from 'react';
-import { MetricType } from '../../../types/metrics';
+import { MetricType } from '~sonar-aligned/types/metrics';
import { AdvancedTimeline, PropsWithoutTheme } from '../AdvancedTimeline';
// Replace scaleTime with scaleUtc to avoid timezone-dependent snapshots
*/
import * as React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
-import { MetricType } from '../../types/metrics';
+import { MetricType } from '~sonar-aligned/types/metrics';
export interface PageCounterProps {
className?: string;
import { ButtonSecondary, Spinner, themeColor } from 'design-system';
import * as React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricType } from '~sonar-aligned/types/metrics';
import { translate, translateWithParameters } from '../../helpers/l10n';
-import { MetricType } from '../../types/metrics';
export interface ListFooterProps {
loadMoreAriaLabel?: string;
import { MetricsRatingBadge, QualityGateIndicator, RatingLabel } from 'design-system';
import * as React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricType } from '~sonar-aligned/types/metrics';
import Tooltip from '../../components/controls/Tooltip';
import { translate, translateWithParameters } from '../../helpers/l10n';
-import { MetricType } from '../../types/metrics';
import { Status } from '../../types/types';
import RatingTooltipContent from './RatingTooltipContent';
} from 'design-system';
import * as React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
-import { MetricKey, MetricType } from '../../types/metrics';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import Measure from './Measure';
import { duplicationRatingConverter } from './utils';
*/
import * as React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import withAppStateContext from '../../app/components/app-state/withAppStateContext';
import { translate, translateWithParameters } from '../../helpers/l10n';
import { isDiffMetric } from '../../helpers/measures';
getMaintainabilityGrid,
} from '../../helpers/ratings';
import { AppState } from '../../types/appstate';
-import { MetricKey, MetricType } from '../../types/metrics';
import { GlobalSettingKeys } from '../../types/settings';
import { KNOWN_RATINGS } from './utils';
*/
import { render, screen } from '@testing-library/react';
import * as React from 'react';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import { Status } from '../../../apps/overview/utils';
-import { MetricKey, MetricType } from '../../../types/metrics';
import MeasureIndicator from '../MeasureIndicator';
it('renders correctly for coverage', () => {
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { MetricKey } from '../../../types/metrics';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { propsToIssueParams } from '../utils';
describe('propsToIssueParams', () => {
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { IssueStatus } from '../../types/issues';
-import { MetricKey } from '../../types/metrics';
import { Dict } from '../../types/types';
const ISSUE_MEASURES = [
import { Note, themeColor } from 'design-system';
import React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricType } from '~sonar-aligned/types/metrics';
import { translate } from '../../helpers/l10n';
import { isDefined } from '../../helpers/types';
-import { MetricType } from '../../types/metrics';
interface Props {
className?: string;
import classNames from 'classnames';
import * as React from 'react';
import { formatMeasure } from '~sonar-aligned/helpers/measures';
+import { MetricType } from '~sonar-aligned/types/metrics';
import { translate, translateWithParameters } from '../../helpers/l10n';
-import { MetricType } from '../../types/metrics';
import './Rating.css';
interface Props extends React.AriaAttributes {
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { MetricKey } from '../../types/metrics';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { CCT_SOFTWARE_QUALITY_METRICS } from '../constants';
import {
areCCTMeasuresComputed,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { colors } from '../app/theme';
import { AlmKeys } from '../types/alm-settings';
import {
IssueStatus,
IssueType,
} from '../types/issues';
-import { MetricKey } from '../types/metrics';
import { RuleType } from '../types/types';
export const SEVERITIES = Object.values(IssueSeverity);
*/
import { BugIcon, CodeSmellIcon, SecurityHotspotIcon, VulnerabilityIcon } from 'design-system';
import { flatten, sortBy } from 'lodash';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { SoftwareQuality } from '../types/clean-code-taxonomy';
import { IssueType, RawIssue } from '../types/issues';
-import { MetricKey } from '../types/metrics';
import { Dict, Flow, FlowLocation, FlowType, Issue, TextRange } from '../types/types';
import { UserBase } from '../types/users';
import { ISSUE_TYPES } from './constants';
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { MetricKey, MetricType } from '../types/metrics';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import {
QualityGateStatusCondition,
QualityGateStatusConditionEnhanced,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { TreeComponent, Visibility } from '../../types/component';
-import { MetricKey } from '../../types/metrics';
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 { MetricKey, MetricType } from '../../types/metrics';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import {
Analysis,
AnalysisEvent,
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { MetricKey } from '../../types/metrics';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import {
QualityGateApplicationStatus,
QualityGateProjectStatus,
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { MetricKey, MetricType } from '../types/metrics';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import {
QualityGateApplicationStatusChildProject,
QualityGateProjectStatus,
import { omit } from 'lodash';
import { To } from 'react-router-dom';
import { ComponentQualifier } from '~sonar-aligned/types/component';
+import { MetricKey, MetricType } from '~sonar-aligned/types/metrics';
import { Location, Router } from '~sonar-aligned/types/router';
import { CompareResponse } from '../api/quality-profiles';
import { RuleDescriptionSections } from '../apps/coding-rules/rule';
RawIssue,
} from '../types/issues';
import { Language } from '../types/languages';
-import { MetricKey, MetricType } from '../types/metrics';
import { Notification } from '../types/notifications';
import { DumpStatus, DumpTask } from '../types/project-dump';
import { TaskStatuses } from '../types/tasks';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { getProjectBadgesToken, renewProjectBadgesToken } from '../api/project-badges';
import { translate } from '../helpers/l10n';
import { localizeMetric } from '../helpers/measures';
-import { MetricKey } from '../types/metrics';
import { useWebApiQuery } from './web-api';
export function useRenewBagdeTokenMutation() {
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import { MetricType } from '~sonar-aligned/types/metrics';
import { getMessages } from '../../../helpers/l10nBundle';
-import { MetricType } from '../../../types/metrics';
import { Dict } from '../../../types/types';
import { formatMeasure } from '../measures';
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import { MetricType } from '~sonar-aligned/types/metrics';
import { ONE_SECOND } from '../../helpers/constants';
import { translate, translateWithParameters } from '../../helpers/l10n';
import { getCurrentLocale } from '../../helpers/l10nBundle';
-import { MetricType } from '../../types/metrics';
import { Dict } from '../../types/types';
--- /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.
+ */
+export enum MetricKey {
+ accepted_issues = 'accepted_issues',
+ alert_status = 'alert_status',
+ blocker_violations = 'blocker_violations',
+ branch_coverage = 'branch_coverage',
+ bugs = 'bugs',
+ burned_budget = 'burned_budget',
+ business_value = 'business_value',
+ class_complexity = 'class_complexity',
+ classes = 'classes',
+ code_smells = 'code_smells',
+ cognitive_complexity = 'cognitive_complexity',
+ comment_lines = 'comment_lines',
+ comment_lines_data = 'comment_lines_data',
+ comment_lines_density = 'comment_lines_density',
+ complexity = 'complexity',
+ complexity_in_classes = 'complexity_in_classes',
+ complexity_in_functions = 'complexity_in_functions',
+ conditions_to_cover = 'conditions_to_cover',
+ confirmed_issues = 'confirmed_issues',
+ coverage = 'coverage',
+ critical_violations = 'critical_violations',
+ development_cost = 'development_cost',
+ directories = 'directories',
+ duplicated_blocks = 'duplicated_blocks',
+ duplicated_files = 'duplicated_files',
+ duplicated_lines = 'duplicated_lines',
+ duplicated_lines_density = 'duplicated_lines_density',
+ duplications_data = 'duplications_data',
+ effort_to_reach_maintainability_rating_a = 'effort_to_reach_maintainability_rating_a',
+ executable_lines_data = 'executable_lines_data',
+ false_positive_issues = 'false_positive_issues',
+ file_complexity = 'file_complexity',
+ file_complexity_distribution = 'file_complexity_distribution',
+ filename_size = 'filename_size',
+ filename_size_rating = 'filename_size_rating',
+ files = 'files',
+ function_complexity = 'function_complexity',
+ function_complexity_distribution = 'function_complexity_distribution',
+ functions = 'functions',
+ generated_lines = 'generated_lines',
+ generated_ncloc = 'generated_ncloc',
+ high_impact_accepted_issues = 'high_impact_accepted_issues',
+ info_violations = 'info_violations',
+ issues = 'issues',
+ last_change_on_maintainability_rating = 'last_change_on_maintainability_rating',
+ last_change_on_releasability_rating = 'last_change_on_releasability_rating',
+ last_change_on_reliability_rating = 'last_change_on_reliability_rating',
+ last_change_on_security_rating = 'last_change_on_security_rating',
+ last_change_on_security_review_rating = 'last_change_on_security_review_rating',
+ last_commit_date = 'last_commit_date',
+ leak_projects = 'leak_projects',
+ line_coverage = 'line_coverage',
+ lines = 'lines',
+ lines_to_cover = 'lines_to_cover',
+ maintainability_issues = 'maintainability_issues',
+ maintainability_rating_distribution = 'maintainability_rating_distribution',
+ maintainability_rating_effort = 'maintainability_rating_effort',
+ major_violations = 'major_violations',
+ minor_violations = 'minor_violations',
+ ncloc = 'ncloc',
+ ncloc_data = 'ncloc_data',
+ ncloc_language_distribution = 'ncloc_language_distribution',
+ new_accepted_issues = 'new_accepted_issues',
+ new_blocker_violations = 'new_blocker_violations',
+ new_branch_coverage = 'new_branch_coverage',
+ new_bugs = 'new_bugs',
+ new_code_smells = 'new_code_smells',
+ new_conditions_to_cover = 'new_conditions_to_cover',
+ new_coverage = 'new_coverage',
+ new_critical_violations = 'new_critical_violations',
+ new_development_cost = 'new_development_cost',
+ new_duplicated_blocks = 'new_duplicated_blocks',
+ new_duplicated_lines = 'new_duplicated_lines',
+ new_duplicated_lines_density = 'new_duplicated_lines_density',
+ new_info_violations = 'new_info_violations',
+ new_issues = 'new_issues',
+ new_line_coverage = 'new_line_coverage',
+ new_lines = 'new_lines',
+ new_lines_to_cover = 'new_lines_to_cover',
+ new_maintainability_issues = 'new_maintainability_issues',
+ new_maintainability_rating = 'new_maintainability_rating',
+ new_maintainability_rating_distribution = 'new_maintainability_rating_distribution',
+ new_major_violations = 'new_major_violations',
+ new_minor_violations = 'new_minor_violations',
+ new_reliability_issues = 'new_reliability_issues',
+ new_reliability_rating = 'new_reliability_rating',
+ new_reliability_rating_distribution = 'new_reliability_rating_distribution',
+ new_reliability_remediation_effort = 'new_reliability_remediation_effort',
+ new_security_hotspots = 'new_security_hotspots',
+ new_security_hotspots_reviewed = 'new_security_hotspots_reviewed',
+ new_security_issues = 'new_security_issues',
+ new_security_rating = 'new_security_rating',
+ new_security_rating_distribution = 'new_security_rating_distribution',
+ new_security_remediation_effort = 'new_security_remediation_effort',
+ new_security_review_rating = 'new_security_review_rating',
+ new_security_review_rating_distribution = 'new_security_review_rating_distribution',
+ new_sqale_debt_ratio = 'new_sqale_debt_ratio',
+ new_technical_debt = 'new_technical_debt',
+ new_uncovered_conditions = 'new_uncovered_conditions',
+ new_uncovered_lines = 'new_uncovered_lines',
+ new_violations = 'new_violations',
+ new_violations_rating = 'new_violations_rating',
+ new_vulnerabilities = 'new_vulnerabilities',
+ open_issues = 'open_issues',
+ projects = 'projects',
+ public_api = 'public_api',
+ public_documented_api_density = 'public_documented_api_density',
+ public_undocumented_api = 'public_undocumented_api',
+ pull_request_fixed_issues = 'pull_request_fixed_issues',
+ quality_gate_details = 'quality_gate_details',
+ quality_profiles = 'quality_profiles',
+ releasability_effort = 'releasability_effort',
+ releasability_rating = 'releasability_rating',
+ releasability_rating_distribution = 'releasability_rating_distribution',
+ reliability_issues = 'reliability_issues',
+ reliability_rating = 'reliability_rating',
+ reliability_rating_distribution = 'reliability_rating_distribution',
+ reliability_rating_effort = 'reliability_rating_effort',
+ reliability_remediation_effort = 'reliability_remediation_effort',
+ reopened_issues = 'reopened_issues',
+ security_hotspots = 'security_hotspots',
+ security_hotspots_reviewed = 'security_hotspots_reviewed',
+ security_issues = 'security_issues',
+ security_rating = 'security_rating',
+ security_rating_distribution = 'security_rating_distribution',
+ security_rating_effort = 'security_rating_effort',
+ security_remediation_effort = 'security_remediation_effort',
+ security_review_rating = 'security_review_rating',
+ security_review_rating_distribution = 'security_review_rating_distribution',
+ security_review_rating_effort = 'security_review_rating_effort',
+ skipped_tests = 'skipped_tests',
+ sonarjava_feedback = 'sonarjava_feedback',
+ sqale_debt_ratio = 'sqale_debt_ratio',
+ sqale_index = 'sqale_index',
+ sqale_rating = 'sqale_rating',
+ statements = 'statements',
+ team_at_sonarsource = 'team_at_sonarsource',
+ team_size = 'team_size',
+ test_errors = 'test_errors',
+ test_execution_time = 'test_execution_time',
+ test_failures = 'test_failures',
+ test_success_density = 'test_success_density',
+ tests = 'tests',
+ uncovered_conditions = 'uncovered_conditions',
+ uncovered_lines = 'uncovered_lines',
+ violations = 'violations',
+ violations_rating = 'violations_rating',
+ vulnerabilities = 'vulnerabilities',
+ wont_fix_issues = 'wont_fix_issues',
+}
+
+export enum MetricType {
+ Rating = 'RATING',
+ Percent = 'PERCENT',
+ Integer = 'INT',
+ Float = 'FLOAT',
+ MilliSeconds = 'MILLISEC',
+ Level = 'LEVEL',
+ ShortInteger = 'SHORT_INT',
+ ShortWorkDuration = 'SHORT_WORK_DUR',
+ Data = 'DATA',
+ Distribution = 'DISTRIB',
+ WorkDuration = 'WORK_DUR',
+}
+++ /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.
- */
-export enum MetricKey {
- alert_status = 'alert_status',
- blocker_violations = 'blocker_violations',
- branch_coverage = 'branch_coverage',
- bugs = 'bugs',
- burned_budget = 'burned_budget',
- business_value = 'business_value',
- class_complexity = 'class_complexity',
- classes = 'classes',
- code_smells = 'code_smells',
- cognitive_complexity = 'cognitive_complexity',
- comment_lines = 'comment_lines',
- comment_lines_data = 'comment_lines_data',
- comment_lines_density = 'comment_lines_density',
- complexity = 'complexity',
- complexity_in_classes = 'complexity_in_classes',
- complexity_in_functions = 'complexity_in_functions',
- conditions_to_cover = 'conditions_to_cover',
- confirmed_issues = 'confirmed_issues',
- coverage = 'coverage',
- critical_violations = 'critical_violations',
- development_cost = 'development_cost',
- directories = 'directories',
- duplicated_blocks = 'duplicated_blocks',
- duplicated_files = 'duplicated_files',
- duplicated_lines = 'duplicated_lines',
- duplicated_lines_density = 'duplicated_lines_density',
- duplications_data = 'duplications_data',
- effort_to_reach_maintainability_rating_a = 'effort_to_reach_maintainability_rating_a',
- executable_lines_data = 'executable_lines_data',
- false_positive_issues = 'false_positive_issues',
- file_complexity = 'file_complexity',
- file_complexity_distribution = 'file_complexity_distribution',
- filename_size = 'filename_size',
- filename_size_rating = 'filename_size_rating',
- files = 'files',
- function_complexity = 'function_complexity',
- function_complexity_distribution = 'function_complexity_distribution',
- functions = 'functions',
- generated_lines = 'generated_lines',
- generated_ncloc = 'generated_ncloc',
- info_violations = 'info_violations',
- last_change_on_maintainability_rating = 'last_change_on_maintainability_rating',
- last_change_on_releasability_rating = 'last_change_on_releasability_rating',
- last_change_on_reliability_rating = 'last_change_on_reliability_rating',
- last_change_on_security_rating = 'last_change_on_security_rating',
- last_change_on_security_review_rating = 'last_change_on_security_review_rating',
- last_commit_date = 'last_commit_date',
- leak_projects = 'leak_projects',
- line_coverage = 'line_coverage',
- lines = 'lines',
- lines_to_cover = 'lines_to_cover',
- maintainability_issues = 'maintainability_issues',
- maintainability_rating_distribution = 'maintainability_rating_distribution',
- maintainability_rating_effort = 'maintainability_rating_effort',
- major_violations = 'major_violations',
- minor_violations = 'minor_violations',
- ncloc = 'ncloc',
- ncloc_data = 'ncloc_data',
- ncloc_language_distribution = 'ncloc_language_distribution',
- new_accepted_issues = 'new_accepted_issues',
- new_blocker_violations = 'new_blocker_violations',
- new_branch_coverage = 'new_branch_coverage',
- new_bugs = 'new_bugs',
- new_code_smells = 'new_code_smells',
- new_conditions_to_cover = 'new_conditions_to_cover',
- new_coverage = 'new_coverage',
- new_critical_violations = 'new_critical_violations',
- new_development_cost = 'new_development_cost',
- new_duplicated_blocks = 'new_duplicated_blocks',
- new_duplicated_lines = 'new_duplicated_lines',
- new_duplicated_lines_density = 'new_duplicated_lines_density',
- new_info_violations = 'new_info_violations',
- new_line_coverage = 'new_line_coverage',
- new_lines = 'new_lines',
- new_lines_to_cover = 'new_lines_to_cover',
- new_maintainability_issues = 'new_maintainability_issues',
- new_maintainability_rating = 'new_maintainability_rating',
- new_maintainability_rating_distribution = 'new_maintainability_rating_distribution',
- new_major_violations = 'new_major_violations',
- new_minor_violations = 'new_minor_violations',
- new_reliability_issues = 'new_reliability_issues',
- new_reliability_rating = 'new_reliability_rating',
- new_reliability_remediation_effort = 'new_reliability_remediation_effort',
- new_reliability_rating_distribution = 'new_reliability_rating_distribution',
- new_security_hotspots = 'new_security_hotspots',
- new_security_hotspots_reviewed = 'new_security_hotspots_reviewed',
- new_security_issues = 'new_security_issues',
- new_security_rating = 'new_security_rating',
- new_security_rating_distribution = 'new_security_rating_distribution',
- new_security_remediation_effort = 'new_security_remediation_effort',
- new_security_review_rating = 'new_security_review_rating',
- new_security_review_rating_distribution = 'new_security_review_rating_distribution',
- new_sqale_debt_ratio = 'new_sqale_debt_ratio',
- new_technical_debt = 'new_technical_debt',
- new_uncovered_conditions = 'new_uncovered_conditions',
- new_uncovered_lines = 'new_uncovered_lines',
- new_violations = 'new_violations',
- new_vulnerabilities = 'new_vulnerabilities',
- open_issues = 'open_issues',
- projects = 'projects',
- public_api = 'public_api',
- public_documented_api_density = 'public_documented_api_density',
- public_undocumented_api = 'public_undocumented_api',
- pull_request_fixed_issues = 'pull_request_fixed_issues',
- quality_gate_details = 'quality_gate_details',
- quality_profiles = 'quality_profiles',
- releasability_effort = 'releasability_effort',
- releasability_rating = 'releasability_rating',
- releasability_rating_distribution = 'releasability_rating_distribution',
- reliability_issues = 'reliability_issues',
- reliability_rating = 'reliability_rating',
- reliability_rating_effort = 'reliability_rating_effort',
- reliability_rating_distribution = 'reliability_rating_distribution',
- reliability_remediation_effort = 'reliability_remediation_effort',
- reopened_issues = 'reopened_issues',
- security_hotspots = 'security_hotspots',
- security_hotspots_reviewed = 'security_hotspots_reviewed',
- security_issues = 'security_issues',
- security_rating = 'security_rating',
- security_rating_effort = 'security_rating_effort',
- security_rating_distribution = 'security_rating_distribution',
- security_remediation_effort = 'security_remediation_effort',
- security_review_rating = 'security_review_rating',
- security_review_rating_distribution = 'security_review_rating_distribution',
- security_review_rating_effort = 'security_review_rating_effort',
- skipped_tests = 'skipped_tests',
- sonarjava_feedback = 'sonarjava_feedback',
- sqale_debt_ratio = 'sqale_debt_ratio',
- sqale_index = 'sqale_index',
- sqale_rating = 'sqale_rating',
- statements = 'statements',
- team_at_sonarsource = 'team_at_sonarsource',
- team_size = 'team_size',
- test_errors = 'test_errors',
- test_execution_time = 'test_execution_time',
- test_failures = 'test_failures',
- test_success_density = 'test_success_density',
- tests = 'tests',
- uncovered_conditions = 'uncovered_conditions',
- uncovered_lines = 'uncovered_lines',
- violations = 'violations',
- vulnerabilities = 'vulnerabilities',
- accepted_issues = 'accepted_issues',
- high_impact_accepted_issues = 'high_impact_accepted_issues',
- wont_fix_issues = 'wont_fix_issues',
-}
-
-export enum MetricType {
- Rating = 'RATING',
- Percent = 'PERCENT',
- Integer = 'INT',
- Level = 'LEVEL',
- ShortInteger = 'SHORT_INT',
- ShortWorkDuration = 'SHORT_WORK_DUR',
- Data = 'DATA',
- Distribution = 'DISTRIB',
-}
-
-export function isMetricKey(key: string): key is MetricKey {
- return (Object.values(MetricKey) as string[]).includes(key);
-}
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { MetricKey } from './metrics';
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { Status } from './types';
interface BaseAnalysis {
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+import { MetricKey } from '~sonar-aligned/types/metrics';
import { BranchLike } from './branch-like';
-import { MetricKey } from './metrics';
import { CaycStatus, MeasureEnhanced, Metric, Status } from './types';
import { UserBase } from './users';