portainer/portainer

View on GitHub

Showing 3,384 of 3,384 total issues

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

    service.logs = function (id, stdout, stderr, timestamps, since, tail) {
      var deferred = $q.defer();

      var parameters = {
        id: id,
Severity: Major
Found in app/docker/services/serviceService.js and 1 other location - About 1 day to fix
app/docker/services/taskService.js on lines 43..65

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

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

Function SettingsAuthenticationController has 205 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function SettingsAuthenticationController($q, $scope, $state, Notifications, SettingsService, FileUploadService, TeamService, LDAPService) {
  $scope.authMethod = 1;

  $scope.state = {
    uploadInProgress: false,

    Function FileUploadFactory has 205 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function FileUploadFactory($q, Upload, EndpointProvider) {
        'use strict';
    
        var service = {};
    
    
    Severity: Major
    Found in app/portainer/services/fileUpload.js - About 1 day to fix

      Service has 57 methods (exceeds 20 allowed). Consider refactoring.
      Open

      type Service struct {
          dataStorePath string
          fileStorePath string
      }
      Severity: Major
      Found in api/filesystem/filesystem.go - About 1 day to fix

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

        export function Small() {
          return (
            <ButtonGroup size="small">
              <Button icon={Play} color="primary" onClick={() => {}} data-cy="button">
                Start
        Severity: Major
        Found in app/react/components/buttons/ButtonGroup.stories.tsx and 2 other locations - About 1 day to fix
        app/react/components/buttons/ButtonGroup.stories.tsx on lines 53..75
        app/react/components/buttons/ButtonGroup.stories.tsx on lines 101..123

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

        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

        export function Large() {
          return (
            <ButtonGroup size="large">
              <Button icon={Play} color="primary" onClick={() => {}} data-cy="button">
                Start
        Severity: Major
        Found in app/react/components/buttons/ButtonGroup.stories.tsx and 2 other locations - About 1 day to fix
        app/react/components/buttons/ButtonGroup.stories.tsx on lines 53..75
        app/react/components/buttons/ButtonGroup.stories.tsx on lines 77..99

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

        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

        export function Xsmall() {
          return (
            <ButtonGroup size="xsmall">
              <Button icon={Play} color="primary" onClick={() => {}} data-cy="button">
                Start
        Severity: Major
        Found in app/react/components/buttons/ButtonGroup.stories.tsx and 2 other locations - About 1 day to fix
        app/react/components/buttons/ButtonGroup.stories.tsx on lines 77..99
        app/react/components/buttons/ButtonGroup.stories.tsx on lines 101..123

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

        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

                {nodePortServiceCount > 0 && (
                  <div className="flex w-full flex-col gap-4">
                    {services.map((service, index) =>
                      service.Type === 'NodePort' ? (
                        <NodePortServiceForm
        app/react/kubernetes/applications/CreateView/application-services/cluster-ip/ClusterIpServicesForm.tsx on lines 47..70
        app/react/kubernetes/applications/CreateView/application-services/load-balancer/LoadBalancerServicesForm.tsx on lines 102..125

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

        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

                {clusterIPServiceCount > 0 && (
                  <div className="flex w-full flex-col gap-4">
                    {services.map((service, index) =>
                      service.Type === 'ClusterIP' ? (
                        <ClusterIpServiceForm
        app/react/kubernetes/applications/CreateView/application-services/load-balancer/LoadBalancerServicesForm.tsx on lines 102..125
        app/react/kubernetes/applications/CreateView/application-services/node-port/NodePortServicesForm.tsx on lines 46..69

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

        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

                {loadBalancerServiceCount > 0 && (
                  <div className="flex w-full flex-col gap-4">
                    {services.map((service, index) =>
                      service.Type === 'LoadBalancer' ? (
                        <LoadBalancerServiceForm
        app/react/kubernetes/applications/CreateView/application-services/cluster-ip/ClusterIpServicesForm.tsx on lines 47..70
        app/react/kubernetes/applications/CreateView/application-services/node-port/NodePortServicesForm.tsx on lines 46..69

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

        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

        File utils.test.ts has 503 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import { ApplicationFormValues } from '../../types';
        
        import { Summary } from './types';
        import { getAppResourceSummaries } from './utils';
        
        

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

          angular.module('portainer.kubernetes').factory('KubernetesPersistentVolumeClaims', [
            '$resource',
            'API_ENDPOINT_ENDPOINTS',
            'EndpointProvider',
            function KubernetesPersistentVolumeClaimsFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider) {
          Severity: Major
          Found in app/kubernetes/rest/persistentVolumeClaim.js and 4 other locations - About 1 day to fix
          app/kubernetes/rest/controllerRevision.js on lines 3..43
          app/kubernetes/rest/replicaSet.js on lines 3..43
          app/kubernetes/rest/resourceQuota.js on lines 3..43
          app/kubernetes/rest/service.js on lines 3..43

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

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

          angular.module('portainer.kubernetes').factory('KubernetesResourceQuotas', [
            '$resource',
            'API_ENDPOINT_ENDPOINTS',
            'EndpointProvider',
            function KubernetesResourceQuotasFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider) {
          Severity: Major
          Found in app/kubernetes/rest/resourceQuota.js and 4 other locations - About 1 day to fix
          app/kubernetes/rest/controllerRevision.js on lines 3..43
          app/kubernetes/rest/persistentVolumeClaim.js on lines 3..43
          app/kubernetes/rest/replicaSet.js on lines 3..43
          app/kubernetes/rest/service.js on lines 3..43

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

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

          angular.module('portainer.kubernetes').factory('KubernetesControllerRevisions', [
            '$resource',
            'API_ENDPOINT_ENDPOINTS',
            'EndpointProvider',
            function KubernetesControllerRevisionsFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider) {
          Severity: Major
          Found in app/kubernetes/rest/controllerRevision.js and 4 other locations - About 1 day to fix
          app/kubernetes/rest/persistentVolumeClaim.js on lines 3..43
          app/kubernetes/rest/replicaSet.js on lines 3..43
          app/kubernetes/rest/resourceQuota.js on lines 3..43
          app/kubernetes/rest/service.js on lines 3..43

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

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

          angular.module('portainer.kubernetes').factory('KubernetesServices', [
            '$resource',
            'API_ENDPOINT_ENDPOINTS',
            'EndpointProvider',
            function KubernetesServicesFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider) {
          Severity: Major
          Found in app/kubernetes/rest/service.js and 4 other locations - About 1 day to fix
          app/kubernetes/rest/controllerRevision.js on lines 3..43
          app/kubernetes/rest/persistentVolumeClaim.js on lines 3..43
          app/kubernetes/rest/replicaSet.js on lines 3..43
          app/kubernetes/rest/resourceQuota.js on lines 3..43

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

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

          angular.module('portainer.kubernetes').factory('KubernetesReplicaSets', [
            '$resource',
            'API_ENDPOINT_ENDPOINTS',
            'EndpointProvider',
            function KubernetesReplicaSetsFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider) {
          Severity: Major
          Found in app/kubernetes/rest/replicaSet.js and 4 other locations - About 1 day to fix
          app/kubernetes/rest/controllerRevision.js on lines 3..43
          app/kubernetes/rest/persistentVolumeClaim.js on lines 3..43
          app/kubernetes/rest/resourceQuota.js on lines 3..43
          app/kubernetes/rest/service.js on lines 3..43

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

          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

          export function getResourceRequests(application: Application) {
            const appContainers = applicationIsKind<Pod>('Pod', application)
              ? application.spec?.containers
              : application.spec?.template.spec?.containers;
          
          
          Severity: Major
          Found in app/react/kubernetes/applications/utils.ts and 1 other location - About 1 day to fix
          app/react/kubernetes/applications/utils.ts on lines 162..181

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

          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

          export function getResourceLimits(application: Application) {
            const appContainers = applicationIsKind<Pod>('Pod', application)
              ? application.spec?.containers
              : application.spec?.template.spec?.containers;
          
          
          Severity: Major
          Found in app/react/kubernetes/applications/utils.ts and 1 other location - About 1 day to fix
          app/react/kubernetes/applications/utils.ts on lines 140..159

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

          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

            return (
              <Formik
                initialValues={initialValues}
                onSubmit={handleSubmit}
                validationSchema={validation}
          app/react/portainer/environments/wizard/EnvironmentsCreationView/shared/AgentForm/AgentForm.tsx on lines 37..69

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

          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

            return (
              <Formik
                initialValues={initialValues}
                onSubmit={handleSubmit}
                validationSchema={validation}
          app/react/portainer/environments/wizard/EnvironmentsCreationView/WizardDocker/SocketTab/SocketForm.tsx on lines 36..69

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

          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

          Severity
          Category
          Status
          Source
          Language