danielwippermann/resol-vbus

View on GitHub

Showing 212 of 557 total issues

File resol-deltasol-cs2-200-data.js has 2881 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*! resol-vbus | Copyright (c) 2013-present, Daniel Wippermann | MIT license */

var rawConfiguration = {
    "languages": [
        {
Severity: Major
Found in src/configuration-optimizers/resol-deltasol-cs2-200-data.js - About 1 wk to fix

    File resol-deltasol-cs4-200-data.js has 2881 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*! resol-vbus | Copyright (c) 2013-present, Daniel Wippermann | MIT license */
    
    var rawConfiguration = {
        "languages": [
            {
    Severity: Major
    Found in src/configuration-optimizers/resol-deltasol-cs4-200-data.js - About 1 wk to fix

      File resol-deltasol-cs-plus-110-data.js has 2648 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*! resol-vbus | Copyright (c) 2013-present, Daniel Wippermann | MIT license */
      
      var rawConfiguration = {
          "languages": [
              {
      Severity: Major
      Found in src/configuration-optimizers/resol-deltasol-cs-plus-110-data.js - About 1 wk to fix

        File resol-deltasol-bs4v2-103-data.js has 2596 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /*! resol-vbus | Copyright (c) 2013-present, Daniel Wippermann | MIT license */
        
        var rawConfiguration = {
            "languages": [
                {
        Severity: Major
        Found in src/configuration-optimizers/resol-deltasol-bs4v2-103-data.js - About 1 wk to fix

          File specification.js has 1215 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /*! resol-vbus | Copyright (c) 2013-present, Daniel Wippermann | MIT license */
          
          const crypto = require('crypto');
          
          
          
          Severity: Major
          Found in src/specification.js - About 3 days to fix

            File resol-deltasol-c-104-data.js has 1112 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /*! resol-vbus | Copyright (c) 2013-present, Daniel Wippermann | MIT license */
            
            var rawConfiguration = {
                "languages": [
                    {
            Severity: Major
            Found in src/configuration-optimizers/resol-deltasol-c-104-data.js - About 2 days to fix

              Function receive has a Cognitive Complexity of 111 (exceeds 5 allowed). Consider refactoring.
              Open

                  receive(timestamp, chunk) {
                      const _this = this;
              
                      if (this.listenerCount('rawData') > 0) {
                          this.emit('rawData', chunk, timestamp);
              Severity: Minor
              Found in src/connection.js - About 2 days 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

              File connection.js has 622 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /*! resol-vbus | Copyright (c) 2013-present, Daniel Wippermann | MIT license */
              
              const { Duplex } = require('stream');
              
              
              
              Severity: Major
              Found in src/connection.js - About 1 day to fix

                File index.js has 600 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /*! resol-vbus | Copyright (c) 2013-present, Daniel Wippermann | MIT license */
                
                const fs = require('fs');
                const os = require('os');
                const path = require('path');
                Severity: Major
                Found in examples/json-live-data-server/index.js - About 1 day to fix

                  Function _onConnection has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring.
                  Open

                      _onConnection(socket) {
                          const _this = this;
                  
                          const connectionInfo = {
                              socket,
                  Severity: Minor
                  Found in src/tcp-connection-endpoint.js - About 1 day 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 _connect has 235 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      _connect(force) {
                          const _this = this;
                  
                          let socket;
                  
                  
                  Severity: Major
                  Found in src/tcp-connection.js - About 1 day to fix

                    Function transceiveValue has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring.
                    Open

                        async transceiveValue(valueInfo, value, options, state) {
                            if (!isObject(valueInfo)) {
                                valueInfo = {
                                    valueIndex: valueInfo,
                                };
                    Severity: Minor
                    Found in src/connection-customizer.js - About 1 day 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

                    File specification-file.js has 540 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /*! resol-vbus | Copyright (c) 2016-present, Daniel Wippermann | MIT license */
                    
                    const fs = require('fs');
                    const path = require('path');
                    
                    
                    Severity: Major
                    Found in src/specification-file.js - About 1 day to fix

                      File index.js has 490 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      /*! resol-vbus | Copyright (c) 2013-present, Daniel Wippermann | MIT license */
                      
                      const fs = require('fs');
                      const os = require('os');
                      const path = require('path');
                      Severity: Minor
                      Found in examples/vbustouch-proxy/index.js - About 7 hrs to fix

                        Function completeConfiguration has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring.
                        Open

                            async completeConfiguration(...configs) {
                                const _this = this;
                        
                                const adjustableValues = _this._getAdjustableValues();
                        
                        
                        Severity: Minor
                        Found in src/base-configuration-optimizer.js - About 7 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

                        File configuration-xml-deserializer.js has 469 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        /*! resol-vbus | Copyright (c) 2013-present, Daniel Wippermann | MIT license */
                        
                        const _ = require('lodash');
                        
                        
                        
                        Severity: Minor
                        Found in tools/configuration-importer/configuration-xml-deserializer.js - About 7 hrs to fix

                          Function _parseBuffer has 180 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              _parseBuffer(buffer) {
                                  const that = this;
                          
                                  const sliceBlock = function(name, offset, size) {
                                      if ((offset < 0) || (offset > buffer.length)) {
                          Severity: Major
                          Found in src/specification-file.js - About 7 hrs to fix

                            File vbus-recording-converter.js has 458 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            /*! resol-vbus | Copyright (c) 2013-present, Daniel Wippermann | MIT license */
                            
                            const moreints = require('buffer-more-ints');
                            
                            
                            
                            Severity: Minor
                            Found in src/vbus-recording-converter.js - About 7 hrs to fix

                              Function _getAdjustableValues has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  _getAdjustableValues() {
                                      const data = this.constructor.configurationData;
                              
                                      const typeById = (data.types || []).reduce((memo, type) => {
                                          memo [type.id] = type;
                              Severity: Minor
                              Found in src/base-configuration-optimizer.js - About 6 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

                              File base-configuration-optimizer.js has 434 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              /*! resol-vbus | Copyright (c) 2013-present, Daniel Wippermann | MIT license */
                              
                              const ConfigurationOptimizer = require('./configuration-optimizer');
                              const {
                                  isNumber,
                              Severity: Minor
                              Found in src/base-configuration-optimizer.js - About 6 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language