bemusic/bemuse

View on GitHub

Showing 508 of 508 total issues

Function runMocha has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

function runMocha() {
  const specs = []
  mocha
    .run()
    .on('test end', function reportFailedSpec(test) {
Severity: Minor
Found in bemuse/src/test/index.js - About 25 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

Function MusicListItemChart has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

const MusicListItemChart = ({
  chart,
  selected,
  onClick,
}: MusicListItemChartProps) => {
Severity: Minor
Found in bemuse/src/app/ui/MusicListItemChart.tsx - About 25 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

Function GameShellScene has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

const GameShellScene = ({
  options: initOptions,
  play,
}: GameShellSceneProps) => {
  const [options, setOptions] = useState(initOptions)
Severity: Minor
Found in bemuse/src/game/ui/GameShellScene.tsx - About 25 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

Function Row has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

const Row = ({
  text,
  data,
  options = {},
}: {
Severity: Minor
Found in bemuse/src/app/ui/ResultDeltasView.tsx - About 25 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

Function ModeSelectScene has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

const ModeSelectScene = () => {
  const sceneManager = useContext(SceneManagerContext)
  const dispatch = useDispatch()
  const playDevice = useRef<PlayDevice>(null)

Severity: Minor
Found in bemuse/src/app/ui/ModeSelectScene.tsx - About 25 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

Function Yours has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

const Yours = ({
  state,
  onResubmitScoreRequest,
  showPopup,
}: {
Severity: Minor
Found in bemuse/src/app/ui/Ranking.tsx - About 25 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

Function MusicInfoTabStats has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

const MusicInfoTabStats = ({ chart }: MusicInfoTabStatsProps) => {
  const user = useCurrentUser()
  const [loading, record] = usePersonalRecord(chart)
  return (
    <div className='MusicInfoTabStats'>
Severity: Minor
Found in bemuse/src/app/ui/MusicInfoTabStats.tsx - About 25 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

Function OptionsInputField has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

const OptionsInputField = <T,>(
  props: OptionsInputFieldProps<T> &
    Omit<ComponentProps<'input'>, keyof OptionsInputFieldProps<T>>
) => {
  const { stringify, parse, onChange, validator, value } = props
Severity: Minor
Found in bemuse/src/app/ui/OptionsInputField.tsx - About 25 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

Severity
Category
Status
Source
Language