ssut/py-googletrans

View on GitHub

Showing 193 of 193 total issues

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

    init = jQuery.fn.init = function( selector, context, root ) {
        var match, elem;

        // HANDLE: $(""), $(null), $(undefined), $(false)
        if ( !selector ) {
Severity: Major
Found in docs/_build/html/_static/jquery-3.5.1.js - About 2 hrs to fix

    Function eq has 54 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function eq(a, b, stack) {
        // Identical objects are equal. `0 === -0`, but they aren't identical.
        // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.
        if (a === b) return a !== 0 || 1 / a == 1 / b;
        // A strict comparison is necessary because `null == undefined`.
    Severity: Major
    Found in docs/_build/html/_static/underscore-1.3.1.js - About 2 hrs to fix

      Function performObjectSearch has 52 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        performObjectSearch : function(object, otherterms) {
          var filenames = this._index.filenames;
          var docnames = this._index.docnames;
          var objects = this._index.objects;
          var objnames = this._index.objnames;
      Severity: Major
      Found in docs/_build/html/_static/searchtools.js - About 2 hrs to fix

        Function remove has 52 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            remove: function( elem, types, handler, selector, mappedTypes ) {
        
                var j, origCount, tmp,
                    events, t, handleObj,
                    special, handlers, type, namespaces, origType,
        Severity: Major
        Found in docs/_build/html/_static/jquery-3.5.1.js - About 2 hrs to fix

          Function buildFragment has 51 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function buildFragment( elems, context, scripts, selection, ignored ) {
              var elem, tmp, tag, wrap, attached, j,
                  fragment = context.createDocumentFragment(),
                  nodes = [],
                  i = 0,
          Severity: Major
          Found in docs/_build/html/_static/jquery-3.5.1.js - About 2 hrs to fix

            Consider simplifying this complex logical expression.
            Open

                            if ( ( mappedTypes || origType === handleObj.origType ) &&
                                ( !handler || handler.guid === handleObj.guid ) &&
                                ( !tmp || tmp.test( handleObj.namespace ) ) &&
                                ( !selector || selector === handleObj.selector ||
                                    selector === "**" && handleObj.selector ) ) {
            Severity: Critical
            Found in docs/_build/html/_static/jquery-3.5.1.js - About 2 hrs to fix

              Function select has 48 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              select = Sizzle.select = function( selector, context, results, seed ) {
                  var i, tokens, token, type, find,
                      compiled = typeof selector === "function" && selector,
                      match = !seed && tokenize( ( selector = compiled.selector || selector ) );
              
              
              Severity: Minor
              Found in docs/_build/html/_static/jquery-3.5.1.js - About 1 hr to fix

                Function matcherFromTokens has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function matcherFromTokens( tokens ) {
                    var checkContext, matcher, j,
                        len = tokens.length,
                        leadingRelative = Expr.relative[ tokens[ 0 ].type ],
                        implicitRelative = leadingRelative || Expr.relative[ " " ],
                Severity: Minor
                Found in docs/_build/html/_static/jquery-3.5.1.js - About 1 hr to fix

                  Function highlightText has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  jQuery.fn.highlightText = function(text, className) {
                    function highlight(node, addItems) {
                      if (node.nodeType === 3) {
                        var val = node.nodeValue;
                        var pos = val.toLowerCase().indexOf(text);
                  Severity: Minor
                  Found in docs/_build/html/_static/doctools.js - About 1 hr to fix

                    Function addCombinator has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function addCombinator( matcher, combinator, base ) {
                        var dir = combinator.dir,
                            skip = combinator.next,
                            key = skip || dir,
                            checkNonElements = base && key === "parentNode",
                    Severity: Minor
                    Found in docs/_build/html/_static/jquery-3.5.1.js - About 1 hr to fix

                      Function tokenize has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
                          var matched, match, tokens, type,
                              soFar, groups, preFilters,
                              cached = tokenCache[ selector + " " ];
                      
                      
                      Severity: Minor
                      Found in docs/_build/html/_static/jquery-3.5.1.js - About 1 hr to fix

                        Function val has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            val: function( value ) {
                                var hooks, ret, valueIsFunction,
                                    elem = this[ 0 ];
                        
                                if ( !arguments.length ) {
                        Severity: Minor
                        Found in docs/_build/html/_static/jquery-3.5.1.js - About 1 hr to fix

                          Function data has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              data: function( key, value ) {
                                  var i, name, data,
                                      elem = this[ 0 ],
                                      attrs = elem && elem.attributes;
                          
                          
                          Severity: Minor
                          Found in docs/_build/html/_static/jquery-3.5.1.js - About 1 hr to fix

                            Function leverageNative has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function leverageNative( el, type, expectSync ) {
                            
                                // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add
                                if ( !expectSync ) {
                                    if ( dataPriv.get( el, type ) === undefined ) {
                            Severity: Minor
                            Found in docs/_build/html/_static/jquery-3.5.1.js - About 1 hr to fix

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

                                  each(obj, function(value, index, list) {
                                    var computed = iterator ? iterator.call(context, value, index, list) : value;
                                    computed >= result.computed && (result = {value : value, computed : computed});
                                  });
                              Severity: Major
                              Found in docs/_build/html/_static/underscore-1.3.1.js and 1 other location - About 1 hr to fix
                              docs/_build/html/_static/underscore-1.3.1.js on lines 242..245

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

                              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

                                  each(obj, function(value, index, list) {
                                    var computed = iterator ? iterator.call(context, value, index, list) : value;
                                    computed < result.computed && (result = {value : value, computed : computed});
                                  });
                              Severity: Major
                              Found in docs/_build/html/_static/underscore-1.3.1.js and 1 other location - About 1 hr to fix
                              docs/_build/html/_static/underscore-1.3.1.js on lines 230..233

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

                              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

                              Function extend has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              jQuery.extend = jQuery.fn.extend = function() {
                                  var options, name, src, copy, copyIsArray, clone,
                                      target = arguments[ 0 ] || {},
                                      i = 1,
                                      length = arguments.length,
                              Severity: Minor
                              Found in docs/_build/html/_static/jquery-3.5.1.js - About 1 hr to fix

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

                                    for p in doc.paragraphs:
                                        txd = tx(p.text)
                                
                                        p.text = p.text + ('\n' + txd if mix else '')
                                Severity: Major
                                Found in example/translate_word_doc.py and 1 other location - About 1 hr to fix
                                example/translate_word_doc.py on lines 20..23

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

                                        for row in table.rows:
                                            for cell in row.cells:
                                                txd = tx(cell.text)
                                                p.text = cell.text + ('\n' + txd if mix else '')
                                Severity: Major
                                Found in example/translate_word_doc.py and 1 other location - About 1 hr to fix
                                example/translate_word_doc.py on lines 14..17

                                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

                                Consider simplifying this complex logical expression.
                                Open

                                if (!jQuery.browser) {
                                  jQuery.uaMatch = function(ua) {
                                    ua = ua.toLowerCase();
                                
                                    var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
                                Severity: Critical
                                Found in docs/_build/html/_static/doctools.js - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language