Showing 235 of 235 total issues
Function init
has 327 lines of code (exceeds 25 allowed). Consider refactoring. Open
function init(element, options) {
var node = getDomNode(element);
if (!node || !node.parentNode) {
return closeAndReturnNoopAnimator();
}
Identical blocks of code found in 2 locations. Consider refactoring. Open
function addMarker(peer) {
console.log('Adding marker...');
var ll = coordinatesToLatLong(peer.latitude, peer.longitude);
if(ll) {
var marker = new google.maps.Marker({
- 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 244.
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
Identical blocks of code found in 2 locations. Consider refactoring. Open
function addMarker(peer) {
console.log('Adding marker...');
var ll = coordinatesToLatLong(peer.latitude, peer.longitude);
if(ll) {
var marker = new google.maps.Marker({
- 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 244.
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 $$AnimationProvider
has 254 lines of code (exceeds 25 allowed). Consider refactoring. Open
var $$AnimationProvider = ['$animateProvider', function($animateProvider) {
var NG_ANIMATE_REF_ATTR = 'ng-animate-ref';
var drivers = this.drivers = [];
Function $get
has 239 lines of code (exceeds 25 allowed). Consider refactoring. Open
function($$jqLite, $rootScope, $injector, $$AnimateRunner, $$rAFScheduler) {
var animationQueue = [];
var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);
Function $RouteProvider
has 216 lines of code (exceeds 25 allowed). Consider refactoring. Open
function $RouteProvider() {
function inherit(parent, extra) {
return angular.extend(Object.create(parent), extra);
}
Function $$AnimateJsProvider
has 203 lines of code (exceeds 25 allowed). Consider refactoring. Open
var $$AnimateJsProvider = ['$animateProvider', function($animateProvider) {
this.$get = ['$injector', '$$AnimateRunner', '$$rAFMutex', '$$jqLite',
function($injector, $$AnimateRunner, $$rAFMutex, $$jqLite) {
var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);
Function $get
has 200 lines of code (exceeds 25 allowed). Consider refactoring. Open
function($injector, $$AnimateRunner, $$rAFMutex, $$jqLite) {
var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);
// $animateJs(element, 'enter');
return function(element, event, classes, options) {
Function $$AnimateCssDriverProvider
has 180 lines of code (exceeds 25 allowed). Consider refactoring. Open
var $$AnimateCssDriverProvider = ['$$animationProvider', function($$animationProvider) {
$$animationProvider.drivers.push('$$animateCssDriver');
var NG_ANIMATE_SHIM_CLASS_NAME = 'ng-animate-shim';
var NG_ANIMATE_ANCHOR_CLASS_NAME = 'ng-anchor';
Function $get
has 172 lines of code (exceeds 25 allowed). Consider refactoring. Open
function($animateCss, $rootScope, $$AnimateRunner, $rootElement, $document, $sniffer) {
// only browsers that support these properties can render animations
if (!$sniffer.animations && !$sniffer.transitions) return noop;
Function translateDirective
has 169 lines of code (exceeds 25 allowed). Consider refactoring. Open
function translateDirective($translate, $q, $interpolate, $compile, $parse, $rootScope) {
'use strict';
/**
Function compile
has 159 lines of code (exceeds 25 allowed). Consider refactoring. Open
compile: function (tElement, tAttr) {
var translateValuesExist = (tAttr.translateValues) ?
tAttr.translateValues : undefined;
Function queueAnimation
has 155 lines of code (exceeds 25 allowed). Consider refactoring. Open
function queueAnimation(element, event, options) {
var node, parent;
element = stripCommentsFromElement(element);
if (element) {
node = getDomNode(element);
Function linkFn
has 150 lines of code (exceeds 25 allowed). Consider refactoring. Open
return function linkFn(scope, iElement, iAttr) {
scope.interpolateParams = {};
scope.preText = '';
scope.postText = '';
File angular-growl.js
has 414 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* angular-growl-v2 - v0.7.4 - 2015-06-17
* http://janstevens.github.io/angular-growl-2
* Copyright (c) 2015 Marco Rinck,Jan Stevens; Licensed MIT
*/
Function $get
has 145 lines of code (exceeds 25 allowed). Consider refactoring. Open
function($rootScope, $location, $routeParams, $q, $injector, $templateRequest, $sce) {
/**
* @ngdoc service
* @name $route
Similar blocks of code found in 2 locations. Consider refactoring. Open
module.exports = function(config) {
config.set({
// base path, that will be used to resolve files and exclude
basePath: '',
- 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 148.
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
module.exports = function(config) {
config.set({
// base path, that will be used to resolve files and exclude
basePath: '',
- 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 148.
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 exports
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(grunt) {
'use strict';
// Project configuration.
grunt.initConfig({
Function start
has 119 lines of code (exceeds 25 allowed). Consider refactoring. Open
function start() {
if (animationClosed) return;
if (!node.parentNode) {
close();
return;