rochdev/tinto

View on GitHub

Showing 7 of 15 total issues

Function until has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

Wait.prototype.until = function(runnable, negate) {
  var self = this;
  var deferred = Q.defer();
  var retryTimeout;
  var lastResults;
Severity: Minor
Found in lib/utils/wait.js - About 1 hr to fix

    Function assert has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function assert(name, callback, message) {
      return function(values) {
        var assertion = this;
        var context = flag(this, 'object');
        var delegate = !!flag(this, 'delegate');
    Severity: Minor
    Found in lib/utils/assert.js - About 1 hr to fix

      Function exports has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      module.exports = function(chai, utils) {
        ['be', 'and'].forEach(function(chain) {
          chai.Assertion.addProperty(chain, function() {
            return this;
          });
      Severity: Minor
      Found in lib/assertions.js - About 1 hr to fix

        Function locate has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        tinto.Locator.prototype.locate = function() {
          var self = this;
          var parent = this.parent && this.parent.getElement() || Q.when(evaluator.getDriver());
        
          if (this.cache && this.id) {
        Severity: Minor
        Found in lib/utils/locator.js - About 1 hr to fix

          Function support has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          function support(type, pluralType, name, matcher, args, message) {
          Severity: Minor
          Found in lib/component.js - About 45 mins to fix

            Function getters has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

            tinto.Entity.prototype.getters = function(props) {
              _.forIn(descriptors(props), function(descriptor, prop) {
                if (descriptor.enumerable) {
                  if (descriptor.get) {
                    this.getter(prop, descriptor.get);
            Severity: Minor
            Found in lib/entity.js - About 35 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function support has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

            function support(type, pluralType, name, matcher, args, message) {
              if (matcher instanceof Array) {
                args = matcher;
                matcher = null;
              }
            Severity: Minor
            Found in lib/component.js - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Severity
            Category
            Status
            Source
            Language