Showing 430 of 684 total issues
Function bind
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
bind() {
super.bind();
this.plugins = [ChartDataLabels];
if (this.extremelimits) {
this.elimits = this.extremelimits.split(','); //split by comma
Function initdygraph
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
initdygraph() {
console.log('sachart - initdygraph');
if (this.pH >0) this.data = [[this.pH, this.pCO2]];
else this.data = [];
this.xaxis = "pH";
Function constructor
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
constructor() {
//document.getElementById("id${window.ids - 2}").addEventListener("change", myfun${window.ids});
/*function myfun${window.ids}(event){
document.getElementById("id${window.ids - 1}").value = event.target.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 getScript
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
getScript(source, callback) {
//check whether the script is not already there
if (Array.from(document.getElementsByTagName('script')).filter(x=> x.getAttribute('src') === source).length > 0) {
console.log('fmi.getScript() WARNING, script is already added into DOM:', source);
//do callback?
- 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 constructor
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
constructor() {
this.handleTick = e => {
this.currenttick++;
if (this.currenttick >= this.ticks2reset) {
//do reset values
- 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 getDateAxis
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Dygraph.getDateAxis = function(start_time, end_time, granularity, opts, dg) {
var formatter = opts("axisLabelFormatter");
var ticks = [];
var t;
Function constructor
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
constructor() {
super();
console.log('sachart constructor');
this.xy = true; //set xy chart - datapoint will not contain time point
this.handleResize = () => {
- 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 bind
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
bind() {
this.refindex = parseInt(this.refindex, 10);
this.refvalues = parseInt(this.refvalues, 10);
this.refendindex = this.refindex + this.refvalues;
- 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 configure
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function configure(config) {
config.globalResources([
PLATFORM.moduleName('./elements/checkbox'),
PLATFORM.moduleName('./elements/buttonparams'),
PLATFORM.moduleName('./elements/receptacle.html'),
Function bind
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
bind() {
this.useranswer = [];
this.showquiz=true;
this.showresult = false;
this.answers_array = (this.answers)? this.answers.split('|').map(s => s.trim()): [];
Consider simplifying this complex logical expression. Open
if (!Number.isInteger(unixTsMs) ||
!Number.isInteger(randA) ||
!Number.isInteger(randBHi) ||
!Number.isInteger(randBLo) ||
unixTsMs < 0 ||
Function start_
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
Dygraph.prototype.start_ = function() {
var data = this.file_;
// Functions can return references of all other types.
if (typeof data == 'function') {
- 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 hslToRgb
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
hslToRgb(h, s, l) {
let r; let g; let b;
if (s === 0) {
r = g = b = l; // achromatic
- 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 removeAnswer
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
removeAnswer(qid2,answer){
let qid = qid2;
if (qid2.includes(';')) qid = qid2.split(';')[0]; //first is id second is id of related tabs
if (this.quizids.includes(qid2)) {
let index = this.qas.findIndex(item => item.id === qid);
- 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 refresh
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
let refresh = debounce(() => {
if (isBuilding) {
log('Watcher: A build is already in progress, deferring change detection...');
return;
}
- 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 bind
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
bind() {
this.useranswer = [];
this.showquiz=true;
this.showresult = false;
this.answers_array = (this.answers)? this.answers.split('|').map(s => s.trim()): [];
- 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 createDragInterface_
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Dygraph.prototype.createDragInterface_ = function() {
var context = {
// Tracks whether the mouse is down right now
isZooming: false,
isPanning: false, // is this drag part of a pan?
Function footnoteTail
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
function footnoteTail(state) {
let i; let l; let j; let t; let lastParagraph; let list; let token; let tokens; let current; let currentLabel;
let insideRef = false;
let refTokens = {};
Function bind
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
bind() {
this.useranswer = [];
this.showquiz=true;
this.showresult = false;
this.answers_array = (this.answers)? this.answers.split('|').map(s => s.trim()): [];
Function instantiate
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
instantiate() {
console.log('fmi instantiate()');
//first define FMI API function names;
const sReset = 'fmi2Reset';
const sInstantiate = 'fmi2Instantiate';