Showing 570 of 1,380 total issues
Function view
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
view({attrs}) {
/** @type {Report} */
const {
id,
Function oninit
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const project = vnode.attrs.project(),
showDetail = h.toggleProp(false, true),
currentTab = prop('info'),
checked = contribution => _.contains(vnode.attrs.selectedContributions(), contribution.id),
Function oninit
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
let l;
const loadReward = () => {
const model = models.rewardDetail,
reward_id = vnode.attrs.item.reward_id,
Function getUserRecommendedProjects
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
const getUserRecommendedProjects = contribution => {
const sample3 = _.partial(_.sample, _, 3),
loaders = prop([]),
collection = prop([]),
{ user_id } = h.getUser();
File reward-vm.js
has 270 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { catarse, commonProject } from '../api';
import _ from 'underscore';
import m from 'mithril';
import prop from 'mithril/stream';
import models from '../models';
File jasmine-matchers.js
has 269 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Copyright © 2013 Jamie Mason, @fold_left,
* https://github.com/JamieMason
*
* Permission is hereby granted, free of charge, to any person
Function oninit
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function (vnode) {
const documentMask = _.partial(h.mask, '999.999.999-99');
const documentCompanyMask = _.partial(h.mask, '99.999.999/9999-99');
const cardStatusClassMap = {
Function oninit
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const EXPERIMENT_CASE_CURRENT = 'EXPERIMENT_CASE_CURRENT',
EXPERIMENT_CASE_6SUBHOM = 'EXPERIMENT_CASE_6SUBHOM',
EXPERIMENT_CASE_3SUBHOM = 'EXPERIMENT_CASE_3SUBHOM';
Function AjaxRequestStub
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
getJasmineRequireObj().AjaxRequestStub = function() {
var RETURN = 0,
ERROR = 1,
TIMEOUT = 2;
Function generateErrorInstance
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
const generateErrorInstance = () => {
const fields = prop([]);
const submissionError = prop(false);
const submissionErrorMsg = prop('');
const fieldIdxValue = (fieldName, idx, initialValue) => _.reduce(fields(), (memo, field) => field[0] === fieldName ? field[idx] : memo, initialValue);
- 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 view
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const list = state.listVM,
stats = projectVM.isSubscription(attrs.project()) ? attrs.subscriptionData() : state.contributionsStats(),
groupedCollection = state.groupedCollection(list.collection());
- 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 view
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
view: function({ state, attrs }) {
const user = attrs.user,
reminders = state.projectReminders(),
projects_collection = (state.contributedProjects() || []).concat(
state.subscribedProjects() || []
- 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 AjaxEventBus
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
getJasmineRequireObj().AjaxEventBus = function(eventFactory) {
function EventBus(source) {
this.eventList = {};
this.source = source;
}
- 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 renderComponents
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
function renderComponents(states, onremovers) {
function renderComponent(component, treePath) {
if (isFunction(component.tag)) {
component.instance = component.tag(component)
} else if (isClass(component.tag)) {
Function view
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
view({ attrs }) {
return (
<div class="section">
<div class="w-container">
<div class="w-row">
Function view
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
view({ attrs: { goalDetails: goalsDetails, subscriptionData, style }, state } : m.Vnode<ProjectGoalsBoxAttrs, ProjectGoalsBoxState>) {
const goalsDetailsOrEmpty = () : GoalDetails[] => {
const hasGoalsDetails = goalsDetails() && goalsDetails().length > 0
if (hasGoalsDetails) {
File user-bank-form.js
has 266 lines of code (exceeds 250 allowed). Consider refactoring. Open
import m from 'mithril';
import prop from 'mithril/stream';
import _ from 'underscore';
import h from '../h';
File project-insights-sub.js
has 266 lines of code (exceeds 250 allowed). Consider refactoring. Open
import m from 'mithril';
import prop from 'mithril/stream';
import moment, { min } from 'moment';
import _ from 'underscore';
import { catarse, catarseMoments, commonAnalytics } from '../api';
Function oninit
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit(/** @type {VNode} */vnode) {
/**
* @param {string} name
* @param {ProjectIntegration[]} integrations
File analytics.js
has 265 lines of code (exceeds 250 allowed). Consider refactoring. Open
//evitamos criar duas vezes...
//tem q ser não dependente de outros codigos
window.CatarseAnalytics = window.CatarseAnalytics || (function(){
/*!
* cookie-monster - a simple cookie library