Showing 570 of 1,380 total issues
Function view
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const project = attrs.project;
return m('div', [
m('.modal-dialog-header', [
- 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 a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
oninit: function(vnode) {
let parentHeight = prop(0),
width = prop(vnode.attrs.width || 280),
top = prop(0),
left = prop(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 view
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
view: function({state, attrs}) {
const data = attrs.data,
btnValue = (state.l()) ? 'por favor, aguarde...' : data.callToAction;
return m('.w-col.w-col-2', [
- 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 7 (exceeds 5 allowed). Consider refactoring. Open
view: function ({ attrs }) {
const collection = attrs.collection,
title = attrs.title || collection.title,
ref = attrs.ref,
showFriends = attrs.showFriends,
- 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 7 (exceeds 5 allowed). Consider refactoring. Open
view: function({ state, attrs }) {
const subsCollection = state.subscriptions.collection(),
onlineCollection = state.onlinePages.collection(),
successfulCollection = state.successfulPages.collection(),
failedCollection = state.failedPages.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 getContent
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function getContent(thing) {
if (!thing) {
return ''
}
if (isString(thing)) {
- 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 getPaymentInfoUntilNoError
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const getPaymentInfoUntilNoError = (paymentMethod, isEdit) => ({ id, catalog_payment_id }) => {
const p = new Promise((resolve, reject) => {
const paymentId = isEdit ? catalog_payment_id : id;
if (paymentId) {
- 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 locationOptions
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const locationOptions = (reward, destination) => {
const options = prop([]),
mapStates = _.map(states(), state => {
let fee;
const feeState = _.findWhere(fees(), {
- 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 formatException
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
jasmine.util.formatException = function(e) {
var lineNumber;
if (e.line) {
lineNumber = e.line;
}
- 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 summarizeResult_
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
jasmine.JsApiReporter.prototype.summarizeResult_ = function(result){
var summaryMessages = [];
var messagesLength = result.messages.length;
for (var messageIndex = 0; messageIndex < messagesLength; messageIndex++) {
var resultMessage = result.messages[messageIndex];
- 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 getUserRecommendedProjects
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const getUserRecommendedProjects = contribution => {
const sample3 = _.partial(_.sample, _, 3),
loaders = prop([]),
collection = prop([]),
{ user_id } = h.getUser();
- 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 analyticsWindowScroll
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
analyticsWindowScroll = eventObj => {
if (eventObj) {
setTimeout(() => {
const u = window.location.href;
let fired = 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 validateCpf
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
validateCpf = strCPF => {
let sum = 0,
remainder;
if (strCPF == '00000000000') return 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 view
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
view({ attrs, state } : m.Vnode<ShareAttrs, ShareState>) {
const project = attrs.project
const projectUrl = `${window.location.origin}/${project.permalink}`
const copyToClipboard = (copyText : HTMLInputElement) => {
- 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 AjaxStubTracker
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
getJasmineRequireObj().AjaxStubTracker = function() {
function StubTracker() {
var stubs = [];
this.addStub = function(stub) {
- 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 analyticsEvent
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
analyticsEvent = (eventObj, fn = Function.prototype) => {
// https://developers.google.com/analytics/devguides/collection/analyticsjs/command-queue-reference#send
if (!eventObj) {
return fn;
}
- 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 '';
Avoid too many return
statements within this function. Open
return m('.u-radius.fontsize-smaller.u-marginbottom-10.fontweight-semibold.card-error',
m('div', [
m('span.fa.fa-exclamation-triangle', ' '),
` Sua assinatura será cancelada no dia ${
h.momentify(subscription.next_charge_at, 'DD/MM/YYYY')
Avoid too many return
statements within this function. Open
return [
m('.card-alert.fontsize-smaller.fontweight-semibold.u-marginbottom-10.u-radius', [
m('span.fa.fa-exclamation-triangle'),
` O boleto de sua assinatura vence dia ${h.momentify(subscription.boleto_expiration_date)}`,
]),
Avoid too many return
statements within this function. Open
return '';