Showing 1,635 of 1,635 total issues
File ionic-angular.js
has 7439 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* Copyright 2014 Drifty Co.
* http://drifty.com/
*
* Ionic, v1.1.0
File ionic.js
has 4890 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* Copyright 2014 Drifty Co.
* http://drifty.com/
*
* Ionic, v1.1.0
File reveal.js
has 2310 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* reveal.js
* http://lab.hakim.se/reveal-js
* MIT licensed
*
File angular-animate.js
has 2040 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* @license AngularJS v1.4.3
* (c) 2010-2015 Google, Inc. http://angularjs.org
* License: MIT
*/
File angular-ui-router.js
has 1637 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* State-based routing for AngularJS
* @version v0.2.13
* @link http://angular-ui.github.com/
* @license MIT License, http://www.opensource.org/licenses/MIT
Function RepeatManagerFactory
has 460 lines of code (exceeds 25 allowed). Consider refactoring. Open
function RepeatManagerFactory($rootScope, $window, $$rAF) {
var EMPTY_DIMENSION = { primaryPos: 0, secondaryPos: 0, primarySize: 0, secondarySize: 0, rowPrimarySize: 0 };
return function RepeatController(options) {
var afterItemsNode = options.afterItemsNode;
Function RepeatController
has 457 lines of code (exceeds 25 allowed). Consider refactoring. Open
return function RepeatController(options) {
var afterItemsNode = options.afterItemsNode;
var containerNode = options.containerNode;
var forceRefreshImages = options.forceRefreshImages;
var heightData = options.heightData;
Function $$AnimateQueueProvider
has 411 lines of code (exceeds 25 allowed). Consider refactoring. Open
var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
var PRE_DIGEST_STATE = 1;
var RUNNING_STATE = 2;
var rules = this.rules = {
Function $StateProvider
has 400 lines of code (exceeds 25 allowed). Consider refactoring. Open
function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
var root, states = {}, $state, queue = {}, abstractKey = 'abstract';
// Builds state properties from definition passed to registerState()
Function $AnimateCssProvider
has 398 lines of code (exceeds 25 allowed). Consider refactoring. Open
var $AnimateCssProvider = ['$animateProvider', function($animateProvider) {
var gcsLookup = createLocalCacheLookup();
var gcsStaggerLookup = createLocalCacheLookup();
this.$get = ['$window', '$$jqLite', '$$AnimateRunner', '$timeout',
Function $get
has 391 lines of code (exceeds 25 allowed). Consider refactoring. Open
function($window, $$jqLite, $$AnimateRunner, $timeout,
$document, $sniffer, $$rAFScheduler) {
var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);
Function $get
has 365 lines of code (exceeds 25 allowed). Consider refactoring. Open
function($$rAF, $rootScope, $rootElement, $document, $$HashMap,
$$animation, $$AnimateRunner, $templateRequest, $$jqLite) {
var activeAnimationsLookup = new $$HashMap();
var disabledElementsLookup = new $$HashMap();
Function initialize
has 364 lines of code (exceeds 25 allowed). Consider refactoring. Open
initialize: function (options) {
var slider = this;
// utilities
var noop = function() {}; // simple no operation function
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();
}
Similar blocks of code found in 2 locations. Consider refactoring. Open
angular.module('ionicApp', ['ionic'])
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
- 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 291.
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
angular.module('ionicApp', ['ionic'])
.config(function($stateProvider, $urlRouterProvider) {
$stateProvider
- 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 291.
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 RevealSearch
has a Cognitive Complexity of 70 (exceeds 5 allowed). Consider refactoring. Open
var RevealSearch = (function() {
var matchedSlides;
var currentMatchedIndex;
var searchboxDirty;
- Read upRead up
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 $$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 $UrlMatcherFactory
has 249 lines of code (exceeds 25 allowed). Consider refactoring. Open
function $UrlMatcherFactory() {
$$UMFP = this;
var isCaseInsensitive = false, isStrictMode = true, defaultSquashPolicy = false;
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);