Showing 31 of 31 total issues
Function Geometry
has 564 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function Geometry() {
var EPSILON = Number.EPSILON || 2.220446049250313e-16,
PI = Math.PI,
sin = Math.sin,
Function CustomMatchers
has a Cognitive Complexity of 129 (exceeds 5 allowed). Consider refactoring. Open
export function CustomMatchers(geometry, comparators) {
geometry = geometry || new Geometry();
comparators = comparators || new Comparators()
- 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 geometry.getBBox.spec.js
has 789 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* global $, describe, it, xit, after, beforeEach, afterEach, expect, jasmine, spyOn */
/* jshint browser: true*/
import { Geometry } from '../src/geometry.js'
import '../node_modules/Canteen/build/canteen.min'
File geometry.spec.js
has 741 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { Geometry } from '../src/geometry.js'
describe('Geometry', () => {
'use strict';
Function Geometry
has a Cognitive Complexity of 85 (exceeds 5 allowed). Consider refactoring. Open
export function Geometry() {
var EPSILON = Number.EPSILON || 2.220446049250313e-16,
PI = Math.PI,
sin = Math.sin,
- 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 geometry.js
has 567 lines of code (exceeds 250 allowed). Consider refactoring. Open
"use strict";
export function Geometry() {
File customMatchers.spec.js
has 504 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { CustomMatchers } from '../src/customMatchers.js'
import '../node_modules/Canteen/build/canteen.min'
describe('customMatchers', () => {
'use strict';
Function CustomMatchers
has 183 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function CustomMatchers(geometry, comparators) {
geometry = geometry || new Geometry();
comparators = comparators || new Comparators()
Function go
has 151 lines of code (exceeds 25 allowed). Consider refactoring. Open
var go = function() {
describe('Face', function () {
'use strict';
Function Rabbit
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
export function Rabbit(geometry, matchers, comparators) {
geometry = geometry || new Geometry();
matchers = matchers || new CustomMatchers();
comparators = comparators || new Comparators();
- 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 Rabbit
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function Rabbit(geometry, matchers, comparators) {
geometry = geometry || new Geometry();
matchers = matchers || new CustomMatchers();
comparators = comparators || new Comparators();
Function Face
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Face(ctx, window) {
window = window || {requestAnimationFrame: function () {}};
var mouth = new Mouth(ctx),
Function Comparators
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
export function Comparators() {
var sameValues = (val1, val2, precision) => {
var same = 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 draw_core
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
var draw_core = function (opt) {
clearCanvas(ctx);
if (opt.side === 'left') {
Function exports
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '.',
Function exports
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
// In order to serve the rabbit build files that are outside the default
Function Eye
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Eye(ctx) {
this.draw = function (opt) {
opt = Object.assign({
cx: 0,
Function draw
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.draw = function (opt) {
opt = Object.assign({
cx: 0,
cy: 0,
width: 10,
Function Mouth
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Mouth(ctx) {
this.draw = function(opt) {
opt = Object.assign({
cx: 20,
Function Comparators
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function Comparators() {
var sameValues = (val1, val2, precision) => {
var same = false;