airbnb/caravel

View on GitHub
superset-frontend/src/dashboard/components/PropertiesModal/index.tsx

Summary

Maintainability
F
1 wk
Test Coverage

File index.tsx has 728 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
Severity: Major
Found in superset-frontend/src/dashboard/components/PropertiesModal/index.tsx - About 1 day to fix

    Function PropertiesModal has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring.
    Open

    const PropertiesModal = ({
      addSuccessToast,
      addDangerToast,
      colorScheme: currentColorScheme,
      dashboardId,
    Severity: Minor
    Found in superset-frontend/src/dashboard/components/PropertiesModal/index.tsx - About 1 day to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function onFinish has 105 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      const onFinish = () => {
        const { title, slug, certifiedBy, certificationDetails } =
          form.getFieldsValue();
        let currentColorScheme = colorScheme;
        let colorNamespace = '';
    Severity: Major
    Found in superset-frontend/src/dashboard/components/PropertiesModal/index.tsx - About 4 hrs to fix

      Function getRowsWithRoles has 66 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        const getRowsWithRoles = () => {
          const jsonMetadataObj = getJsonMetadata();
          const hasCustomLabelColors = !!Object.keys(
            jsonMetadataObj?.label_colors || {},
          ).length;
      Severity: Major
      Found in superset-frontend/src/dashboard/components/PropertiesModal/index.tsx - About 2 hrs to fix

        Function getRowsWithoutRoles has 38 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          const getRowsWithoutRoles = () => {
            const jsonMetadataObj = getJsonMetadata();
            const hasCustomLabelColors = !!Object.keys(
              jsonMetadataObj?.label_colors || {},
            ).length;

          Function handleDashboardData has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              dashboardData => {
                const {
                  id,
                  dashboard_title,
                  slug,

            Function updateTags has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              const updateTags = (oldTags: TagType[], newTags: TagType[]) => {
                // update the tags for this object
                // add tags that are in new tags, but not in old tags
                // eslint-disable-next-line array-callback-return
                newTags.map((tag: TagType) => {

              Consider simplifying this complex logical expression.
              Open

                  if (onlyApply) {
                    onSubmit(onSubmitProps);
                    onHide();
                    addSuccessToast(t('Dashboard properties updated'));
                  } else {
              Severity: Major
              Found in superset-frontend/src/dashboard/components/PropertiesModal/index.tsx - About 40 mins to fix

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                          <Col xs={24} md={12}>
                            <StyledFormItem label={t('URL slug')} name="slug">
                              <Input type="text" disabled={isLoading} />
                            </StyledFormItem>
                            <p className="help-block">
                superset-frontend/src/dashboard/components/PropertiesModal/index.tsx on lines 710..717
                superset-frontend/src/dashboard/components/PropertiesModal/index.tsx on lines 718..728

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 101.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                          <Col xs={24} md={12}>
                            <StyledFormItem label={t('Certified by')} name="certifiedBy">
                              <Input type="text" disabled={isLoading} />
                            </StyledFormItem>
                            <p className="help-block">
                superset-frontend/src/dashboard/components/PropertiesModal/index.tsx on lines 692..699
                superset-frontend/src/dashboard/components/PropertiesModal/index.tsx on lines 718..728

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 101.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                          <Col xs={24} md={12}>
                            <StyledFormItem
                              label={t('Certification details')}
                              name="certificationDetails"
                            >
                superset-frontend/src/dashboard/components/PropertiesModal/index.tsx on lines 692..699
                superset-frontend/src/dashboard/components/PropertiesModal/index.tsx on lines 710..717

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 101.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                  const handleChangeTags = (values: { label: string; value: number }[]) => {
                    // triggered whenever a new tag is selected or a tag was deselected
                    // on new tag selected, add the tag
                
                    const uniqueTags = [...new Set(values.map(v => v.label))];
                superset-frontend/src/explore/components/PropertiesModal/index.tsx on lines 285..291

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 97.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                            <StyledFormItem label={t('Roles')}>
                              <AsyncSelect
                                allowClear
                                ariaLabel={t('Roles')}
                                disabled={isLoading}
                superset-frontend/src/dashboard/components/PropertiesModal/index.tsx on lines 477..489

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 94.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                          <StyledFormItem label={t('Owners')}>
                            <AsyncSelect
                              allowClear
                              ariaLabel={t('Owners')}
                              disabled={isLoading}
                superset-frontend/src/dashboard/components/PropertiesModal/index.tsx on lines 545..557

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 94.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                  const handleOnChangeOwners = (owners: { value: number; label: string }[]) => {
                    const parsedOwners: Owners = ensureIsArray(owners).map(o => ({
                      id: o.value,
                      full_name: o.label,
                    }));
                superset-frontend/src/dashboard/components/PropertiesModal/index.tsx on lines 251..257

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 89.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                  const handleOnChangeRoles = (roles: { value: number; label: string }[]) => {
                    const parsedRoles: Roles = ensureIsArray(roles).map(r => ({
                      id: r.value,
                      name: r.label,
                    }));
                superset-frontend/src/dashboard/components/PropertiesModal/index.tsx on lines 243..249

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 89.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                  const tagsAsSelectValues = useMemo(() => {
                    const selectTags = tags.map(tag => ({
                      value: tag.name,
                      label: tag.name,
                      key: tag.name,
                superset-frontend/src/explore/components/PropertiesModal/index.tsx on lines 82..89

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 73.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                const StyledJsonEditor = styled(JsonEditor)`
                  border-radius: ${({ theme }) => theme.borderRadius}px;
                  border: 1px solid ${({ theme }) => theme.colors.secondary.light2};
                `;
                superset-frontend/src/features/annotations/AnnotationModal.tsx on lines 47..50
                superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx on lines 44..47

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 64.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        <Row>
                          <Col xs={24} md={24}>
                            <h3 style={{ marginTop: '1em' }}>{t('Access')}</h3>
                          </Col>
                        </Row>
                superset-frontend/src/dashboard/components/PropertiesModal/index.tsx on lines 731..735

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 61.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                          <Row gutter={16}>
                            <Col xs={24} md={12}>
                              <h3 css={{ marginTop: '1em' }}>{t('Tags')}</h3>
                            </Col>
                          </Row>
                superset-frontend/src/dashboard/components/PropertiesModal/index.tsx on lines 517..521

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 61.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        <Row>
                          <Col xs={24} md={24}>
                            <h3>{t('Certification')}</h3>
                          </Col>
                        </Row>
                superset-frontend/src/dashboard/components/PropertiesModal/index.tsx on lines 677..681

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 58.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        <Row>
                          <Col xs={24} md={24}>
                            <h3>{t('Basic information')}</h3>
                          </Col>
                        </Row>
                superset-frontend/src/dashboard/components/PropertiesModal/index.tsx on lines 704..708

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 58.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 7 locations. Consider refactoring.
                Open

                      const {
                        id,
                        dashboard_title,
                        slug,
                        certified_by,
                superset-frontend/plugins/plugin-chart-echarts/src/Funnel/transformProps.ts on lines 88..98
                superset-frontend/plugins/plugin-chart-echarts/src/Gauge/transformProps.ts on lines 97..107
                superset-frontend/plugins/plugin-chart-echarts/src/Graph/transformProps.ts on lines 158..168
                superset-frontend/plugins/plugin-chart-echarts/src/Radar/transformProps.ts on lines 74..84
                superset-frontend/src/filters/components/Range/transformProps.ts on lines 23..33
                superset-frontend/src/filters/components/Time/transformProps.ts on lines 24..34

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 53.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                          <Button
                            htmlType="button"
                            buttonSize="small"
                            onClick={onHide}
                            data-test="properties-modal-cancel-button"
                superset-frontend/src/dashboard/components/OverwriteConfirm/OverwriteConfirmModal.tsx on lines 136..144

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 45.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                There are no issues that match your filters.

                Category
                Status