myems-admin/js/plugins/validate/jquery.validate.min.js

Summary

Maintainability
F
5 days
Test Coverage

File jquery.validate.min.js has 802 lines of code (exceeds 250 allowed). Consider refactoring.
Open

(function () {
    "use strict";
    angular.module("app.chart.ctrls", []).controller("chartCtrl", ["$scope", function ($scope) {
        return $scope.easypiechart = {percent: 65, options: {animate: {duration: 1e3, enabled: !0}, barColor: "#31C0BE", lineCap: "round", size: 180, lineWidth: 5}}, $scope.easypiechart2 = {percent: 35, options: {animate: {duration: 1e3, enabled: !0}, barColor: "#66B5D7", lineCap: "round", size: 180, lineWidth: 10}}, $scope.easypiechart3 = {percent: 68, options: {animate: {duration: 1e3, enabled: !0}, barColor: "#60CD9B", lineCap: "square", size: 180, lineWidth: 20, scaleLength: 0}}, $scope.gaugeChart1 = {data: {maxValue: 3e3, animationSpeed: 40, val: 1375}, options: {lines: 12, angle: 0, lineWidth: .47, pointer: {length: .6, strokeWidth: .03, color: "#000000"}, limitMax: "false", colorStart: "#A3C86D", colorStop: "#A3C86D", strokeColor: "#E0E0E0", generateGradient: !0, percentColors: [
            [0, "#60CD9B"],
Severity: Major
Found in myems-admin/js/plugins/validate/jquery.validate.min.js - About 1 day to fix

    Function setLang has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            return $scope.lang = "English", $scope.setLang = function (lang) {
                switch (lang) {
                    case"English":
                        localize.setLanguage("EN-US");
                        break;
    Severity: Minor
    Found in myems-admin/js/plugins/validate/jquery.validate.min.js - About 1 hr to fix

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

              ]}}, $scope.gaugeChart3 = {data: {maxValue: 3e3, animationSpeed: 50, val: 1100}, options: {lines: 12, angle: 0, lineWidth: .47, pointer: {length: .6, strokeWidth: .03, color: "#464646"}, limitMax: "true", colorStart: "#FF7857", colorStop: "#FF7857", strokeColor: "#F1F1F1", generateGradient: !0, percentColors: [
                  [0, "#E87352"],
                  [1, "#E87352"]
              ]}}
      Severity: Major
      Found in myems-admin/js/plugins/validate/jquery.validate.min.js and 2 other locations - About 3 hrs to fix
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 4..7
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 7..10

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

      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

              ]}}, $scope.gaugeChart2 = {data: {maxValue: 3e3, animationSpeed: 45, val: 1200}, options: {lines: 12, angle: 0, lineWidth: .47, pointer: {length: .6, strokeWidth: .03, color: "#464646"}, limitMax: "true", colorStart: "#7ACBEE", colorStop: "#7ACBEE", strokeColor: "#F1F1F1", generateGradient: !0, percentColors: [
                  [0, "#66B5D7"],
                  [1, "#66B5D7"]
              ]}}, $scope.gaugeChart3 = {data: {maxValue: 3e3, animationSpeed: 50, val: 1100}, options: {lines: 12, angle: 0, lineWidth: .47, pointer: {length: .6, strokeWidth: .03, color: "#464646"}, limitMax: "true", colorStart: "#FF7857", colorStop: "#FF7857", strokeColor: "#F1F1F1", generateGradient: !0, percentColors: [
      Severity: Major
      Found in myems-admin/js/plugins/validate/jquery.validate.min.js and 2 other locations - About 3 hrs to fix
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 4..7
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 10..13

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

      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

              return $scope.easypiechart = {percent: 65, options: {animate: {duration: 1e3, enabled: !0}, barColor: "#31C0BE", lineCap: "round", size: 180, lineWidth: 5}}, $scope.easypiechart2 = {percent: 35, options: {animate: {duration: 1e3, enabled: !0}, barColor: "#66B5D7", lineCap: "round", size: 180, lineWidth: 10}}, $scope.easypiechart3 = {percent: 68, options: {animate: {duration: 1e3, enabled: !0}, barColor: "#60CD9B", lineCap: "square", size: 180, lineWidth: 20, scaleLength: 0}}, $scope.gaugeChart1 = {data: {maxValue: 3e3, animationSpeed: 40, val: 1375}, options: {lines: 12, angle: 0, lineWidth: .47, pointer: {length: .6, strokeWidth: .03, color: "#000000"}, limitMax: "false", colorStart: "#A3C86D", colorStop: "#A3C86D", strokeColor: "#E0E0E0", generateGradient: !0, percentColors: [
                  [0, "#60CD9B"],
                  [1, "#60CD9B"]
              ]}}, $scope.gaugeChart2 = {data: {maxValue: 3e3, animationSpeed: 45, val: 1200}, options: {lines: 12, angle: 0, lineWidth: .47, pointer: {length: .6, strokeWidth: .03, color: "#464646"}, limitMax: "true", colorStart: "#7ACBEE", colorStop: "#7ACBEE", strokeColor: "#F1F1F1", generateGradient: !0, percentColors: [
      Severity: Major
      Found in myems-admin/js/plugins/validate/jquery.validate.min.js and 2 other locations - About 3 hrs to fix
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 7..10
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 10..13

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

      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 $scope.form = {required: "", minlength: "", maxlength: "", length_rage: "", type_something: "", confirm_type: "", foo: "", email: "", url: "", num: "", minVal: "", maxVal: "", valRange: "", pattern: ""}, original = angular.copy($scope.form), $scope.revert = function () {
      Severity: Major
      Found in myems-admin/js/plugins/validate/jquery.validate.min.js and 1 other location - About 1 hr to fix
      myems-admin/js/plugins/footable/footable.all.min.js on lines 385..400

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

      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 sample_data = {af: "16.63", al: "11.58", dz: "158.97", ao: "85.81", ag: "1.1", ar: "351.02", am: "8.83", au: "1219.72", at: "366.26", az: "52.17", bs: "7.54", bh: "21.73", bd: "105.4", bb: "3.96", by: "52.89", be: "461.33", bz: "1.43", bj: "6.49", bt: "1.4", bo: "19.18", ba: "16.2", bw: "12.5", br: "2023.53", bn: "11.96", bg: "44.84", bf: "8.67", bi: "1.47", kh: "11.36", cm: "21.88", ca: "1563.66", cv: "1.57", cf: "2.11", td: "7.59", cl: "199.18", cn: "5745.13", co: "283.11", km: "0.56", cd: "12.6", cg: "11.88", cr: "35.02", ci: "22.38", hr: "59.92", cy: "22.75", cz: "195.23", dk: "304.56", dj: "1.14", dm: "0.38", "do": "50.87", ec: "61.49", eg: "216.83", sv: "21.8", gq: "14.55", er: "2.25", ee: "19.22", et: "30.94", fj: "3.15", fi: "231.98", fr: "2555.44", ga: "12.56", gm: "1.04", ge: "11.23", de: "3305.9", gh: "18.06", gr: "305.01", gd: "0.65", gt: "40.77", gn: "4.34", gw: "0.83", gy: "2.2", ht: "6.5", hn: "15.34", hk: "226.49", hu: "132.28", is: "12.77", "in": "1430.02", id: "695.06", ir: "337.9", iq: "84.14", ie: "204.14", il: "201.25", it: "2036.69", jm: "13.74", jp: "5390.9", jo: "27.13", kz: "129.76", ke: "32.42", ki: "0.15", kr: "986.26", undefined: "5.73", kw: "117.32", kg: "4.44", la: "6.34", lv: "23.39", lb: "39.15", ls: "1.8", lr: "0.98", ly: "77.91", lt: "35.73", lu: "52.43", mk: "9.58", mg: "8.33", mw: "5.04", my: "218.95", mv: "1.43", ml: "9.08", mt: "7.8", mr: "3.49", mu: "9.43", mx: "1004.04", md: "5.36", mn: "5.81", me: "3.88", ma: "91.7", mz: "10.21", mm: "35.65", na: "11.45", np: "15.11", nl: "770.31", nz: "138", ni: "6.38", ne: "5.6", ng: "206.66", no: "413.51", om: "53.78", pk: "174.79", pa: "27.2", pg: "8.81", py: "17.17", pe: "153.55", ph: "189.06", pl: "438.88", pt: "223.7", qa: "126.52", ro: "158.39", ru: "1476.91", rw: "5.69", ws: "0.55", st: "0.19", sa: "434.44", sn: "12.66", rs: "38.92", sc: "0.92", sl: "1.9", sg: "217.38", sk: "86.26", si: "46.44", sb: "0.67", za: "354.41", es: "1374.78", lk: "48.24", kn: "0.56", lc: "1", vc: "0.58", sd: "65.93", sr: "3.3", sz: "3.17", se: "444.59", ch: "522.44", sy: "59.63", tw: "426.98", tj: "5.58", tz: "22.43", th: "312.61", tl: "0.62", tg: "3.07", to: "0.3", tt: "21.2", tn: "43.86", tr: "729.05", tm: 0, ug: "17.12", ua: "136.56", ae: "239.65", gb: "2258.57", us: "14624.18", uy: "40.71", uz: "37.72", vu: "0.72", ve: "285.21", vn: "101.99", ye: "30.02", zm: "15.69", zw: "5.57"}, $scope.worldMap = {map: "world_en", backgroundColor: null, color: "#ffffff", hoverOpacity: .7, selectedColor: "#666666", enableZoom: !0, showTooltip: !0, values: sample_data, scaleColors: ["#C4FFFF", "#07C0BB"], normalizeFunction: "polynomial"}, $scope.USAMap = {map: "usa_en", backgroundColor: null, color: "#ffffff", hoverColor: "#999999", selectedColor: "#666666", enableZoom: !0, showTooltip: !0, selectedRegion: "MO"}, $scope.europeMap = {map: "europe_en", backgroundColor: null, color: "#ffffff", hoverOpacity: .7, hoverColor: "#999999", enableZoom: !1, showTooltip: !1, values: sample_data, scaleColors: ["#C4FFFF", "#07C0BB"], normalizeFunction: "polynomial"}
      Severity: Major
      Found in myems-admin/js/plugins/validate/jquery.validate.min.js and 1 other location - About 1 hr to fix
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 328..328

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

      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

              ], $scope.barChart.options = {series: {stack: !0, bars: {show: !0, fill: 1, barWidth: .3, align: "center", horizontal: !1, order: 1}}, grid: {hoverable: !0, borderWidth: 1, borderColor: "#eeeeee"}, tooltip: !0, tooltipOpts: {defaultTheme: !1}, colors: ["#60CD9B", "#66B5D7", "#EEC95A", "#E87352"]}, $scope.pieChart = {}, $scope.pieChart.data = [
                  {label: "Download Sales", data: 12},
                  {label: "In-Store Sales", data: 30},
                  {label: "Mail-Order Sales", data: 20},
                  {label: "Online Sales", data: 19}
      Severity: Major
      Found in myems-admin/js/plugins/validate/jquery.validate.min.js and 1 other location - About 1 hr to fix
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 142..147

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

      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

              ], $scope.pieChart.options = {series: {pie: {show: !0}}, legend: {show: !0}, grid: {hoverable: !0, clickable: !0}, colors: ["#60CD9B", "#66B5D7", "#EEC95A", "#E87352"], tooltip: !0, tooltipOpts: {content: "%p.0%, %s", defaultTheme: !1}}, $scope.donutChart = {}, $scope.donutChart.data = [
                  {label: "Download Sales", data: 12},
                  {label: "In-Store Sales", data: 30},
                  {label: "Mail-Order Sales", data: 20},
                  {label: "Online Sales", data: 19}
      Severity: Major
      Found in myems-admin/js/plugins/validate/jquery.validate.min.js and 1 other location - About 1 hr to fix
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 137..142

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

      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 $scope.demoData1 = {data: [3, 1, 2, 2, 4, 6, 4, 5, 2, 4, 5, 3, 4, 6, 4, 7], options: {type: "line", lineColor: "#fff", highlightLineColor: "#fff", fillColor: "#60CD9B", spotColor: !1, minSpotColor: !1, maxSpotColor: !1, width: "100%", height: "150px"}}, $scope.simpleChart1 = {data: [3, 1, 2, 3, 5, 3, 4, 2], options: {type: "line", lineColor: "#31C0BE", fillColor: "#bce0df", spotColor: !1, minSpotColor: !1, maxSpotColor: !1}}, $scope.simpleChart2 = {data: [3, 1, 2, 3, 5, 3, 4, 2], options: {type: "bar", barColor: "#31C0BE"}}, $scope.simpleChart3 = {data: [3, 1, 2, 3, 5, 3, 4, 2], options: {type: "pie", sliceColors: ["#31C0BE", "#60CD9B", "#E87352", "#8170CA", "#EEC95A", "#60CD9B"]}}, $scope.tristateChart1 = {data: [1, 2, -3, -5, 3, 1, -4, 2], options: {type: "tristate", posBarColor: "#95b75d", negBarColor: "#fa8564"}}, $scope.largeChart1 = {data: [3, 1, 2, 3, 5, 3, 4, 2], options: {type: "line", lineColor: "#674E9E", highlightLineColor: "#7ACBEE", fillColor: "#927ED1", spotColor: !1, minSpotColor: !1, maxSpotColor: !1, width: "100%", height: "150px"}}, $scope.largeChart2 = {data: [3, 1, 2, 3, 5, 3, 4, 2], options: {type: "bar", barColor: "#31C0BE", barWidth: 10, width: "100%", height: "150px"}}, $scope.largeChart3 = {data: [3, 1, 2, 3, 5], options: {type: "pie", sliceColors: ["#31C0BE", "#60CD9B", "#E87352", "#8170CA", "#EEC95A", "#60CD9B"], width: "150px", height: "150px"}}
      Severity: Major
      Found in myems-admin/js/plugins/validate/jquery.validate.min.js and 1 other location - About 1 hr to fix
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 156..156

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 57.

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

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

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

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

      Refactorings

      Further Reading

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

              ], lineChart1.data2 = [
                  [1, 9],
                  [2, 15],
                  [3, 17],
                  [4, 21],
      Severity: Minor
      Found in myems-admin/js/plugins/validate/jquery.validate.min.js and 1 other location - About 55 mins to fix
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 47..59

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

      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

                      {id: 21, title: "Item 2.1", items: [
                          {id: 211, title: "Item 2.1.1", items: []},
                          {id: 212, title: "Item 2.1.2", items: []}
                      ]},
      Severity: Minor
      Found in myems-admin/js/plugins/validate/jquery.validate.min.js and 1 other location - About 55 mins to fix
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 532..535

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

      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

                      {id: 22, title: "Item 2.2", items: [
                          {id: 221, title: "Item 2.2.1", items: []},
                          {id: 222, title: "Item 2.2.2", items: []}
                      ]}
      Severity: Minor
      Found in myems-admin/js/plugins/validate/jquery.validate.min.js and 1 other location - About 55 mins to fix
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 528..531

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

      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 lineChart1 = {}, lineChart1.data1 = [
                  [1, 15],
                  [2, 20],
                  [3, 14],
                  [4, 10],
      Severity: Minor
      Found in myems-admin/js/plugins/validate/jquery.validate.min.js and 1 other location - About 55 mins to fix
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 59..71

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

      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 $scope.alerts = [
                  {type: "success", msg: "Well done! You successfully read this important alert message."},
                  {type: "info", msg: "Heads up! This alert needs your attention, but it is not super important."},
                  {type: "warning", msg: "Warning! Best check yo self, you're not looking too good."},
                  {type: "danger", msg: "Oh snap! Change a few things up and try submitting again."}
      Severity: Minor
      Found in myems-admin/js/plugins/validate/jquery.validate.min.js and 1 other location - About 45 mins to fix
      myems-web/src/components/MyEMS/common/ComparisonTypeOptions.js on lines 1..6

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

      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 $scope.user = {email: "", password: ""}, $scope.showInfoOnSubmit = !1, original = angular.copy($scope.user), $scope.revert = function () {
                  return $scope.user = angular.copy(original), $scope.form_signin.$setPristine()
              }, $scope.canRevert = function () {
      Severity: Minor
      Found in myems-admin/js/plugins/validate/jquery.validate.min.js and 1 other location - About 35 mins to fix
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 279..281

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

      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

              }, $scope.canRevert = function () {
                  return!angular.equals($scope.form, original) || !$scope.form_constraints.$pristine
              }, $scope.canSubmit = function () {
      Severity: Minor
      Found in myems-admin/js/plugins/validate/jquery.validate.min.js and 2 other locations - About 35 mins to fix
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 290..292
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 301..303

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

      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

              }, $scope.canRevert = function () {
                  return!angular.equals($scope.user, original) || !$scope.form_signin.$pristine
              }, $scope.canSubmit = function () {
      Severity: Minor
      Found in myems-admin/js/plugins/validate/jquery.validate.min.js and 2 other locations - About 35 mins to fix
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 281..283
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 301..303

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

      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

              }, $scope.canRevert = function () {
                  return!angular.equals($scope.user, original) || !$scope.form_signup.$pristine
              }, $scope.canSubmit = function () {
      Severity: Minor
      Found in myems-admin/js/plugins/validate/jquery.validate.min.js and 2 other locations - About 35 mins to fix
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 281..283
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 290..292

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

      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

                          return colors = void 0 === attrs.barColors || "" === attrs.barColors ? null : JSON.parse(attrs.barColors), options = {element: ele[0], data: data, xkey: attrs.xkey, ykeys: JSON.parse(attrs.ykeys), labels: JSON.parse(attrs.labels), barColors: colors || ["#0b62a4", "#7a92a3", "#4da74d", "#afd8f8", "#edc240", "#cb4b4b", "#9440ed"], stacked: attrs.stacked || null, resize: !0}, new Morris.Bar(options);
      Severity: Major
      Found in myems-admin/js/plugins/validate/jquery.validate.min.js and 3 other locations - About 30 mins to fix
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 196..196
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 198..198
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 202..202

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 45.

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

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

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

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

      Refactorings

      Further Reading

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

                          return colors = void 0 === attrs.colors || "" === attrs.colors ? null : JSON.parse(attrs.colors), options = {element: ele[0], data: data, colors: colors || ["#0B62A4", "#3980B5", "#679DC6", "#95BBD7", "#B0CCE1", "#095791", "#095085", "#083E67", "#052C48", "#042135"], resize: !0}, attrs.formatter && (func = new Function("y", "data", attrs.formatter), options.formatter = func), new Morris.Donut(options)
      Severity: Major
      Found in myems-admin/js/plugins/validate/jquery.validate.min.js and 3 other locations - About 30 mins to fix
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 196..196
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 198..198
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 200..200

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 45.

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

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

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

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

      Refactorings

      Further Reading

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

                          return colors = void 0 === attrs.lineColors || "" === attrs.lineColors ? null : JSON.parse(attrs.lineColors), options = {element: ele[0], data: data, xkey: attrs.xkey, ykeys: JSON.parse(attrs.ykeys), labels: JSON.parse(attrs.labels), lineWidth: attrs.lineWidth || 2, lineColors: colors || ["#0b62a4", "#7a92a3", "#4da74d", "#afd8f8", "#edc240", "#cb4b4b", "#9440ed"], resize: !0}, new Morris.Line(options);
      Severity: Major
      Found in myems-admin/js/plugins/validate/jquery.validate.min.js and 3 other locations - About 30 mins to fix
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 198..198
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 200..200
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 202..202

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 45.

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

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

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

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

      Refactorings

      Further Reading

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

                          return colors = void 0 === attrs.lineColors || "" === attrs.lineColors ? null : JSON.parse(attrs.lineColors), options = {element: ele[0], data: data, xkey: attrs.xkey, ykeys: JSON.parse(attrs.ykeys), labels: JSON.parse(attrs.labels), lineWidth: attrs.lineWidth || 2, lineColors: colors || ["#0b62a4", "#7a92a3", "#4da74d", "#afd8f8", "#edc240", "#cb4b4b", "#9440ed"], behaveLikeLine: attrs.behaveLikeLine || !1, fillOpacity: attrs.fillOpacity || "auto", pointSize: attrs.pointSize || 4, resize: !0}, new Morris.Area(options);
      Severity: Major
      Found in myems-admin/js/plugins/validate/jquery.validate.min.js and 3 other locations - About 30 mins to fix
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 196..196
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 200..200
      myems-admin/js/plugins/validate/jquery.validate.min.js on lines 202..202

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 45.

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

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

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

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

      Refactorings

      Further Reading

      There are no issues that match your filters.

      Category
      Status