Showing 3,362 of 3,362 total issues
File common.js
has 861 lines of code (exceeds 250 allowed). Consider refactoring. Open
import LocalCollection from './local_collection.js';
export const hasOwn = Object.prototype.hasOwnProperty;
// Each element selector contains:
File backbone.js
has 856 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Backbone.js 0.9.2
// (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc.
// Backbone may be freely distributed under the MIT license.
// For all details and documentation:
File history.js
has 848 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* History.js Core
* @author Benjamin Arthur Lupton <contact@balupton.com>
* @copyright 2010-2011 Benjamin Arthur Lupton <contact@balupton.com>
* @license New BSD License <http://creativecommons.org/licenses/BSD/>
Identical blocks of code found in 2 locations. Consider refactoring. Open
var args = splitArgs({
'rails': '4.0.0',
'protected-attributes': null,
'rails-observers': null,
'actionpack-page-caching': null,
- 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 362.
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
var args = splitArgs({
'rails': '4.0.0',
'protected-attributes': null,
'rails-observers': null,
'actionpack-page-caching': null,
- 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 362.
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
File console.js
has 827 lines of code (exceeds 250 allowed). Consider refactoring. Open
/// This class provides a set of utility functions for printing to the terminal
/// in the Meteor tool.
///
/// When you intend for your messages to be read by humans, you should use the
/// following functions to print to the terminal. They will automatically line
Similar blocks of code found in 2 locations. Consider refactoring. Open
Tinytest.add("spiderable - is ready with a custom hook", function (test, expect) {
var callbacks = {}
test.equal(
_.keys(Spiderable._onReadyHook.callbacks).length,
2
- 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 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
- 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
Tinytest.add("spiderable - is not ready with a custom hook", function (test, expect) {
var callbacks = {}
test.equal(
_.keys(Spiderable._onReadyHook.callbacks).length,
2
- 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 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
- 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
File meteor-npm.js
has 775 lines of code (exceeds 250 allowed). Consider refactoring. Open
/// Implements the process of managing a package's .npm directory,
/// in which we call `npm install` to install npm dependencies,
/// and a variety of related commands. Notably, we use `npm shrinkwrap`
/// to ensure we get consistent versions of npm sub-dependencies.
File solver.js
has 772 lines of code (exceeds 250 allowed). Consider refactoring. Open
const has = Npm.require('lodash.has');
const zip = Npm.require('lodash.zip');
const memoize = Npm.require('lodash.memoize');
const groupBy = Npm.require('lodash.groupby');
File linker.js
has 746 lines of code (exceeds 250 allowed). Consider refactoring. Open
var _ = require('underscore');
var sourcemap = require('source-map');
var buildmessage = require('../utils/buildmessage.js');
var watch = require('../fs/watch');
var Profile = require('../tool-env/profile').Profile;
File run-mongo.js
has 744 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { MongoExitCodes } from '../utils/mongo-exit-codes';
var files = require('../fs/files');
var utils = require('../utils/utils.js');
var fiberHelpers = require('../utils/fiber-helpers.js');
var runLog = require('./run-log.js');
File catalog-remote.js
has 735 lines of code (exceeds 250 allowed). Consider refactoring. Open
var _ = require('underscore');
var sqlite3 = require('sqlite3');
var files = require('../../fs/files');
var utils = require('../../utils/utils.js');
File allow_tests.js
has 726 lines of code (exceeds 250 allowed). Consider refactoring. Open
if (Meteor.isServer) {
// Set up allow/deny rules for test collections
var allowCollections = {};
Function _runOnce
has 334 lines of code (exceeds 25 allowed). Consider refactoring. Open
_runOnce: function (options) {
var self = this;
options = options || {};
var firstRun = options.firstRun;
Function testSubtree
has a Cognitive Complexity of 82 (exceeds 5 allowed). Consider refactoring. Open
const testSubtree = (value, pattern) => {
// Match anything!
if (pattern === Match.Any) {
return false;
- 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 launchMongo
has 313 lines of code (exceeds 25 allowed). Consider refactoring. Open
var launchMongo = function(options) {
var onExit = options.onExit || function() {};
var noOplog = false;
var mongod_path = files.pathJoin(
File run-app.js
has 684 lines of code (exceeds 250 allowed). Consider refactoring. Open
var _ = require('underscore');
var Fiber = require('fibers');
var files = require('../fs/files');
var watch = require('../fs/watch');
var bundler = require('../isobuild/bundler.js');
File auth.js
has 683 lines of code (exceeds 250 allowed). Consider refactoring. Open
var _ = require('underscore');
var utils = require('../utils/utils.js');
var files = require('../fs/files');
var config = require('./config.js');
var httpHelpers = require('../utils/http-helpers.js');
File deploy.js
has 678 lines of code (exceeds 250 allowed). Consider refactoring. Open
// URL parsing and validation
// RPC to server (endpoint, arguments)
// see if RPC requires password
// prompt for password
// send RPC with or without password as required