Showing 28 of 319 total issues
Function exports
has 151 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(environment) {
let ENV = {
modulePrefix: 'aeonvera',
podModulePrefix: 'aeonvera/pods',
i18n: {
Function _drawGraph
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
_drawGraph() {
const explanationId = 'chart-event-sunburst-explanation';
const chartId = 'chart-event-sunburst';
const width = Ember.$(`#${chartId}`).parent().parent().width();
File router.js
has 269 lines of code (exceeds 250 allowed). Consider refactoring. Open
import EmberRouter from '@ember/routing/router';
import config from './config/environment';
import RouterScroll from 'ember-router-scroll';
const Router = EmberRouter.extend(RouterScroll, {
Function exports
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(defaults) {
var fingerprintPrepend = '';
console.log(env);
switch(env){
case 'staging':
Function get
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
get() {
const model = this.get('model');
const startTime = this.get('startTime');
const endTime = this.get('endTime');
Function get
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
get() {
const model = this.get('model');
const startTime = this.get('startTime');
const endTime = this.get('endTime');
- 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 _drawGraph
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
_drawGraph() {
const explanationId = 'chart-event-sunburst-explanation';
const chartId = 'chart-event-sunburst';
const width = Ember.$(`#${chartId}`).parent().parent().width();
- 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 calculateForSubTotal
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
calculateForSubTotal(subTotal: any, absorbFees: boolean = false, allowNegative: boolean = false) {
let value = parseFloat(subTotal);
if (isNaN(value)) {
value = 0;
Function model
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
model(params, transition) {
const { queryParams } = transition;
let token = queryParams.token;
let order = null;
Function exports
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(deployTarget) {
var bucketSuffix = deployTarget === 'development' ? 'dev' : deployTarget;
var ENV = {
build: {},
Function initialize
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
initialize: function() {
if (alreadyRun) {
return;
}
alreadyRun = true;
Function allergyText
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
allergyText: Ember.computed('housingRequest', function() {
const noPreference = this.get('noPreference');
const pets = this.get('allergicToPets');
const smoke = this.get('allergicToSmoke');
const other = this.get('otherAllergies');
- 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 _fillData
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
_fillData() {
const model = this.get('model');
const incomes = model.get('incomes');
const registrationTimes = model.get('registrationTimes');
const incomeTimes = model.get('incomeTimes');
Function submitInformation
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
submitInformation() {
const complete = this.get('formComplete');
if (!complete) return;
Function messageFromError
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export function messageFromError(error, msgTemplate) {
msgTemplate = msgTemplate || defaultTemplate;
if (typeof error === 'string') return error;
- 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 orderQuery
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
orderQuery(hostId, hostType, pastDays, showPaid, selectedLineItem, nameContains) {
Function orderQuery
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
orderQuery(hostId, hostType, pastDays, showPaid, selectedLineItem, nameContains) {
const query = { host_id_eq: hostId, host_type_eq: hostType };
if (isPresent(pastDays)) {
const m = moment(new Date());
- 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 paymentStatus
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
paymentStatus: function() {
const owed = this.get('amountOwed');
const paid = this.get('amountPaid');
const doesOwe = owed > 0;
const hasPaid = paid > 0;
- 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 didSubmitHousing
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
didSubmitHousing() {
const option = parseInt(this.get('selectedHousingOption'));
const housingProvision = this.get('housingProvision');
const housingRequest = this.get('housingRequest');
- 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
Avoid too many return
statements within this function. Open
return msgTemplate(attribute, attributeDetail);