Showing 91 of 91 total issues
Function adaptCache
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
external_angular_default.a.forEach(cacheDefinitions, function adaptCache (config, cacheId) {
adaptedServices[config.cacheService].createCache(cacheId, config)
var cache = caches[cacheId] = adaptedServices[config.cacheService].getCache(cacheId)
var adaptedCache = adaptedCaches[cacheId] = {}
// Determine whether to perform deepcopying or not
Function adaptCache
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
angular.forEach(cacheDefinitions, function adaptCache (config, cacheId) {
adaptedServices[config.cacheService].createCache(cacheId, config)
var cache = caches[cacheId] = adaptedServices[config.cacheService].getCache(cacheId)
var adaptedCache = adaptedCaches[cacheId] = {}
// Determine whether to perform deepcopying or not
Function adaptCache
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
external_angular_default.a.forEach(cacheDefinitions, function adaptCache (config, cacheId) {
adaptedServices[config.cacheService].createCache(cacheId, config)
var cache = caches[cacheId] = adaptedServices[config.cacheService].getCache(cacheId)
var adaptedCache = adaptedCaches[cacheId] = {}
// Determine whether to perform deepcopying or not
Function recursiveCopy
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
function recursiveCopy(value, clone, references, visited, customizer) {
const type = detectType(value);
const copiedValue = copier_copy(value, type);
// return if not a collection value
Function exports
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['mocha'],
files: ngConfig.files,
Function httpEtagPromiseFactory
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function httpEtagPromiseFactory (httpPromise) {
var then = httpPromise.then
var success = httpPromise.success
if (useLegacyPromiseExtensions) {
Function httpEtagPromiseFactory
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function httpEtagPromiseFactory (httpPromise) {
var then = httpPromise.then
var success = httpPromise.success
if (useLegacyPromiseExtensions) {
Function httpEtagPromiseFactory
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function httpEtagPromiseFactory (httpPromise) {
var then = httpPromise.then
var success = httpPromise.success
if (useLegacyPromiseExtensions) {
Identical blocks of code found in 2 locations. Consider refactoring. Open
httpEtagProvider.defineCache = function httpEtagDefineCache (cacheId, config) {
config = external_angular_default.a.extend({}, defaultEtagCacheConfig, config, { id: cacheId })
cacheDefinitions[cacheId] = config
return httpEtagProvider
}
- 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 63.
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
httpEtagProvider.defineCache = function httpEtagDefineCache (cacheId, config) {
config = external_angular_default.a.extend({}, defaultEtagCacheConfig, config, { id: cacheId })
cacheDefinitions[cacheId] = config
return httpEtagProvider
}
- 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 63.
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 keys
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
var keysShim = function keys(object) {
var isObject = object !== null && typeof object === 'object';
var isFunction = toStr.call(object) === '[object Function]';
var isArguments = isArgs(object);
var isString = isObject && toStr.call(object) === '[object String]';
Similar blocks of code found in 2 locations. Consider refactoring. Open
module.exports = {
files: [
resolve('node_modules/angular/angular.js'),
resolve('node_modules/angular-mocks/angular-mocks.js'),
resolve('src/index.js'),
- 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 58.
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 = {
files: [
resolve('test/angular_1.5/vendor/angular.js'),
resolve('test/angular_1.5/vendor/angular-mocks.js'),
resolve('src/index.js'),
- 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 58.
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 processHttpConfigEtagValue
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function processHttpConfigEtagValue (httpConfig) {
var etagValue = httpConfig.etagCache
var etagValueType = typeof etagValue
var etagCacheConfig = {}
Function processHttpConfigEtagValue
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function processHttpConfigEtagValue (httpConfig) {
var etagValue = httpConfig.etagCache
var etagValueType = typeof etagValue
var etagCacheConfig = {}
Function processHttpConfigEtagValue
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function processHttpConfigEtagValue (httpConfig) {
var etagValue = httpConfig.etagCache
var etagValueType = typeof etagValue
var etagCacheConfig = {}
Identical blocks of code found in 3 locations. Consider refactoring. Open
adaptedCache.expireItem = function adaptedCacheUnsetItemCache (itemKey) {
var data = adaptedCache.$getItem(itemKey)
delete data.etagHeader
adaptedCache.$setItem(itemKey, data)
}
- 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 55.
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 3 locations. Consider refactoring. Open
adaptedCache.expireItem = function adaptedCacheUnsetItemCache (itemKey) {
var data = adaptedCache.$getItem(itemKey)
delete data.etagHeader
adaptedCache.$setItem(itemKey, data)
}
- 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 55.
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 3 locations. Consider refactoring. Open
adaptedCache.expireItem = function adaptedCacheUnsetItemCache (itemKey) {
var data = adaptedCache.$getItem(itemKey)
delete data.etagHeader
adaptedCache.$setItem(itemKey, data)
}
- 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 55.
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
function processCacheId (cacheId) {
var type = typeof cacheId
var isDefined = type === 'number' || (type === 'string' && !!cacheId)
return isDefined ? cacheId : defaultCacheId
}
- 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 54.
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