Showing 170 of 392 total issues
Function onPaint
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
onPaint (key) {
if (key !== undefined) this.hotKey = key
this.data = this.source.getData(this.hotKey)
// console.log("lines:", this.hotKey, this.info.labelY, this.data)
- 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 getZipDay
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
export function getZipDay (daydata, rate) {
if (rate < 1) return daydata
const out = []
const zipday = []
- 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 cl.event.handler.js
has 252 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Copyright (c) 2018-present clchart Contributors.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
Function drawSuperBoard
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
drawSuperBoard () {
this.orderData = this.father.getData('snapshot')
this.orderData.coindot = this.static.coindot
this.static.volzoom = 100
Function drawOrder
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
drawOrder () {
const xpos = this.drawGridLine() // 先画线格
if (this.orderData === undefined || this.orderData.value.length < 1) {
return
}
Function drawIndex
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
drawIndex () {
_drawBegin(this.context, this.color.grid)
_drawRect(this.context, this.rectMain.left, this.rectMain.top, this.rectMain.width, this.rectMain.height)
const offy = this.rectOrder.height / 3
Function getData
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
getData (key, rightMode) {
switch (key) {
case 'DAY':
this.OutData['DAY'] = {
key,
Function onPaint
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
onPaint (key) {
if (key !== undefined) this.hotKey = key
this.data = this.source.getData(this.hotKey)
this.codeInfo = this.source.getData('INFO')
- 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 mergeMDay
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
mergeMDay (source, min) {
let out = []
if (source !== undefined && !isEmptyArray(source.value)) {
out = copyArrayOfDeep(source.value)
- 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 getValue
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
export default function getValue ({
fields,
value
}, label, index = 0) {
let val = 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 mergeNowMinToMin
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
mergeNowMinToMin (source, min, offset) {
const curMin = []
let sumVol = 0
let sumMoney = 0
Function touchmove
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
touchmove (e) {
const event = this.eventBuild(e)
if (new Date() - this.__timestamp < 150) {
return event
}
Function beforeLocation
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
beforeLocation () {
this.linkInfo.rightMode = 'forword'
this.data = this.source.getData(this.father.hotKey)
const lastDate = this.data.value[this.data.value.length - 1][this.data.fields.time]
Function findNearTimeToIndex
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
export function findNearTimeToIndex (data, findvalue, label, direction) {
if (label === undefined) label = 'time'
if (direction && direction === 'forword') {
for (let idx = data.value.length - 1; idx >= 0; idx--) {
if (getValue(data, label, idx) > findvalue) continue
- 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 onMouseMove
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
onMouseMove (event) {
if (this.linkInfo.hideInfo) return
if (!this.linkInfo.showCursorLine) return
// this.draw_clear();
// 找到X坐标对应的数据索引
- 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 onPaint
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
onPaint () {
if (!this.config.visible) return
_setLineWidth(this.context, this.scale)
let clr = this.color.button
- 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 checkBefore
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
checkBefore () {
if (this.static.before <= 0)
{
console.log(this.InData['NOW'],this.InData['DAY']);
- 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 onPaint
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
onPaint () {
this.data = this.father.data
if (this.axisX.display === 'none') return
let xx, value, spaceX
- 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 make_command_buffer
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function make_command_buffer(sign, command) {
// console.log('<===', typeof command, command);
let cmd = sign + ':{'
let argv = false
for (let k = 0; k < command.length; k++) {
- 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 drawGridLine
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
drawGridLine () {
_drawBegin(this.context, this.color.grid)
_drawRect(this.context, this.rectMain.left, this.rectMain.top, this.rectMain.width, this.rectMain.height)
let mmpCount = 1