Showing 570 of 1,380 total issues
Function paymentVM
has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring. Open
const paymentVM = () => {
const pagarme = prop({}),
defaultCountryID = addressVM.defaultCountryID,
submissionError = prop(false),
isLoading = prop(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 fakeRequest
has 211 lines of code (exceeds 25 allowed). Consider refactoring. Open
function fakeRequest(global, requestTracker, stubTracker, paramParser) {
function FakeXMLHttpRequest() {
requestTracker.track(this);
this.eventBus = eventBusFactory(this);
initializeEvents(this);
Function scan
has 204 lines of code (exceeds 25 allowed). Consider refactoring. Open
function scan(render) {
const states = {}
const onremovers = []
const renderNode = renderComponents(states, onremovers)
const api = {
Function userInteraction
has 203 lines of code (exceeds 25 allowed). Consider refactoring. Open
userInteraction(attrs) {
const {
subscription,
displayCancelModal,
isGeneratingSecondSlip,
File user-notifications.js
has 495 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";
import userVM from "../vms/user-vm";
Function view
has 196 lines of code (exceeds 25 allowed). Consider refactoring. Open
view: function() {
return m('footer.main-footer.main-footer-neg',
[
m('section.w-container',
m('.w-row',
Function view
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const project = attrs.project,
rewards = attrs.rewardDetails;
return m('nav-wrapper', { style: attrs.style }, project() ? [
- 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 oninit
has 193 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
let parsedErrors = userAboutVM.mapRailsErrors(railsErrorsVM.railsErrors());
let deleteUser;
const user = vnode.attrs.user || {},
fields = {
Function oninit
has 192 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
let deleteFormSubmit;
const showPreview = prop(false),
willSelectRewards = prop(false),
isProjectLoaded = prop(false),
File edit-reward-card.js
has 486 lines of code (exceeds 250 allowed). Consider refactoring. Open
import m from 'mithril';
import prop from 'mithril/stream';
import moment from 'moment';
import _ from 'underscore';
import h from '../h';
Function oninit
has 191 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const vm = vnode.attrs.vm,
isSubscriptionEdit = vnode.attrs.isSubscriptionEdit || prop(false),
subscriptionEditConfirmed = prop(false),
showSubscriptionModal = prop(false),
Function projectFiltersVM
has 190 lines of code (exceeds 25 allowed). Consider refactoring. Open
const projectFiltersVM = () => {
const filtersVM = catarse.filtersVM,
covid19 = filtersVM({
integrations: 'like',
}).integrations('COVID-19'),
Function oninit
has 186 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
let listVM = subscriptionListVM,
filterVM = subscriptionFilterVM,
error = prop(''),
filterBuilder = [{ // name
Function view
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
// FIXME: MISSING ADJUSTS
// - add draft admin modifications
const reward = state.reward,
project = attrs.project,
- 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 oninit
has 179 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit({attrs, state} : m.Vnode<UserInfoEditSettingsAttrs, UserInfoEditSettingsState>) {
const hasErrorOn = attrs.hasErrorOn
const getErrorsOn = attrs.getErrorsOn
const user = attrs.user
user.address = user.address || {
File projects-subscription-report.js
has 462 lines of code (exceeds 250 allowed). Consider refactoring. Open
import m from 'mithril';
import prop from 'mithril/stream';
import _ from 'underscore';
import {
catarse,
Function view
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
view: function({ state, attrs }) {
const project = attrs.project;
const userDetail = attrs.userDetails();
const contactData = _.extend(attrs.userDetails(), { project_id: project().id });
const contactModalC = [ownerMessageContent, contactData];
- 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
File start.js
has 458 lines of code (exceeds 250 allowed). Consider refactoring. Open
import m from 'mithril';
import prop from 'mithril/stream';
import { catarse } from '../api';
import _ from 'underscore';
import models from '../models';
File payment-credit-card.js
has 458 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';
import tooltip from './tooltip';
File credit-card-vm.js
has 448 lines of code (exceeds 250 allowed). Consider refactoring. Open
import _ from 'underscore';
import prop from 'mithril/stream';
const { CatarseAnalytics } = window;