Showing 80 of 460 total issues
Function exports
has 122 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(){
var todoAlgebra = new set.Algebra(
set.props.boolean("complete"),
set.props.id("id"),
set.props.sort("sort")
File js.js
has 368 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// ========================================
// CODE
// ========================================
can.fixture({
File js.js
has 343 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// ========================================
// CODE
// ========================================
can.fixture({
File js.js
has 330 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// ========================================
// CODE
// ========================================
can.fixture({
File js.js
has 315 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// ========================================
// CODE
// ========================================
can.fixture({
File js.js
has 288 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// ========================================
// CODE
// ========================================
can.fixture({
File atm-stream.js
has 279 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// ========================================
// CODE
// ========================================
can.fixture({
File 9-disable-payments.js
has 278 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { kefir as Kefir, StacheElement } from "//unpkg.com/can@6/ecosystem.mjs";
class CCPayment extends StacheElement {
static view = `
<form on:submit="this.pay(scope.event)">
File atm.js
has 273 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"use strict";
can.fixture({
"/verifyCard": function(request, response) {
if (!request.data || !request.data.number || !request.data.pin) {
response(400, {});
File 8-create-playlist.js
has 265 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import {
addJQueryEvents,
Control,
domData,
domEvents,
File 8-pay-button.js
has 264 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { kefir as Kefir, StacheElement } from "//unpkg.com/can@6/ecosystem.mjs";
class CCPayment extends StacheElement {
static view = `
<form on:submit="this.pay(scope.event)">
File js.js
has 261 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// ========================================
// CODE
// ========================================
can.fixture({
Function showOnlyWhenBlurredOnce
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
showOnlyWhenBlurredOnce(errorStream, blurredStream) {
const errorEvent = errorStream.map(error => {
if (!error) {
return {
type: "valid"
Function showOnlyWhenBlurredOnce
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
showOnlyWhenBlurredOnce(errorStream, blurredStream) {
const errorEvent = errorStream.map(error => {
if (!error) {
return {
type: "valid"
Function showOnlyWhenBlurredOnce
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
showOnlyWhenBlurredOnce(errorStream, blurredStream) {
const errorEvent = errorStream.map(error => {
if (!error) {
return {
type: "valid"
Function showOnlyWhenBlurredOnce
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
showOnlyWhenBlurredOnce(errorStream, blurredStream) {
const errorEvent = errorStream.map(error => {
if (!error) {
return {
type: "valid"
Function showOnlyWhenBlurredOnce
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
showOnlyWhenBlurredOnce(errorStream, blurredStream) {
const errorEvent = errorStream.map(error => {
if (!error) {
return {
type: "valid"
Function showOnlyWhenBlurredOnce
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
showOnlyWhenBlurredOnce(errorStream, blurredStream) {
const errorEvent = errorStream.map(error => {
if (!error) {
return {
type: "valid"
Function state
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
Open
get state() {
// if printingReceipt
// if a currentTransaction
// and the transaction is executed -> successfulTransaction
// if an account
- 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 getElementsInRange
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getElementsInRange(range, wrapNodeName) {
const elements = [];
function addSiblingElement(element) {
// We are going to wrap all text nodes with a span.