maestro-server/bootue

View on GitHub

Showing 22 of 40 total issues

File script.js has 344 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * This component made by Sagalbot
 *
 * https://github.com/sagalbot/vue-select
 */
Severity: Minor
Found in src/forms/select/script.js - About 4 hrs to fix

    Function getJSON has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
    Open

    export default function getJSON (url, header = []) {
      let request = new window.XMLHttpRequest()
      let data = {}
      // p (-simulated- promise)
      let p = {
    Severity: Minor
    Found in src/forms/typeahead/_utils/getJSON.js - About 2 hrs 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

    `` has 23 functions (exceeds 20 allowed). Consider refactoring.
    Open

      methods: {
        close () {
          this.displayDayView = this.displayMonthView = this.displayYearView = false
        },
        inputClick () {
    Severity: Minor
    Found in src/forms/datepicker/script.js - About 2 hrs to fix

      File script.js has 267 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import translations from '../_texts/translations.js'
      
      export default {
        props: {
          value: {type: String},
      Severity: Minor
      Found in src/forms/datepicker/script.js - About 2 hrs to fix

        Function setItems has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
        Open

            setItems (data) {
              if (this.async) {
                this.items = this.asyncKey ? data[this.asyncKey] : data
                this.items = this.items.slice(0, this.limit)
              } else {
        Severity: Minor
        Found in src/forms/typeahead/script.js - About 2 hrs 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 transition has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

            transition (val, old) {
              if (val === old) { return }
              const el = this.$el
              const body = document.body
              if (val) {
        Severity: Minor
        Found in src/modal/script.js - About 2 hrs 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 getJSON has 47 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export default function getJSON (url, header = []) {
          let request = new window.XMLHttpRequest()
          let data = {}
          // p (-simulated- promise)
          let p = {
        Severity: Minor
        Found in src/forms/typeahead/_utils/getJSON.js - About 1 hr to fix

          Function beforeDestroy has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
          Open

            beforeDestroy () {
              if (this._tabGroup) {
                this._tabGroup.tabs = this._tabGroup.tabs.filter(el => el !== this)
              }
              if (this._tabs) {
          Severity: Minor
          Found in src/tab/script.js - About 1 hr 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 checkScroll has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
          Open

              checkScroll () {
                // if is hidden don't calculate anything
                if (!(this.$el.offsetWidth || this.$el.offsetHeight || this.$el.getClientRects().length)) {
                  return
                }
          Severity: Minor
          Found in src/affix/script.js - About 1 hr 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 show has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              show (val) {
                this.$emit('input', val)
                this.$emit(this.show ? 'open' : 'close')
                const body = document.body
                const scrollBarWidth = getScrollBarWidth()
          Severity: Minor
          Found in src/sidebar/script.js - About 1 hr to fix

            Function position has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                position () {
                  let popover = this.$refs.popover
                  let trigger = this.$refs.trigger.children[0]
                  this.$nextTick(() => {
                    if (trigger && popover) {
            Severity: Minor
            Found in src/_core/_utils/popoverMixins.js - About 1 hr to fix

              Function created has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
              Open

                created () {
                  this._isTab = true
                  let tabs = this
                  while (!this._tabs && tabs.$parent) {
                    if (tabs._isTabGroup) {
              Severity: Minor
              Found in src/tab/script.js - About 1 hr 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 action has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

                  action (val, p) {
                    if (this.sem) {
                      if (val === null) { return }
                      this.sem = false
                      if (val && this.callback instanceof Function) this.callback()
              Severity: Minor
              Found in src/modal/script.js - About 55 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 select has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

                  select (option) {
                    if (this.isOptionSelected(option)) {
                      this.deselect(option)
                    } else {
                      if (this.taggable && !this.optionExists(option)) {
              Severity: Minor
              Found in src/forms/select/script.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 toggleDropdown has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

                  toggleDropdown (e) {
                    if (e.target === this.$refs.openIndicator || e.target === this.$refs.search || e.target === this.$refs.toggle || e.target === this.$el) {
                      if (this.open) {
                        this.$refs.search.blur() // dropdown will close on blur
                      } else {
              Severity: Minor
              Found in src/forms/select/script.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 boolean has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                boolean: val => {
                  if (typeof val === 'string') {
                    if (val === '' || val === 'true') {
                      return true
                    }
              Severity: Minor
              Found in src/_core/_utils/coerce.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 mutableValue has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                  mutableValue (val, old) {
                    if (this.multiple) {
                      this.onChange ? this.onChange(val) : null
                    } else {
                      this.onChange && val !== old ? this.onChange(val) : null
              Severity: Minor
              Found in src/forms/select/script.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 show has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                  show (val) {
                    this.$emit('input', val)
                    this.$emit(this.show ? 'open' : 'close')
                    const body = document.body
                    const scrollBarWidth = getScrollBarWidth()
              Severity: Minor
              Found in src/sidebar/script.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 show has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                  show (options) {
                    if (options) {
                      if (options.text) { this.text = options.text }
                      if (options.size) { this.size = options.size }
                      if (options.fixed) { this.fixed = options.fixed }
              Severity: Minor
              Found in src/spinner/script.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 rangeLength42 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  rangeLength42 () {
                    if (this.dateRange.length < 42) {
                      const nextMonthNeed = 42 - this.dateRange.length
                      const nextMonth = this.getYearMonth(this.setupRange.year, this.setupRange.month + 1)
              
              
              Severity: Minor
              Found in src/forms/datepicker/script.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