Showing 42 of 42 total issues
Function definition
has 517 lines of code (exceeds 25 allowed). Consider refactoring. Open
function definition(isObject, isInstanceOf, isTypeOf, generateUuid, iterate, Event, hooksCss, supportMethod) {
var //shortcuts
documentBody = document.body || document.getElementsByTagName('body')[0],
arrayPrototypeConcat = Array.prototype.concat,
arrayPrototypeSlice = Array.prototype.slice,
File element.js
has 523 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* @use /demand/validator/isObject
* @use /demand/validator/isInstanceOf
* @use /demand/validator/isTypeOf
* @use /demand/function/uuid
Function definition
has 193 lines of code (exceeds 25 allowed). Consider refactoring. Open
function definition(isTypeOf, isInstanceOf, DomElement) {
var arrayPrototypeSlice = Array.prototype.slice,
objectDefineProperty = Object.defineProperty;
function resolveElements(elements) {
Function definition
has 168 lines of code (exceeds 25 allowed). Consider refactoring. Open
function definition(abstractUuid, iterate) {
var objectDefineProperties = Object.defineProperties,
storage = {},
regexMatchLeadingSlash = /^\//,
regexMatchParameter = /[?&]?([^=]+)=([^&]*)/g,
Function definition
has 129 lines of code (exceeds 25 allowed). Consider refactoring. Open
function definition(Weakmap, Pledge, isObject, iterate, Url, functionMerge) {
var XDR = 'XDomainRequest' in global && global.XDomainRequest || XHR,
storage = new Weakmap();
function flatten(object, prefix, items) {
Similar blocks of code found in 2 locations. Consider refactoring. Open
pageX: {
match: /^(?:mouse|pointer|contextmenu|click|dblclick|drag|drop|wheel)/,
process: function(event, originalEvent) {
objectDefineProperty(event, 'pageX', {
value: (function() {
- Read upRead up
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 134.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
pageY: {
match: /^(?:mouse|pointer|contextmenu|touch|click|dblclick|drag|drop|wheel)/,
process: function(event, originalEvent) {
objectDefineProperty(event, 'pageY', {
value: (function() {
- Read upRead up
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 134.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Function definition
has 120 lines of code (exceeds 25 allowed). Consider refactoring. Open
function definition(Weakmap, iterate) {
var regexMatchExcludedMethods = /^(_|((get|has|is)([A-Z]|$))|(on|one|off|emit|constructor)$)/,
objectDefineProperty = Object.defineProperty,
objectGetOwnPropertyNames = Object.getOwnPropertyNames,
objectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor,
Function definition
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
function definition(iterate) {
var objectDefineProperty = Object.defineProperty,
objectDefineProperties = Object.defineProperties,
storage = {
general: {
Function definition
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
function definition(Weakmap, DomElement, functionMerge, functionDebounce) {
var documentElement = document.documentElement,
window = new DomElement(global),
viewport = {},
storage = new Weakmap(),
Similar blocks of code found in 3 locations. Consider refactoring. Open
gulp.task(id + ':patch', function() {
return gulp.src(settings.watch)
.pipe(plugins.bump({ type: 'patch' }))
.pipe(plugins.chmod(config.permissions))
.pipe(gulp.dest('./'))
- Read upRead up
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 109.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
gulp.task(id + ':minor', function() {
return gulp.src(settings.watch)
.pipe(plugins.bump({ type: 'minor' }))
.pipe(plugins.chmod(config.permissions))
.pipe(gulp.dest('./'))
- Read upRead up
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 109.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
gulp.task(id + ':major', function() {
return gulp.src(settings.watch)
.pipe(plugins.bump({ type: 'major' }))
.pipe(plugins.chmod(config.permissions))
.pipe(gulp.dest('./'))
- Read upRead up
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 109.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Function definition
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
function definition(Weakmap, Emitter, functionMerge) {
var storage = new Weakmap();
function getStorageProperty(context, property) {
var properties;
Function definition
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
function definition(iterate) {
var id = 'polyfill/window/matchmedia',
storage = {},
count = 0, style;
Function definition
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
function definition(abstractUuid, Pledge, isInstanceOf, defer, supportMethod) {
var ArrayBuffer = 'ArrayBuffer' in global ? ArrayBuffer : null,
NativeWorker = supportMethod('Worker'),
NativeUrl = supportMethod('URL'),
NativeBlob = supportMethod('Blob'),
Function definition
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
function definition(hooksEvent) {
function getTarget(event) {
var target = event.target || event.srcElement || document;
return target.nodeType === 3 ? target.parentNode : target;
Function request
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
function request(method) {
var properties = storage.get(this),
isString = typeof properties.data === 'string',
settings = properties.settings,
url = properties.url,
Similar blocks of code found in 2 locations. Consider refactoring. Open
getWidth: function(includeMargin) {
var node = this.node,
width = node.offsetWidth,
style;
- Read upRead up
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 82.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
getHeight: function(includeMargin) {
var node = this.node,
height = node.offsetHeight,
style;
- Read upRead up
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 82.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76