sebastian-software/core

View on GitHub

Showing 406 of 406 total issues

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

                for (var e = 0; e < oldElements.length; e++) {
                    core.bom.ClassName.remove(oldElements[e], 'active');
                }
Severity: Minor
Found in source/class/core/apibrowser/Browser.js and 1 other location - About 50 mins to fix
source/class/core/apibrowser/Browser.js on lines 377..379

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

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

            for (var i=0, l=keys.length; i<l; i++) {
                result[keys[i]] = values[i];
            }
Severity: Minor
Found in source/class/core/Array.js and 1 other location - About 50 mins to fix
source/class/core/event/Flow.js on lines 248..250

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

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

        for (var i=0,ii=keylist.length; i<ii; i++) {
          retValue[keylist[i]] = result[i];
        }
Severity: Minor
Found in source/class/core/event/Flow.js and 1 other location - About 50 mins to fix
source/class/core/Array.js on lines 514..516

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

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

      for (var i=0,ii=keylist.length; i<ii; i++) {
        valuelist[i] = hashmap[keylist[i]];
      }
Severity: Minor
Found in source/class/core/event/Flow.js and 1 other location - About 50 mins to fix
source/class/core/util/Base62.js on lines 124..126

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

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

Avoid deeply nested control flow statements.
Open

              if (!self.__refreshActive) {

                self.__startDeceleration(timeStamp);

              }
Severity: Major
Found in source/class/core/ui/Scroller.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                  if (!self.__enableScrollX && self.__refreshHeight != null) {
    
                    if (!self.__refreshActive && scrollTop <= -self.__refreshHeight) {
    
                      self.__refreshActive = true;
    Severity: Major
    Found in source/class/core/ui/Scroller.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                  for (length = value.length; length--;) {
                    update(value, length, callback);
                  }
      Severity: Major
      Found in source/class/core/JSON.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                if (typeof value !== "boolean") {
                                    boollike[name] = false;
                                }
        Severity: Major
        Found in source/class/core/bom/Form.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                  if (key.substring(0,2) == "__") {
                                      throw new Error("Included class " + includedClass.className + " overwrites private member " + key + " of other included class " + allIncludeMembers[key].className + " in class " + name);
                                  }
          Severity: Major
          Found in source/class/core/Class.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                            if (types.indexOf(relevant[j]) != -1)
                            {
                              data[relevant[j]] = value;
                              break;
                            }
            Severity: Major
            Found in source/class/core/service/location/GeoCode.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                            if (element !== undef) {
                              // According to ES 5.1 section 15.12.3: "If `gap` {whitespace}
                              // is not the empty string, let `member` {quote(property) + ":"}
                              // be the concatenation of `member` and the `space` character."
                              // The "`space` character" refers to the literal space
              Severity: Major
              Found in source/class/core/JSON.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                            if (sign) {
                              abort();
                            }
                Severity: Major
                Found in source/class/core/JSON.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                          if (key.substring(0,2) == "__") {
                                              throw new Error("Included class " + includedClass.className + " overwrites private member of class " + name);
                                          }
                  Severity: Major
                  Found in source/class/core/Class.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                if (symbol == "-") {
                                  sign = true;
                                  symbol = source.charAt(++Index);
                                }
                    Severity: Major
                    Found in source/class/core/JSON.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                  while (j--) {
                                    wrapper = wrapper.lastChild;
                                  }
                      Severity: Major
                      Found in source/class/core/bom/Fragment.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                for (var key2 in ownProperty) {
                                                    property[key2] = ownProperty[key2];
                                                }
                        Severity: Major
                        Found in source/class/core/Class.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                      if (source.slice(Index, Index + 4) == "true") {
                                        Index += 4;
                                        return true;
                                      } else if (source.slice(Index, Index + 5) == "false") {
                                        Index += 5;
                          Severity: Major
                          Found in source/class/core/JSON.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                        if (!config.nullable) {
                                                            obj.error("Missing value for: " + propertyName + " (during reset() - from theme system)");
                                                        }
                            Severity: Major
                            Found in source/class/core/property/Multi.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                      if (!(value instanceof type || core.Class.includesClass(value.constructor, type))) {
                                                          throw new Error("Value of property " + name + " must be instance of or include " + type + ". Invalid value: " + value);
                                                      }
                              Severity: Major
                              Found in source/class/core/property/Debug.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                            for (index = 0, length = value.length; index < length; any || (any = true), index++) {
                                              element = serialize(index, value, callback, properties, whitespace, indentation, stack);
                                              results.push(element === undef ? "null" : element);
                                            }
                                Severity: Major
                                Found in source/class/core/JSON.js - About 45 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language