mose/rails-i18nterface

View on GitHub
app/assets/javascripts/rails_i18nterface/ender.js

Summary

Maintainability
F
1 wk
Test Coverage

File ender.js has 2318 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
  * =============================================================
  * Ender: open module JavaScript framework (https://ender.no.de)
  * Build: ender build jeesh reqwest --output app/assets/javascripts/rails_i18nterface/ender
  * =============================================================
Severity: Major
Found in app/assets/javascripts/rails_i18nterface/ender.js - About 6 days to fix

    Function Event has 119 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          , Event = (function () {
                  // a whitelist of properties (for different event types) tells us what to check for and copy
              var commonProps  = str2arr('altKey attrChange attrName bubbles cancelable ctrlKey currentTarget ' +
                    'detail eventPhase getModifierState isTrusted metaKey relatedNode relatedTarget shiftKey '  +
                    'srcElement target timeStamp type view which propertyName')
    Severity: Major
    Found in app/assets/javascripts/rails_i18nterface/ender.js - About 4 hrs to fix

      Function init has 79 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function init(o, fn) {
        
            this.url = typeof o == 'string' ? o : o.url
            this.timeout = null
        
      Severity: Major
      Found in app/assets/javascripts/rails_i18nterface/ender.js - About 3 hrs to fix

        Function RegEntry has 63 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

              , RegEntry = (function () {
                  // each handler is wrapped so we can handle delegation and custom events
                  var wrappedHandler = function (element, fn, condition, args) {
                      var call = function (event, eargs) {
                            return fn.apply(element, args ? slice.call(eargs, event ? 0 : 1).concat(args) : eargs)
        Severity: Major
        Found in app/assets/javascripts/rails_i18nterface/ender.js - About 2 hrs to fix

          Function registry has 55 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                , registry = (function () {
                    // our map stores arrays by event type, just because it's better than storing
                    // everything in a single array.
                    // uses '$' as a prefix for the keys for safety and 'r' as a special prefix for
                    // rootListeners so we can look them up fast
          Severity: Major
          Found in app/assets/javascripts/rails_i18nterface/ender.js - About 2 hrs to fix

            Function handleJsonp has 37 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function handleJsonp(o, fn, err, url) {
                  var reqId = uniqid++
                    , cbkey = o.jsonpCallback || 'callback' // the 'callback' key
                    , cbval = o.jsonpCallbackName || reqwest.getcallbackPrefix(reqId)
                    // , cbval = o.jsonpCallbackName || ('reqwest_' + reqId) // the 'callback' value
            Severity: Minor
            Found in app/assets/javascripts/rails_i18nterface/ender.js - About 1 hr to fix

              Function on has 36 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                    , on = function(element, events, selector, fn) {
                        var originalFn, type, types, i, args, entry, first
                
                        //TODO: the undefined check means you can't pass an 'args' argument, fix this perhaps?
                        if (selector === undefined && typeof events == 'object') {
              Severity: Minor
              Found in app/assets/javascripts/rails_i18nterface/ender.js - About 1 hr to fix

                Function interpret has 11 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    function interpret(whole, tag, idsAndClasses, wholeAttribute, attribute, qualifier, value, wholePseudo, pseudo, wholePseudoVal, pseudoVal) {
                Severity: Major
                Found in app/assets/javascripts/rails_i18nterface/ender.js - About 1 hr to fix

                  Function css has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                        , css: function (o, opt_v) {
                            var p, iter = o
                            // is this a request for just getting a style?
                            if (opt_v === undefined && typeof o == 'string') {
                              // repurpose 'v'
                  Severity: Minor
                  Found in app/assets/javascripts/rails_i18nterface/ender.js - About 1 hr to fix

                    Function offset has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                          , offset: function (opt_x, opt_y) {
                              if (opt_x && typeof opt_x == 'object' && (typeof opt_x.top == 'number' || typeof opt_x.left == 'number')) {
                                return this.each(function (el) {
                                  xy(el, opt_x.left, opt_x.top)
                                })
                    Severity: Minor
                    Found in app/assets/javascripts/rails_i18nterface/ender.js - About 1 hr to fix

                      Function serial has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function serial(el, cb) {
                            var n = el.name
                              , t = el.tagName.toLowerCase()
                              , optCb = function (o) {
                                  // IE gives value="" even where there is no value attribute
                      Severity: Minor
                      Found in app/assets/javascripts/rails_i18nterface/ender.js - About 1 hr to fix

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

                              , dim: function () {
                                  if (!this.length) return { height: 0, width: 0 }
                                  var el = this[0]
                                    , de = el.nodeType == 9 && el.documentElement // document
                                    , orig = !de && !!el.style && !el.offsetWidth && !el.offsetHeight ?
                        Severity: Minor
                        Found in app/assets/javascripts/rails_i18nterface/ender.js - About 1 hr to fix

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

                                function success(resp) {
                                  var r = resp.responseText
                                  if (r) {
                                    switch (type) {
                                    case 'json':
                          Severity: Minor
                          Found in app/assets/javascripts/rails_i18nterface/ender.js - About 1 hr to fix

                            Consider simplifying this complex logical expression.
                            Open

                                  if (o) {
                                    o.type && (o.method = o.type) && delete o.type
                                    o.dataType && (o.type = o.dataType)
                                    o.jsonpCallback && (o.jsonpCallbackName = o.jsonpCallback) && delete o.jsonpCallback
                                    o.jsonp && (o.jsonpCallback = o.jsonp)
                            Severity: Major
                            Found in app/assets/javascripts/rails_i18nterface/ender.js - About 1 hr to fix

                              Function RegEntry has 7 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                        , RegEntry = function (element, type, handler, original, namespaces, args, root) {
                              Severity: Major
                              Found in app/assets/javascripts/rails_i18nterface/ender.js - About 50 mins to fix

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

                                            , forAll = function (element, type, original, handler, root, fn) {
                                Severity: Minor
                                Found in app/assets/javascripts/rails_i18nterface/ender.js - About 45 mins to fix

                                  Function once has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                        , once = function (rm, element, type, fn, originalFn) {
                                  Severity: Minor
                                  Found in app/assets/javascripts/rails_i18nterface/ender.js - About 35 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                          if (pseudo && qwery.pseudos[pseudo] && !qwery.pseudos[pseudo](this, pseudoVal)) return false
                                    Severity: Major
                                    Found in app/assets/javascripts/rails_i18nterface/ender.js - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                                  return this
                                      Severity: Major
                                      Found in app/assets/javascripts/rails_i18nterface/ender.js - About 30 mins to fix

                                        Avoid too many return statements within this function.
                                        Open

                                                return false
                                        Severity: Major
                                        Found in app/assets/javascripts/rails_i18nterface/ender.js - About 30 mins to fix

                                          Avoid too many return statements within this function.
                                          Open

                                                return select(selector, root)
                                          Severity: Major
                                          Found in app/assets/javascripts/rails_i18nterface/ender.js - About 30 mins to fix

                                            Avoid too many return statements within this function.
                                            Open

                                                    if (hasByClass && m[3]) return arrayify(root[byClass](m[3]))
                                            Severity: Major
                                            Found in app/assets/javascripts/rails_i18nterface/ender.js - About 30 mins to fix

                                              Avoid too many return statements within this function.
                                              Open

                                                      if (m[2]) return arrayify(root[byTag](m[2]))
                                              Severity: Major
                                              Found in app/assets/javascripts/rails_i18nterface/ender.js - About 30 mins to fix

                                                Avoid too many return statements within this function.
                                                Open

                                                      return this
                                                Severity: Major
                                                Found in app/assets/javascripts/rails_i18nterface/ender.js - About 30 mins to fix

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

                                                      var isAncestor = 'compareDocumentPosition' in html ?
                                                        function (element, container) {
                                                          return (container.compareDocumentPosition(element) & 16) == 16
                                                        } : 'contains' in html ?
                                                        function (element, container) {
                                                  Severity: Major
                                                  Found in app/assets/javascripts/rails_i18nterface/ender.js and 1 other location - About 3 hrs to fix
                                                  app/assets/javascripts/rails_i18nterface/ender.js on lines 719..731

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

                                                  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

                                                            var isAncestor = 'compareDocumentPosition' in root
                                                                  ? function (element, container) {
                                                                      return container.compareDocumentPosition && (container.compareDocumentPosition(element) & 16) === 16
                                                                    }
                                                                  : 'contains' in root
                                                  Severity: Major
                                                  Found in app/assets/javascripts/rails_i18nterface/ender.js and 1 other location - About 3 hrs to fix
                                                  app/assets/javascripts/rails_i18nterface/ender.js on lines 1830..1841

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

                                                  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

                                                    (function (name, context, definition) {
                                                      if (typeof module != 'undefined' && module.exports) module.exports = definition()
                                                      else if (typeof context['define'] == 'function' && context['define']['amd']) define(definition)
                                                      else context[name] = definition()
                                                    })('qwery', this, function () {
                                                  Severity: Major
                                                  Found in app/assets/javascripts/rails_i18nterface/ender.js and 1 other location - About 2 hrs to fix
                                                  app/assets/javascripts/rails_i18nterface/ender.js on lines 1988..3120

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

                                                  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

                                                    (function (name, context, definition) {
                                                      if (typeof module != 'undefined' && module.exports) module.exports = definition()
                                                      else if (typeof context['define'] == 'function' && context['define']['amd']) define(definition)
                                                      else context[name] = definition()
                                                    })('bonzo', this, function() {
                                                  Severity: Major
                                                  Found in app/assets/javascripts/rails_i18nterface/ender.js and 1 other location - About 2 hrs to fix
                                                  app/assets/javascripts/rails_i18nterface/ender.js on lines 1547..1908

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

                                                  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

                                                            Event.prototype.preventDefault = function () {
                                                              if (this.originalEvent.preventDefault) this.originalEvent.preventDefault()
                                                              else this.originalEvent.returnValue = false
                                                            }
                                                  Severity: Major
                                                  Found in app/assets/javascripts/rails_i18nterface/ender.js and 1 other location - About 1 hr to fix
                                                  app/assets/javascripts/rails_i18nterface/ender.js on lines 859..862

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

                                                  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

                                                            Event.prototype.stopPropagation = function () {
                                                              if (this.originalEvent.stopPropagation) this.originalEvent.stopPropagation()
                                                              else this.originalEvent.cancelBubble = true
                                                            }
                                                  Severity: Major
                                                  Found in app/assets/javascripts/rails_i18nterface/ender.js and 1 other location - About 1 hr to fix
                                                  app/assets/javascripts/rails_i18nterface/ender.js on lines 855..858

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

                                                  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

                                                        case '|=':
                                                          return actual.match(attrCache.g('|=' + val) || attrCache.s('|=' + val, '^' + clean(val) + '(-|$)', 1))
                                                  Severity: Major
                                                  Found in app/assets/javascripts/rails_i18nterface/ender.js and 1 other location - About 1 hr to fix
                                                  app/assets/javascripts/rails_i18nterface/ender.js on lines 1686..1687

                                                  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

                                                        case '~=':
                                                          return actual.match(attrCache.g('~=' + val) || attrCache.s('~=' + val, '(?:^|\\s+)' + clean(val) + '(?:\\s+|$)', 1))
                                                  Severity: Major
                                                  Found in app/assets/javascripts/rails_i18nterface/ender.js and 1 other location - About 1 hr to fix
                                                  app/assets/javascripts/rails_i18nterface/ender.js on lines 1688..1689

                                                  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

                                                              , height = de
                                                                  ? Math.max(el.body.scrollHeight, el.body.offsetHeight, de.scrollWidth, de.offsetWidth, de.clientHeight)
                                                                  : el.offsetHeight
                                                  Severity: Major
                                                  Found in app/assets/javascripts/rails_i18nterface/ender.js and 1 other location - About 1 hr to fix
                                                  app/assets/javascripts/rails_i18nterface/ender.js on lines 2836..2838

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

                                                  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

                                                              , width = de
                                                                  ? Math.max(el.body.scrollWidth, el.body.offsetWidth, de.scrollWidth, de.offsetWidth, de.clientWidth)
                                                                  : el.offsetWidth
                                                  Severity: Major
                                                  Found in app/assets/javascripts/rails_i18nterface/ender.js and 1 other location - About 1 hr to fix
                                                  app/assets/javascripts/rails_i18nterface/ender.js on lines 2839..2841

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

                                                  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

                                                            'show '                                                          + // mouse buttons
                                                            'input invalid '                                                 + // form elements
                                                            'touchstart touchmove touchend touchcancel '                     + // touch
                                                            'gesturestart gesturechange gestureend '                         + // gesture
                                                            'textinput'                                                      + // TextEvent
                                                  Severity: Minor
                                                  Found in app/assets/javascripts/rails_i18nterface/ender.js and 1 other location - About 40 mins to fix
                                                  app/assets/javascripts/rails_i18nterface/ender.js on lines 683..691

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

                                                  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

                                                            'click dblclick mouseup mousedown contextmenu '                  + // mouse buttons
                                                            'mousewheel mousemultiwheel DOMMouseScroll '                     + // mouse wheel
                                                            'mouseover mouseout mousemove selectstart selectend '            + // mouse movement
                                                            'keydown keypress keyup '                                        + // keyboard
                                                            'orientationchange '                                             + // mobile
                                                  Severity: Minor
                                                  Found in app/assets/javascripts/rails_i18nterface/ender.js and 1 other location - About 40 mins to fix
                                                  app/assets/javascripts/rails_i18nterface/ender.js on lines 695..703

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

                                                  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

                                                        if (o.error) {
                                                          this._errorHandlers.push(function () {
                                                            o.error.apply(o, arguments)
                                                          })
                                                        }
                                                  Severity: Minor
                                                  Found in app/assets/javascripts/rails_i18nterface/ender.js and 2 other locations - About 35 mins to fix
                                                  app/assets/javascripts/rails_i18nterface/ender.js on lines 339..343
                                                  app/assets/javascripts/rails_i18nterface/ender.js on lines 351..355

                                                  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

                                                        if (o.success) {
                                                          this._fulfillmentHandlers.push(function () {
                                                            o.success.apply(o, arguments)
                                                          })
                                                        }
                                                  Severity: Minor
                                                  Found in app/assets/javascripts/rails_i18nterface/ender.js and 2 other locations - About 35 mins to fix
                                                  app/assets/javascripts/rails_i18nterface/ender.js on lines 345..349
                                                  app/assets/javascripts/rails_i18nterface/ender.js on lines 351..355

                                                  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

                                                        if (o.complete) {
                                                          this._completeHandlers.push(function () {
                                                            o.complete.apply(o, arguments)
                                                          })
                                                        }
                                                  Severity: Minor
                                                  Found in app/assets/javascripts/rails_i18nterface/ender.js and 2 other locations - About 35 mins to fix
                                                  app/assets/javascripts/rails_i18nterface/ender.js on lines 339..343
                                                  app/assets/javascripts/rails_i18nterface/ender.js on lines 345..349

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

                                                              , left = bcr.left + scroll.x - Math.max(0, de && de.clientLeft, doc.body.clientLeft)
                                                  Severity: Minor
                                                  Found in app/assets/javascripts/rails_i18nterface/ender.js and 1 other location - About 35 mins to fix
                                                  app/assets/javascripts/rails_i18nterface/ender.js on lines 2802..2802

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

                                                              , top = bcr.top + scroll.y - Math.max(0, de && de.clientTop, doc.body.clientTop)
                                                  Severity: Minor
                                                  Found in app/assets/javascripts/rails_i18nterface/ender.js and 1 other location - About 35 mins to fix
                                                  app/assets/javascripts/rails_i18nterface/ender.js on lines 2803..2803

                                                  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

                                                  There are no issues that match your filters.

                                                  Category
                                                  Status