Showing 6 of 13 total issues
Function set_data
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
set_data(data) {
this.controls.innerHTML = "";
for ( let automatic_method of data ) {
let button = document.createElement('A');
button.classList.add('nav-link');
Function create_form
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
create_form(data, on_success) {
let form = new Form(document.createElement('FORM'));
for ( let parameter of data.parameter_list ) {
form.dom.appendChild(this.create_input_group(parameter.name, parameter.type));
Function add_buttons
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
add_buttons(element) {
let control = new class extends Element {
get element_list() {
return this.dom.querySelectorAll('[role="tab"]');
Function add_contents
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
add_contents(element) {
let control = new class extends Element {
get element_list() {
let list = [];
- 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 update_table
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async update_table() {
let table = this.table;
table.clear();
try {
Function add_buttons
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
add_buttons(element) {
let control = new class extends Element {
get element_list() {
return this.dom.querySelectorAll('[role="tab"]');
- 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"