Showing 570 of 1,380 total issues
File jasmine.js
has 1511 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework.
*
* @namespace
*/
File h.ts
has 1299 lines of code (exceeds 250 allowed). Consider refactoring. Open
import _ from 'underscore';
import moment from 'moment';
import * as Sentry from '@sentry/browser';
import m from 'mithril';
import prop from 'mithril/stream';
Function CatarseAnalytics
has a Cognitive Complexity of 148 (exceeds 5 allowed). Consider refactoring. Open
window.CatarseAnalytics = window.CatarseAnalytics || (function(){
/*!
* cookie-monster - a simple cookie library
* v0.3.0
* https://github.com/jgallen23/cookie-monster
- 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 AjaxFakeRequest
has a Cognitive Complexity of 101 (exceeds 5 allowed). Consider refactoring. Open
getJasmineRequireObj().AjaxFakeRequest = function(eventBusFactory) {
function extend(destination, source, propertiesToSkip) {
propertiesToSkip = propertiesToSkip || [];
for (var property in source) {
if (!arrayContains(propertiesToSkip, property)) {
- 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 paymentVM
has 372 lines of code (exceeds 25 allowed). Consider refactoring. Open
const paymentVM = () => {
const pagarme = prop({}),
defaultCountryID = addressVM.defaultCountryID,
submissionError = prop(false),
isLoading = prop(false);
Function view
has a Cognitive Complexity of 86 (exceeds 5 allowed). Consider refactoring. Open
view: function({state}) {
const user = state.user(),
project_id = state.project_id,
project = state.project(),
formatedValue = h.formatNumber(state.value, 2, 3),
- 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 80 (exceeds 5 allowed). Consider refactoring. Open
view: function ({ state }) {
const user = state.user(),
project = state.project(),
formatedValue = h.formatNumber(Number(state.value), 2, 3),
anonymousCheckbox = m('.w-row', [
- 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 71 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const project = attrs.project(),
projectRoute = `/projects/${project.project_id}`,
editRoute = `${projectRoute}/edit`,
editLinkClass = hash => `dashboard-nav-link-left ${project.is_published ? 'indent' : ''} ${h.hashMatch(hash) ? 'selected' : ''}`;
- 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 280 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const listVM = balanceTransferListVM,
filterVM = balanceTransferFilterVM(),
authorizedListVM = balanceTransferListVM,
authorizedFilterVM = balanceTransferFilterVM(),
Function CatarseAnalytics
has 263 lines of code (exceeds 25 allowed). Consider refactoring. Open
window.CatarseAnalytics = window.CatarseAnalytics || (function(){
/*!
* cookie-monster - a simple cookie library
* v0.3.0
* https://github.com/jgallen23/cookie-monster
Function AjaxFakeRequest
has 257 lines of code (exceeds 25 allowed). Consider refactoring. Open
getJasmineRequireObj().AjaxFakeRequest = function(eventBusFactory) {
function extend(destination, source, propertiesToSkip) {
propertiesToSkip = propertiesToSkip || [];
for (var property in source) {
if (!arrayContains(propertiesToSkip, property)) {
Function oninit
has 248 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function (vnode) {
const filterVM = projectsSubscriptionReportVM,
catarseVM = projectsContributionReportVM,
dropdownNumber = prop(0),
error = prop(false),
File mock-ajax.js
has 579 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
Jasmine-Ajax - v3.1.1: a set of helpers for testing AJAX requests under the Jasmine
BDD framework for JavaScript.
Function oninit
has 246 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
let listVM = contributionListVM,
filterVM = contributionFilterVM,
error = prop(''),
filterBuilder = [{ // full_text_index
Function oninit
has 244 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const listVM = projectContributionsListVM(),
filterVM = projectsContributionReportVM,
project = prop([{}]),
rewards = prop([]),
Function oninit
has 239 lines of code (exceeds 25 allowed). Consider refactoring. Open
oninit: function(vnode) {
const project = projectVM.getCurrentProject(),
reward = vnode.attrs.reward(),
imageFileToUpload = prop(null),
minimumValue = projectVM.isSubscription(project) ? 5 : 10,
Function view
has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const project = attrs.project,
isSolidarityProject = state.isSolidarityProject,
buildTooltip = el => m(tooltip, {
el,
- 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 userInteraction
has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring. Open
userInteraction(attrs) {
const {
subscription,
displayCancelModal,
isGeneratingSecondSlip,
- 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 i18n.js
has 536 lines of code (exceeds 250 allowed). Consider refactoring. Open
// I18n.js
// =======
//
// This small library provides the Rails I18n API on the Javascript.
// You don't actually have to use Rails (or even Ruby) to use I18n.js.
File user-about-edit.js
has 531 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';