galarant/domless

View on GitHub

Showing 52 of 124 total issues

Function handlePointerUp has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

  handlePointerUp(pointer, currentlyOver) {
    // don't bother with the rest if I have no handlers
    if (!this.handlePointerUpIn && !this.handlePointerUpOut) {
      return
    }
Severity: Minor
Found in src/components/element.js - About 45 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 activate has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

  activate(force=false) {
    if (!this.active || force) {
      console.log("activating textField " + this.id)
      super.activate()
      this.cursor.setAlpha(1)
Severity: Minor
Found in src/components/input/text_field.js - About 45 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 handleGameObjectUpIn has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

  handleGameObjectUpIn(pointer, currentlyOver, event) {
    if (this.active) {
      if (this.eventName) {
        this.scene.events.emit(this.eventName, ...this.eventArgs)
      }
Severity: Minor
Found in src/components/input/button.js - About 45 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 activate has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

  activate(force=false) {
    if (!this.active || force) {

      // show the element
      this.setAlpha(1)
Severity: Minor
Found in src/components/element.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

Function constructor has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

  constructor(
    scene,
    {
      edge="bottom",
      size=300,
Severity: Minor
Found in src/components/display/drawer.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

Function handleKeyboardInput has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

  handleKeyboardInput(key) {
    if (this.active) {
      if (key.repeats == 2) {
        // don't do anything on first repeat
        // this heads off occasional "double tap" bugs
Severity: Minor
Found in src/components/input/button.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

Function activate has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

  activate() {
    if (!this.active) {
      console.log("activating dropDown ", this.id)
      this.scene.children.bringToTop(this)
      if (this.formRow) {
Severity: Minor
Found in src/components/input/dropdown_field.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

Function constructor has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

  constructor(
    scene,
    {
      x, y,
      width=60, height=60,
Severity: Minor
Found in src/components/input/button.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

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

  promptNextPage() {
    this.pageBreaks.push(this.content.height - this.lineHeight)
    if (this.pages.length) {
      // disable page up
      if (this.pageUpButton.alpha) {
Severity: Minor
Found in src/components/display/dialogue.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 formRowUpdate has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  formRowUpdate() {
    if (this.list && this.innerHeight) {
      let nextRow = this.form.nextRow(this)
      if (nextRow) {
        nextRow.y = this.y + this.innerHeight + this.form.rowPadding
Severity: Minor
Found in src/components/input/form.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 scrollCamera has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  scrollCamera(scrollDelta, inputMethod) {
    let
      camera = this.scene.cameras.main

    if (this.minScroll !== undefined && camera.scrollY + scrollDelta < this.minScroll) {
Severity: Minor
Found in src/plugins/scrollable.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 constructor has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

  constructor(
    scene,
    {
      x, y,
      width=400, height=200,
Severity: Minor
Found in src/components/input/text_field.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

Severity
Category
Status
Source
Language