maestro-server/bootue

View on GitHub

Showing 40 of 40 total issues

Identical blocks of code found in 2 locations. Consider refactoring.
Open

  module: {
    rules: [
      {
        test: /\.vue$/,
        use: 'vue-loader'
Severity: Major
Found in webpack.config.js and 1 other location - About 5 hrs to fix
webpack.config.prod.js on lines 22..77

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 164.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

  module: {
    rules: [
      {
        test: /\.vue$/,
        use: 'vue-loader'
Severity: Major
Found in webpack.config.prod.js and 1 other location - About 5 hrs to fix
webpack.config.js on lines 19..74

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 164.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        preNextDecadeClick (flag) {
          const year = this.currDate.getFullYear()
          const months = this.currDate.getMonth()
          const date = this.currDate.getDate()
    
    
    Severity: Major
    Found in src/forms/datepicker/script.js and 1 other location - About 3 hrs to fix
    src/forms/datepicker/script.js on lines 96..106

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 120.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        preNextYearClick (flag) {
          const year = this.currDate.getFullYear()
          const months = this.currDate.getMonth()
          const date = this.currDate.getDate()
    
    
    Severity: Major
    Found in src/forms/datepicker/script.js and 1 other location - About 3 hrs to fix
    src/forms/datepicker/script.js on lines 72..82

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 120.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    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

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

            mounted () {
              this.toggleInterval(true)
          
              this.$el.addEventListener('mouseenter', () => this.toggleInterval(false), false)
              this.$el.addEventListener('mouseleave', () => this.toggleInterval(true), false)
          Severity: Major
          Found in src/carousel/script.js and 1 other location - About 1 hr to fix
          src/carousel/script.js on lines 92..97

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 75.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

            beforeDestroy () {
              this.toggleInterval(false)
          
              this.$el.removeEventListener('mouseenter', () => this.toggleInterval(false), false)
              this.$el.removeEventListener('mouseleave', () => this.toggleInterval(true), false)
          Severity: Major
          Found in src/carousel/script.js and 1 other location - About 1 hr to fix
          src/carousel/script.js on lines 86..91

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 75.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          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

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                beforeDestroy () {
                  let links = this.$el.querySelectorAll('li>a')
                  Array.prototype.map.call(links, (el) => {
                    el.removeEventListener('click', this.hiddeMe, false)
                  })
              Severity: Major
              Found in src/dropdown/script.js and 1 other location - About 1 hr to fix
              src/dropdown/script.js on lines 58..64

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 70.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                mounted () {
                  let links = this.$el.querySelectorAll('.dropdown-menu>li>a')
                  Array.prototype.map.call(links, (el) => {
                    el.addEventListener('click', this.hiddeMe, false)
                  })
              Severity: Major
              Found in src/dropdown/script.js and 1 other location - About 1 hr to fix
              src/dropdown/script.js on lines 66..72

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 70.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Severity
              Category
              Status
              Source
              Language