mylisabox/lisa-box

View on GitHub
lisa.js

Summary

Maintainability
D
2 days
Test Coverage

Function exports has 228 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = (function () {
  //private
  let app

  /**
Severity: Major
Found in lisa.js - About 1 day to fix

    Function exports has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
    Open

    module.exports = (function () {
      //private
      let app
    
      /**
    Severity: Minor
    Found in lisa.js - About 4 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 createOrUpdateDevices has 54 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        createOrUpdateDevices(device, criteria) {
          const plugin = getCurrentPlugin()
          //app.log.debug(plugin)
          let promise
    
    
    Severity: Major
    Found in lisa.js - About 2 hrs to fix

      Function log has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          get log() {
            const getArguments = (args) => {
              const plugin = getCurrentPlugin()
              const mainArguments = Array.prototype.slice.call(args)
              return [plugin + ':'].concat(mainArguments)
      Severity: Minor
      Found in lisa.js - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status