File view_team_in_grades.js
has 300 lines of code (exceeds 250 allowed). Consider refactoring. Open
$ = jQuery;
$(function () {
// Changed as part of E1788_OSS_project_Maroon_Heatmap_fixes
// scoreTable was assigned as classes for the table which is required to be sortable
Function col_sort
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
function col_sort(m) {
lesser = !lesser
// Swaps two columns of the table
jQuery.moveColumn = function (table, from, to) {
var rows = jQuery('tr', table);
Function drawQuestionRow
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
function drawQuestionRow(priorQuestionNum, questionNum, roundNum, tRow, gridWidth, tooltipText, reviewNum, numRounds, roundPrefix, tBody) {
Function col_sort
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function col_sort(m) {
lesser = !lesser
// Swaps two columns of the table
jQuery.moveColumn = function (table, from, to) {
var rows = jQuery('tr', table);
- 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 drawReviewRow
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
function drawReviewRow(tRow, questionNum, reviewNum, gridWidth, rowData, rIndex, tooltipText) {
Function drawReviewRow
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function drawReviewRow(tRow, questionNum, reviewNum, gridWidth, rowData, rIndex, tooltipText) {
tRow.id = "hg_row" + questionNum + "_" + reviewNum;
tRow.setAttribute("data-questionnum", questionNum);
for (let cIndex = 0; cIndex < gridWidth; ++cIndex) {
let cell = tRow.insertCell();
- 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 onMetricToggle
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function onMetricToggle(clicked_metric) {
if (clicked_metric.checked == true) {
var hide = false
} else {
var hide = true
- 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"