Showing 2,206 of 2,206 total issues

Function a has 65 lines of code (exceeds 25 allowed). Consider refactoring.
Open

            function a(i) {
                return function(a) {
                    return function(i) {
                        if (n)
                            throw new TypeError("Generator is already executing.");
Severity: Major
Found in public/vendor/cwr.js - About 2 hrs to fix

    Function a has 65 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                        function a(i) {
                            return function(a) {
                                return function(i) {
                                    if (n)
                                        throw new TypeError("Generator is already executing.");
    Severity: Major
    Found in public/vendor/cwr.js - About 2 hrs to fix

      Function a has 65 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                      function a(i) {
                          return function(a) {
                              return function(i) {
                                  if (n)
                                      throw new TypeError("Generator is already executing.");
      Severity: Major
      Found in public/vendor/cwr.js - About 2 hrs to fix

        Function mt has 65 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    }(), mt = function() {
                        function t(e) {
                            var t = void 0 === e ? {} : e,
                                n = t.fetchFunction,
                                r = t.requestTimeout;
        Severity: Major
        Found in public/vendor/cwr.js - About 2 hrs to fix

          Function a has 65 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                          function a(i) {
                              return function(a) {
                                  return function(i) {
                                      if (n)
                                          throw new TypeError("Generator is already executing.");
          Severity: Major
          Found in public/vendor/cwr.js - About 2 hrs to fix

            Function a has 65 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                            function a(i) {
                                return function(a) {
                                    return function(i) {
                                        if (n)
                                            throw new TypeError("Generator is already executing.");
            Severity: Major
            Found in public/vendor/cwr.js - About 2 hrs to fix

              Function a has 65 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                              function a(i) {
                                  return function(a) {
                                      return function(i) {
                                          if (n)
                                              throw new TypeError("Generator is already executing.");
              Severity: Major
              Found in public/vendor/cwr.js - About 2 hrs to fix

                Function a has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                                function a(i) {
                                    return function(a) {
                                        return function(i) {
                                            if (n)
                                                throw new TypeError("Generator is already executing.");
                Severity: Major
                Found in public/vendor/cwr.js - About 2 hrs to fix

                  Function a has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                                  function a(i) {
                                      return function(a) {
                                          return function(i) {
                                              if (n)
                                                  throw new TypeError("Generator is already executing.");
                  Severity: Major
                  Found in public/vendor/cwr.js - About 2 hrs to fix

                    Function a has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                    function a(i) {
                                        return function(a) {
                                            return function(i) {
                                                if (n)
                                                    throw new TypeError("Generator is already executing.");
                    Severity: Major
                    Found in public/vendor/cwr.js - About 2 hrs to fix

                      Function a has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                      function a(i) {
                                          return function(a) {
                                              return function(i) {
                                                  if (n)
                                                      throw new TypeError("Generator is already executing.");
                      Severity: Major
                      Found in public/vendor/cwr.js - About 2 hrs to fix

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

                        test('fromNow', () => {
                          assert.equal(
                            moment().add({ s: 30 }).fromNow(),
                            'कुछ ही क्षण में',
                            'कुछ ही क्षण में'
                        Severity: Major
                        Found in src/app/legacy/psammead/psammead-locales/moment/hi.test.js and 22 other locations - About 2 hrs to fix
                        src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 309..316
                        src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 307..314
                        src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 197..204
                        src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 297..304
                        src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 298..301
                        src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 303..310
                        src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 296..303
                        src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 300..307
                        src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 298..301
                        src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 330..337
                        src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 300..307
                        src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 289..296
                        src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 303..310
                        src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 298..305
                        src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 298..305
                        src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 354..365
                        src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 262..269
                        src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 331..338
                        src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 267..274
                        src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 300..311
                        src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 300..307
                        src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 297..304

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

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

                        test('fromNow', () => {
                          assert.equal(
                            moment().add({ s: 30 }).fromNow(),
                            'কয়েক সেকেন্ড পরে',
                            'কয়েক সেকেন্ড পরে'
                        Severity: Major
                        Found in src/app/legacy/psammead/psammead-locales/moment/bn.test.js and 22 other locations - About 2 hrs to fix
                        src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 309..316
                        src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 307..314
                        src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 297..304
                        src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 298..301
                        src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 297..304
                        src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 303..310
                        src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 296..303
                        src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 300..307
                        src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 298..301
                        src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 330..337
                        src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 300..307
                        src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 289..296
                        src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 303..310
                        src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 298..305
                        src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 298..305
                        src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 354..365
                        src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 262..269
                        src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 331..338
                        src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 267..274
                        src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 300..311
                        src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 300..307
                        src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 297..304

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

                        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

                          it('logger.info should run console.info in development', () => {
                            const loggerInstance = loggerWeb('');
                            loggerInstance.info(event, message);
                        
                            expect(global.console.info).toHaveBeenCalledWith({ event, message });
                        Severity: Major
                        Found in src/app/lib/logger.web.test.js and 6 other locations - About 2 hrs to fix
                        src/app/lib/logger.web.test.js on lines 25..31
                        src/app/lib/logger.web.test.js on lines 75..81
                        src/app/lib/logger.web.test.js on lines 83..89
                        src/app/lib/logger.web.test.js on lines 99..105
                        src/app/lib/logger.web.test.js on lines 107..113
                        src/app/lib/logger.web.test.js on lines 115..121

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

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

                          it('should correctly render canonical navigation', () => {
                            const { container } = render(<Navigation />, {
                              bbcOrigin: 'https://www.test.bbc.co.uk',
                              id: 'c0000000000o',
                              isAmp: false,
                        Severity: Major
                        Found in src/app/legacy/containers/Navigation/index.test.jsx and 5 other locations - About 2 hrs to fix
                        src/app/legacy/containers/Navigation/index.test.jsx on lines 13..24
                        src/app/legacy/containers/Navigation/index.test.jsx on lines 39..50
                        src/app/legacy/containers/Navigation/index.test.jsx on lines 52..63
                        src/app/legacy/containers/Navigation/index.test.jsx on lines 65..76
                        src/app/legacy/containers/Navigation/index.test.jsx on lines 78..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 87.

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

                        test('fromNow', () => {
                          assert.equal(moment().add({ s: 30 }).fromNow(), 'केही क्षणमा', 'केही क्षणमा');
                          assert.equal(moment().add({ d: 5 }).fromNow(), '५ दिनमा', '५ दिनमा');
                        });
                        Severity: Major
                        Found in src/app/legacy/psammead/psammead-locales/moment/ne.test.js and 22 other locations - About 2 hrs to fix
                        src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 309..316
                        src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 307..314
                        src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 197..204
                        src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 297..304
                        src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 298..301
                        src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 297..304
                        src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 303..310
                        src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 296..303
                        src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 300..307
                        src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 330..337
                        src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 300..307
                        src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 289..296
                        src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 303..310
                        src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 298..305
                        src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 298..305
                        src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 354..365
                        src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 262..269
                        src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 331..338
                        src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 267..274
                        src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 300..311
                        src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 300..307
                        src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 297..304

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

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

                        test('fromNow', () => {
                          assert.equal(
                            moment().add({ s: 30 }).fromNow(),
                            'za nekoliko sekundi',
                            'in a few seconds'
                        Severity: Major
                        Found in src/app/legacy/psammead/psammead-locales/moment/sr.test.js and 22 other locations - About 2 hrs to fix
                        src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 309..316
                        src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 307..314
                        src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 197..204
                        src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 297..304
                        src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 298..301
                        src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 297..304
                        src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 303..310
                        src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 296..303
                        src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 300..307
                        src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 298..301
                        src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 330..337
                        src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 300..307
                        src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 289..296
                        src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 303..310
                        src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 298..305
                        src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 354..365
                        src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 262..269
                        src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 331..338
                        src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 267..274
                        src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 300..311
                        src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 300..307
                        src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 297..304

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

                        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

                          it('logger.warn should run console.warn in development', () => {
                            const loggerInstance = loggerWeb('');
                            loggerInstance.warn(event, message);
                        
                            expect(global.console.warn).toHaveBeenCalledWith({ event, message });
                        Severity: Major
                        Found in src/app/lib/logger.web.test.js and 6 other locations - About 2 hrs to fix
                        src/app/lib/logger.web.test.js on lines 25..31
                        src/app/lib/logger.web.test.js on lines 75..81
                        src/app/lib/logger.web.test.js on lines 91..97
                        src/app/lib/logger.web.test.js on lines 99..105
                        src/app/lib/logger.web.test.js on lines 107..113
                        src/app/lib/logger.web.test.js on lines 115..121

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

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

                        test('fromNow', () => {
                          assert.equal(
                            moment().add({ s: 30 }).fromNow(),
                            'ஒரு சில விநாடிகள் இல்',
                            'ஒரு சில விநாடிகள் இல்'
                        Severity: Major
                        Found in src/app/legacy/psammead/psammead-locales/moment/ta.test.js and 22 other locations - About 2 hrs to fix
                        src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 309..316
                        src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 307..314
                        src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 197..204
                        src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 297..304
                        src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 298..301
                        src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 297..304
                        src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 303..310
                        src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 296..303
                        src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 300..307
                        src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 298..301
                        src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 330..337
                        src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 300..307
                        src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 289..296
                        src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 303..310
                        src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 298..305
                        src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 298..305
                        src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 262..269
                        src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 331..338
                        src/app/legacy/psammead/psammead-locales/moment/ur.test.js on lines 267..274
                        src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 300..311
                        src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 300..307
                        src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 297..304

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

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

                        test('fromNow', () => {
                          assert.equal(
                            moment().add({ s: 30 }).fromNow(),
                            'چند سیکنڈ بعد',
                            'in a few seconds'
                        Severity: Major
                        Found in src/app/legacy/psammead/psammead-locales/moment/ur.test.js and 22 other locations - About 2 hrs to fix
                        src/app/legacy/psammead/psammead-locales/moment/ar.test.js on lines 309..316
                        src/app/legacy/psammead/psammead-locales/moment/az.test.js on lines 307..314
                        src/app/legacy/psammead/psammead-locales/moment/bn.test.js on lines 197..204
                        src/app/legacy/psammead/psammead-locales/moment/es.test.js on lines 297..304
                        src/app/legacy/psammead/psammead-locales/moment/gu.test.js on lines 298..301
                        src/app/legacy/psammead/psammead-locales/moment/hi.test.js on lines 297..304
                        src/app/legacy/psammead/psammead-locales/moment/ig.test.js on lines 303..310
                        src/app/legacy/psammead/psammead-locales/moment/ky.test.js on lines 296..303
                        src/app/legacy/psammead/psammead-locales/moment/mr.test.js on lines 300..307
                        src/app/legacy/psammead/psammead-locales/moment/ne.test.js on lines 298..301
                        src/app/legacy/psammead/psammead-locales/moment/pa-in.test.js on lines 330..337
                        src/app/legacy/psammead/psammead-locales/moment/pcm.test.js on lines 300..307
                        src/app/legacy/psammead/psammead-locales/moment/pt-br.test.js on lines 289..296
                        src/app/legacy/psammead/psammead-locales/moment/si.test.js on lines 303..310
                        src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js on lines 298..305
                        src/app/legacy/psammead/psammead-locales/moment/sr.test.js on lines 298..305
                        src/app/legacy/psammead/psammead-locales/moment/ta.test.js on lines 354..365
                        src/app/legacy/psammead/psammead-locales/moment/th.test.js on lines 262..269
                        src/app/legacy/psammead/psammead-locales/moment/uk.test.js on lines 331..338
                        src/app/legacy/psammead/psammead-locales/moment/uz.test.js on lines 300..311
                        src/app/legacy/psammead/psammead-locales/moment/yo.test.js on lines 300..307
                        src/app/legacy/psammead/psammead-locales/moment/zh-tw.test.js on lines 297..304

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

                        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