tadashi-aikawa/owlmixin

View on GitHub

Showing 243 of 243 total issues

Function superMatcher has 65 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        superMatcher = function( seed, context, xml, results, outermost ) {
            var elem, j, matcher,
                matchedCount = 0,
                i = "0",
                unmatched = seed && [],
Severity: Major
Found in docs/_static/jquery-3.6.0.js - About 2 hrs to fix

    OwlMixin has 23 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class OwlMixin(DictTransformer, JsonTransformer, YamlTransformer, metaclass=OwlMeta):
        @classmethod
        def from_dict(
            cls,
            d: dict,
    Severity: Minor
    Found in owlmixin/__init__.py - About 2 hrs to fix

      File util.py has 269 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      # coding: utf-8
      
      # The location of `import yaml` is not optimized!!
      # pylint: disable=wrong-import-order,duplicate-code
      
      
      Severity: Minor
      Found in owlmixin/util.py - About 2 hrs to fix

        Function performObjectSearch has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
        Open

          performObjectSearch: (object, objectTerms) => {
            const filenames = Search._index.filenames;
            const docNames = Search._index.docnames;
            const objects = Search._index.objects;
            const objNames = Search._index.objnames;
        Severity: Minor
        Found in docs/_static/searchtools.js - About 2 hrs 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 domManip has 60 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function domManip( collection, args, callback, ignored ) {
        
            // Flatten any nested arrays
            args = flat( args );
        
        
        Severity: Major
        Found in docs/_static/jquery-3.6.0.js - About 2 hrs to fix

          Function ajaxConvert has 59 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function ajaxConvert( s, response, jqXHR, isSuccess ) {
              var conv2, current, conv, tmp, prev,
                  converters = {},
          
                  // Work with a copy of dataTypes in case we need to modify it for conversion
          Severity: Major
          Found in docs/_static/jquery-3.6.0.js - About 2 hrs to fix

            Function highlightText has a Cognitive Complexity of 17 (exceeds 5 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/_static/_sphinx_javascript_frameworks_compat.js - About 2 hrs 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 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/_static/jquery-3.6.0.js - About 2 hrs to fix

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

                      Object.keys(terms).forEach((term) => {
                        if (term.match(escapedWord) && !terms[word])
                          arr.push({ files: terms[term], score: Scorer.partialTerm });
                      });
              Severity: Major
              Found in docs/_static/searchtools.js and 1 other location - About 2 hrs to fix
              docs/_static/searchtools.js on lines 465..468

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

              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

                      Object.keys(titleTerms).forEach((term) => {
                        if (term.match(escapedWord) && !titleTerms[word])
                          arr.push({ files: titleTerms[word], score: Scorer.partialTitle });
                      });
              Severity: Major
              Found in docs/_static/searchtools.js and 1 other location - About 2 hrs to fix
              docs/_static/searchtools.js on lines 461..464

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

              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 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/_static/jquery-3.6.0.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/_static/jquery-3.6.0.js - About 2 hrs to fix

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

                    performObjectSearch: (object, objectTerms) => {
                      const filenames = Search._index.filenames;
                      const docNames = Search._index.docnames;
                      const objects = Search._index.objects;
                      const objNames = Search._index.objnames;
                  Severity: Minor
                  Found in docs/_static/searchtools.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/_static/jquery-3.6.0.js - About 2 hrs to fix

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

                                case "ArrowLeft":
                                  if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
                      
                                  const prevLink = document.querySelector('link[rel="prev"]');
                                  if (prevLink && prevLink.href) {
                      Severity: Major
                      Found in docs/_static/doctools.js and 1 other location - About 2 hrs to fix
                      docs/_static/doctools.js on lines 130..138

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

                      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

                            } else {
                              el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`;
                              toggledRows.forEach((el) => (el.style.display = ""));
                            }
                      Severity: Major
                      Found in docs/_static/doctools.js and 1 other location - About 2 hrs to fix
                      docs/_static/doctools.js on lines 88..91

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

                      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 "ArrowRight":
                                  if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
                      
                                  const nextLink = document.querySelector('link[rel="next"]');
                                  if (nextLink && nextLink.href) {
                      Severity: Major
                      Found in docs/_static/doctools.js and 1 other location - About 2 hrs to fix
                      docs/_static/doctools.js on lines 121..129

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

                      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

                            if (el.src.substr(-9) === "minus.png") {
                              el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`;
                              toggledRows.forEach((el) => (el.style.display = "none"));
                            } else {
                      Severity: Major
                      Found in docs/_static/doctools.js and 1 other location - About 2 hrs to fix
                      docs/_static/doctools.js on lines 91..94

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

                      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 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/_static/_sphinx_javascript_frameworks_compat.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/_static/jquery-3.6.0.js - About 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language