sexybiggetje/pixdisp

View on GitHub
www/js/app.js

Summary

Maintainability
A
0 mins
Test Coverage

Function createPalette has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Wontfix

    createPalette() {
        let paletteItBe = [
            "0 0 0", "20 12 28", "68 36 52", "48 52 109", "78 74 78", "133 76 48",
            "52 101 36", "208 70 72", "117 113 97",    "89 125 206", "210 125 44",
            "133 149 161", "109 170 44", "210 170 153",    "109 194 202", "218 212 94",
Severity: Minor
Found in www/js/app.js - About 1 hr to fix

    Function submitCanvas has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Wontfix

        submitCanvas( ev ) {
    
            if ( ev.preventDefault ) {
                ev.preventDefault();
            }
    Severity: Minor
    Found in www/js/app.js - About 35 mins to fix

    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

    There are no issues that match your filters.

    Category
    Status