Showing 274 of 508 total issues
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
if (currentTime > gameNote.time) return false
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 (!file) return undefined
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
return 'S'
Avoid too many return
statements within this function. Open
Open
return NORMAL_JUDGE
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
return false
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_LV4_TIMEGATES)
Avoid too many return
statements within this function. Open
Open
return 5
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 new FixedTimegatesJudge(TRANSITIONAL_BEGINNER_LV5_TIMEGATES)
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
if (i < 161) return 4
Avoid too many return
statements within this function. Open
Open
return scene
Avoid too many return
statements within this function. Open
Open
if (rest[0] === 'sustain') return 'Sustain'
Function lcs
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
export function lcs(a: string, b: string) {
let max = ''
for (let i = 0; i < a.length; i++) {
for (let j = 0; j < b.length; j++) {
const cur = lcp(a, i, b, j)
- 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 getReleaseChangelog
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
function getReleaseChangelog(changelog, version) {
const lines = changelog.split('\n')
/** @type {string[] | undefined} */
let output
for (const line of lines) {
- 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"