Showing 12 of 82 total issues
Function exports
has 180 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(grunt) {
var packageNames = [];
var guides = [];
// Grunt Tasks
Function _serializeForCheckouts
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
_serializeForCheckouts: function(snapshot, orderJSON) {
var order = snapshot.record;
var checkoutState = this.get('checkouts.currentState');
var data = {
Function _serializeForCheckouts
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
_serializeForCheckouts: function(snapshot, orderJSON) {
var order = snapshot.record;
var checkoutState = this.get('checkouts.currentState');
var data = {
- 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 adapterDidInvalidate
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
adapterDidInvalidate: function(errors) {
var recordErrors = Ember.get(this, 'errors');
var nestedRecordErrors = {};
for (var key in errors) {
- 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 included
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
included: function(app) {
this._super.included(app);
/* Here we call included on any nested Spree Ember Dependencies */
this.addons.forEach(function(addon){
Function exports
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(environment) {
var ENV = {
modulePrefix: 'dummy',
environment: environment,
baseURL: '/',
Function exports
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(environment) {
var ENV = {
modulePrefix: 'dummy',
environment: environment,
baseURL: '/',
Function exports
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(environment) {
var ENV = {
modulePrefix: 'dummy',
environment: environment,
baseURL: '/',
Function exports
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(environment) {
var ENV = {
modulePrefix: 'dummy',
environment: environment,
baseURL: '/',
Function transition
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
transition: function(stateName) {
var nextStateName;
var checkoutState = this.get('currentState');
if (this.get('currentOrder')) {
- 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 selectedVariant
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
selectedVariant: Ember.computed('product.variants', function() {
var selection = this.get('variantSelection');
var variants = this.get('product.variants');
if (selection) {
- 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 steps
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
steps: Ember.computed('checkoutSteps', 'checkoutState', function() {
var checkoutSteps = this.get('checkoutSteps') || Ember.A();
var checkoutState = this.get('checkoutState');
var stepObjects = Ember.A();
- 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"