alain-andre/alain-andre-fr

View on GitHub

Showing 67 of 109 total issues

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

        embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, flashvarsObj, parObj, attObj, callbackFn) {
            var callbackObj = {success:false, id:replaceElemIdStr};
            if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
              widthStr += ""; // auto-convert to string
              heightStr += "";
Severity: Minor
Found in source/javascripts/libs/swfobject-dynamic.js - About 1 hr to fix

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

        ua = function() {
            var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
                u = nav.userAgent.toLowerCase(),
                p = nav.platform.toLowerCase(),
                windows = p ? /win/.test(p) : /win/.test(u),
    Severity: Minor
    Found in .themes/classic/source/javascripts/libs/swfobject-dynamic.js - About 1 hr to fix

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

          ua = function() {
              var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
                  u = nav.userAgent.toLowerCase(),
                  p = nav.platform.toLowerCase(),
                  windows = p ? /win/.test(p) : /win/.test(u),
      Severity: Minor
      Found in source/javascripts/libs/swfobject-dynamic.js - About 1 hr to fix

        Consider simplifying this complex logical expression.
        Open

                    if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
                      widthStr += ""; // auto-convert to string
                      heightStr += "";
                      var att = {};
                      if (attObj && typeof attObj === OBJECT) {
        Severity: Critical
        Found in source/javascripts/libs/swfobject-dynamic.js - About 1 hr to fix

          Consider simplifying this complex logical expression.
          Open

                      if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
                        widthStr += ""; // auto-convert to string
                        heightStr += "";
                        var att = {};
                        if (attObj && typeof attObj === OBJECT) {
          Severity: Critical
          Found in .themes/classic/source/javascripts/libs/swfobject-dynamic.js - About 1 hr to fix

            Consider simplifying this complex logical expression.
            Open

            10),e[1]=parseInt(c.replace(/^.*\.(.*)\s.*$/,"$1"),10),e[2]=/[a-zA-Z]/.test(c)?parseInt(c.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}else if(typeof v.ActiveXObject!=l)try{var f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(f&&(c=f.GetVariable("$version")))k=!0,c=c.split(" ")[1].split(","),e=[parseInt(c[0],10),parseInt(c[1],10),parseInt(c[2],10)]}catch(h){}return{w3:a,pv:e,wk:b,ie:k,win:g,mac:d}}();return{embedSWF:function(a,b,d,i,k,e,c,f,h){var j={success:!1,id:b};if(g.w3&&!(g.wk&&g.wk<312)&&
            a&&b&&d&&i&&k){d+="";i+="";var p={};if(f&&typeof f===o)for(var m in f)p[m]=f[m];p.data=a;p.width=d;p.height=i;a={};if(c&&typeof c===o)for(var n in c)a[n]=c[n];if(e&&typeof e===o)for(var r in e)typeof a.flashvars!=l?a.flashvars+="&"+r+"="+e[r]:a.flashvars=r+"="+e[r];if(t(k))b=s(p,a,b),j.success=!0,j.ref=b}h&&h(j)},ua:g,getFlashPlayerVersion:function(){return{major:g.pv[0],minor:g.pv[1],release:g.pv[2]}},hasFlashPlayerVersion:t,createSWF:function(a,b,d){if(g.w3)return s(a,b,d)},getQueryParamValue:function(a){var b=
            Severity: Critical
            Found in .themes/classic/source/javascripts/octopress.js - About 1 hr to fix

              Consider simplifying this complex logical expression.
              Open

              10),e[1]=parseInt(c.replace(/^.*\.(.*)\s.*$/,"$1"),10),e[2]=/[a-zA-Z]/.test(c)?parseInt(c.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}else if(typeof v.ActiveXObject!=l)try{var f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(f&&(c=f.GetVariable("$version")))k=!0,c=c.split(" ")[1].split(","),e=[parseInt(c[0],10),parseInt(c[1],10),parseInt(c[2],10)]}catch(h){}return{w3:a,pv:e,wk:b,ie:k,win:g,mac:d}}();return{embedSWF:function(a,b,d,i,k,e,c,f,h){var j={success:!1,id:b};if(g.w3&&!(g.wk&&g.wk<312)&&
              a&&b&&d&&i&&k){d+="";i+="";var p={};if(f&&typeof f===o)for(var m in f)p[m]=f[m];p.data=a;p.width=d;p.height=i;a={};if(c&&typeof c===o)for(var n in c)a[n]=c[n];if(e&&typeof e===o)for(var r in e)typeof a.flashvars!=l?a.flashvars+="&"+r+"="+e[r]:a.flashvars=r+"="+e[r];if(t(k))b=s(p,a,b),j.success=!0,j.ref=b}h&&h(j)},ua:g,getFlashPlayerVersion:function(){return{major:g.pv[0],minor:g.pv[1],release:g.pv[2]}},hasFlashPlayerVersion:t,createSWF:function(a,b,d){if(g.w3)return s(a,b,d)},getQueryParamValue:function(a){var b=
              Severity: Critical
              Found in source/javascripts/octopress.js - About 1 hr to fix

                Function Pinboard_Linkroll has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function Pinboard_Linkroll() {
                  var items;
                
                  this.set_items = function(i) {
                    this.items = i;
                Severity: Minor
                Found in source/javascripts/pinboard.js - About 1 hr to fix

                  Function Pinboard_Linkroll has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function Pinboard_Linkroll() {
                    var items;
                  
                    this.set_items = function(i) {
                      this.items = i;
                  Severity: Minor
                  Found in .themes/classic/source/javascripts/pinboard.js - About 1 hr to fix

                    Method render_code_block has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      def render_code_block(input)
                        @options = nil
                        @caption = nil
                        @lang = nil
                        @url = nil
                    Severity: Minor
                    Found in plugins/backtick_code_block.rb - About 1 hr to fix

                      Function Pinboard_Linkroll has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function Pinboard_Linkroll() {
                        var items;
                      
                        this.set_items = function(i) {
                          this.items = i;
                      Severity: Minor
                      Found in .themes/classic/source/javascripts/pinboard.js - About 1 hr 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 Pinboard_Linkroll has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function Pinboard_Linkroll() {
                        var items;
                      
                        this.set_items = function(i) {
                          this.items = i;
                      Severity: Minor
                      Found in source/javascripts/pinboard.js - About 1 hr 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

                      Method render_code_block has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                      Open

                        def render_code_block(input)
                          @options = nil
                          @caption = nil
                          @lang = nil
                          @url = nil
                      Severity: Minor
                      Found in plugins/backtick_code_block.rb - About 1 hr 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 prettyDate has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function prettyDate(time) {
                        if (navigator.appName === 'Microsoft Internet Explorer') {
                          return "<span>&infin;</span>"; // because IE date parsing isn't fun.
                        }
                        var say = {
                      Severity: Minor
                      Found in .themes/classic/source/javascripts/twitter.js - About 1 hr to fix

                        Function prettyDate has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function prettyDate(time) {
                          if (navigator.appName === 'Microsoft Internet Explorer') {
                            return "<span>&infin;</span>"; // because IE date parsing isn't fun.
                          }
                          var say = {
                        Severity: Minor
                        Found in source/javascripts/twitter.js - About 1 hr to fix

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

                          var github = (function(){
                            function escapeHtml(str) {
                              return $('<div/>').text(str).html();
                            }
                            function render(target, repos){
                          Severity: Minor
                          Found in .themes/classic/source/javascripts/github.js - About 1 hr to fix

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

                            var github = (function(){
                              function escapeHtml(str) {
                                return $('<div/>').text(str).html();
                              }
                              function render(target, repos){
                            Severity: Minor
                            Found in source/javascripts/github.js - About 1 hr to fix

                              Function embedSWF has 9 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              10),e[1]=parseInt(c.replace(/^.*\.(.*)\s.*$/,"$1"),10),e[2]=/[a-zA-Z]/.test(c)?parseInt(c.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}else if(typeof v.ActiveXObject!=l)try{var f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(f&&(c=f.GetVariable("$version")))k=!0,c=c.split(" ")[1].split(","),e=[parseInt(c[0],10),parseInt(c[1],10),parseInt(c[2],10)]}catch(h){}return{w3:a,pv:e,wk:b,ie:k,win:g,mac:d}}();return{embedSWF:function(a,b,d,i,k,e,c,f,h){var j={success:!1,id:b};if(g.w3&&!(g.wk&&g.wk<312)&&
                              Severity: Major
                              Found in .themes/classic/source/javascripts/octopress.js - About 1 hr to fix

                                Function embedSWF has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                        embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, flashvarsObj, parObj, attObj, callbackFn) {
                                Severity: Major
                                Found in source/javascripts/libs/swfobject-dynamic.js - About 1 hr to fix

                                  Function embedSWF has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                  10),e[1]=parseInt(c.replace(/^.*\.(.*)\s.*$/,"$1"),10),e[2]=/[a-zA-Z]/.test(c)?parseInt(c.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}else if(typeof v.ActiveXObject!=l)try{var f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(f&&(c=f.GetVariable("$version")))k=!0,c=c.split(" ")[1].split(","),e=[parseInt(c[0],10),parseInt(c[1],10),parseInt(c[2],10)]}catch(h){}return{w3:a,pv:e,wk:b,ie:k,win:g,mac:d}}();return{embedSWF:function(a,b,d,i,k,e,c,f,h){var j={success:!1,id:b};if(g.w3&&!(g.wk&&g.wk<312)&&
                                  Severity: Major
                                  Found in source/javascripts/octopress.js - About 1 hr to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language