Showing 10,536 of 10,536 total issues

Function justifiedGallery has 180 lines of code (exceeds 25 allowed). Consider refactoring.
Open

   $.fn.justifiedGallery = function(options){

           //TODO fare impostazione 'rel' che sostituisce tutti i link con il rel specificato

        var settings = $.extend( {
Severity: Major
Found in myems-admin/js/plugins/justified-gallery/jquery.justifiedgallery.js - About 7 hrs to fix

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

                  <Col xs="auto">
                    <FormGroup>
                      <Label className={labelClasses} for="combinedEquipmentSelect">
                        {t('Combined Equipment')}
                      </Label>
    myems-web/src/components/MyEMS/Tenant/TenantBill.js on lines 482..501

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

    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

                  <Col xs="auto">
                    <FormGroup>
                      <Label className={labelClasses} for="tenantSelect">
                        {t('Tenant')}
                      </Label>
    Severity: Major
    Found in myems-web/src/components/MyEMS/Tenant/TenantBill.js and 1 other location - About 7 hrs to fix
    myems-web/src/components/MyEMS/Monitoring/CombinedEquipments.js on lines 279..298

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

    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

          <Media className="mb-3">
            <Link to="pages/profile">
              <Avatar src={users[3].avatar.src} size="l" />
            </Link>
            <Media body className="ml-2 fs--1">
    Severity: Major
    Found in myems-web/src/components/kanban/ModalCommentContetn.js and 1 other location - About 7 hrs to fix
    myems-web/src/components/kanban/ModalCommentContetn.js on lines 64..80

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

    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

          <Media>
            <Link to="pages/profile">
              <Avatar src={users[0].avatar.src} size="l" />
            </Link>
            <Media body className="ml-2 fs--1">
    Severity: Major
    Found in myems-web/src/components/kanban/ModalCommentContetn.js and 1 other location - About 7 hrs to fix
    myems-web/src/components/kanban/ModalCommentContetn.js on lines 47..63

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

    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 shopfloor_energy_input_category.py has 466 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import random
    import time
    from datetime import datetime, timedelta
    from decimal import Decimal
    from multiprocessing import Pool
    Severity: Minor
    Found in myems-aggregation/shopfloor_energy_input_category.py - About 7 hrs to fix

      Function link has 179 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            link: function (scope, element, attrs) {
              // We keep some chart-specific variables here as a closure
              // instead of storing them on 'scope'.
      
              // prevSeriesOptions is maintained by processSeries
      Severity: Major
      Found in myems-admin/js/angular-highcharts/highcharts-ng.js - About 7 hrs to fix

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

              <Fragment>
                <Card>
                  <FalconCardHeader title={t('Daily Value')} className="bg-light" titleClass="text-lightSlateGray mb-0" />
                  <CardBody>
                    <BootstrapTable
        Severity: Major
        Found in myems-web/src/components/MyEMS/Space/EnterProduction.js and 1 other location - About 7 hrs to fix
        myems-web/src/components/MyEMS/Meter/OfflineMeterInput.js on lines 367..392

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

        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

            <Fragment>
              <PageHeader
                title="React Image Lightbox"
                description="A flexible lightbox component for displaying images in a React project."
                className="mb-3"
        Severity: Major
        Found in myems-web/src/components/plugins/ImageLightbox.js and 1 other location - About 7 hrs to fix
        myems-web/src/components/plugins/EchartMap.js on lines 247..271

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

        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

              <Fragment>
                <Card>
                  <FalconCardHeader title={t('Daily Value')} className="bg-light" titleClass="text-lightSlateGray mb-0" />
                  <CardBody>
                    <BootstrapTable
        Severity: Major
        Found in myems-web/src/components/MyEMS/Meter/OfflineMeterInput.js and 1 other location - About 7 hrs to fix
        myems-web/src/components/MyEMS/Space/EnterProduction.js on lines 429..454

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

        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

          <Fragment>
            <PageHeader
              title="Echarts"
              description="A Declarative Framework for Rapid Construction of Web-based Visualization"
              className="mb-3"
        Severity: Major
        Found in myems-web/src/components/plugins/EchartMap.js and 1 other location - About 7 hrs to fix
        myems-web/src/components/plugins/ImageLightbox.js on lines 36..60

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

        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 messages.js has 463 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import chatImg1 from '../../assets/img/chat/1.jpg';
        import chatImg2 from '../../assets/img/chat/2.jpg';
        import chatImg3 from '../../assets/img/chat/3.jpg';
        import chatImg4 from '../../assets/img/chat/4.jpg';
        import chatImg5 from '../../assets/img/chat/5.jpg';
        Severity: Minor
        Found in myems-web/src/data/chat/messages.js - About 7 hrs to fix

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

                <FormGroup>
                  <InputGroup>
                    <Input
                      id="password"
                      placeholder={!hasLabel ? t('Password') : ''}
          myems-web/src/components/MyEMS/auth/SentRegisterEmailMessageForm.js on lines 191..208

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

          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

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

                <FormGroup>
                  <InputGroup>
                    <Input
                      id="password"
                      placeholder={!hasLabel ? t('Password') : ''}
          myems-web/src/components/MyEMS/auth/SentForgotPasswordEmailMessageForm.js on lines 188..205

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

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

          const badgeFormatter = status => {
            let color = '';
            let icon = '';
            let text = '';
            switch (status) {
          Severity: Major
          Found in myems-web/src/components/dashboard/PurchasesTable.js and 3 other locations - About 7 hrs to fix
          myems-web/src/components/MyEMS/Shopfloor/PurchasesTable.js on lines 24..50
          myems-web/src/components/MyEMS/Store/PurchasesTable.js on lines 24..50
          myems-web/src/components/MyEMS/Tenant/PurchasesTable.js on lines 24..50

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

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

          const badgeFormatter = status => {
            let color = '';
            let icon = '';
            let text = '';
            switch (status) {
          Severity: Major
          Found in myems-web/src/components/MyEMS/Store/PurchasesTable.js and 3 other locations - About 7 hrs to fix
          myems-web/src/components/MyEMS/Shopfloor/PurchasesTable.js on lines 24..50
          myems-web/src/components/MyEMS/Tenant/PurchasesTable.js on lines 24..50
          myems-web/src/components/dashboard/PurchasesTable.js on lines 24..50

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

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

          const badgeFormatter = status => {
            let color = '';
            let icon = '';
            let text = '';
            switch (status) {
          Severity: Major
          Found in myems-web/src/components/MyEMS/Shopfloor/PurchasesTable.js and 3 other locations - About 7 hrs to fix
          myems-web/src/components/MyEMS/Store/PurchasesTable.js on lines 24..50
          myems-web/src/components/MyEMS/Tenant/PurchasesTable.js on lines 24..50
          myems-web/src/components/dashboard/PurchasesTable.js on lines 24..50

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

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

          const badgeFormatter = status => {
            let color = '';
            let icon = '';
            let text = '';
            switch (status) {
          Severity: Major
          Found in myems-web/src/components/MyEMS/Tenant/PurchasesTable.js and 3 other locations - About 7 hrs to fix
          myems-web/src/components/MyEMS/Shopfloor/PurchasesTable.js on lines 24..50
          myems-web/src/components/MyEMS/Store/PurchasesTable.js on lines 24..50
          myems-web/src/components/dashboard/PurchasesTable.js on lines 24..50

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

          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

          gulp.task('scss:dark', () =>
            gulp
              .src('src/assets/scss/theme-dark.scss')
              .pipe(plumber())
              .pipe(sourcemaps.init())
          Severity: Major
          Found in myems-web/gulpfile.js and 1 other location - About 7 hrs to fix
          myems-web/gulpfile.js on lines 14..30

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

          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 const ActivityLog = ({ items = 5 }) => {
            const activityLog = activities.slice(0, items);
          
            return (
              <Card className="mb-3">
          Severity: Major
          Found in myems-web/src/components/profile/ProfileContent.js and 1 other location - About 7 hrs to fix
          myems-web/src/components/widgets/ActivityLogWidgets.js on lines 9..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 177.

          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