Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions indicators/cyclomatic_complexity.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"@context": "https://w3id.org/everse/rsqi#",
"@id": "https://w3id.org/everse/i/indicators/cyclomatic_complexity",
Comment thread
dgarijo marked this conversation as resolved.
Outdated
"@type": "SoftwareQualityIndicator",
"name": "Cyclomatic complexity follow community conventions",
Comment thread
dgarijo marked this conversation as resolved.
Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"name": "Cyclomatic complexity follow community conventions",
"name": "Cyclomatic complexity follows community conventions",

"abbreviation": "cyclomatic_complexity",
Comment thread
dgarijo marked this conversation as resolved.
Outdated
"identifier": { "@id": "https://w3id.org/everse/i/indicators/cyclomatic_complexity" },
Comment thread
dgarijo marked this conversation as resolved.
Outdated
"description": "Cyclomatic complexity (i.e., the number of linearly independent paths through a program’s source code) of the whole software component or modules/components/classes/functions/methods. Cyclomatic complexity is created by calculating the number of different code paths in the flow of the program. A program that has complex control flow requires more tests to achieve good code coverage and is less maintainable.",
Comment thread
dgarijo marked this conversation as resolved.
Outdated
"status": "Active",
"keywords": [
"maintainability", "complexity, code"
],
"version": "1.0.0",
"author": {
"@type": "schema:Person",
"name": "Daniel Garijo"
},
"contact": [
{
"@type": "schema:Person",
"name": "Daniel Garijo"
},
{
"@type": "schema:Person",
"name": "Andres Montero"
}
],
"source": [
{
"identifier": "https://zenodo.org/records/10647227",
"url": "https://zenodo.org/records/10647227",
"name": "Task Force Sub Group 3 - Review of Software Quality Attributes and Characteristics"
},
{
"url": "https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=11216562&tag=1",
"name": "Socially-Informed Jupyter Notebook Quality: A Role- and Lifecycle-Aware Metrics Framework"
}
],
"qualityDimension": { "@id": "https://w3id.org/everse/i/dimensions/maintainability" },
"created": "10-03-2026"
}
43 changes: 12 additions & 31 deletions website/rs_tiers.html
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,8 @@ <h2>Relevance of Indicators for RS Tiers</h2>
let originalData = [];

const tierOrder = ["crucial", "recommended", "good to have", "not relevant"];
let currentSort = {
column: null,
index: -1
};
let activeSortColumn = null;


async function fetchCSVFile(csvPath) {
const overlay = document.getElementById("table-loading-overlay");
Expand Down Expand Up @@ -322,39 +320,22 @@ <h2>Relevance of Indicators for RS Tiers</h2>
}

function sortByTier(column) {
if (currentSort.column !== column) {
currentSort.column = column;
currentSort.index = -1;
}

const presentValues = tierOrder.filter(value =>
allData.some(item =>
(item[column] || "").toLowerCase() === value
)
);

if (presentValues.length === 0) {
return;
}

currentSort.index++;

if (currentSort.index >= presentValues.length) {
currentSort.column = null;
currentSort.index = -1;
if (activeSortColumn === column) {
activeSortColumn = null;
updateTableFromCSV(originalData);
return;
}

const priority = presentValues[currentSort.index];
activeSortColumn = column;

const sorted = [...allData].sort((a, b) => {
const aVal = (a[column] || "").toLowerCase();
const bVal = (b[column] || "").toLowerCase();
const orderIndex = value => {
const normalized = (value || "").toLowerCase();
const idx = tierOrder.indexOf(normalized);
return idx === -1 ? tierOrder.length : idx;
};

if (aVal === priority && bVal !== priority) return -1;
if (bVal === priority && aVal !== priority) return 1;
return 0;
const sorted = [...allData].sort((a, b) => {
return orderIndex(a[column]) - orderIndex(b[column]);
});

updateTableFromCSV(sorted);
Expand Down