Showing 274 of 508 total issues
Avoid too many return
statements within this function. Open
Open
if (object.bga.bga_events.length !== 1) return undefined
Avoid too many return
statements within this function. Open
Open
if (gameNote.position > position + windowSize * 1.5) return false
Avoid too many return
statements within this function. Open
Open
return { file: file, offset: offset }
Avoid too many return
statements within this function. Open
Open
return
Avoid too many return
statements within this function. Open
Open
if (score < 500000) return 'A'
Avoid too many return
statements within this function. Open
Open
if (currentTime > gameNote.time) return false
Avoid too many return
statements within this function. Open
Open
return NORMAL_JUDGE
Avoid too many return
statements within this function. Open
Open
return scene
Avoid too many return
statements within this function. Open
Open
if (i < 161) return 4
Avoid too many return
statements within this function. Open
Open
if (rest[0] === 'sustain') return 'Sustain'
Avoid too many return
statements within this function. Open
Open
return noteColumn(sprites.white, c)
Avoid too many return
statements within this function. Open
Open
return new FixedTimegatesJudge(TRANSITIONAL_BEGINNER_LV5_TIMEGATES)
Avoid too many return
statements within this function. Open
Open
return `${String(key).replace(/\./g, ' ')}?`
Avoid too many return
statements within this function. Open
Open
return 5
Avoid too many return
statements within this function. Open
Open
return new FixedTimegatesJudge(TRANSITIONAL_BEGINNER_LV4_TIMEGATES)
Avoid too many return
statements within this function. Open
Open
return `${prefix} Pitch${rest[1] === 'up' ? '+' : '-'}`
Avoid too many return
statements within this function. Open
Open
if (rest[0] === 'mod') return 'Mod'
Avoid too many return
statements within this function. Open
Open
return false
Function match
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
export function match(text: string) {
let matched = false
return {
when: function (
pattern: RegExp,
- 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 _setupInteractivity
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
_setupInteractivity() {
let mouse = null
let touches = []
const onMouse = (e) => {
mouse = e
- 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"