qlik-oss/sn-scatter-plot

View on GitHub
src/ext/property-definition/index.js

Summary

Maintainability
F
1 wk
Test Coverage
C
76%

Function propertyDefinition has 672 lines of code (exceeds 60 allowed). Consider refactoring.
Open

export default function propertyDefinition(env) {
  const { flags, translator, sense } = env;
  const theme = sense?.theme;

  // Feature Flags for Styling Panel
Severity: Major
Found in src/ext/property-definition/index.js - About 3 days to fix

    File index.js has 684 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* eslint-disable no-param-reassign */
    import { setValue, getValue } from 'qlik-chart-modules';
    import trendlineDefinition from './trendlines-definition';
    import showCompressionResolution from '../show-compression-resolution';
    import colorModeOptions from './color-mode-options';
    Severity: Major
    Found in src/ext/property-definition/index.js - About 1 day to fix

      Function set has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

                    set(value, setter, def, args, data) {
      Severity: Minor
      Found in src/ext/property-definition/index.js - About 35 mins to fix

        Function set has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                      set(value, setter, def, args, data) {
        Severity: Minor
        Found in src/ext/property-definition/index.js - About 35 mins to fix

          Function set has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                        set(value, setter, def, args, data) {
          Severity: Minor
          Found in src/ext/property-definition/index.js - About 35 mins to fix

            Function set has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                          set(value, setter, definition, args, data) {
            Severity: Minor
            Found in src/ext/property-definition/index.js - About 35 mins to fix

              Function set has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                            set(value, setter, definition, args, data) {
              Severity: Minor
              Found in src/ext/property-definition/index.js - About 35 mins to fix

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

                          startAt: {
                            type: 'string',
                            component: 'dropdown',
                            translation: 'properties.axis.startAt',
                            readOnly: (data) => !data.yAxis.autoMinMax && !(data.yAxis.minMax === 'min' && data.yAxis.min === 0),
                Severity: Major
                Found in src/ext/property-definition/index.js and 1 other location - About 1 day to fix
                src/ext/property-definition/index.js on lines 469..511

                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 299.

                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

                          startAt: {
                            type: 'string',
                            component: 'dropdown',
                            translation: 'properties.axis.startAt',
                            readOnly: (data) => !data.xAxis.autoMinMax && !(data.xAxis.minMax === 'min' && data.xAxis.min === 0),
                Severity: Major
                Found in src/ext/property-definition/index.js and 1 other location - About 1 day to fix
                src/ext/property-definition/index.js on lines 602..644

                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 299.

                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

                          minMax: {
                            type: 'items',
                            items: {
                              autoMinMax: {
                                ref: 'xAxis.autoMinMax',
                Severity: Major
                Found in src/ext/property-definition/index.js and 1 other location - About 1 day to fix
                src/ext/property-definition/index.js on lines 564..601

                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 281.

                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

                          minMax: {
                            type: 'items',
                            items: {
                              autoMinMax: {
                                ref: 'yAxis.autoMinMax',
                Severity: Major
                Found in src/ext/property-definition/index.js and 1 other location - About 1 day to fix
                src/ext/property-definition/index.js on lines 431..468

                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 281.

                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

                          xAxisTitle: {
                            component: 'checkbox',
                            ref: 'xAxis.show',
                            type: 'string',
                            translation: 'Simple.Label.XAxis.Hide',
                Severity: Major
                Found in src/ext/property-definition/index.js and 1 other location - About 6 hrs to fix
                src/ext/property-definition/index.js on lines 141..158

                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 158.

                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

                          yAxisTitle: {
                            component: 'checkbox',
                            ref: 'yAxis.show',
                            type: 'string',
                            translation: 'Simple.Label.YAxis.Hide',
                Severity: Major
                Found in src/ext/property-definition/index.js and 1 other location - About 6 hrs to fix
                src/ext/property-definition/index.js on lines 123..140

                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 158.

                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

                          showNavigation: {
                            ref: 'navigation',
                            type: 'boolean',
                            translation: 'Common.Navigation',
                            component: 'switch',
                Severity: Major
                Found in src/ext/property-definition/index.js and 2 other locations - About 1 hr to fix
                src/ext/property-definition/index.js on lines 170..186
                src/ext/property-definition/index.js on lines 302..318

                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 3 locations. Consider refactoring.
                Open

                              showGridLines: {
                                ref: 'gridLine.auto',
                                type: 'boolean',
                                translation: 'properties.gridLine.spacing',
                                component: 'switch',
                Severity: Major
                Found in src/ext/property-definition/index.js and 2 other locations - About 1 hr to fix
                src/ext/property-definition/index.js on lines 170..186
                src/ext/property-definition/index.js on lines 195..211

                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 3 locations. Consider refactoring.
                Open

                          showDisclaimer: {
                            translation: 'properties.showDisclaimer',
                            type: 'boolean',
                            ref: 'showDisclaimer',
                            component: 'switch',
                Severity: Major
                Found in src/ext/property-definition/index.js and 2 other locations - About 1 hr to fix
                src/ext/property-definition/index.js on lines 195..211
                src/ext/property-definition/index.js on lines 302..318

                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

                              measureAxisTitle: {
                                component: 'header',
                                type: 'string',
                                label(properties, handler) {
                                  return getAxisTitle(handler, 'y');
                Severity: Major
                Found in src/ext/property-definition/index.js and 1 other location - About 1 hr to fix
                src/ext/property-definition/index.js on lines 388..399

                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 57.

                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

                              measureAxisTitle: {
                                component: 'header',
                                type: 'string',
                                label(properties, handler) {
                                  return getAxisTitle(handler, 'x');
                Severity: Major
                Found in src/ext/property-definition/index.js and 1 other location - About 1 hr to fix
                src/ext/property-definition/index.js on lines 523..534

                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 57.

                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