Showing 11 of 19 total issues
Function makeChart
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
function makeChart(heat, hcolor, sets) {
let ldata = lowerData(heat);
var ctx = document.getElementById('matrix-chart').getContext('2d');
window.myMatrix = new Chart(ctx, {
type: 'matrix',
Function setStatsPage
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
function setStatsPage(sets, hcolor, off, step) {
let start = 0, end = 0;
let dates = [], ws = [], reps = [], exs = [];
let ex = document.getElementById("ex-value").value;
Function statsChart
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function statsChart(id, dates, ws, wcolor, xticks) {
const ctx = document.getElementById(id);
if (sChart){
Function weightChart
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function weightChart(id, dates, ws, wcolor, xticks) {
const ctx = document.getElementById(id);
if (wChart){
Function setStatsPage
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function setStatsPage(sets, hcolor, off, step) {
let start = 0, end = 0;
let dates = [], ws = [], reps = [], exs = [];
let ex = document.getElementById("ex-value").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 setWeights
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function setWeights(weights, wcolor, off, step) {
let start = 0, end = 0;
let dates = [], ws = [];
offset = offset + off;
Function statsChart
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function statsChart(id, dates, ws, wcolor, xticks) {
Function weightChart
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function weightChart(id, dates, ws, wcolor, xticks) {
Function setWeights
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function setWeights(weights, wcolor, off, step) {
let start = 0, end = 0;
let dates = [], ws = [];
offset = offset + off;
- 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 setFormContent
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function setFormContent(sets, date) {
window.sessionStorage.setItem("today", date);
document.getElementById('todayEx').innerHTML = "";
document.getElementById("formDate").value = date;
document.getElementById("realDate").value = date;
- 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 addAllGroup
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function addAllGroup(exs, gr) {
// console.log('GR =', gr);
// console.log('SETS =', exs);
- 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"