JohnMunsch/PaperQuik

View on GitHub
app/bower_components/jquery/src/css.js

Summary

Maintainability
F
2 wks
Test Coverage

File css.js has 317 lines of code (exceeds 250 allowed). Consider refactoring.
Open

define([
    "./core",
    "./var/pnum",
    "./core/access",
    "./css/var/rmargin",
Severity: Minor
Found in app/bower_components/jquery/src/css.js - About 3 hrs to fix

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

    function showHide( elements, show ) {
        var display, elem, hidden,
            values = [],
            index = 0,
            length = elements.length;
    Severity: Minor
    Found in app/bower_components/jquery/src/css.js - About 1 hr to fix

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

          style: function( elem, name, value, extra ) {
              // Don't set styles on text and comment nodes
              if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
                  return;
              }
      Severity: Minor
      Found in app/bower_components/jquery/src/css.js - About 1 hr to fix

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

        function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
        Severity: Minor
        Found in app/bower_components/jquery/src/css.js - About 35 mins to fix

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

          jQuery.extend({
              // Add in style property hooks for overriding the default
              // behavior of getting and setting a style property
              cssHooks: {
                  opacity: {
          Severity: Major
          Found in app/bower_components/jquery/src/css.js and 1 other location - About 5 days to fix
          app/bower_components/jquery/dist/jquery.js on lines 5876..6008

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

          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

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

          function showHide( elements, show ) {
              var display, elem, hidden,
                  values = [],
                  index = 0,
                  length = elements.length;
          Severity: Major
          Found in app/bower_components/jquery/src/css.js and 1 other location - About 2 days to fix
          app/bower_components/jquery/dist/jquery.js on lines 5825..5874

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

          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

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

          jQuery.fn.extend({
              css: function( name, value ) {
                  return access( this, function( elem, name, value ) {
                      var styles, len,
                          map = {},
          Severity: Major
          Found in app/bower_components/jquery/src/css.js and 1 other location - About 1 day to fix
          app/bower_components/jquery/dist/jquery.js on lines 6079..6121

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

          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 augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
              var i = extra === ( isBorderBox ? "border" : "content" ) ?
                  // If we already have the right measurement, avoid augmentation
                  4 :
                  // Otherwise initialize for horizontal or vertical properties
          Severity: Major
          Found in app/bower_components/jquery/src/css.js and 1 other location - About 1 day to fix
          app/bower_components/jquery/dist/jquery.js on lines 5742..5779

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

          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 getWidthOrHeight( elem, name, extra ) {
          
              // Start with offset property, which is equivalent to the border-box value
              var valueIsBorderBox = true,
                  val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
          Severity: Major
          Found in app/bower_components/jquery/src/css.js and 1 other location - About 1 day to fix
          app/bower_components/jquery/dist/jquery.js on lines 5781..5823

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

          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

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

          jQuery.each({
              margin: "",
              padding: "",
              border: "Width"
          }, function( prefix, suffix ) {
          Severity: Major
          Found in app/bower_components/jquery/src/css.js and 1 other location - About 1 day to fix
          app/bower_components/jquery/dist/jquery.js on lines 6052..6077

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

          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

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

          jQuery.each([ "height", "width" ], function( i, name ) {
              jQuery.cssHooks[ name ] = {
                  get: function( elem, computed, extra ) {
                      if ( computed ) {
                          // certain elements can have dimension info if we invisibly show them
          Severity: Major
          Found in app/bower_components/jquery/src/css.js and 1 other location - About 1 day to fix
          app/bower_components/jquery/dist/jquery.js on lines 6010..6037

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

          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

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

          function vendorPropName( style, name ) {
          
              // shortcut for names that are not vendor prefixed
              if ( name in style ) {
                  return name;
          Severity: Major
          Found in app/bower_components/jquery/src/css.js and 1 other location - About 4 hrs to fix
          app/bower_components/jquery/dist/jquery.js on lines 5712..5732

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

          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

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

          var
              // swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
              // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
              rdisplayswap = /^(none|table(?!-c[ea]).+)/,
              rnumsplit = new RegExp( "^(" + pnum + ")(.*)$", "i" ),
          Severity: Major
          Found in app/bower_components/jquery/src/css.js and 1 other location - About 3 hrs to fix
          app/bower_components/jquery/dist/jquery.js on lines 5696..5709

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

          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 setPositiveNumber( elem, value, subtract ) {
              var matches = rnumsplit.exec( value );
              return matches ?
                  // Guard against undefined "subtract", e.g., when used as in cssHooks
                  Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
          Severity: Major
          Found in app/bower_components/jquery/src/css.js and 1 other location - About 1 hr to fix
          app/bower_components/jquery/dist/jquery.js on lines 5734..5740

          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

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

          jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,
              function( elem, computed ) {
                  if ( computed ) {
                      // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
                      // Work around by temporarily setting element display to inline-block
          Severity: Major
          Found in app/bower_components/jquery/src/css.js and 1 other location - About 1 hr to fix
          app/bower_components/jquery/dist/jquery.js on lines 6040..6049

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

          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