Showing 7 of 27 total issues
Function GitAmp
has 400 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const GitAmp = (function(exports, $) {
'use strict';
/**
* AudioPlayer
Function GitAmp
has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring. Open
Open
const GitAmp = (function(exports, $) {
'use strict';
/**
* AudioPlayer
- 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
File main.js
has 406 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const GitAmp = (function(exports, $) {
'use strict';
/**
* AudioPlayer
Function Gui
has 119 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Gui = (function() {
const scaleFactor = 6;
const textColor = '#ffffff';
const maxLife = 20000;
Function AudioPlayer
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const AudioPlayer = (function() {
// something somewhere needs a global volume variable
// not sure what thing it is, but adding this line works
exports.volume = localStorage.getItem('volume');
Function draw
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Event.prototype.draw = function(width, height) {
let no_label = false;
let size = this.getSize();
const self = this;
Method __construct
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function __construct(int $id, Type $type, Information $information, Ring $ring, BaseSound $sound)